Created
April 1, 2024 21:49
-
-
Save lightclient/54abb2af2465d6969fa6d1920b9ad9d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
contract DepositGen { | |
event DepositEvent( | |
bytes pubkey, | |
bytes withdrawal_credentials, | |
bytes amount, | |
bytes signature, | |
bytes index | |
); | |
uint8 curr = 0; | |
receive() external payable { | |
bytes memory pubkey = new bytes(48); | |
pubkey[0] = bytes1(curr); | |
bytes memory withdrawal_credentials = new bytes(32); | |
withdrawal_credentials[0] = bytes1(curr); | |
bytes memory amount = new bytes(8); | |
amount[0] = bytes1(curr); | |
bytes memory signature = new bytes(96); | |
signature[0] = bytes1(curr); | |
bytes memory index = new bytes(8); | |
index[0] = bytes1(curr); | |
curr++; | |
emit DepositEvent(pubkey, withdrawal_credentials, amount, signature, index); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment