Created
December 25, 2021 10:40
-
-
Save chenlongzhen/fe15a509c0343561e2341324ac624dab to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
This file contains hidden or 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.4.22 <0.9.0; | |
library TestsAccounts { | |
function getAccount(uint index) pure public returns (address) { | |
address[15] memory accounts; | |
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; | |
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; | |
accounts[2] = 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db; | |
accounts[3] = 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB; | |
accounts[4] = 0x617F2E2fD72FD9D5503197092aC168c91465E7f2; | |
accounts[5] = 0x17F6AD8Ef982297579C203069C1DbfFE4348c372; | |
accounts[6] = 0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678; | |
accounts[7] = 0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7; | |
accounts[8] = 0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C; | |
accounts[9] = 0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC; | |
accounts[10] = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c; | |
accounts[11] = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C; | |
accounts[12] = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB; | |
accounts[13] = 0x583031D1113aD414F02576BD6afaBfb302140225; | |
accounts[14] = 0xdD870fA1b7C4700F2BD7f44238821C26f7392148; | |
return accounts[index]; | |
} | |
} |
This file contains hidden or 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.4.22 <0.9.0; | |
library Assert { | |
event AssertionEvent( | |
bool passed, | |
string message, | |
string methodName | |
); | |
event AssertionEventUint( | |
bool passed, | |
string message, | |
string methodName, | |
uint256 returned, | |
uint256 expected | |
); | |
event AssertionEventInt( | |
bool passed, | |
string message, | |
string methodName, | |
int256 returned, | |
int256 expected | |
); | |
event AssertionEventBool( | |
bool passed, | |
string message, | |
string methodName, | |
bool returned, | |
bool expected | |
); | |
event AssertionEventAddress( | |
bool passed, | |
string message, | |
string methodName, | |
address returned, | |
address expected | |
); | |
event AssertionEventBytes32( | |
bool passed, | |
string message, | |
string methodName, | |
bytes32 returned, | |
bytes32 expected | |
); | |
event AssertionEventString( | |
bool passed, | |
string message, | |
string methodName, | |
string returned, | |
string expected | |
); | |
event AssertionEventUintInt( | |
bool passed, | |
string message, | |
string methodName, | |
uint256 returned, | |
int256 expected | |
); | |
event AssertionEventIntUint( | |
bool passed, | |
string message, | |
string methodName, | |
int256 returned, | |
uint256 expected | |
); | |
function ok(bool a, string memory message) public returns (bool result) { | |
result = a; | |
emit AssertionEvent(result, message, "ok"); | |
} | |
function equal(uint256 a, uint256 b, string memory message) public returns (bool result) { | |
result = (a == b); | |
emit AssertionEventUint(result, message, "equal", a, b); | |
} | |
function equal(int256 a, int256 b, string memory message) public returns (bool result) { | |
result = (a == b); | |
emit AssertionEventInt(result, message, "equal", a, b); | |
} | |
function equal(bool a, bool b, string memory message) public returns (bool result) { | |
result = (a == b); | |
emit AssertionEventBool(result, message, "equal", a, b); | |
} | |
// TODO: only for certain versions of solc | |
//function equal(fixed a, fixed b, string message) public returns (bool result) { | |
// result = (a == b); | |
// emit AssertionEvent(result, message); | |
//} | |
// TODO: only for certain versions of solc | |
//function equal(ufixed a, ufixed b, string message) public returns (bool result) { | |
// result = (a == b); | |
// emit AssertionEvent(result, message); | |
//} | |
function equal(address a, address b, string memory message) public returns (bool result) { | |
result = (a == b); | |
emit AssertionEventAddress(result, message, "equal", a, b); | |
} | |
function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) { | |
result = (a == b); | |
emit AssertionEventBytes32(result, message, "equal", a, b); | |
} | |
function equal(string memory a, string memory b, string memory message) public returns (bool result) { | |
result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))); | |
emit AssertionEventString(result, message, "equal", a, b); | |
} | |
function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) { | |
result = (a != b); | |
emit AssertionEventUint(result, message, "notEqual", a, b); | |
} | |
function notEqual(int256 a, int256 b, string memory message) public returns (bool result) { | |
result = (a != b); | |
emit AssertionEventInt(result, message, "notEqual", a, b); | |
} | |
function notEqual(bool a, bool b, string memory message) public returns (bool result) { | |
result = (a != b); | |
emit AssertionEventBool(result, message, "notEqual", a, b); | |
} | |
// TODO: only for certain versions of solc | |
//function notEqual(fixed a, fixed b, string message) public returns (bool result) { | |
// result = (a != b); | |
// emit AssertionEvent(result, message); | |
//} | |
// TODO: only for certain versions of solc | |
//function notEqual(ufixed a, ufixed b, string message) public returns (bool result) { | |
// result = (a != b); | |
// emit AssertionEvent(result, message); | |
//} | |
function notEqual(address a, address b, string memory message) public returns (bool result) { | |
result = (a != b); | |
emit AssertionEventAddress(result, message, "notEqual", a, b); | |
} | |
function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) { | |
result = (a != b); | |
emit AssertionEventBytes32(result, message, "notEqual", a, b); | |
} | |
function notEqual(string memory a, string memory b, string memory message) public returns (bool result) { | |
result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))); | |
emit AssertionEventString(result, message, "notEqual", a, b); | |
} | |
/*----------------- Greater than --------------------*/ | |
function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) { | |
result = (a > b); | |
emit AssertionEventUint(result, message, "greaterThan", a, b); | |
} | |
function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) { | |
result = (a > b); | |
emit AssertionEventInt(result, message, "greaterThan", a, b); | |
} | |
// TODO: safely compare between uint and int | |
function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) { | |
if(b < int(0)) { | |
// int is negative uint "a" always greater | |
result = true; | |
} else { | |
result = (a > uint(b)); | |
} | |
emit AssertionEventUintInt(result, message, "greaterThan", a, b); | |
} | |
function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) { | |
if(a < int(0)) { | |
// int is negative uint "b" always greater | |
result = false; | |
} else { | |
result = (uint(a) > b); | |
} | |
emit AssertionEventIntUint(result, message, "greaterThan", a, b); | |
} | |
/*----------------- Lesser than --------------------*/ | |
function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) { | |
result = (a < b); | |
emit AssertionEventUint(result, message, "lesserThan", a, b); | |
} | |
function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) { | |
result = (a < b); | |
emit AssertionEventInt(result, message, "lesserThan", a, b); | |
} | |
// TODO: safely compare between uint and int | |
function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) { | |
if(b < int(0)) { | |
// int is negative int "b" always lesser | |
result = false; | |
} else { | |
result = (a < uint(b)); | |
} | |
emit AssertionEventUintInt(result, message, "lesserThan", a, b); | |
} | |
function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) { | |
if(a < int(0)) { | |
// int is negative int "a" always lesser | |
result = true; | |
} else { | |
result = (uint(a) < b); | |
} | |
emit AssertionEventIntUint(result, message, "lesserThan", a, b); | |
} | |
} |
This file contains hidden or 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
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS | |
The 'scripts' folder contains example async/await scripts for deploying the 'Storage' contract. | |
For the deployment of any other contract, 'contractName' and 'constructorArgs' should be updated (along with other code if required). | |
Scripts have full access to the web3.js and ethers.js libraries. | |
To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled. | |
Output from script will appear in remix terminal. |
This file contains hidden or 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"ropsten:3": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"rinkeby:4": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"kovan:42": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"görli:5": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"Custom": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
} | |
}, | |
"data": { | |
"bytecode": { | |
"generatedSources": [], | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b50610250806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80632e1a7d4d14610046578063b69ef8a814610062578063b6b55f2514610080575b600080fd5b610060600480360381019061005b91906100ed565b61009c565b005b61006a6100b7565b6040516100779190610125565b60405180910390f35b61009a600480360381019061009591906100ed565b6100bd565b005b806000808282546100ad9190610196565b9250508190555050565b60005481565b806000808282546100ce9190610140565b9250508190555050565b6000813590506100e781610203565b92915050565b6000602082840312156100ff57600080fd5b600061010d848285016100d8565b91505092915050565b61011f816101ca565b82525050565b600060208201905061013a6000830184610116565b92915050565b600061014b826101ca565b9150610156836101ca565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561018b5761018a6101d4565b5b828201905092915050565b60006101a1826101ca565b91506101ac836101ca565b9250828210156101bf576101be6101d4565b5b828203905092915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61020c816101ca565b811461021757600080fd5b5056fea2646970667358221220e898ea1436a2b3846fd8648c54d2c0e2fc1a4d8ba3e34e4a28017736498b72a464736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x250 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0x62 JUMPI DUP1 PUSH4 0xB6B55F25 EQ PUSH2 0x80 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x60 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x5B SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST PUSH2 0x9C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x6A PUSH2 0xB7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x77 SWAP2 SWAP1 PUSH2 0x125 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x9A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x95 SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST PUSH2 0xBD JUMP JUMPDEST STOP JUMPDEST DUP1 PUSH1 0x0 DUP1 DUP3 DUP3 SLOAD PUSH2 0xAD SWAP2 SWAP1 PUSH2 0x196 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP1 DUP3 DUP3 SLOAD PUSH2 0xCE SWAP2 SWAP1 PUSH2 0x140 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE7 DUP2 PUSH2 0x203 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xFF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x10D DUP5 DUP3 DUP6 ADD PUSH2 0xD8 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x11F DUP2 PUSH2 0x1CA JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x13A PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x116 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x14B DUP3 PUSH2 0x1CA JUMP JUMPDEST SWAP2 POP PUSH2 0x156 DUP4 PUSH2 0x1CA JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x18B JUMPI PUSH2 0x18A PUSH2 0x1D4 JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A1 DUP3 PUSH2 0x1CA JUMP JUMPDEST SWAP2 POP PUSH2 0x1AC DUP4 PUSH2 0x1CA JUMP JUMPDEST SWAP3 POP DUP3 DUP3 LT ISZERO PUSH2 0x1BF JUMPI PUSH2 0x1BE PUSH2 0x1D4 JUMP JUMPDEST JUMPDEST DUP3 DUP3 SUB SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x20C DUP2 PUSH2 0x1CA JUMP JUMPDEST DUP2 EQ PUSH2 0x217 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE8 SWAP9 0xEA EQ CALLDATASIZE LOG2 0xB3 DUP5 PUSH16 0xD8648C54D2C0E2FC1A4D8BA3E34E4A28 ADD PUSH24 0x36498B72A464736F6C634300080400330000000000000000 ", | |
"sourceMap": "23:212:0:-:0;;;;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:1674:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "59:87:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "69:29:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "91:6:1" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "78:12:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "78:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "69:5:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "134:5:1" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "107:26:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "107:33:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "107:33:1" | |
} | |
] | |
}, | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "37:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "45:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "53:5:1", | |
"type": "" | |
} | |
], | |
"src": "7:139:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "218:196:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "264:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "273:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "276:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "266:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "266:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "266:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "239:7:1" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "248:9:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "235:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "235:23:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "260:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "231:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "231:32:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "228:2:1" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "290:117:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "305:15:1", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "319:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "309:6:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "334:63:1", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "369:9:1" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "380:6:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "365:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "365:22:1" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "389:7:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "344:20:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "344:53:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "334:6:1" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "188:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "199:7:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "211:6:1", | |
"type": "" | |
} | |
], | |
"src": "152:262:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "485:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "502:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "525:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "507:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "507:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "495:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "495:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "495:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "473:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "480:3:1", | |
"type": "" | |
} | |
], | |
"src": "420:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "642:124:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "652:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "664:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "675:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "660:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "660:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "652:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "732:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "745:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "756:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "741:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "741:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "688:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "688:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "688:71:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "614:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "626:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "637:4:1", | |
"type": "" | |
} | |
], | |
"src": "544:222:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "816:261:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "826:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "849:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "831:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "831:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "826:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "860:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "883:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "865:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "865:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "860:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1023:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1025:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1025:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1025:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "944:1:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "951:66:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1019:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "947:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "947:74:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "941:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "941:81:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "938:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1055:16:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1066:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1069:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1062:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1062:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulIdentifier", | |
"src": "1055:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_add_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "803:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "806:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulTypedName", | |
"src": "812:3:1", | |
"type": "" | |
} | |
], | |
"src": "772:305:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1128:146:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1138:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1161:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1143:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1143:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1138:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1172:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1195:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1177:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1177:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1172:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1219:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1221:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1221:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1221:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1213:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1216:1:1" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1210:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1210:8:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1207:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1251:17:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1263:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1266:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "1259:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1259:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "diff", | |
"nodeType": "YulIdentifier", | |
"src": "1251:4:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_sub_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "1114:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "1117:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "diff", | |
"nodeType": "YulTypedName", | |
"src": "1123:4:1", | |
"type": "" | |
} | |
], | |
"src": "1083:191:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1325:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1335:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1346:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1335:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1307:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1317:7:1", | |
"type": "" | |
} | |
], | |
"src": "1280:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1391:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1408:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1411:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1401:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1401:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1401:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1505:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1508:4:1", | |
"type": "", | |
"value": "0x11" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1498:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1498:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1498:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1529:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1532:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1522:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1522:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1522:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x11", | |
"nodeType": "YulFunctionDefinition", | |
"src": "1363:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1592:79:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1649:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1658:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1661:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1651:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1651:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1651:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1615:5:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1640:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1622:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1622:24:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "1612:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1612:35:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1605:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1605:43:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1602:2:1" | |
} | |
] | |
}, | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1585:5:1", | |
"type": "" | |
} | |
], | |
"src": "1549:122:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function checked_sub_t_uint256(x, y) -> diff {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n if lt(x, y) { panic_error_0x11() }\n\n diff := sub(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b50600436106100415760003560e01c80632e1a7d4d14610046578063b69ef8a814610062578063b6b55f2514610080575b600080fd5b610060600480360381019061005b91906100ed565b61009c565b005b61006a6100b7565b6040516100779190610125565b60405180910390f35b61009a600480360381019061009591906100ed565b6100bd565b005b806000808282546100ad9190610196565b9250508190555050565b60005481565b806000808282546100ce9190610140565b9250508190555050565b6000813590506100e781610203565b92915050565b6000602082840312156100ff57600080fd5b600061010d848285016100d8565b91505092915050565b61011f816101ca565b82525050565b600060208201905061013a6000830184610116565b92915050565b600061014b826101ca565b9150610156836101ca565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561018b5761018a6101d4565b5b828201905092915050565b60006101a1826101ca565b91506101ac836101ca565b9250828210156101bf576101be6101d4565b5b828203905092915050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61020c816101ca565b811461021757600080fd5b5056fea2646970667358221220e898ea1436a2b3846fd8648c54d2c0e2fc1a4d8ba3e34e4a28017736498b72a464736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x46 JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0x62 JUMPI DUP1 PUSH4 0xB6B55F25 EQ PUSH2 0x80 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x60 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x5B SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST PUSH2 0x9C JUMP JUMPDEST STOP JUMPDEST PUSH2 0x6A PUSH2 0xB7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x77 SWAP2 SWAP1 PUSH2 0x125 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x9A PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x95 SWAP2 SWAP1 PUSH2 0xED JUMP JUMPDEST PUSH2 0xBD JUMP JUMPDEST STOP JUMPDEST DUP1 PUSH1 0x0 DUP1 DUP3 DUP3 SLOAD PUSH2 0xAD SWAP2 SWAP1 PUSH2 0x196 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP1 DUP3 DUP3 SLOAD PUSH2 0xCE SWAP2 SWAP1 PUSH2 0x140 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xE7 DUP2 PUSH2 0x203 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xFF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x10D DUP5 DUP3 DUP6 ADD PUSH2 0xD8 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x11F DUP2 PUSH2 0x1CA JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x13A PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x116 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x14B DUP3 PUSH2 0x1CA JUMP JUMPDEST SWAP2 POP PUSH2 0x156 DUP4 PUSH2 0x1CA JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x18B JUMPI PUSH2 0x18A PUSH2 0x1D4 JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1A1 DUP3 PUSH2 0x1CA JUMP JUMPDEST SWAP2 POP PUSH2 0x1AC DUP4 PUSH2 0x1CA JUMP JUMPDEST SWAP3 POP DUP3 DUP3 LT ISZERO PUSH2 0x1BF JUMPI PUSH2 0x1BE PUSH2 0x1D4 JUMP JUMPDEST JUMPDEST DUP3 DUP3 SUB SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x20C DUP2 PUSH2 0x1CA JUMP JUMPDEST DUP2 EQ PUSH2 0x217 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xE8 SWAP9 0xEA EQ CALLDATASIZE LOG2 0xB3 DUP5 PUSH16 0xD8648C54D2C0E2FC1A4D8BA3E34E4A28 ADD PUSH24 0x36498B72A464736F6C634300080400330000000000000000 ", | |
"sourceMap": "23:212:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;156:77;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;44:22;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;73:76;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;156:77;219:7;208;;:18;;;;;;;:::i;:::-;;;;;;;;156:77;:::o;44:22::-;;;;:::o;73:76::-;135:7;124;;:18;;;;;;;:::i;:::-;;;;;;;;73:76;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:262::-;211:6;260:2;248:9;239:7;235:23;231:32;228:2;;;276:1;273;266:12;228:2;319:1;344:53;389:7;380:6;369:9;365:22;344:53;:::i;:::-;334:63;;290:117;218:196;;;;:::o;420:118::-;507:24;525:5;507:24;:::i;:::-;502:3;495:37;485:53;;:::o;544:222::-;637:4;675:2;664:9;660:18;652:26;;688:71;756:1;745:9;741:17;732:6;688:71;:::i;:::-;642:124;;;;:::o;772:305::-;812:3;831:20;849:1;831:20;:::i;:::-;826:25;;865:20;883:1;865:20;:::i;:::-;860:25;;1019:1;951:66;947:74;944:1;941:81;938:2;;;1025:18;;:::i;:::-;938:2;1069:1;1066;1062:9;1055:16;;816:261;;;;:::o;1083:191::-;1123:4;1143:20;1161:1;1143:20;:::i;:::-;1138:25;;1177:20;1195:1;1177:20;:::i;:::-;1172:25;;1216:1;1213;1210:8;1207:2;;;1221:18;;:::i;:::-;1207:2;1266:1;1263;1259:9;1251:17;;1128:146;;;;:::o;1280:77::-;1317:7;1346:5;1335:16;;1325:32;;;:::o;1363:180::-;1411:77;1408:1;1401:88;1508:4;1505:1;1498:15;1532:4;1529:1;1522:15;1549:122;1622:24;1640:5;1622:24;:::i;:::-;1615:5;1612:35;1602:2;;1661:1;1658;1651:12;1602:2;1592:79;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "118400", | |
"executionCost": "165", | |
"totalCost": "118565" | |
}, | |
"external": { | |
"balance()": "1129", | |
"deposit(uint256)": "infinite", | |
"withdraw(uint256)": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"balance()": "b69ef8a8", | |
"deposit(uint256)": "b6b55f25", | |
"withdraw(uint256)": "2e1a7d4d" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "balance", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_amount", | |
"type": "uint256" | |
} | |
], | |
"name": "deposit", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_amount", | |
"type": "uint256" | |
} | |
], | |
"name": "withdraw", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains hidden or 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
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "balance", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_amount", | |
"type": "uint256" | |
} | |
], | |
"name": "deposit", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_amount", | |
"type": "uint256" | |
} | |
], | |
"name": "withdraw", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"error.sol": "Error" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"error.sol": { | |
"keccak256": "0xb5b854296319ad0009577123c3b2ec7d63d3f384adc5e512431d6a5492b3ed6f", | |
"urls": [ | |
"bzz-raw://3d995c8860a0161946ac799c83366ec79c19aad436437a080268c2adbc6b7ad5", | |
"dweb:/ipfs/QmZsbUWzaj9ybCub5sVzhxjZYMesTA9a5NM8h6tfHFzdN8" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains hidden or 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"ropsten:3": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"rinkeby:4": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"kovan:42": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"görli:5": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"Custom": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
} | |
}, | |
"data": { | |
"bytecode": { | |
"generatedSources": [], | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b5061012e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063f8a8fd6d14602d575b600080fd5b60336035565b005b7f939d3e7a25bb12381cae7d37cc5817330e2f4589879f451ee2d30087ad1dfe9b33606460405160659291906089565b60405180910390a1565b60768160ae565b82525050565b60838160e8565b82525050565b6000604082019050609c6000830185606f565b60a76020830184607c565b9392505050565b600060b78260be565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060f18260de565b905091905056fea2646970667358221220ba3aea99f9abd393ce6cf383c7361975de08e6cc1a2a814ee7af7cd6d4710ccc64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x12E DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xF8A8FD6D EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x35 JUMP JUMPDEST STOP JUMPDEST PUSH32 0x939D3E7A25BB12381CAE7D37CC5817330E2F4589879F451EE2D30087AD1DFE9B CALLER PUSH1 0x64 PUSH1 0x40 MLOAD PUSH1 0x65 SWAP3 SWAP2 SWAP1 PUSH1 0x89 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x76 DUP2 PUSH1 0xAE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x83 DUP2 PUSH1 0xE8 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH1 0x9C PUSH1 0x0 DUP4 ADD DUP6 PUSH1 0x6F JUMP JUMPDEST PUSH1 0xA7 PUSH1 0x20 DUP4 ADD DUP5 PUSH1 0x7C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xB7 DUP3 PUSH1 0xBE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xF1 DUP3 PUSH1 0xDE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBA GASPRICE 0xEA SWAP10 0xF9 0xAB 0xD3 SWAP4 0xCE PUSH13 0xF383C7361975DE08E6CC1A2A81 0x4E 0xE7 0xAF PUSH29 0xD6D4710CCC64736F6C6343000804003300000000000000000000000000 ", | |
"sourceMap": "23:138:0:-:0;;;;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:1089:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "72:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "89:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "112:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "94:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "94:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "82:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "82:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "82:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "60:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "67:3:1", | |
"type": "" | |
} | |
], | |
"src": "7:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "206:76:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "223:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "269:5:1" | |
} | |
], | |
"functionName": { | |
"name": "convert_t_rational_100_by_1_to_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "228:40:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "228:47:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "216:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "216:60:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "216:60:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_rational_100_by_1_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "194:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "201:3:1", | |
"type": "" | |
} | |
], | |
"src": "131:151:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "424:216:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "434:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "446:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "457:2:1", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "442:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "442:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "434:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "514:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "527:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "538:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "523:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "523:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "470:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "470:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "470:71:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "605:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "618:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "629:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "614:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "614:18:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_rational_100_by_1_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "551:53:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "551:82:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "551:82:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_address_t_rational_100_by_1__to_t_address_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "388:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "400:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "408:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "419:4:1", | |
"type": "" | |
} | |
], | |
"src": "288:352:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "691:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "701:35:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "730:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "712:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "712:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "701:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "673:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "683:7:1", | |
"type": "" | |
} | |
], | |
"src": "646:96:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "793:81:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "803:65:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "818:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "825:42:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "814:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "814:54:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "803:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "775:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "785:7:1", | |
"type": "" | |
} | |
], | |
"src": "748:126:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "925:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "935:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "946:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "935:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "907:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "917:7:1", | |
"type": "" | |
} | |
], | |
"src": "880:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1033:53:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1043:37:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1074:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1056:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1056:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "converted", | |
"nodeType": "YulIdentifier", | |
"src": "1043:9:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "convert_t_rational_100_by_1_to_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1013:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "converted", | |
"nodeType": "YulTypedName", | |
"src": "1023:9:1", | |
"type": "" | |
} | |
], | |
"src": "963:123:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_t_rational_100_by_1_to_t_uint256_fromStack(value, pos) {\n mstore(pos, convert_t_rational_100_by_1_to_t_uint256(value))\n }\n\n function abi_encode_tuple_t_address_t_rational_100_by_1__to_t_address_t_uint256__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_rational_100_by_1_to_t_uint256_fromStack(value1, add(headStart, 32))\n\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function convert_t_rational_100_by_1_to_t_uint256(value) -> converted {\n converted := cleanup_t_uint256(value)\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "6080604052348015600f57600080fd5b506004361060285760003560e01c8063f8a8fd6d14602d575b600080fd5b60336035565b005b7f939d3e7a25bb12381cae7d37cc5817330e2f4589879f451ee2d30087ad1dfe9b33606460405160659291906089565b60405180910390a1565b60768160ae565b82525050565b60838160e8565b82525050565b6000604082019050609c6000830185606f565b60a76020830184607c565b9392505050565b600060b78260be565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060f18260de565b905091905056fea2646970667358221220ba3aea99f9abd393ce6cf383c7361975de08e6cc1a2a814ee7af7cd6d4710ccc64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xF8A8FD6D EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x35 JUMP JUMPDEST STOP JUMPDEST PUSH32 0x939D3E7A25BB12381CAE7D37CC5817330E2F4589879F451EE2D30087AD1DFE9B CALLER PUSH1 0x64 PUSH1 0x40 MLOAD PUSH1 0x65 SWAP3 SWAP2 SWAP1 PUSH1 0x89 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x76 DUP2 PUSH1 0xAE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x83 DUP2 PUSH1 0xE8 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH1 0x9C PUSH1 0x0 DUP4 ADD DUP6 PUSH1 0x6F JUMP JUMPDEST PUSH1 0xA7 PUSH1 0x20 DUP4 ADD DUP5 PUSH1 0x7C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xB7 DUP3 PUSH1 0xBE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xF1 DUP3 PUSH1 0xDE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xBA GASPRICE 0xEA SWAP10 0xF9 0xAB 0xD3 SWAP4 0xCE PUSH13 0xF383C7361975DE08E6CC1A2A81 0x4E 0xE7 0xAF PUSH29 0xD6D4710CCC64736F6C6343000804003300000000000000000000000000 ", | |
"sourceMap": "23:138:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;92:67;;;:::i;:::-;;;131:21;136:10;148:3;131:21;;;;;;;:::i;:::-;;;;;;;;92:67::o;7:118:1:-;94:24;112:5;94:24;:::i;:::-;89:3;82:37;72:53;;:::o;131:151::-;228:47;269:5;228:47;:::i;:::-;223:3;216:60;206:76;;:::o;288:352::-;419:4;457:2;446:9;442:18;434:26;;470:71;538:1;527:9;523:17;514:6;470:71;:::i;:::-;551:82;629:2;618:9;614:18;605:6;551:82;:::i;:::-;424:216;;;;;:::o;646:96::-;683:7;712:24;730:5;712:24;:::i;:::-;701:35;;691:51;;;:::o;748:126::-;785:7;825:42;818:5;814:54;803:65;;793:81;;;:::o;880:77::-;917:7;946:5;935:16;;925:32;;;:::o;963:123::-;1023:9;1056:24;1074:5;1056:24;:::i;:::-;1043:37;;1033:53;;;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "60400", | |
"executionCost": "111", | |
"totalCost": "60511" | |
}, | |
"external": { | |
"test()": "1763" | |
} | |
}, | |
"methodIdentifiers": { | |
"test()": "f8a8fd6d" | |
} | |
}, | |
"abi": [ | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "sender", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "value", | |
"type": "uint256" | |
} | |
], | |
"name": "Log1", | |
"type": "event" | |
}, | |
{ | |
"inputs": [], | |
"name": "test", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains hidden or 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
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": false, | |
"internalType": "address", | |
"name": "sender", | |
"type": "address" | |
}, | |
{ | |
"indexed": false, | |
"internalType": "uint256", | |
"name": "value", | |
"type": "uint256" | |
} | |
], | |
"name": "Log1", | |
"type": "event" | |
}, | |
{ | |
"inputs": [], | |
"name": "test", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"Event.sol": "Event" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"Event.sol": { | |
"keccak256": "0x430f30637e1ec19098467f4c622476870e227c482a2daa35ef1e1b49b972661a", | |
"urls": [ | |
"bzz-raw://75c17f015f7c8f9ed9e217736d9d6cc629fa299b35c9a214775b57f537e90665", | |
"dweb:/ipfs/QmS6wWnjZ5NJmrSFkHt3grz6hnewvzcXh6aP89x7ujKWDh" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains hidden or 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"ropsten:3": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"rinkeby:4": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"kovan:42": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"görli:5": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"Custom": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
} | |
}, | |
"data": { | |
"bytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:516:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "58:269:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "68:22:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "82:4:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "88:1:1", | |
"type": "", | |
"value": "2" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "78:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "78:12:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "68:6:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "99:38:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "129:4:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "135:1:1", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "125:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "125:12:1" | |
}, | |
"variables": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulTypedName", | |
"src": "103:18:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "176:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "190:27:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "204:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "212:4:1", | |
"type": "", | |
"value": "0x7f" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "200:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "200:17:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "190:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "156:18:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "149:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "149:26:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "146:2:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "279:42:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x22", | |
"nodeType": "YulIdentifier", | |
"src": "293:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "293:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "293:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "243:18:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "266:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "274:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "263:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "263:14:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "240:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "240:38:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "237:2:1" | |
} | |
] | |
}, | |
"name": "extract_byte_array_length", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "42:4:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "51:6:1", | |
"type": "" | |
} | |
], | |
"src": "7:320:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "361:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "378:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "381:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "371:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "371:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "371:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "475:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "478:4:1", | |
"type": "", | |
"value": "0x22" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "468:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "468:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "468:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "499:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "502:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "492:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "492:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "492:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x22", | |
"nodeType": "YulFunctionDefinition", | |
"src": "333:180:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"linkReferences": {}, | |
"object": "60806040526040518060400160405280600c81526020017f48656c6c6f20576f726c642100000000000000000000000000000000000000008152506000908051906020019061004f929190610062565b5034801561005c57600080fd5b50610166565b82805461006e90610105565b90600052602060002090601f01602090048101928261009057600085556100d7565b82601f106100a957805160ff19168380011785556100d7565b828001600101855582156100d7579182015b828111156100d65782518255916020019190600101906100bb565b5b5090506100e491906100e8565b5090565b5b808211156101015760008160009055506001016100e9565b5090565b6000600282049050600182168061011d57607f821691505b6020821081141561013157610130610137565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b61022e806101756000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063cfae321714610030575b600080fd5b61003861004e565b6040516100459190610115565b60405180910390f35b6000805461005b90610186565b80601f016020809104026020016040519081016040528092919081815260200182805461008790610186565b80156100d45780601f106100a9576101008083540402835291602001916100d4565b820191906000526020600020905b8154815290600101906020018083116100b757829003601f168201915b505050505081565b60006100e782610137565b6100f18185610142565b9350610101818560208601610153565b61010a816101e7565b840191505092915050565b6000602082019050818103600083015261012f81846100dc565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610171578082015181840152602081019050610156565b83811115610180576000848401525b50505050565b6000600282049050600182168061019e57607f821691505b602082108114156101b2576101b16101b8565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f830116905091905056fea264697066735822122056da68d19b955bec717f0e7756b119fb9e959fce8c20398cecf1021a68c859a864736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xC DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x48656C6C6F20576F726C64210000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x4F SWAP3 SWAP2 SWAP1 PUSH2 0x62 JUMP JUMPDEST POP CALLVALUE DUP1 ISZERO PUSH2 0x5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x166 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x6E SWAP1 PUSH2 0x105 JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x90 JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0xD7 JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0xA9 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0xD7 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0xD7 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0xD6 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0xBB JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0xE4 SWAP2 SWAP1 PUSH2 0xE8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x101 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0xE9 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x11D JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x131 JUMPI PUSH2 0x130 PUSH2 0x137 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x22E DUP1 PUSH2 0x175 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xCFAE3217 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x38 PUSH2 0x4E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x115 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH2 0x5B SWAP1 PUSH2 0x186 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x87 SWAP1 PUSH2 0x186 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xD4 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xA9 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xD4 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xB7 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE7 DUP3 PUSH2 0x137 JUMP JUMPDEST PUSH2 0xF1 DUP2 DUP6 PUSH2 0x142 JUMP JUMPDEST SWAP4 POP PUSH2 0x101 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x153 JUMP JUMPDEST PUSH2 0x10A DUP2 PUSH2 0x1E7 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x12F DUP2 DUP5 PUSH2 0xDC JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x171 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x156 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x180 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x19E JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x1B2 JUMPI PUSH2 0x1B1 PUSH2 0x1B8 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 JUMP 0xDA PUSH9 0xD19B955BEC717F0E77 JUMP 0xB1 NOT 0xFB SWAP15 SWAP6 SWAP16 0xCE DUP13 KECCAK256 CODECOPY DUP13 0xEC CALL MUL BYTE PUSH9 0xC859A864736F6C6343 STOP ADDMOD DIV STOP CALLER ", | |
"sourceMap": "25:66:0:-:0;;;50:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;25:66;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:320:1:-;51:6;88:1;82:4;78:12;68:22;;135:1;129:4;125:12;156:18;146:2;;212:4;204:6;200:17;190:27;;146:2;274;266:6;263:14;243:18;240:38;237:2;;;293:18;;:::i;:::-;237:2;58:269;;;;:::o;333:180::-;381:77;378:1;371:88;478:4;475:1;468:15;502:4;499:1;492:15;25:66:0;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:1906:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "99:272:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "109:53:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "156:5:1" | |
} | |
], | |
"functionName": { | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "123:32:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "123:39:1" | |
}, | |
"variables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "113:6:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "171:78:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "237:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "242:6:1" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "178:58:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "178:71:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "171:3:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "284:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "291:4:1", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "280:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "280:16:1" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "298:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "303:6:1" | |
} | |
], | |
"functionName": { | |
"name": "copy_memory_to_memory", | |
"nodeType": "YulIdentifier", | |
"src": "258:21:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "258:52:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "258:52:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "319:46:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "330:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "357:6:1" | |
} | |
], | |
"functionName": { | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulIdentifier", | |
"src": "335:21:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "335:29:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "326:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "326:39:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "319:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "80:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "87:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "95:3:1", | |
"type": "" | |
} | |
], | |
"src": "7:364:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "495:195:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "505:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "517:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "528:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "513:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "513:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "505:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "552:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "563:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "548:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "548:17:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "571:4:1" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "577:9:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "567:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "567:20:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "541:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "541:47:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "541:47:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "597:86:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "669:6:1" | |
}, | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "678:4:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "605:63:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "605:78:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "597:4:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "467:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "479:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "490:4:1", | |
"type": "" | |
} | |
], | |
"src": "377:313:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "755:40:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "766:22:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "782:5:1" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "776:5:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "776:12:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "766:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "738:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "748:6:1", | |
"type": "" | |
} | |
], | |
"src": "696:99:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "897:73:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "914:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "919:6:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "907:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "907:19:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "907:19:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "935:29:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "954:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "959:4:1", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "950:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "950:14:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulIdentifier", | |
"src": "935:11:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "869:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "874:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulTypedName", | |
"src": "885:11:1", | |
"type": "" | |
} | |
], | |
"src": "801:169:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1025:258:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1035:10:1", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1044:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "i", | |
"nodeType": "YulTypedName", | |
"src": "1039:1:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1104:63:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "1129:3:1" | |
}, | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1134:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1125:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1125:11:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "1148:3:1" | |
}, | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1153:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1144:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1144:11:1" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "1138:5:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1138:18:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1118:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1118:39:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1118:39:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1065:1:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1068:6:1" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1062:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1062:13:1" | |
}, | |
"nodeType": "YulForLoop", | |
"post": { | |
"nodeType": "YulBlock", | |
"src": "1076:19:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1078:15:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1087:1:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1090:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1083:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1083:10:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1078:1:1" | |
} | |
] | |
} | |
] | |
}, | |
"pre": { | |
"nodeType": "YulBlock", | |
"src": "1058:3:1", | |
"statements": [] | |
}, | |
"src": "1054:113:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1201:76:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "1251:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1256:6:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1247:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1247:16:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1265:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1240:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1240:27:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1240:27:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1182:1:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1185:6:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "1179:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1179:13:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1176:2:1" | |
} | |
] | |
}, | |
"name": "copy_memory_to_memory", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "1007:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "dst", | |
"nodeType": "YulTypedName", | |
"src": "1012:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1017:6:1", | |
"type": "" | |
} | |
], | |
"src": "976:307:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1340:269:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1350:22:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "1364:4:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1370:1:1", | |
"type": "", | |
"value": "2" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "1360:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1360:12:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1350:6:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1381:38:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "1411:4:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1417:1:1", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1407:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1407:12:1" | |
}, | |
"variables": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulTypedName", | |
"src": "1385:18:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1458:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1472:27:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1486:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1494:4:1", | |
"type": "", | |
"value": "0x7f" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1482:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1482:17:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1472:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "1438:18:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1431:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1431:26:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1428:2:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1561:42:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x22", | |
"nodeType": "YulIdentifier", | |
"src": "1575:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1575:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1575:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "1525:18:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1548:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1556:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1545:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1545:14:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "1522:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1522:38:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1519:2:1" | |
} | |
] | |
}, | |
"name": "extract_byte_array_length", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "1324:4:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1333:6:1", | |
"type": "" | |
} | |
], | |
"src": "1289:320:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1643:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1660:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1663:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1653:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1653:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1653:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1757:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1760:4:1", | |
"type": "", | |
"value": "0x22" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1750:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1750:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1750:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1781:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1784:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1774:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1774:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1774:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x22", | |
"nodeType": "YulFunctionDefinition", | |
"src": "1615:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1849:54:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1859:38:1", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1877:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1884:2:1", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1873:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1873:14:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1893:2:1", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "1889:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1889:7:1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1869:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1869:28:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "1859:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1832:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "1842:6:1", | |
"type": "" | |
} | |
], | |
"src": "1801:102:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b506004361061002b5760003560e01c8063cfae321714610030575b600080fd5b61003861004e565b6040516100459190610115565b60405180910390f35b6000805461005b90610186565b80601f016020809104026020016040519081016040528092919081815260200182805461008790610186565b80156100d45780601f106100a9576101008083540402835291602001916100d4565b820191906000526020600020905b8154815290600101906020018083116100b757829003601f168201915b505050505081565b60006100e782610137565b6100f18185610142565b9350610101818560208601610153565b61010a816101e7565b840191505092915050565b6000602082019050818103600083015261012f81846100dc565b905092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610171578082015181840152602081019050610156565b83811115610180576000848401525b50505050565b6000600282049050600182168061019e57607f821691505b602082108114156101b2576101b16101b8565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f830116905091905056fea264697066735822122056da68d19b955bec717f0e7756b119fb9e959fce8c20398cecf1021a68c859a864736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2B JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0xCFAE3217 EQ PUSH2 0x30 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x38 PUSH2 0x4E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x45 SWAP2 SWAP1 PUSH2 0x115 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH2 0x5B SWAP1 PUSH2 0x186 JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x87 SWAP1 PUSH2 0x186 JUMP JUMPDEST DUP1 ISZERO PUSH2 0xD4 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xA9 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xD4 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xB7 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0xE7 DUP3 PUSH2 0x137 JUMP JUMPDEST PUSH2 0xF1 DUP2 DUP6 PUSH2 0x142 JUMP JUMPDEST SWAP4 POP PUSH2 0x101 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x153 JUMP JUMPDEST PUSH2 0x10A DUP2 PUSH2 0x1E7 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x12F DUP2 DUP5 PUSH2 0xDC JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x171 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x156 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x180 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x19E JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x1B2 JUMPI PUSH2 0x1B1 PUSH2 0x1B8 JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 JUMP 0xDA PUSH9 0xD19B955BEC717F0E77 JUMP 0xB1 NOT 0xFB SWAP15 SWAP6 SWAP16 0xCE DUP13 KECCAK256 CODECOPY DUP13 0xEC CALL MUL BYTE PUSH9 0xC859A864736F6C6343 STOP ADDMOD DIV STOP CALLER ", | |
"sourceMap": "25:66:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:37;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:364:1:-;95:3;123:39;156:5;123:39;:::i;:::-;178:71;242:6;237:3;178:71;:::i;:::-;171:78;;258:52;303:6;298:3;291:4;284:5;280:16;258:52;:::i;:::-;335:29;357:6;335:29;:::i;:::-;330:3;326:39;319:46;;99:272;;;;;:::o;377:313::-;490:4;528:2;517:9;513:18;505:26;;577:9;571:4;567:20;563:1;552:9;548:17;541:47;605:78;678:4;669:6;605:78;:::i;:::-;597:86;;495:195;;;;:::o;696:99::-;748:6;782:5;776:12;766:22;;755:40;;;:::o;801:169::-;885:11;919:6;914:3;907:19;959:4;954:3;950:14;935:29;;897:73;;;;:::o;976:307::-;1044:1;1054:113;1068:6;1065:1;1062:13;1054:113;;;1153:1;1148:3;1144:11;1138:18;1134:1;1129:3;1125:11;1118:39;1090:2;1087:1;1083:10;1078:15;;1054:113;;;1185:6;1182:1;1179:13;1176:2;;;1265:1;1256:6;1251:3;1247:16;1240:27;1176:2;1025:258;;;;:::o;1289:320::-;1333:6;1370:1;1364:4;1360:12;1350:22;;1417:1;1411:4;1407:12;1438:18;1428:2;;1494:4;1486:6;1482:17;1472:27;;1428:2;1556;1548:6;1545:14;1525:18;1522:38;1519:2;;;1575:18;;:::i;:::-;1519:2;1340:269;;;;:::o;1615:180::-;1663:77;1660:1;1653:88;1760:4;1757:1;1750:15;1784:4;1781:1;1774:15;1801:102;1842:6;1893:2;1889:7;1884:2;1877:5;1873:14;1869:28;1859:38;;1849:54;;;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "111600", | |
"executionCost": "infinite", | |
"totalCost": "infinite" | |
}, | |
"external": { | |
"greet()": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"greet()": "cfae3217" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "greet", | |
"outputs": [ | |
{ | |
"internalType": "string", | |
"name": "", | |
"type": "string" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
} | |
] | |
} |
This file contains hidden or 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
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "greet", | |
"outputs": [ | |
{ | |
"internalType": "string", | |
"name": "", | |
"type": "string" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"hello.sol": "HelloWorld" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"hello.sol": { | |
"keccak256": "0x415ace29c97c8e66755bc52961ae1d9d5f8d3d825b1b3f320eeb697491b44e3b", | |
"urls": [ | |
"bzz-raw://d41a6f00f6e735e05be438238ca18f1591fa9eb9b2e88fa18f584485841041cc", | |
"dweb:/ipfs/QmbvM1Mj5W8NTzhbSjYBmvcC7kYXNwM2fEzfPAh9pENVct" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains hidden or 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"ropsten:3": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"rinkeby:4": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"kovan:42": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"görli:5": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"Custom": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
} | |
}, | |
"data": { | |
"bytecode": { | |
"generatedSources": [], | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b50610385806100206000396000f3fe60806040526004361061003f5760003560e01c80633ccfd60b1461004457806370a082311461005b578063b69ef8a814610098578063d0e30db0146100c3575b600080fd5b34801561005057600080fd5b506100596100cd565b005b34801561006757600080fd5b50610082600480360381019061007d9190610224565b610198565b60405161008f919061025c565b60405180910390f35b3480156100a457600080fd5b506100ad6101b0565b6040516100ba919061025c565b60405180910390f35b6100cb6101b8565b005b3373ffffffffffffffffffffffffffffffffffffffff166108fc6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549081150290604051600060405180830381858888f19350505050158015610151573d6000803e3d6000fd5b5060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550565b60006020528060005260406000206000915090505481565b600047905090565b346000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546102069190610277565b92505081905550565b60008135905061021e81610338565b92915050565b60006020828403121561023657600080fd5b60006102448482850161020f565b91505092915050565b610256816102ff565b82525050565b6000602082019050610271600083018461024d565b92915050565b6000610282826102ff565b915061028d836102ff565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156102c2576102c1610309565b5b828201905092915050565b60006102d8826102df565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610341816102cd565b811461034c57600080fd5b5056fea26469706673582212206f448ba6a9fbcf1c6c1d6da6d1f7699c09cb4e06787f7c7fe336ad3c2dbdb45f64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x385 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x3F JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x44 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x5B JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0xD0E30DB0 EQ PUSH2 0xC3 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x59 PUSH2 0xCD JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x82 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x7D SWAP2 SWAP1 PUSH2 0x224 JUMP JUMPDEST PUSH2 0x198 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8F SWAP2 SWAP1 PUSH2 0x25C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xAD PUSH2 0x1B0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xBA SWAP2 SWAP1 PUSH2 0x25C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xCB PUSH2 0x1B8 JUMP JUMPDEST STOP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC PUSH1 0x0 DUP1 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x151 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x0 DUP1 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 MSTORE DUP1 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP2 POP SWAP1 POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SELFBALANCE SWAP1 POP SWAP1 JUMP JUMPDEST CALLVALUE PUSH1 0x0 DUP1 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x206 SWAP2 SWAP1 PUSH2 0x277 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x21E DUP2 PUSH2 0x338 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x236 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x244 DUP5 DUP3 DUP6 ADD PUSH2 0x20F JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x256 DUP2 PUSH2 0x2FF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x271 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x24D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x282 DUP3 PUSH2 0x2FF JUMP JUMPDEST SWAP2 POP PUSH2 0x28D DUP4 PUSH2 0x2FF JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x2C2 JUMPI PUSH2 0x2C1 PUSH2 0x309 JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2D8 DUP3 PUSH2 0x2DF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x341 DUP2 PUSH2 0x2CD JUMP JUMPDEST DUP2 EQ PUSH2 0x34C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH16 0x448BA6A9FBCF1C6C1D6DA6D1F7699C09 0xCB 0x4E MOD PUSH25 0x7F7C7FE336AD3C2DBDB45F64736F6C63430008040033000000 ", | |
"sourceMap": "54:401:0:-:0;;;;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:1711:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "59:87:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "69:29:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "91:6:1" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "78:12:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "78:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "69:5:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "134:5:1" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "107:26:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "107:33:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "107:33:1" | |
} | |
] | |
}, | |
"name": "abi_decode_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "37:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "45:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "53:5:1", | |
"type": "" | |
} | |
], | |
"src": "7:139:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "218:196:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "264:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "273:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "276:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "266:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "266:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "266:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "239:7:1" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "248:9:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "235:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "235:23:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "260:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "231:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "231:32:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "228:2:1" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "290:117:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "305:15:1", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "319:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "309:6:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "334:63:1", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "369:9:1" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "380:6:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "365:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "365:22:1" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "389:7:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "344:20:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "344:53:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "334:6:1" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "188:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "199:7:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "211:6:1", | |
"type": "" | |
} | |
], | |
"src": "152:262:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "485:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "502:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "525:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "507:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "507:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "495:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "495:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "495:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "473:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "480:3:1", | |
"type": "" | |
} | |
], | |
"src": "420:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "642:124:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "652:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "664:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "675:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "660:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "660:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "652:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "732:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "745:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "756:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "741:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "741:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "688:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "688:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "688:71:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "614:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "626:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "637:4:1", | |
"type": "" | |
} | |
], | |
"src": "544:222:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "816:261:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "826:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "849:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "831:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "831:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "826:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "860:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "883:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "865:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "865:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "860:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1023:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1025:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1025:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1025:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "944:1:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "951:66:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1019:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "947:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "947:74:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "941:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "941:81:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "938:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1055:16:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1066:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1069:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1062:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1062:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulIdentifier", | |
"src": "1055:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_add_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "803:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "806:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulTypedName", | |
"src": "812:3:1", | |
"type": "" | |
} | |
], | |
"src": "772:305:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1128:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1138:35:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1167:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "1149:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1149:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1138:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1110:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1120:7:1", | |
"type": "" | |
} | |
], | |
"src": "1083:96:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1230:81:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1240:65:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1255:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1262:42:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1251:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1251:54:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1240:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1212:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1222:7:1", | |
"type": "" | |
} | |
], | |
"src": "1185:126:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1362:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1372:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1383:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1372:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1344:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1354:7:1", | |
"type": "" | |
} | |
], | |
"src": "1317:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1428:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1445:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1448:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1438:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1438:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1438:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1542:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1545:4:1", | |
"type": "", | |
"value": "0x11" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1535:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1535:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1535:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1566:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1569:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1559:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1559:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1559:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x11", | |
"nodeType": "YulFunctionDefinition", | |
"src": "1400:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1629:79:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1686:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1695:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1698:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1688:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1688:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1688:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1652:5:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1677:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_address", | |
"nodeType": "YulIdentifier", | |
"src": "1659:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1659:24:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "1649:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1649:35:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1642:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1642:43:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1639:2:1" | |
} | |
] | |
}, | |
"name": "validator_revert_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1622:5:1", | |
"type": "" | |
} | |
], | |
"src": "1586:122:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "60806040526004361061003f5760003560e01c80633ccfd60b1461004457806370a082311461005b578063b69ef8a814610098578063d0e30db0146100c3575b600080fd5b34801561005057600080fd5b506100596100cd565b005b34801561006757600080fd5b50610082600480360381019061007d9190610224565b610198565b60405161008f919061025c565b60405180910390f35b3480156100a457600080fd5b506100ad6101b0565b6040516100ba919061025c565b60405180910390f35b6100cb6101b8565b005b3373ffffffffffffffffffffffffffffffffffffffff166108fc6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549081150290604051600060405180830381858888f19350505050158015610151573d6000803e3d6000fd5b5060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550565b60006020528060005260406000206000915090505481565b600047905090565b346000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546102069190610277565b92505081905550565b60008135905061021e81610338565b92915050565b60006020828403121561023657600080fd5b60006102448482850161020f565b91505092915050565b610256816102ff565b82525050565b6000602082019050610271600083018461024d565b92915050565b6000610282826102ff565b915061028d836102ff565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156102c2576102c1610309565b5b828201905092915050565b60006102d8826102df565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610341816102cd565b811461034c57600080fd5b5056fea26469706673582212206f448ba6a9fbcf1c6c1d6da6d1f7699c09cb4e06787f7c7fe336ad3c2dbdb45f64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x3F JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0x44 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x5B JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0xD0E30DB0 EQ PUSH2 0xC3 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x59 PUSH2 0xCD JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x67 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x82 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x7D SWAP2 SWAP1 PUSH2 0x224 JUMP JUMPDEST PUSH2 0x198 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x8F SWAP2 SWAP1 PUSH2 0x25C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xAD PUSH2 0x1B0 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xBA SWAP2 SWAP1 PUSH2 0x25C JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xCB PUSH2 0x1B8 JUMP JUMPDEST STOP JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC PUSH1 0x0 DUP1 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x151 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP PUSH1 0x0 DUP1 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 MSTORE DUP1 PUSH1 0x0 MSTORE PUSH1 0x40 PUSH1 0x0 KECCAK256 PUSH1 0x0 SWAP2 POP SWAP1 POP SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SELFBALANCE SWAP1 POP SWAP1 JUMP JUMPDEST CALLVALUE PUSH1 0x0 DUP1 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x206 SWAP2 SWAP1 PUSH2 0x277 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x21E DUP2 PUSH2 0x338 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x236 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x244 DUP5 DUP3 DUP6 ADD PUSH2 0x20F JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x256 DUP2 PUSH2 0x2FF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x271 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x24D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x282 DUP3 PUSH2 0x2FF JUMP JUMPDEST SWAP2 POP PUSH2 0x28D DUP4 PUSH2 0x2FF JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x2C2 JUMPI PUSH2 0x2C1 PUSH2 0x309 JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2D8 DUP3 PUSH2 0x2DF JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH2 0x341 DUP2 PUSH2 0x2CD JUMP JUMPDEST DUP2 EQ PUSH2 0x34C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 PUSH16 0x448BA6A9FBCF1C6C1D6DA6D1F7699C09 0xCB 0x4E MOD PUSH25 0x7F7C7FE336AD3C2DBDB45F64736F6C63430008040033000000 ", | |
"sourceMap": "54:401:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;219:130;;;;;;;;;;;;;:::i;:::-;;77:44;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;355:93;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;128:85;;;:::i;:::-;;219:130;264:10;256:28;;:51;285:9;:21;295:10;285:21;;;;;;;;;;;;;;;;256:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;341:1;317:9;:21;327:10;317:21;;;;;;;;;;;;;;;:25;;;;219:130::o;77:44::-;;;;;;;;;;;;;;;;;:::o;355:93::-;394:7;420:21;413:28;;355:93;:::o;128:85::-;197:9;172;:21;182:10;172:21;;;;;;;;;;;;;;;;:34;;;;;;;:::i;:::-;;;;;;;;128:85::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:262::-;211:6;260:2;248:9;239:7;235:23;231:32;228:2;;;276:1;273;266:12;228:2;319:1;344:53;389:7;380:6;369:9;365:22;344:53;:::i;:::-;334:63;;290:117;218:196;;;;:::o;420:118::-;507:24;525:5;507:24;:::i;:::-;502:3;495:37;485:53;;:::o;544:222::-;637:4;675:2;664:9;660:18;652:26;;688:71;756:1;745:9;741:17;732:6;688:71;:::i;:::-;642:124;;;;:::o;772:305::-;812:3;831:20;849:1;831:20;:::i;:::-;826:25;;865:20;883:1;865:20;:::i;:::-;860:25;;1019:1;951:66;947:74;944:1;941:81;938:2;;;1025:18;;:::i;:::-;938:2;1069:1;1066;1062:9;1055:16;;816:261;;;;:::o;1083:96::-;1120:7;1149:24;1167:5;1149:24;:::i;:::-;1138:35;;1128:51;;;:::o;1185:126::-;1222:7;1262:42;1255:5;1251:54;1240:65;;1230:81;;;:::o;1317:77::-;1354:7;1383:5;1372:16;;1362:32;;;:::o;1400:180::-;1448:77;1445:1;1438:88;1545:4;1542:1;1535:15;1569:4;1566:1;1559:15;1586:122;1659:24;1677:5;1659:24;:::i;:::-;1652:5;1649:35;1639:2;;1698:1;1695;1688:12;1639:2;1629:79;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "180200", | |
"executionCost": "226", | |
"totalCost": "180426" | |
}, | |
"external": { | |
"balance()": "361", | |
"balanceOf(address)": "1514", | |
"deposit()": "infinite", | |
"withdraw()": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"balance()": "b69ef8a8", | |
"balanceOf(address)": "70a08231", | |
"deposit()": "d0e30db0", | |
"withdraw()": "3ccfd60b" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "balance", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "balanceOf", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "deposit", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "withdraw", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains hidden or 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
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "balance", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "", | |
"type": "address" | |
} | |
], | |
"name": "balanceOf", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "deposit", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "withdraw", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"payable.sol": "Payable" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"payable.sol": { | |
"keccak256": "0x5d30c2a10072bcd5b14aa85b7f8374b0b903e6cd7c6c278494a97529e53f6983", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://ee1ccfa5b7c5d9345b5eed9134babe6f77955e953a133003bfb857dd7f876c19", | |
"dweb:/ipfs/QmNwhA9rtZr2u8LKecoiQf8QDMPbm5BUa5BDjFLMVyU5bW" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains hidden or 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"ropsten:3": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"rinkeby:4": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"kovan:42": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"görli:5": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"Custom": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
} | |
}, | |
"data": { | |
"bytecode": { | |
"generatedSources": [], | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b506103e3806100206000396000f3fe60806040526004361061002d5760003560e01c806373d4a13a146100ce578063b69ef8a8146100f957610080565b36610080576040518060400160405280600c81526020017f726563656976652063616c6c00000000000000000000000000000000000000008152506000908051906020019061007d9291906101ba565b50005b6040518060400160405280600d81526020017f66616c6c6261636b2063616c6c00000000000000000000000000000000000000815250600090805190602001906100cb9291906101ba565b50005b3480156100da57600080fd5b506100e3610124565b6040516100f091906102a5565b60405180910390f35b34801561010557600080fd5b5061010e6101b2565b60405161011b91906102c7565b60405180910390f35b600080546101319061033b565b80601f016020809104026020016040519081016040528092919081815260200182805461015d9061033b565b80156101aa5780601f1061017f576101008083540402835291602001916101aa565b820191906000526020600020905b81548152906001019060200180831161018d57829003601f168201915b505050505081565b600047905090565b8280546101c69061033b565b90600052602060002090601f0160209004810192826101e8576000855561022f565b82601f1061020157805160ff191683800117855561022f565b8280016001018555821561022f579182015b8281111561022e578251825591602001919060010190610213565b5b50905061023c9190610240565b5090565b5b80821115610259576000816000905550600101610241565b5090565b6000610268826102e2565b61027281856102ed565b9350610282818560208601610308565b61028b8161039c565b840191505092915050565b61029f816102fe565b82525050565b600060208201905081810360008301526102bf818461025d565b905092915050565b60006020820190506102dc6000830184610296565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b60005b8381101561032657808201518184015260208101905061030b565b83811115610335576000848401525b50505050565b6000600282049050600182168061035357607f821691505b602082108114156103675761036661036d565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f830116905091905056fea264697066735822122046652fed359d205e9fb9ee6954d15f39daf00c109f8459725cb4ee8eb1251eb064736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3E3 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x73D4A13A EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0xF9 JUMPI PUSH2 0x80 JUMP JUMPDEST CALLDATASIZE PUSH2 0x80 JUMPI PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xC DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x726563656976652063616C6C0000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x7D SWAP3 SWAP2 SWAP1 PUSH2 0x1BA JUMP JUMPDEST POP STOP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xD DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x66616C6C6261636B2063616C6C00000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0xCB SWAP3 SWAP2 SWAP1 PUSH2 0x1BA JUMP JUMPDEST POP STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xDA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xE3 PUSH2 0x124 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xF0 SWAP2 SWAP1 PUSH2 0x2A5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x105 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10E PUSH2 0x1B2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x11B SWAP2 SWAP1 PUSH2 0x2C7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH2 0x131 SWAP1 PUSH2 0x33B JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x15D SWAP1 PUSH2 0x33B JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1AA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x17F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1AA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x18D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH1 0x0 SELFBALANCE SWAP1 POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x1C6 SWAP1 PUSH2 0x33B JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x1E8 JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0x22F JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0x201 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x22F JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x22F JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x22E JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x213 JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x23C SWAP2 SWAP1 PUSH2 0x240 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x259 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x241 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x268 DUP3 PUSH2 0x2E2 JUMP JUMPDEST PUSH2 0x272 DUP2 DUP6 PUSH2 0x2ED JUMP JUMPDEST SWAP4 POP PUSH2 0x282 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x308 JUMP JUMPDEST PUSH2 0x28B DUP2 PUSH2 0x39C JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x29F DUP2 PUSH2 0x2FE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2BF DUP2 DUP5 PUSH2 0x25D JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2DC PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x296 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x326 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x30B JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x335 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x353 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x367 JUMPI PUSH2 0x366 PUSH2 0x36D JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID PUSH6 0x2FED359D205E SWAP16 0xB9 0xEE PUSH10 0x54D15F39DAF00C109F84 MSIZE PUSH19 0x5CB4EE8EB1251EB064736F6C63430008040033 ", | |
"sourceMap": "54:352:0:-:0;;;;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:2341:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "99:272:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "109:53:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "156:5:1" | |
} | |
], | |
"functionName": { | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulIdentifier", | |
"src": "123:32:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "123:39:1" | |
}, | |
"variables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "113:6:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "171:78:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "237:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "242:6:1" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "178:58:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "178:71:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "171:3:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "284:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "291:4:1", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "280:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "280:16:1" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "298:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "303:6:1" | |
} | |
], | |
"functionName": { | |
"name": "copy_memory_to_memory", | |
"nodeType": "YulIdentifier", | |
"src": "258:21:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "258:52:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "258:52:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "319:46:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "330:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "357:6:1" | |
} | |
], | |
"functionName": { | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulIdentifier", | |
"src": "335:21:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "335:29:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "326:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "326:39:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "319:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "80:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "87:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "95:3:1", | |
"type": "" | |
} | |
], | |
"src": "7:364:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "442:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "459:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "482:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "464:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "464:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "452:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "452:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "452:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "430:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "437:3:1", | |
"type": "" | |
} | |
], | |
"src": "377:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "619:195:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "629:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "641:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "652:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "637:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "637:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "629:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "676:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "687:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "672:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "672:17:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "695:4:1" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "701:9:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "691:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "691:20:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "665:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "665:47:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "665:47:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "721:86:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "793:6:1" | |
}, | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "802:4:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "729:63:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "729:78:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "721:4:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "591:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "603:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "614:4:1", | |
"type": "" | |
} | |
], | |
"src": "501:313:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "918:124:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "928:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "940:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "951:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "936:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "936:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "928:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "1008:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1021:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1032:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1017:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1017:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "964:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "964:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "964:71:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "890:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "902:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "913:4:1", | |
"type": "" | |
} | |
], | |
"src": "820:222:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1107:40:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1118:22:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1134:5:1" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "1128:5:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1128:12:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1118:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_length_t_string_memory_ptr", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1090:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1100:6:1", | |
"type": "" | |
} | |
], | |
"src": "1048:99:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1249:73:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1266:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1271:6:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1259:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1259:19:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1259:19:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1287:29:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1306:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1311:4:1", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1302:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1302:14:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulIdentifier", | |
"src": "1287:11:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "1221:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1226:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulTypedName", | |
"src": "1237:11:1", | |
"type": "" | |
} | |
], | |
"src": "1153:169:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1373:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1383:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1394:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1383:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1355:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1365:7:1", | |
"type": "" | |
} | |
], | |
"src": "1328:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1460:258:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1470:10:1", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1479:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "i", | |
"nodeType": "YulTypedName", | |
"src": "1474:1:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1539:63:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "1564:3:1" | |
}, | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1569:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1560:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1560:11:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "src", | |
"nodeType": "YulIdentifier", | |
"src": "1583:3:1" | |
}, | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1588:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1579:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1579:11:1" | |
} | |
], | |
"functionName": { | |
"name": "mload", | |
"nodeType": "YulIdentifier", | |
"src": "1573:5:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1573:18:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1553:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1553:39:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1553:39:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1500:1:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1503:6:1" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1497:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1497:13:1" | |
}, | |
"nodeType": "YulForLoop", | |
"post": { | |
"nodeType": "YulBlock", | |
"src": "1511:19:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1513:15:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1522:1:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1525:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1518:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1518:10:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1513:1:1" | |
} | |
] | |
} | |
] | |
}, | |
"pre": { | |
"nodeType": "YulBlock", | |
"src": "1493:3:1", | |
"statements": [] | |
}, | |
"src": "1489:113:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1636:76:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dst", | |
"nodeType": "YulIdentifier", | |
"src": "1686:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1691:6:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1682:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1682:16:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1700:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1675:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1675:27:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1675:27:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "i", | |
"nodeType": "YulIdentifier", | |
"src": "1617:1:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1620:6:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "1614:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1614:13:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1611:2:1" | |
} | |
] | |
}, | |
"name": "copy_memory_to_memory", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "src", | |
"nodeType": "YulTypedName", | |
"src": "1442:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "dst", | |
"nodeType": "YulTypedName", | |
"src": "1447:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1452:6:1", | |
"type": "" | |
} | |
], | |
"src": "1411:307:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1775:269:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1785:22:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "1799:4:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1805:1:1", | |
"type": "", | |
"value": "2" | |
} | |
], | |
"functionName": { | |
"name": "div", | |
"nodeType": "YulIdentifier", | |
"src": "1795:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1795:12:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1785:6:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "1816:38:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "data", | |
"nodeType": "YulIdentifier", | |
"src": "1846:4:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1852:1:1", | |
"type": "", | |
"value": "1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1842:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1842:12:1" | |
}, | |
"variables": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulTypedName", | |
"src": "1820:18:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1893:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1907:27:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1921:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1929:4:1", | |
"type": "", | |
"value": "0x7f" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1917:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1917:17:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1907:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "1873:18:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1866:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1866:26:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1863:2:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1996:42:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x22", | |
"nodeType": "YulIdentifier", | |
"src": "2010:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2010:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2010:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "outOfPlaceEncoding", | |
"nodeType": "YulIdentifier", | |
"src": "1960:18:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "1983:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1991:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1980:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1980:14:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "1957:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1957:38:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1954:2:1" | |
} | |
] | |
}, | |
"name": "extract_byte_array_length", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "data", | |
"nodeType": "YulTypedName", | |
"src": "1759:4:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "1768:6:1", | |
"type": "" | |
} | |
], | |
"src": "1724:320:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2078:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2095:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2098:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "2088:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2088:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2088:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2192:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2195:4:1", | |
"type": "", | |
"value": "0x22" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "2185:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2185:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2185:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2216:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2219:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "2209:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2209:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2209:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x22", | |
"nodeType": "YulFunctionDefinition", | |
"src": "2050:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2284:54:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2294:38:1", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2312:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2319:2:1", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2308:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2308:14:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2328:2:1", | |
"type": "", | |
"value": "31" | |
} | |
], | |
"functionName": { | |
"name": "not", | |
"nodeType": "YulIdentifier", | |
"src": "2324:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2324:7:1" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "2304:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2304:28:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "result", | |
"nodeType": "YulIdentifier", | |
"src": "2294:6:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "round_up_to_mul_of_32", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2267:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "result", | |
"nodeType": "YulTypedName", | |
"src": "2277:6:1", | |
"type": "" | |
} | |
], | |
"src": "2236:102:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "60806040526004361061002d5760003560e01c806373d4a13a146100ce578063b69ef8a8146100f957610080565b36610080576040518060400160405280600c81526020017f726563656976652063616c6c00000000000000000000000000000000000000008152506000908051906020019061007d9291906101ba565b50005b6040518060400160405280600d81526020017f66616c6c6261636b2063616c6c00000000000000000000000000000000000000815250600090805190602001906100cb9291906101ba565b50005b3480156100da57600080fd5b506100e3610124565b6040516100f091906102a5565b60405180910390f35b34801561010557600080fd5b5061010e6101b2565b60405161011b91906102c7565b60405180910390f35b600080546101319061033b565b80601f016020809104026020016040519081016040528092919081815260200182805461015d9061033b565b80156101aa5780601f1061017f576101008083540402835291602001916101aa565b820191906000526020600020905b81548152906001019060200180831161018d57829003601f168201915b505050505081565b600047905090565b8280546101c69061033b565b90600052602060002090601f0160209004810192826101e8576000855561022f565b82601f1061020157805160ff191683800117855561022f565b8280016001018555821561022f579182015b8281111561022e578251825591602001919060010190610213565b5b50905061023c9190610240565b5090565b5b80821115610259576000816000905550600101610241565b5090565b6000610268826102e2565b61027281856102ed565b9350610282818560208601610308565b61028b8161039c565b840191505092915050565b61029f816102fe565b82525050565b600060208201905081810360008301526102bf818461025d565b905092915050565b60006020820190506102dc6000830184610296565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050919050565b60005b8381101561032657808201518184015260208101905061030b565b83811115610335576000848401525b50505050565b6000600282049050600182168061035357607f821691505b602082108114156103675761036661036d565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f830116905091905056fea264697066735822122046652fed359d205e9fb9ee6954d15f39daf00c109f8459725cb4ee8eb1251eb064736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x73D4A13A EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0xB69EF8A8 EQ PUSH2 0xF9 JUMPI PUSH2 0x80 JUMP JUMPDEST CALLDATASIZE PUSH2 0x80 JUMPI PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xC DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x726563656976652063616C6C0000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x7D SWAP3 SWAP2 SWAP1 PUSH2 0x1BA JUMP JUMPDEST POP STOP JUMPDEST PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xD DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x66616C6C6261636B2063616C6C00000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0xCB SWAP3 SWAP2 SWAP1 PUSH2 0x1BA JUMP JUMPDEST POP STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xDA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xE3 PUSH2 0x124 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xF0 SWAP2 SWAP1 PUSH2 0x2A5 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x105 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x10E PUSH2 0x1B2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x11B SWAP2 SWAP1 PUSH2 0x2C7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH2 0x131 SWAP1 PUSH2 0x33B JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0x15D SWAP1 PUSH2 0x33B JUMP JUMPDEST DUP1 ISZERO PUSH2 0x1AA JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x17F JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1AA JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x18D JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP DUP2 JUMP JUMPDEST PUSH1 0x0 SELFBALANCE SWAP1 POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x1C6 SWAP1 PUSH2 0x33B JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x1E8 JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0x22F JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0x201 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x22F JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x22F JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x22E JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x213 JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x23C SWAP2 SWAP1 PUSH2 0x240 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x259 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x241 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x268 DUP3 PUSH2 0x2E2 JUMP JUMPDEST PUSH2 0x272 DUP2 DUP6 PUSH2 0x2ED JUMP JUMPDEST SWAP4 POP PUSH2 0x282 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x308 JUMP JUMPDEST PUSH2 0x28B DUP2 PUSH2 0x39C JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x29F DUP2 PUSH2 0x2FE JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2BF DUP2 DUP5 PUSH2 0x25D JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x2DC PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x296 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x326 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x30B JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x335 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x353 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x367 JUMPI PUSH2 0x366 PUSH2 0x36D JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 CHAINID PUSH6 0x2FED359D205E SWAP16 0xB9 0xEE PUSH10 0x54D15F39DAF00C109F84 MSIZE PUSH19 0x5CB4EE8EB1251EB064736F6C63430008040033 ", | |
"sourceMap": "54:352:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;271:21;;;;;;;;;;;;;;;;;:4;:21;;;;;;;;;;;;:::i;:::-;;54:352;;375:22;;;;;;;;;;;;;;;;;:4;:22;;;;;;;;;;;;:::i;:::-;;54:352;82:18;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;107:93;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;82:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;107:93::-;146:7;172:21;165:28;;107:93;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:364:1:-;95:3;123:39;156:5;123:39;:::i;:::-;178:71;242:6;237:3;178:71;:::i;:::-;171:78;;258:52;303:6;298:3;291:4;284:5;280:16;258:52;:::i;:::-;335:29;357:6;335:29;:::i;:::-;330:3;326:39;319:46;;99:272;;;;;:::o;377:118::-;464:24;482:5;464:24;:::i;:::-;459:3;452:37;442:53;;:::o;501:313::-;614:4;652:2;641:9;637:18;629:26;;701:9;695:4;691:20;687:1;676:9;672:17;665:47;729:78;802:4;793:6;729:78;:::i;:::-;721:86;;619:195;;;;:::o;820:222::-;913:4;951:2;940:9;936:18;928:26;;964:71;1032:1;1021:9;1017:17;1008:6;964:71;:::i;:::-;918:124;;;;:::o;1048:99::-;1100:6;1134:5;1128:12;1118:22;;1107:40;;;:::o;1153:169::-;1237:11;1271:6;1266:3;1259:19;1311:4;1306:3;1302:14;1287:29;;1249:73;;;;:::o;1328:77::-;1365:7;1394:5;1383:16;;1373:32;;;:::o;1411:307::-;1479:1;1489:113;1503:6;1500:1;1497:13;1489:113;;;1588:1;1583:3;1579:11;1573:18;1569:1;1564:3;1560:11;1553:39;1525:2;1522:1;1518:10;1513:15;;1489:113;;;1620:6;1617:1;1614:13;1611:2;;;1700:1;1691:6;1686:3;1682:16;1675:27;1611:2;1460:258;;;;:::o;1724:320::-;1768:6;1805:1;1799:4;1795:12;1785:22;;1852:1;1846:4;1842:12;1873:18;1863:2;;1929:4;1921:6;1917:17;1907:27;;1863:2;1991;1983:6;1980:14;1960:18;1957:38;1954:2;;;2010:18;;:::i;:::-;1954:2;1775:269;;;;:::o;2050:180::-;2098:77;2095:1;2088:88;2195:4;2192:1;2185:15;2219:4;2216:1;2209:15;2236:102;2277:6;2328:2;2324:7;2319:2;2312:5;2308:14;2304:28;2294:38;;2284:54;;;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "199000", | |
"executionCost": "245", | |
"totalCost": "199245" | |
}, | |
"external": { | |
"": "infinite", | |
"balance()": "339", | |
"data()": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"balance()": "b69ef8a8", | |
"data()": "73d4a13a" | |
} | |
}, | |
"abi": [ | |
{ | |
"stateMutability": "payable", | |
"type": "fallback" | |
}, | |
{ | |
"inputs": [], | |
"name": "balance", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "data", | |
"outputs": [ | |
{ | |
"internalType": "string", | |
"name": "", | |
"type": "string" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"stateMutability": "payable", | |
"type": "receive" | |
} | |
] | |
} |
This file contains hidden or 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
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"stateMutability": "payable", | |
"type": "fallback" | |
}, | |
{ | |
"inputs": [], | |
"name": "balance", | |
"outputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "data", | |
"outputs": [ | |
{ | |
"internalType": "string", | |
"name": "", | |
"type": "string" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"stateMutability": "payable", | |
"type": "receive" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"Fallback.sol": "ReceiveEther" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"Fallback.sol": { | |
"keccak256": "0x65b60d6735812c03953960d182bccd0c935afaab2057e2efcf24db4a694a5930", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://67151f2fcdea1ece3e62f3a196dab425fc88c989f09bba7dbb7743d0525bdb90", | |
"dweb:/ipfs/QmUx36JZNfKkRPgGanFo2phbWdogAKDZjWBtEn7e9byb7v" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains hidden or 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
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"ropsten:3": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"rinkeby:4": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"kovan:42": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"görli:5": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"Custom": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
} | |
}, | |
"data": { | |
"bytecode": { | |
"generatedSources": [], | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b50610387806100206000396000f3fe6080604052600436106100345760003560e01c80631a695230146100395780633e58c58c14610055578063f55332ab14610071575b600080fd5b610053600480360381019061004e919061021c565b61008d565b005b61006f600480360381019061006a919061021c565b6100d7565b005b61008b6004803603810190610086919061021c565b610154565b005b8073ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156100d3573d6000803e3d6000fd5b5050565b60008173ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050905080610150576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610147906102a0565b60405180910390fd5b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163460405161017b9061028b565b60006040518083038185875af1925050503d80600081146101b8576040519150601f19603f3d011682016040523d82523d6000602084013e6101bd565b606091505b509150915081610202576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f9906102a0565b60405180910390fd5b505050565b6000813590506102168161033a565b92915050565b60006020828403121561022e57600080fd5b600061023c84828501610207565b91505092915050565b60006102526012836102cb565b915061025d8261030e565b602082019050919050565b60006102756000836102c0565b915061028082610337565b600082019050919050565b600061029682610268565b9150819050919050565b600060208201905081810360008301526102b981610245565b9050919050565b600081905092915050565b600082825260208201905092915050565b60006102e7826102ee565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4661696c656420746f2073656e64206574680000000000000000000000000000600082015250565b50565b610343816102dc565b811461034e57600080fd5b5056fea2646970667358221220c71639fae5d68933a17378380797b84c35f348adea724442f372f95118057e6864736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x387 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1A695230 EQ PUSH2 0x39 JUMPI DUP1 PUSH4 0x3E58C58C EQ PUSH2 0x55 JUMPI DUP1 PUSH4 0xF55332AB EQ PUSH2 0x71 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x53 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x4E SWAP2 SWAP1 PUSH2 0x21C JUMP JUMPDEST PUSH2 0x8D JUMP JUMPDEST STOP JUMPDEST PUSH2 0x6F PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6A SWAP2 SWAP1 PUSH2 0x21C JUMP JUMPDEST PUSH2 0xD7 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x8B PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x86 SWAP2 SWAP1 PUSH2 0x21C JUMP JUMPDEST PUSH2 0x154 JUMP JUMPDEST STOP JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC CALLVALUE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0xD3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC CALLVALUE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP SWAP1 POP DUP1 PUSH2 0x150 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x147 SWAP1 PUSH2 0x2A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLVALUE PUSH1 0x40 MLOAD PUSH2 0x17B SWAP1 PUSH2 0x28B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1B8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1BD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0x202 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1F9 SWAP1 PUSH2 0x2A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x216 DUP2 PUSH2 0x33A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x22E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x23C DUP5 DUP3 DUP6 ADD PUSH2 0x207 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x252 PUSH1 0x12 DUP4 PUSH2 0x2CB JUMP JUMPDEST SWAP2 POP PUSH2 0x25D DUP3 PUSH2 0x30E JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x275 PUSH1 0x0 DUP4 PUSH2 0x2C0 JUMP JUMPDEST SWAP2 POP PUSH2 0x280 DUP3 PUSH2 0x337 JUMP JUMPDEST PUSH1 0x0 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x296 DUP3 PUSH2 0x268 JUMP JUMPDEST SWAP2 POP DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2B9 DUP2 PUSH2 0x245 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E7 DUP3 PUSH2 0x2EE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4661696C656420746F2073656E64206574680000000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x343 DUP2 PUSH2 0x2DC JUMP JUMPDEST DUP2 EQ PUSH2 0x34E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC7 AND CODECOPY STATICCALL 0xE5 0xD6 DUP10 CALLER LOG1 PUSH20 0x78380797B84C35F348ADEA724442F372F9511805 PUSH31 0x6864736F6C6343000804003300000000000000000000000000000000000000 ", | |
"sourceMap": "304:536:0:-:0;;;;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:3043:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "67:95:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "77:29:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "99:6:1" | |
} | |
], | |
"functionName": { | |
"name": "calldataload", | |
"nodeType": "YulIdentifier", | |
"src": "86:12:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "86:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "77:5:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "150:5:1" | |
} | |
], | |
"functionName": { | |
"name": "validator_revert_t_address_payable", | |
"nodeType": "YulIdentifier", | |
"src": "115:34:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "115:41:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "115:41:1" | |
} | |
] | |
}, | |
"name": "abi_decode_t_address_payable", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "45:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "53:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "61:5:1", | |
"type": "" | |
} | |
], | |
"src": "7:155:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "242:204:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "288:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "297:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "300:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "290:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "290:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "290:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "263:7:1" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "272:9:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "259:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "259:23:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "284:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "slt", | |
"nodeType": "YulIdentifier", | |
"src": "255:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "255:32:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "252:2:1" | |
}, | |
{ | |
"nodeType": "YulBlock", | |
"src": "314:125:1", | |
"statements": [ | |
{ | |
"nodeType": "YulVariableDeclaration", | |
"src": "329:15:1", | |
"value": { | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "343:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
"variables": [ | |
{ | |
"name": "offset", | |
"nodeType": "YulTypedName", | |
"src": "333:6:1", | |
"type": "" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "358:71:1", | |
"value": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "401:9:1" | |
}, | |
{ | |
"name": "offset", | |
"nodeType": "YulIdentifier", | |
"src": "412:6:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "397:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "397:22:1" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulIdentifier", | |
"src": "421:7:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_decode_t_address_payable", | |
"nodeType": "YulIdentifier", | |
"src": "368:28:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "368:61:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "358:6:1" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_decode_tuple_t_address_payable", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "212:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "dataEnd", | |
"nodeType": "YulTypedName", | |
"src": "223:7:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "235:6:1", | |
"type": "" | |
} | |
], | |
"src": "168:278:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "598:220:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "608:74:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "674:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "679:2:1", | |
"type": "", | |
"value": "18" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "615:58:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "615:67:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "608:3:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "780:3:1" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d", | |
"nodeType": "YulIdentifier", | |
"src": "691:88:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "691:93:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "691:93:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "793:19:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "804:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "809:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "800:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "800:12:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "793:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "586:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "594:3:1", | |
"type": "" | |
} | |
], | |
"src": "452:366:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "987:235:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "997:90:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1080:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1085:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "1004:75:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1004:83:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "997:3:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1185:3:1" | |
} | |
], | |
"functionName": { | |
"name": "store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", | |
"nodeType": "YulIdentifier", | |
"src": "1096:88:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1096:93:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1096:93:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1198:18:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1209:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1214:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1205:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1205:11:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "1198:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "975:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "983:3:1", | |
"type": "" | |
} | |
], | |
"src": "824:398:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1416:191:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1427:154:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1577:3:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "1434:141:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1434:147:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1427:3:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1591:10:1", | |
"value": { | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "1598:3:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "end", | |
"nodeType": "YulIdentifier", | |
"src": "1591:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "1403:3:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "end", | |
"nodeType": "YulTypedName", | |
"src": "1412:3:1", | |
"type": "" | |
} | |
], | |
"src": "1228:379:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1784:248:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1794:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1806:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1817:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1802:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1802:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "1794:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1841:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1852:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1837:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1837:17:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "1860:4:1" | |
}, | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "1866:9:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "1856:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1856:20:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1830:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1830:47:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1830:47:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1886:139:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "2020:4:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_stringliteral_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d_to_t_string_memory_ptr_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "1894:124:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1894:131:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "1886:4:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_stringliteral_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d__to_t_string_memory_ptr__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "1764:9:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "1779:4:1", | |
"type": "" | |
} | |
], | |
"src": "1613:419:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2151:34:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2161:18:1", | |
"value": { | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2176:3:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulIdentifier", | |
"src": "2161:11:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "2123:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "2128:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulTypedName", | |
"src": "2139:11:1", | |
"type": "" | |
} | |
], | |
"src": "2038:147:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2287:73:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2304:3:1" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulIdentifier", | |
"src": "2309:6:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "2297:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2297:19:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2297:19:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2325:29:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "2344:3:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2349:4:1", | |
"type": "", | |
"value": "0x20" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2340:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2340:14:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulIdentifier", | |
"src": "2325:11:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "2259:3:1", | |
"type": "" | |
}, | |
{ | |
"name": "length", | |
"nodeType": "YulTypedName", | |
"src": "2264:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "updated_pos", | |
"nodeType": "YulTypedName", | |
"src": "2275:11:1", | |
"type": "" | |
} | |
], | |
"src": "2191:169:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2419:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2429:35:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2458:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "2440:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2440:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "2429:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address_payable", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2401:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "2411:7:1", | |
"type": "" | |
} | |
], | |
"src": "2366:104:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2521:81:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "2531:65:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2546:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2553:42:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "2542:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2542:54:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "2531:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2503:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "2513:7:1", | |
"type": "" | |
} | |
], | |
"src": "2476:126:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2714:62:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulIdentifier", | |
"src": "2736:6:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2744:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "2732:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2732:14:1" | |
}, | |
{ | |
"kind": "string", | |
"nodeType": "YulLiteral", | |
"src": "2748:20:1", | |
"type": "", | |
"value": "Failed to send eth" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "2725:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2725:44:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2725:44:1" | |
} | |
] | |
}, | |
"name": "store_literal_in_memory_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "2706:6:1", | |
"type": "" | |
} | |
], | |
"src": "2608:168:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2888:8:1", | |
"statements": [] | |
}, | |
"name": "store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "memPtr", | |
"nodeType": "YulTypedName", | |
"src": "2880:6:1", | |
"type": "" | |
} | |
], | |
"src": "2782:114:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2953:87:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "3018:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3027:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "3030:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "3020:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "3020:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "3020:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2976:5:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "3009:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_address_payable", | |
"nodeType": "YulIdentifier", | |
"src": "2983:25:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2983:32:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "2973:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2973:43:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "2966:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2966:51:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "2963:2:1" | |
} | |
] | |
}, | |
"name": "validator_revert_t_address_payable", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2946:5:1", | |
"type": "" | |
} | |
], | |
"src": "2902:138:1" | |
} | |
] | |
}, | |
"contents": "{\n\n function abi_decode_t_address_payable(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address_payable(value)\n }\n\n function abi_decode_tuple_t_address_payable(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_payable(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_stringliteral_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 18)\n store_literal_in_memory_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos, 0)\n store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470(pos)\n end := add(pos, 0)\n }\n\n function abi_encode_tuple_packed_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos ) -> end {\n\n pos := abi_encode_t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack( pos)\n\n end := pos\n }\n\n function abi_encode_tuple_t_stringliteral_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos, length) -> updated_pos {\n updated_pos := pos\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function cleanup_t_address_payable(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function store_literal_in_memory_2b75519baca6883ce3f5b359538cb1b4b03905a5b75d77101dd70b3c2fd4965d(memPtr) {\n\n mstore(add(memPtr, 0), \"Failed to send eth\")\n\n }\n\n function store_literal_in_memory_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470(memPtr) {\n\n }\n\n function validator_revert_t_address_payable(value) {\n if iszero(eq(value, cleanup_t_address_payable(value))) { revert(0, 0) }\n }\n\n}\n", | |
"id": 1, | |
"language": "Yul", | |
"name": "#utility.yul" | |
} | |
], | |
"immutableReferences": {}, | |
"linkReferences": {}, | |
"object": "6080604052600436106100345760003560e01c80631a695230146100395780633e58c58c14610055578063f55332ab14610071575b600080fd5b610053600480360381019061004e919061021c565b61008d565b005b61006f600480360381019061006a919061021c565b6100d7565b005b61008b6004803603810190610086919061021c565b610154565b005b8073ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156100d3573d6000803e3d6000fd5b5050565b60008173ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050905080610150576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610147906102a0565b60405180910390fd5b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163460405161017b9061028b565b60006040518083038185875af1925050503d80600081146101b8576040519150601f19603f3d011682016040523d82523d6000602084013e6101bd565b606091505b509150915081610202576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f9906102a0565b60405180910390fd5b505050565b6000813590506102168161033a565b92915050565b60006020828403121561022e57600080fd5b600061023c84828501610207565b91505092915050565b60006102526012836102cb565b915061025d8261030e565b602082019050919050565b60006102756000836102c0565b915061028082610337565b600082019050919050565b600061029682610268565b9150819050919050565b600060208201905081810360008301526102b981610245565b9050919050565b600081905092915050565b600082825260208201905092915050565b60006102e7826102ee565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4661696c656420746f2073656e64206574680000000000000000000000000000600082015250565b50565b610343816102dc565b811461034e57600080fd5b5056fea2646970667358221220c71639fae5d68933a17378380797b84c35f348adea724442f372f95118057e6864736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x34 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x1A695230 EQ PUSH2 0x39 JUMPI DUP1 PUSH4 0x3E58C58C EQ PUSH2 0x55 JUMPI DUP1 PUSH4 0xF55332AB EQ PUSH2 0x71 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x53 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x4E SWAP2 SWAP1 PUSH2 0x21C JUMP JUMPDEST PUSH2 0x8D JUMP JUMPDEST STOP JUMPDEST PUSH2 0x6F PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6A SWAP2 SWAP1 PUSH2 0x21C JUMP JUMPDEST PUSH2 0xD7 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x8B PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x86 SWAP2 SWAP1 PUSH2 0x21C JUMP JUMPDEST PUSH2 0x154 JUMP JUMPDEST STOP JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC CALLVALUE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0xD3 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC CALLVALUE SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP SWAP1 POP DUP1 PUSH2 0x150 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x147 SWAP1 PUSH2 0x2A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLVALUE PUSH1 0x40 MLOAD PUSH2 0x17B SWAP1 PUSH2 0x28B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP RETURNDATASIZE DUP1 PUSH1 0x0 DUP2 EQ PUSH2 0x1B8 JUMPI PUSH1 0x40 MLOAD SWAP2 POP PUSH1 0x1F NOT PUSH1 0x3F RETURNDATASIZE ADD AND DUP3 ADD PUSH1 0x40 MSTORE RETURNDATASIZE DUP3 MSTORE RETURNDATASIZE PUSH1 0x0 PUSH1 0x20 DUP5 ADD RETURNDATACOPY PUSH2 0x1BD JUMP JUMPDEST PUSH1 0x60 SWAP2 POP JUMPDEST POP SWAP2 POP SWAP2 POP DUP2 PUSH2 0x202 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1F9 SWAP1 PUSH2 0x2A0 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x216 DUP2 PUSH2 0x33A JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x22E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x23C DUP5 DUP3 DUP6 ADD PUSH2 0x207 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x252 PUSH1 0x12 DUP4 PUSH2 0x2CB JUMP JUMPDEST SWAP2 POP PUSH2 0x25D DUP3 PUSH2 0x30E JUMP JUMPDEST PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x275 PUSH1 0x0 DUP4 PUSH2 0x2C0 JUMP JUMPDEST SWAP2 POP PUSH2 0x280 DUP3 PUSH2 0x337 JUMP JUMPDEST PUSH1 0x0 DUP3 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x296 DUP3 PUSH2 0x268 JUMP JUMPDEST SWAP2 POP DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2B9 DUP2 PUSH2 0x245 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E7 DUP3 PUSH2 0x2EE JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH32 0x4661696C656420746F2073656E64206574680000000000000000000000000000 PUSH1 0x0 DUP3 ADD MSTORE POP JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x343 DUP2 PUSH2 0x2DC JUMP JUMPDEST DUP2 EQ PUSH2 0x34E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC7 AND CODECOPY STATICCALL 0xE5 0xD6 DUP10 CALLER LOG1 PUSH20 0x78380797B84C35F348ADEA724442F372F9511805 PUSH31 0x6864736F6C6343000804003300000000000000000000000000000000000000 ", | |
"sourceMap": "304:536:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;412:94;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;512:143;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;661:175;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;412:94;476:3;:12;;:23;489:9;476:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;412:94;:::o;512:143::-;572:9;584:3;:8;;:19;593:9;584:19;;;;;;;;;;;;;;;;;;;;;;;572:31;;621:4;613:35;;;;;;;;;;;;:::i;:::-;;;;;;;;;512:143;;:::o;661:175::-;722:9;733:17;754:3;:8;;770:9;754:30;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;721:63;;;;802:4;794:35;;;;;;;;;;;;:::i;:::-;;;;;;;;;661:175;;;:::o;7:155:1:-;61:5;99:6;86:20;77:29;;115:41;150:5;115:41;:::i;:::-;67:95;;;;:::o;168:278::-;235:6;284:2;272:9;263:7;259:23;255:32;252:2;;;300:1;297;290:12;252:2;343:1;368:61;421:7;412:6;401:9;397:22;368:61;:::i;:::-;358:71;;314:125;242:204;;;;:::o;452:366::-;594:3;615:67;679:2;674:3;615:67;:::i;:::-;608:74;;691:93;780:3;691:93;:::i;:::-;809:2;804:3;800:12;793:19;;598:220;;;:::o;824:398::-;983:3;1004:83;1085:1;1080:3;1004:83;:::i;:::-;997:90;;1096:93;1185:3;1096:93;:::i;:::-;1214:1;1209:3;1205:11;1198:18;;987:235;;;:::o;1228:379::-;1412:3;1434:147;1577:3;1434:147;:::i;:::-;1427:154;;1598:3;1591:10;;1416:191;;;:::o;1613:419::-;1779:4;1817:2;1806:9;1802:18;1794:26;;1866:9;1860:4;1856:20;1852:1;1841:9;1837:17;1830:47;1894:131;2020:4;1894:131;:::i;:::-;1886:139;;1784:248;;;:::o;2038:147::-;2139:11;2176:3;2161:18;;2151:34;;;;:::o;2191:169::-;2275:11;2309:6;2304:3;2297:19;2349:4;2344:3;2340:14;2325:29;;2287:73;;;;:::o;2366:104::-;2411:7;2440:24;2458:5;2440:24;:::i;:::-;2429:35;;2419:51;;;:::o;2476:126::-;2513:7;2553:42;2546:5;2542:54;2531:65;;2521:81;;;:::o;2608:168::-;2748:20;2744:1;2736:6;2732:14;2725:44;2714:62;:::o;2782:114::-;2888:8;:::o;2902:138::-;2983:32;3009:5;2983:32;:::i;:::-;2976:5;2973:43;2963:2;;3030:1;3027;3020:12;2963:2;2953:87;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "180600", | |
"executionCost": "226", | |
"totalCost": "180826" | |
}, | |
"external": { | |
"call(address)": "infinite", | |
"send(address)": "infinite", | |
"transfer(address)": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"call(address)": "f55332ab", | |
"send(address)": "3e58c58c", | |
"transfer(address)": "1a695230" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address payable", | |
"name": "_to", | |
"type": "address" | |
} | |
], | |
"name": "call", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address payable", | |
"name": "_to", | |
"type": "address" | |
} | |
], | |
"name": "send", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address payable", | |
"name": "_to", | |
"type": "address" | |
} | |
], | |
"name": "transfer", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
} | |
] | |
} |
This file contains hidden or 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
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address payable", | |
"name": "_to", | |
"type": "address" | |
} | |
], | |
"name": "call", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address payable", | |
"name": "_to", | |
"type": "address" | |
} | |
], | |
"name": "send", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address payable", | |
"name": "_to", | |
"type": "address" | |
} | |
], | |
"name": "transfer", | |
"outputs": [], | |
"stateMutability": "payable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"SendEther.sol": "SendEther" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"SendEther.sol": { | |
"keccak256": "0x90169a1a162666a1b0f39856a6f4a383e3d7924e9a29d446793fa70927051826", | |
"license": "MIT", | |
"urls": [ | |
"bzz-raw://fdee968a3fe9017c18ec74ead3774a112c356750488b4c00e7f1b43e765ec562", | |
"dweb:/ipfs/QmXat1EFyDzRRvvaoQvbGfsDkGE64ePUkdHRS8qiBh6kXC" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains hidden or 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; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { | |
uint256 number; | |
/** | |
* @dev Store value in variable | |
* @param num value to store | |
*/ | |
function store(uint256 num) public { | |
number = num; | |
} | |
/** | |
* @dev Return value | |
* @return value of 'number' | |
*/ | |
function retrieve() public view returns (uint256){ | |
return number; | |
} | |
} |
This file contains hidden or 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; | |
/** | |
* @title Owner | |
* @dev Set & change owner | |
*/ | |
contract Owner { | |
address private owner; | |
// event for EVM logging | |
event OwnerSet(address indexed oldOwner, address indexed newOwner); | |
// modifier to check if caller is owner | |
modifier isOwner() { | |
// If the first argument of 'require' evaluates to 'false', execution terminates and all | |
// changes to the state and to Ether balances are reverted. | |
// This used to consume all gas in old EVM versions, but not anymore. | |
// It is often a good idea to use 'require' to check if functions are called correctly. | |
// As a second argument, you can also provide an explanation about what went wrong. | |
require(msg.sender == owner, "Caller is not owner"); | |
_; | |
} | |
/** | |
* @dev Set contract deployer as owner | |
*/ | |
constructor() { | |
owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor | |
emit OwnerSet(address(0), owner); | |
} | |
/** | |
* @dev Change owner | |
* @param newOwner address of new owner | |
*/ | |
function changeOwner(address newOwner) public isOwner { | |
emit OwnerSet(owner, newOwner); | |
owner = newOwner; | |
} | |
/** | |
* @dev Return owner address | |
* @return address of owner | |
*/ | |
function getOwner() external view returns (address) { | |
return owner; | |
} | |
} |
This file contains hidden or 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; | |
/** | |
* @title Ballot | |
* @dev Implements voting process along with vote delegation | |
*/ | |
contract Ballot { | |
struct Voter { | |
uint weight; // weight is accumulated by delegation | |
bool voted; // if true, that person already voted | |
address delegate; // person delegated to | |
uint vote; // index of the voted proposal | |
} | |
struct Proposal { | |
// If you can limit the length to a certain number of bytes, | |
// always use one of bytes1 to bytes32 because they are much cheaper | |
bytes32 name; // short name (up to 32 bytes) | |
uint voteCount; // number of accumulated votes | |
} | |
address public chairperson; | |
mapping(address => Voter) public voters; | |
Proposal[] public proposals; | |
/** | |
* @dev Create a new ballot to choose one of 'proposalNames'. | |
* @param proposalNames names of proposals | |
*/ | |
constructor(bytes32[] memory proposalNames) { | |
chairperson = msg.sender; | |
voters[chairperson].weight = 1; | |
for (uint i = 0; i < proposalNames.length; i++) { | |
// 'Proposal({...})' creates a temporary | |
// Proposal object and 'proposals.push(...)' | |
// appends it to the end of 'proposals'. | |
proposals.push(Proposal({ | |
name: proposalNames[i], | |
voteCount: 0 | |
})); | |
} | |
} | |
/** | |
* @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. | |
* @param voter address of voter | |
*/ | |
function giveRightToVote(address voter) public { | |
require( | |
msg.sender == chairperson, | |
"Only chairperson can give right to vote." | |
); | |
require( | |
!voters[voter].voted, | |
"The voter already voted." | |
); | |
require(voters[voter].weight == 0); | |
voters[voter].weight = 1; | |
} | |
/** | |
* @dev Delegate your vote to the voter 'to'. | |
* @param to address to which vote is delegated | |
*/ | |
function delegate(address to) public { | |
Voter storage sender = voters[msg.sender]; | |
require(!sender.voted, "You already voted."); | |
require(to != msg.sender, "Self-delegation is disallowed."); | |
while (voters[to].delegate != address(0)) { | |
to = voters[to].delegate; | |
// We found a loop in the delegation, not allowed. | |
require(to != msg.sender, "Found loop in delegation."); | |
} | |
sender.voted = true; | |
sender.delegate = to; | |
Voter storage delegate_ = voters[to]; | |
if (delegate_.voted) { | |
// If the delegate already voted, | |
// directly add to the number of votes | |
proposals[delegate_.vote].voteCount += sender.weight; | |
} else { | |
// If the delegate did not vote yet, | |
// add to her weight. | |
delegate_.weight += sender.weight; | |
} | |
} | |
/** | |
* @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. | |
* @param proposal index of proposal in the proposals array | |
*/ | |
function vote(uint proposal) public { | |
Voter storage sender = voters[msg.sender]; | |
require(sender.weight != 0, "Has no right to vote"); | |
require(!sender.voted, "Already voted."); | |
sender.voted = true; | |
sender.vote = proposal; | |
// If 'proposal' is out of the range of the array, | |
// this will throw automatically and revert all | |
// changes. | |
proposals[proposal].voteCount += sender.weight; | |
} | |
/** | |
* @dev Computes the winning proposal taking all previous votes into account. | |
* @return winningProposal_ index of winning proposal in the proposals array | |
*/ | |
function winningProposal() public view | |
returns (uint winningProposal_) | |
{ | |
uint winningVoteCount = 0; | |
for (uint p = 0; p < proposals.length; p++) { | |
if (proposals[p].voteCount > winningVoteCount) { | |
winningVoteCount = proposals[p].voteCount; | |
winningProposal_ = p; | |
} | |
} | |
} | |
/** | |
* @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then | |
* @return winnerName_ the name of the winner | |
*/ | |
function winnerName() public view | |
returns (bytes32 winnerName_) | |
{ | |
winnerName_ = proposals[winningProposal()].name; | |
} | |
} |
This file contains hidden or 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
pragma solidity ^0.8; | |
contract Error{ | |
uint256 public balance; | |
function deposit(uint256 _amount) public { | |
balance += _amount; | |
} | |
function withdraw(uint256 _amount) public { | |
balance -= _amount; | |
} | |
} |
This file contains hidden or 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
pragma solidity ^0.8; | |
contract Event{ | |
event Log1(address indexed sender, uint256 value); | |
string log; | |
function test() external{ | |
emit Log1(msg.sender, 100); | |
log = 'dfkg' | |
} | |
} |
This file contains hidden or 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; | |
contract ReceiveEther{ | |
string public data; | |
function balance() public view returns(uint256) { | |
return address(this).balance; | |
} | |
// msg.data为空时候 | |
receive() external payable{ | |
data = "receive call"; | |
} | |
// msg.data不为空时候 | |
fallback() external payable{ | |
data = "fallback call"; | |
} | |
} | |
This file contains hidden or 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
pragma solidity ^0.8.4; | |
contract HelloWorld{ | |
string public greet = 'Hello World!'; | |
//0xd9145CCE52D386f254917e481eB44e9943F39138 | |
} |
This file contains hidden or 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; | |
contract Payable{ | |
mapping(address => uint256) public balanceOf; | |
function deposit() public payable { | |
balanceOf[msg.sender] += msg.value; | |
} | |
function withdraw() public { | |
payable(msg.sender).transfer(balanceOf[msg.sender]); | |
balanceOf[msg.sender] = 0; | |
} | |
function balance() public view returns(uint256) { | |
return address(this).balance; | |
} | |
} |
This file contains hidden or 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
// Right click on the script name and hit "Run" to execute | |
(async () => { | |
try { | |
console.log('Running deployWithEthers script...') | |
const contractName = 'Storage' // Change this for other contract | |
const constructorArgs = [] // Put constructor args (if any) here for your contract | |
// Note that the script needs the ABI which is generated from the compilation artifact. | |
// Make sure contract is compiled and artifacts are generated | |
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path | |
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) | |
// 'web3Provider' is a remix global variable object | |
const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() | |
let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); | |
let contract = await factory.deploy(...constructorArgs); | |
console.log('Contract Address: ', contract.address); | |
// The contract is NOT deployed yet; we must wait until it is mined | |
await contract.deployed() | |
console.log('Deployment successful.') | |
} catch (e) { | |
console.log(e.message) | |
} | |
})() |
This file contains hidden or 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
// Right click on the script name and hit "Run" to execute | |
(async () => { | |
try { | |
console.log('Running deployWithWeb3 script...') | |
const contractName = 'Storage' // Change this for other contract | |
const constructorArgs = [] // Put constructor args (if any) here for your contract | |
// Note that the script needs the ABI which is generated from the compilation artifact. | |
// Make sure contract is compiled and artifacts are generated | |
const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path | |
const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) | |
const accounts = await web3.eth.getAccounts() | |
let contract = new web3.eth.Contract(metadata.abi) | |
contract = contract.deploy({ | |
data: metadata.data.bytecode.object, | |
arguments: constructorArgs | |
}) | |
const newContractInstance = await contract.send({ | |
from: accounts[0], | |
gas: 1500000, | |
gasPrice: '30000000000' | |
}) | |
console.log('Contract deployed at address: ', newContractInstance.options.address) | |
} catch (e) { | |
console.log(e.message) | |
} | |
})() |
This file contains hidden or 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; | |
contract ReceiveEther{ | |
function balance() public view returns(uint256) { | |
return address(this).balance; | |
} | |
//合约一般不接收,这里为了测试加上了 | |
receive() external payable{} | |
fallback() external payable{} | |
} | |
contract SendEther{ | |
//transfer | |
//send | |
//call | |
//前两种,可能会失败,不推荐 | |
function transfer(address payable _to) public payable { | |
_to.transfer(msg.value); | |
} | |
function send(address payable _to) public payable { | |
bool sent = _to.send(msg.value); | |
require(sent, "Failed to send eth"); | |
} | |
function call(address payable _to) public payable { | |
(bool sent, bytes memory data) = _to.call{value: msg.value}(""); | |
require(sent, "Failed to send eth"); | |
} | |
} |
This file contains hidden or 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; | |
import "remix_tests.sol"; // this import is automatically injected by Remix. | |
import "../contracts/3_Ballot.sol"; | |
contract BallotTest { | |
bytes32[] proposalNames; | |
Ballot ballotToTest; | |
function beforeAll () public { | |
proposalNames.push(bytes32("candidate1")); | |
ballotToTest = new Ballot(proposalNames); | |
} | |
function checkWinningProposal () public { | |
ballotToTest.vote(0); | |
Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal"); | |
Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name"); | |
} | |
function checkWinninProposalWithReturnValue () public view returns (bool) { | |
return ballotToTest.winningProposal() == 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment