Last active
November 8, 2021 15:12
-
-
Save nhancv/ce3d1d7a49a55b2213e89483e1dd5548 to your computer and use it in GitHub Desktop.
AbiEncode
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: MIT | |
pragma solidity 0.8.4; | |
contract AbiEncode { | |
function encode() public pure returns (bytes memory) { | |
uint[2] memory amounts = [uint(1e18), uint(99e18)]; | |
bytes memory userData = abi.encode(0, amounts); | |
return userData; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment