Created
July 13, 2021 12:31
-
-
Save BigSamu/8228d1fa3c1b80ff7a9dfa73ca52c3d2 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 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 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 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 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.4.22 <0.9.0; | |
contract HelloWorldContract { | |
string greeting; | |
constructor() public { | |
greeting = 'Hello World'; | |
} | |
function greet() public view returns (string memory) { | |
return greeting; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.4.22 <0.9.0; | |
contract Bank { | |
struct Account { | |
address addr; | |
uint amount; | |
} | |
Account public acc_1 = Account({ | |
addr:0x5B38Da6a701c568545dCfcB03FcB875f56beddC4, | |
amount: 50 | |
}); | |
Account public acc_2 = Account({ | |
addr:0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2, | |
amount: 50 | |
}); | |
function addAmount (uint _addMoney) public { | |
acc_1.amount += _addMoney; | |
} | |
function withdraw (uint _substractMoney) public { | |
acc_1.amount -= _substractMoney; | |
} | |
function transfer (uint _transferMoney) public { | |
require(acc_1.amount >= _transferMoney); // check enough credit for transfering | |
require(acc_2.amount + _transferMoney >= acc_2.amount); // check for overflow when transfering | |
acc_1.amount -= _transferMoney; | |
acc_2.amount += _transferMoney; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": "60806040526040518060400160405280735b38da6a701c568545dcfcb03fcb875f56beddc473ffffffffffffffffffffffffffffffffffffffff16815260200160328152506000808201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050604051806040016040528073ab8483f64d9c6d1ecf9b849ae677dd3315835cb273ffffffffffffffffffffffffffffffffffffffff1681526020016032815250600260008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505034801561013957600080fd5b506103c6806101496000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630912f2321461005c57806312514bba146100785780632e1a7d4d1461009457806359e596cc146100b0578063b8c34e4c146100cf575b600080fd5b61007660048036038101906100719190610214565b6100ee565b005b610092600480360381019061008d9190610214565b61010d565b005b6100ae60048036038101906100a99190610214565b61017c565b005b6100b861019b565b6040516100c692919061025b565b60405180910390f35b6100d76101cd565b6040516100e592919061025b565b60405180910390f35b80600060010160008282546101039190610284565b9250508190555050565b80600060010154101561011f57600080fd5b600260010154816002600101546101369190610284565b101561014157600080fd5b806000600101600082825461015691906102da565b9250508190555080600260010160008282546101729190610284565b9250508190555050565b806000600101600082825461019191906102da565b9250508190555050565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60028060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60008135905061020e81610379565b92915050565b60006020828403121561022657600080fd5b6000610234848285016101ff565b91505092915050565b6102468161030e565b82525050565b61025581610340565b82525050565b6000604082019050610270600083018561023d565b61027d602083018461024c565b9392505050565b600061028f82610340565b915061029a83610340565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156102cf576102ce61034a565b5b828201905092915050565b60006102e582610340565b91506102f083610340565b9250828210156103035761030261034a565b5b828203905092915050565b600061031982610320565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61038281610340565b811461038d57600080fd5b5056fea2646970667358221220c7ddd2e37fa105c5c5d5985426082bb7bc4c4a2bd31500dc39e435a7d73e35ea64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH20 0x5B38DA6A701C568545DCFCB03FCB875F56BEDDC4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x32 DUP2 MSTORE POP PUSH1 0x0 DUP1 DUP3 ADD MLOAD DUP2 PUSH1 0x0 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x20 DUP3 ADD MLOAD DUP2 PUSH1 0x1 ADD SSTORE POP POP PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH20 0xAB8483F64D9C6D1ECF9B849AE677DD3315835CB2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x32 DUP2 MSTORE POP PUSH1 0x2 PUSH1 0x0 DUP3 ADD MLOAD DUP2 PUSH1 0x0 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x20 DUP3 ADD MLOAD DUP2 PUSH1 0x1 ADD SSTORE POP POP CALLVALUE DUP1 ISZERO PUSH2 0x139 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3C6 DUP1 PUSH2 0x149 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 0x57 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x912F232 EQ PUSH2 0x5C JUMPI DUP1 PUSH4 0x12514BBA EQ PUSH2 0x78 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x94 JUMPI DUP1 PUSH4 0x59E596CC EQ PUSH2 0xB0 JUMPI DUP1 PUSH4 0xB8C34E4C EQ PUSH2 0xCF JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x76 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x214 JUMP JUMPDEST PUSH2 0xEE JUMP JUMPDEST STOP JUMPDEST PUSH2 0x92 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x8D SWAP2 SWAP1 PUSH2 0x214 JUMP JUMPDEST PUSH2 0x10D JUMP JUMPDEST STOP JUMPDEST PUSH2 0xAE PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0xA9 SWAP2 SWAP1 PUSH2 0x214 JUMP JUMPDEST PUSH2 0x17C JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB8 PUSH2 0x19B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC6 SWAP3 SWAP2 SWAP1 PUSH2 0x25B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD7 PUSH2 0x1CD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE5 SWAP3 SWAP2 SWAP1 PUSH2 0x25B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x103 SWAP2 SWAP1 PUSH2 0x284 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD SLOAD LT ISZERO PUSH2 0x11F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x1 ADD SLOAD DUP2 PUSH1 0x2 PUSH1 0x1 ADD SLOAD PUSH2 0x136 SWAP2 SWAP1 PUSH2 0x284 JUMP JUMPDEST LT ISZERO PUSH2 0x141 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x156 SWAP2 SWAP1 PUSH2 0x2DA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP1 PUSH1 0x2 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x172 SWAP2 SWAP1 PUSH2 0x284 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x191 SWAP2 SWAP1 PUSH2 0x2DA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x2 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x20E DUP2 PUSH2 0x379 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x226 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x234 DUP5 DUP3 DUP6 ADD PUSH2 0x1FF JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x246 DUP2 PUSH2 0x30E JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x255 DUP2 PUSH2 0x340 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x270 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23D JUMP JUMPDEST PUSH2 0x27D PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x24C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x28F DUP3 PUSH2 0x340 JUMP JUMPDEST SWAP2 POP PUSH2 0x29A DUP4 PUSH2 0x340 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x2CF JUMPI PUSH2 0x2CE PUSH2 0x34A JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E5 DUP3 PUSH2 0x340 JUMP JUMPDEST SWAP2 POP PUSH2 0x2F0 DUP4 PUSH2 0x340 JUMP JUMPDEST SWAP3 POP DUP3 DUP3 LT ISZERO PUSH2 0x303 JUMPI PUSH2 0x302 PUSH2 0x34A JUMP JUMPDEST JUMPDEST DUP3 DUP3 SUB SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x319 DUP3 PUSH2 0x320 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 0x382 DUP2 PUSH2 0x340 JUMP JUMPDEST DUP2 EQ PUSH2 0x38D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC7 0xDD 0xD2 0xE3 PUSH32 0xA105C5C5D5985426082BB7BC4C4A2BD31500DC39E435A7D73E35EA64736F6C63 NUMBER STOP ADDMOD DIV STOP CALLER ", | |
"sourceMap": "34:875:0:-:0;;;152:92;;;;;;;;175:42;152:92;;;;;;235:2;152:92;;;129:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;278:92;;;;;;;;301:42;278:92;;;;;;361:2;278:92;;;255:115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34:875;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:2142: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_address", | |
"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_address_to_t_address_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": "609:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "626:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "649:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "631:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "631:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "619:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "619:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "619:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "597:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "604:3:1", | |
"type": "" | |
} | |
], | |
"src": "544:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "794:206:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "804:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "816:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "827:2:1", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "812:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "812:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "804:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "884:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "897:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "908:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "893:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "893:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "840:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "840:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "840:71:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "965:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "978:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "989:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "974:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "974:18:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "921:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "921:72:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "921:72:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_address_t_uint256__to_t_address_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "758:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "770:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "778:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "789:4:1", | |
"type": "" | |
} | |
], | |
"src": "668:332:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1050:261:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1060:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1083:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1065:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1065:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1060:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1094:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1117:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1099:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1099:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1094:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1257:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1259:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1259:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1259:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1178:1:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1185:66:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1253:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "1181:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1181:74:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "1175:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1175:81:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1172:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1289:16:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1300:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1303:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1296:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1296:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulIdentifier", | |
"src": "1289:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_add_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "1037:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "1040:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulTypedName", | |
"src": "1046:3:1", | |
"type": "" | |
} | |
], | |
"src": "1006:305:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1362:146:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1372:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1395:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1377:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1377:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1372:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1406:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1429:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1411:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1411:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1406:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1453:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1455:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1455:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1455:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1447:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1450:1:1" | |
} | |
], | |
"functionName": { | |
"name": "lt", | |
"nodeType": "YulIdentifier", | |
"src": "1444:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1444:8:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1441:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1485:17:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1497:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1500:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "1493:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1493:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "diff", | |
"nodeType": "YulIdentifier", | |
"src": "1485:4:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_sub_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "1348:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "1351:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "diff", | |
"nodeType": "YulTypedName", | |
"src": "1357:4:1", | |
"type": "" | |
} | |
], | |
"src": "1317:191:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1559:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1569:35:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1598:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "1580:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1580:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1569:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1541:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1551:7:1", | |
"type": "" | |
} | |
], | |
"src": "1514:96:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1661:81:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1671:65:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1686:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1693:42:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1682:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1682:54:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1671:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1643:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1653:7:1", | |
"type": "" | |
} | |
], | |
"src": "1616:126:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1793:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1803:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1814:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1803:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1775:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1785:7:1", | |
"type": "" | |
} | |
], | |
"src": "1748:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1859:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1876:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1879:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1869:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1869:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1869:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1973:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1976:4:1", | |
"type": "", | |
"value": "0x11" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1966:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1966:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1966:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1997:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2000:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1990:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1990:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1990:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x11", | |
"nodeType": "YulFunctionDefinition", | |
"src": "1831:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2060:79:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "2117:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2126:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "2129:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "2119:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2119:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "2119:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2083:5:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "2108:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "2090:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2090:24:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "2080:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2080:35:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "2073:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "2073:43:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "2070:2:1" | |
} | |
] | |
}, | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "2053:5:1", | |
"type": "" | |
} | |
], | |
"src": "2017: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_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\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_address_t_uint256__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_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\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_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_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": "608060405234801561001057600080fd5b50600436106100575760003560e01c80630912f2321461005c57806312514bba146100785780632e1a7d4d1461009457806359e596cc146100b0578063b8c34e4c146100cf575b600080fd5b61007660048036038101906100719190610214565b6100ee565b005b610092600480360381019061008d9190610214565b61010d565b005b6100ae60048036038101906100a99190610214565b61017c565b005b6100b861019b565b6040516100c692919061025b565b60405180910390f35b6100d76101cd565b6040516100e592919061025b565b60405180910390f35b80600060010160008282546101039190610284565b9250508190555050565b80600060010154101561011f57600080fd5b600260010154816002600101546101369190610284565b101561014157600080fd5b806000600101600082825461015691906102da565b9250508190555080600260010160008282546101729190610284565b9250508190555050565b806000600101600082825461019191906102da565b9250508190555050565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60028060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60008135905061020e81610379565b92915050565b60006020828403121561022657600080fd5b6000610234848285016101ff565b91505092915050565b6102468161030e565b82525050565b61025581610340565b82525050565b6000604082019050610270600083018561023d565b61027d602083018461024c565b9392505050565b600061028f82610340565b915061029a83610340565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156102cf576102ce61034a565b5b828201905092915050565b60006102e582610340565b91506102f083610340565b9250828210156103035761030261034a565b5b828203905092915050565b600061031982610320565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b61038281610340565b811461038d57600080fd5b5056fea2646970667358221220c7ddd2e37fa105c5c5d5985426082bb7bc4c4a2bd31500dc39e435a7d73e35ea64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x57 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x912F232 EQ PUSH2 0x5C JUMPI DUP1 PUSH4 0x12514BBA EQ PUSH2 0x78 JUMPI DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x94 JUMPI DUP1 PUSH4 0x59E596CC EQ PUSH2 0xB0 JUMPI DUP1 PUSH4 0xB8C34E4C EQ PUSH2 0xCF JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x76 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x71 SWAP2 SWAP1 PUSH2 0x214 JUMP JUMPDEST PUSH2 0xEE JUMP JUMPDEST STOP JUMPDEST PUSH2 0x92 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x8D SWAP2 SWAP1 PUSH2 0x214 JUMP JUMPDEST PUSH2 0x10D JUMP JUMPDEST STOP JUMPDEST PUSH2 0xAE PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0xA9 SWAP2 SWAP1 PUSH2 0x214 JUMP JUMPDEST PUSH2 0x17C JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB8 PUSH2 0x19B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xC6 SWAP3 SWAP2 SWAP1 PUSH2 0x25B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD7 PUSH2 0x1CD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE5 SWAP3 SWAP2 SWAP1 PUSH2 0x25B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x103 SWAP2 SWAP1 PUSH2 0x284 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD SLOAD LT ISZERO PUSH2 0x11F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x1 ADD SLOAD DUP2 PUSH1 0x2 PUSH1 0x1 ADD SLOAD PUSH2 0x136 SWAP2 SWAP1 PUSH2 0x284 JUMP JUMPDEST LT ISZERO PUSH2 0x141 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x156 SWAP2 SWAP1 PUSH2 0x2DA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP DUP1 PUSH1 0x2 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x172 SWAP2 SWAP1 PUSH2 0x284 JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x191 SWAP2 SWAP1 PUSH2 0x2DA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x2 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x20E DUP2 PUSH2 0x379 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x226 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x234 DUP5 DUP3 DUP6 ADD PUSH2 0x1FF JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x246 DUP2 PUSH2 0x30E JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x255 DUP2 PUSH2 0x340 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x270 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x23D JUMP JUMPDEST PUSH2 0x27D PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x24C JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x28F DUP3 PUSH2 0x340 JUMP JUMPDEST SWAP2 POP PUSH2 0x29A DUP4 PUSH2 0x340 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x2CF JUMPI PUSH2 0x2CE PUSH2 0x34A JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E5 DUP3 PUSH2 0x340 JUMP JUMPDEST SWAP2 POP PUSH2 0x2F0 DUP4 PUSH2 0x340 JUMP JUMPDEST SWAP3 POP DUP3 DUP3 LT ISZERO PUSH2 0x303 JUMPI PUSH2 0x302 PUSH2 0x34A JUMP JUMPDEST JUMPDEST DUP3 DUP3 SUB SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x319 DUP3 PUSH2 0x320 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 0x382 DUP2 PUSH2 0x340 JUMP JUMPDEST DUP2 EQ PUSH2 0x38D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC7 0xDD 0xD2 0xE3 PUSH32 0xA105C5C5D5985426082BB7BC4C4A2BD31500DC39E435A7D73E35EA64736F6C63 NUMBER STOP ADDMOD DIV STOP CALLER ", | |
"sourceMap": "34:875:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;381:85;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;582:325;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;476:96;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;129:115;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;255;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;381:85;450:9;434:5;:12;;;:25;;;;;;;:::i;:::-;;;;;;;;381:85;:::o;582:325::-;663:14;647:5;:12;;;:30;;639:39;;;;;;768:5;:12;;;750:14;735:5;:12;;;:29;;;;:::i;:::-;:45;;727:54;;;;;;846:14;830:5;:12;;;:30;;;;;;;:::i;:::-;;;;;;;;886:14;870:5;:12;;;:30;;;;;;;:::i;:::-;;;;;;;;582:325;:::o;476:96::-;550:15;534:5;:12;;;:31;;;;;;;:::i;:::-;;;;;;;;476:96;:::o;129:115::-;;;;;;;;;;;;;;;;;;;;;;;:::o;255:::-;;;;;;;;;;;;;;;;;;;;;;;:::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:118::-;631:24;649:5;631:24;:::i;:::-;626:3;619:37;609:53;;:::o;668:332::-;789:4;827:2;816:9;812:18;804:26;;840:71;908:1;897:9;893:17;884:6;840:71;:::i;:::-;921:72;989:2;978:9;974:18;965:6;921:72;:::i;:::-;794:206;;;;;:::o;1006:305::-;1046:3;1065:20;1083:1;1065:20;:::i;:::-;1060:25;;1099:20;1117:1;1099:20;:::i;:::-;1094:25;;1253:1;1185:66;1181:74;1178:1;1175:81;1172:2;;;1259:18;;:::i;:::-;1172:2;1303:1;1300;1296:9;1289:16;;1050:261;;;;:::o;1317:191::-;1357:4;1377:20;1395:1;1377:20;:::i;:::-;1372:25;;1411:20;1429:1;1411:20;:::i;:::-;1406:25;;1450:1;1447;1444:8;1441:2;;;1455:18;;:::i;:::-;1441:2;1500:1;1497;1493:9;1485:17;;1362:146;;;;:::o;1514:96::-;1551:7;1580:24;1598:5;1580:24;:::i;:::-;1569:35;;1559:51;;;:::o;1616:126::-;1653:7;1693:42;1686:5;1682:54;1671:65;;1661:81;;;:::o;1748:77::-;1785:7;1814:5;1803:16;;1793:32;;;:::o;1831:180::-;1879:77;1876:1;1869:88;1976:4;1973:1;1966:15;2000:4;1997:1;1990:15;2017:122;2090:24;2108:5;2090:24;:::i;:::-;2083:5;2080:35;2070:2;;2129:1;2126;2119:12;2070:2;2060:79;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "193200", | |
"executionCost": "82170", | |
"totalCost": "275370" | |
}, | |
"external": { | |
"acc_1()": "2184", | |
"acc_2()": "2206", | |
"addAmount(uint256)": "infinite", | |
"transfer(uint256)": "infinite", | |
"withdraw(uint256)": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"acc_1()": "59e596cc", | |
"acc_2()": "b8c34e4c", | |
"addAmount(uint256)": "0912f232", | |
"transfer(uint256)": "12514bba", | |
"withdraw(uint256)": "2e1a7d4d" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "acc_1", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "acc_2", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_addMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "addAmount", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_transferMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "transfer", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_substractMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "withdraw", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "acc_1", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"name": "acc_2", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_addMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "addAmount", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_transferMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "transfer", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_substractMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "withdraw", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"contracts/4_Structs.sol": "Bank" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"contracts/4_Structs.sol": { | |
"keccak256": "0xb99431165ece90ef7b86d892f48e28f7f9c077b47ff5149648d63528dea9afac", | |
"urls": [ | |
"bzz-raw://ed662b01f302c0e3fb5d832c797877de9d414bddd150709d20b4a9504199841b", | |
"dweb:/ipfs/QmRaF6N6axEc2T2tmiTeFC2zdEBAiQFnUUH2PT12i7Rw9E" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": { | |
"linkReferences": {}, | |
"object": "608060405234801561001057600080fd5b506040805190810160405280600b81526020017f48656c6c6f20576f726c640000000000000000000000000000000000000000008152506000908051906020019061005c929190610062565b50610107565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a357805160ff19168380011785556100d1565b828001600101855582156100d1579182015b828111156100d05782518255916020019190600101906100b5565b5b5090506100de91906100e2565b5090565b61010491905b808211156101005760008160009055506001016100e8565b5090565b90565b6101a4806101166000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063cfae321714610046575b600080fd5b34801561005257600080fd5b5061005b6100d6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561009b578082015181840152602081019050610080565b50505050905090810190601f1680156100c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b606060008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561016e5780601f106101435761010080835404028352916020019161016e565b820191906000526020600020905b81548152906001019060200180831161015157829003601f168201915b50505050509050905600a165627a7a723058209d17370f752e9cbec127972eabc260e5655b40cb03e5f99641a342a1615ac86f0029", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0xB DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x48656C6C6F20576F726C64000000000000000000000000000000000000000000 DUP2 MSTORE POP PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x5C SWAP3 SWAP2 SWAP1 PUSH2 0x62 JUMP JUMPDEST POP PUSH2 0x107 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0xA3 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0xD1 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0xD1 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0xD0 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0xB5 JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0xDE SWAP2 SWAP1 PUSH2 0xE2 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0x104 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x100 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0xE8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0x1A4 DUP1 PUSH2 0x116 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH4 0xFFFFFFFF AND DUP1 PUSH4 0xCFAE3217 EQ PUSH2 0x46 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x52 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5B PUSH2 0xD6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9B JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x80 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xC8 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV 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 PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0x16E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x143 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x16E 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 0x151 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 SWAP14 OR CALLDATACOPY 0xf PUSH22 0x2E9CBEC127972EABC260E5655B40CB03E5F99641A342 LOG1 PUSH2 0x5AC8 PUSH16 0x290000000000000000000000000000 ", | |
"sourceMap": "34:197:0:-;;;85:56;8:9:-1;5:2;;;30:1;27;20:12;5:2;85:56:0;112:24;;;;;;;;;;;;;;;;;;:8;:24;;;;;;;;;;;;:::i;:::-;;34:197;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"linkReferences": {}, | |
"object": "608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063cfae321714610046575b600080fd5b34801561005257600080fd5b5061005b6100d6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561009b578082015181840152602081019050610080565b50505050905090810190601f1680156100c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b606060008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561016e5780601f106101435761010080835404028352916020019161016e565b820191906000526020600020905b81548152906001019060200180831161015157829003601f168201915b50505050509050905600a165627a7a723058209d17370f752e9cbec127972eabc260e5655b40cb03e5f99641a342a1615ac86f0029", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x41 JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH4 0xFFFFFFFF AND DUP1 PUSH4 0xCFAE3217 EQ PUSH2 0x46 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x52 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5B PUSH2 0xD6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x9B JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x80 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xC8 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV 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 PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV DUP1 ISZERO PUSH2 0x16E JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x143 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x16E 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 0x151 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 SWAP14 OR CALLDATACOPY 0xf PUSH22 0x2E9CBEC127972EABC260E5655B40CB03E5F99641A342 LOG1 PUSH2 0x5AC8 PUSH16 0x290000000000000000000000000000 ", | |
"sourceMap": "34:197:0:-;;;;;;;;;;;;;;;;;;;;;;;;146:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;146:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;146:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;184:6;214:8;207:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;146:83;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "84000", | |
"executionCost": "infinite", | |
"totalCost": "infinite" | |
}, | |
"external": { | |
"greet()": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"greet()": "cfae3217" | |
} | |
}, | |
"abi": [ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "greet", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "string" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compiler": { | |
"version": "0.4.22+commit.4cb486ee" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "greet", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "string" | |
} | |
], | |
"payable": false, | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [], | |
"payable": false, | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
} | |
], | |
"devdoc": { | |
"methods": {} | |
}, | |
"userdoc": { | |
"methods": {} | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"contracts/3_Ballot.sol": "HelloWorldContract" | |
}, | |
"evmVersion": "byzantium", | |
"libraries": {}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"contracts/3_Ballot.sol": { | |
"keccak256": "0xbba66c6c08b59e53b78761671d7f615e029d707ddcb3d16f4fc56271f0b96405", | |
"urls": [ | |
"bzzr://3286a9d31fa5994bd61726176097a3fb08232a2cb8c79f7ef40b5a93064db16d" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": "60806040526040518060400160405280735b38da6a701c568545dcfcb03fcb875f56beddc473ffffffffffffffffffffffffffffffffffffffff16815260200160328152506000808201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015550503480156100a457600080fd5b5061025a806100b46000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630912f2321461003b5780637da1365e14610057575b600080fd5b610055600480360381019061005091906100dc565b610076565b005b61005f610095565b60405161006d929190610123565b60405180910390f35b806000600101600082825461008b919061014c565b9250508190555050565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000813590506100d68161020d565b92915050565b6000602082840312156100ee57600080fd5b60006100fc848285016100c7565b91505092915050565b61010e816101a2565b82525050565b61011d816101d4565b82525050565b60006040820190506101386000830185610105565b6101456020830184610114565b9392505050565b6000610157826101d4565b9150610162836101d4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610197576101966101de565b5b828201905092915050565b60006101ad826101b4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610216816101d4565b811461022157600080fd5b5056fea26469706673582212209e22121cbe6ed7c2dc030bbc489e7d0b9517769312cebbef1ea6016e7543415c64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH20 0x5B38DA6A701C568545DCFCB03FCB875F56BEDDC4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x32 DUP2 MSTORE POP PUSH1 0x0 DUP1 DUP3 ADD MLOAD DUP2 PUSH1 0x0 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x20 DUP3 ADD MLOAD DUP2 PUSH1 0x1 ADD SSTORE POP POP CALLVALUE DUP1 ISZERO PUSH2 0xA4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x25A DUP1 PUSH2 0xB4 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 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x912F232 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x7DA1365E EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xDC JUMP JUMPDEST PUSH2 0x76 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x95 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6D SWAP3 SWAP2 SWAP1 PUSH2 0x123 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x8B SWAP2 SWAP1 PUSH2 0x14C JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xD6 DUP2 PUSH2 0x20D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xFC DUP5 DUP3 DUP6 ADD PUSH2 0xC7 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x10E DUP2 PUSH2 0x1A2 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x11D DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x138 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x105 JUMP JUMPDEST PUSH2 0x145 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x114 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x157 DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP2 POP PUSH2 0x162 DUP4 PUSH2 0x1D4 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x197 JUMPI PUSH2 0x196 PUSH2 0x1DE JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AD DUP3 PUSH2 0x1B4 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 0x216 DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP2 EQ PUSH2 0x221 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP15 0x22 SLT SHR 0xBE PUSH15 0xD7C2DC030BBC489E7D0B9517769312 0xCE 0xBB 0xEF 0x1E 0xA6 ADD PUSH15 0x7543415C64736F6C63430008040033 ", | |
"sourceMap": "34:306:0:-:0;;;152:92;;;;;;;;175:42;152:92;;;;;;235:2;152:92;;;131:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34:306;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:1945: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_address", | |
"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_address_to_t_address_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": "609:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "626:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "649:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "631:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "631:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "619:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "619:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "619:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "597:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "604:3:1", | |
"type": "" | |
} | |
], | |
"src": "544:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "794:206:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "804:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "816:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "827:2:1", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "812:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "812:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "804:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "884:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "897:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "908:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "893:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "893:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "840:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "840:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "840:71:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "965:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "978:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "989:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "974:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "974:18:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "921:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "921:72:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "921:72:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_address_t_uint256__to_t_address_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "758:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "770:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "778:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "789:4:1", | |
"type": "" | |
} | |
], | |
"src": "668:332:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1050:261:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1060:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1083:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1065:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1065:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1060:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1094:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1117:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1099:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1099:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1094:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1257:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1259:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1259:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1259:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1178:1:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1185:66:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1253:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "1181:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1181:74:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "1175:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1175:81:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1172:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1289:16:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1300:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1303:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1296:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1296:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulIdentifier", | |
"src": "1289:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_add_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "1037:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "1040:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulTypedName", | |
"src": "1046:3:1", | |
"type": "" | |
} | |
], | |
"src": "1006:305:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1362:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1372:35:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1401:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "1383:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1383:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1372:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1344:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1354:7:1", | |
"type": "" | |
} | |
], | |
"src": "1317:96:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1464:81:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1474:65:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1489:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1496:42:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1485:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1485:54:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1474:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1446:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1456:7:1", | |
"type": "" | |
} | |
], | |
"src": "1419:126:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1596:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1606:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1617:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1606:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1578:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1588:7:1", | |
"type": "" | |
} | |
], | |
"src": "1551:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1662:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1679:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1682:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1672:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1672:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1672:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1776:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1779:4:1", | |
"type": "", | |
"value": "0x11" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1769:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1769:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1769:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1800:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1803:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1793:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1793:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1793:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x11", | |
"nodeType": "YulFunctionDefinition", | |
"src": "1634:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1863:79:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1920:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1929:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1932:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1922:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1922:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1922:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1886:5:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1911:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1893:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1893:24:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "1883:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1883:35:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1876:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1876:43:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1873:2:1" | |
} | |
] | |
}, | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1856:5:1", | |
"type": "" | |
} | |
], | |
"src": "1820: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_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\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_address_t_uint256__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_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\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_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": "608060405234801561001057600080fd5b50600436106100365760003560e01c80630912f2321461003b5780637da1365e14610057575b600080fd5b610055600480360381019061005091906100dc565b610076565b005b61005f610095565b60405161006d929190610123565b60405180910390f35b806000600101600082825461008b919061014c565b9250508190555050565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000813590506100d68161020d565b92915050565b6000602082840312156100ee57600080fd5b60006100fc848285016100c7565b91505092915050565b61010e816101a2565b82525050565b61011d816101d4565b82525050565b60006040820190506101386000830185610105565b6101456020830184610114565b9392505050565b6000610157826101d4565b9150610162836101d4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610197576101966101de565b5b828201905092915050565b60006101ad826101b4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610216816101d4565b811461022157600080fd5b5056fea26469706673582212209e22121cbe6ed7c2dc030bbc489e7d0b9517769312cebbef1ea6016e7543415c64736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x912F232 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x7DA1365E EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xDC JUMP JUMPDEST PUSH2 0x76 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x95 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6D SWAP3 SWAP2 SWAP1 PUSH2 0x123 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x8B SWAP2 SWAP1 PUSH2 0x14C JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xD6 DUP2 PUSH2 0x20D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xFC DUP5 DUP3 DUP6 ADD PUSH2 0xC7 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x10E DUP2 PUSH2 0x1A2 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x11D DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x138 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x105 JUMP JUMPDEST PUSH2 0x145 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x114 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x157 DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP2 POP PUSH2 0x162 DUP4 PUSH2 0x1D4 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x197 JUMPI PUSH2 0x196 PUSH2 0x1DE JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AD DUP3 PUSH2 0x1B4 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 0x216 DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP2 EQ PUSH2 0x221 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP15 0x22 SLT SHR 0xBE PUSH15 0xD7C2DC030BBC489E7D0B9517769312 0xCE 0xBB 0xEF 0x1E 0xA6 ADD PUSH15 0x7543415C64736F6C63430008040033 ", | |
"sourceMap": "34:306:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;255:83;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;131:113;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;255:83;322:9;308:3;:10;;;:23;;;;;;;:::i;:::-;;;;;;;;255:83;:::o;131:113::-;;;;;;;;;;;;;;;;;;;;;;;:::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:118::-;631:24;649:5;631:24;:::i;:::-;626:3;619:37;609:53;;:::o;668:332::-;789:4;827:2;816:9;812:18;804:26;;840:71;908:1;897:9;893:17;884:6;840:71;:::i;:::-;921:72;989:2;978:9;974:18;965:6;921:72;:::i;:::-;794:206;;;;;:::o;1006:305::-;1046:3;1065:20;1083:1;1065:20;:::i;:::-;1060:25;;1099:20;1117:1;1099:20;:::i;:::-;1094:25;;1253:1;1185:66;1181:74;1178:1;1175:81;1172:2;;;1259:18;;:::i;:::-;1172:2;1303:1;1300;1296:9;1289:16;;1050:261;;;;:::o;1317:96::-;1354:7;1383:24;1401:5;1383:24;:::i;:::-;1372:35;;1362:51;;;:::o;1419:126::-;1456:7;1496:42;1489:5;1485:54;1474:65;;1464:81;;;:::o;1551:77::-;1588:7;1617:5;1606:16;;1596:32;;;:::o;1634:180::-;1682:77;1679:1;1672:88;1779:4;1776:1;1769:15;1803:4;1800:1;1793:15;1820:122;1893:24;1911:5;1893:24;:::i;:::-;1886:5;1883:35;1873:2;;1932:1;1929;1922:12;1873:2;1863:79;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "120400", | |
"executionCost": "41131", | |
"totalCost": "161531" | |
}, | |
"external": { | |
"acc()": "2140", | |
"addAmount(uint256)": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"acc()": "7da1365e", | |
"addAmount(uint256)": "0912f232" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "acc", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_addMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "addAmount", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "acc", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_addMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "addAmount", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"contracts/4_Structs.sol": "Struct" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"contracts/4_Structs.sol": { | |
"keccak256": "0x139dee078ae9bb8bf49444a2a13f591832676d9b496d1c5e1db61e99051cc18c", | |
"urls": [ | |
"bzz-raw://a60a898efbdf97b2bafc273ae43f6a1ad7740d5dec1cf860d8f0a46a9d02b2db", | |
"dweb:/ipfs/QmdbmkhAfFXMuzc6kssXpYv681tw7A3EhPaHsXAvv84U37" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": "60806040526040518060400160405280735b38da6a701c568545dcfcb03fcb875f56beddc473ffffffffffffffffffffffffffffffffffffffff16815260200160328152506000808201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015550503480156100a457600080fd5b5061025a806100b46000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630912f2321461003b5780637da1365e14610057575b600080fd5b610055600480360381019061005091906100dc565b610076565b005b61005f610095565b60405161006d929190610123565b60405180910390f35b806000600101600082825461008b919061014c565b9250508190555050565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000813590506100d68161020d565b92915050565b6000602082840312156100ee57600080fd5b60006100fc848285016100c7565b91505092915050565b61010e816101a2565b82525050565b61011d816101d4565b82525050565b60006040820190506101386000830185610105565b6101456020830184610114565b9392505050565b6000610157826101d4565b9150610162836101d4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610197576101966101de565b5b828201905092915050565b60006101ad826101b4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610216816101d4565b811461022157600080fd5b5056fea2646970667358221220c2d80d0e62afdcb2fcdbb32e6317f6e8477f339b1beb6bf830ed605f3c8fecf864736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH20 0x5B38DA6A701C568545DCFCB03FCB875F56BEDDC4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x32 DUP2 MSTORE POP PUSH1 0x0 DUP1 DUP3 ADD MLOAD DUP2 PUSH1 0x0 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH1 0x20 DUP3 ADD MLOAD DUP2 PUSH1 0x1 ADD SSTORE POP POP CALLVALUE DUP1 ISZERO PUSH2 0xA4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x25A DUP1 PUSH2 0xB4 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 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x912F232 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x7DA1365E EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xDC JUMP JUMPDEST PUSH2 0x76 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x95 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6D SWAP3 SWAP2 SWAP1 PUSH2 0x123 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x8B SWAP2 SWAP1 PUSH2 0x14C JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xD6 DUP2 PUSH2 0x20D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xFC DUP5 DUP3 DUP6 ADD PUSH2 0xC7 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x10E DUP2 PUSH2 0x1A2 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x11D DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x138 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x105 JUMP JUMPDEST PUSH2 0x145 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x114 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x157 DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP2 POP PUSH2 0x162 DUP4 PUSH2 0x1D4 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x197 JUMPI PUSH2 0x196 PUSH2 0x1DE JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AD DUP3 PUSH2 0x1B4 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 0x216 DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP2 EQ PUSH2 0x221 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC2 0xD8 0xD 0xE PUSH3 0xAFDCB2 0xFC 0xDB 0xB3 0x2E PUSH4 0x17F6E847 PUSH32 0x339B1BEB6BF830ED605F3C8FECF864736F6C6343000804003300000000000000 ", | |
"sourceMap": "34:307:0:-:0;;;153:92;;;;;;;;176:42;153:92;;;;;;236:2;153:92;;;132:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34:307;;;;;;;;;;;;;;;;" | |
}, | |
"deployedBytecode": { | |
"generatedSources": [ | |
{ | |
"ast": { | |
"nodeType": "YulBlock", | |
"src": "0:1945: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_address", | |
"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_address_to_t_address_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": "609:53:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "pos", | |
"nodeType": "YulIdentifier", | |
"src": "626:3:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "649:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "631:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "631:24:1" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "619:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "619:37:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "619:37:1" | |
} | |
] | |
}, | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "597:5:1", | |
"type": "" | |
}, | |
{ | |
"name": "pos", | |
"nodeType": "YulTypedName", | |
"src": "604:3:1", | |
"type": "" | |
} | |
], | |
"src": "544:118:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "794:206:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "804:26:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "816:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "827:2:1", | |
"type": "", | |
"value": "64" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "812:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "812:18:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulIdentifier", | |
"src": "804:4:1" | |
} | |
] | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value0", | |
"nodeType": "YulIdentifier", | |
"src": "884:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "897:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "908:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "893:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "893:17:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_address_to_t_address_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "840:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "840:71:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "840:71:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"name": "value1", | |
"nodeType": "YulIdentifier", | |
"src": "965:6:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulIdentifier", | |
"src": "978:9:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "989:2:1", | |
"type": "", | |
"value": "32" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "974:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "974:18:1" | |
} | |
], | |
"functionName": { | |
"name": "abi_encode_t_uint256_to_t_uint256_fromStack", | |
"nodeType": "YulIdentifier", | |
"src": "921:43:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "921:72:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "921:72:1" | |
} | |
] | |
}, | |
"name": "abi_encode_tuple_t_address_t_uint256__to_t_address_t_uint256__fromStack_reversed", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "headStart", | |
"nodeType": "YulTypedName", | |
"src": "758:9:1", | |
"type": "" | |
}, | |
{ | |
"name": "value1", | |
"nodeType": "YulTypedName", | |
"src": "770:6:1", | |
"type": "" | |
}, | |
{ | |
"name": "value0", | |
"nodeType": "YulTypedName", | |
"src": "778:6:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "tail", | |
"nodeType": "YulTypedName", | |
"src": "789:4:1", | |
"type": "" | |
} | |
], | |
"src": "668:332:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1050:261:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1060:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1083:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1065:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1065:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1060:1:1" | |
} | |
] | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1094:25:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1117:1:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1099:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1099:20:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1094:1:1" | |
} | |
] | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1257:22:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [], | |
"functionName": { | |
"name": "panic_error_0x11", | |
"nodeType": "YulIdentifier", | |
"src": "1259:16:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1259:18:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1259:18:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1178:1:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1185:66:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1253:1:1" | |
} | |
], | |
"functionName": { | |
"name": "sub", | |
"nodeType": "YulIdentifier", | |
"src": "1181:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1181:74:1" | |
} | |
], | |
"functionName": { | |
"name": "gt", | |
"nodeType": "YulIdentifier", | |
"src": "1175:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1175:81:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1172:2:1" | |
}, | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1289:16:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "x", | |
"nodeType": "YulIdentifier", | |
"src": "1300:1:1" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulIdentifier", | |
"src": "1303:1:1" | |
} | |
], | |
"functionName": { | |
"name": "add", | |
"nodeType": "YulIdentifier", | |
"src": "1296:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1296:9:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulIdentifier", | |
"src": "1289:3:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "checked_add_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "x", | |
"nodeType": "YulTypedName", | |
"src": "1037:1:1", | |
"type": "" | |
}, | |
{ | |
"name": "y", | |
"nodeType": "YulTypedName", | |
"src": "1040:1:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "sum", | |
"nodeType": "YulTypedName", | |
"src": "1046:3:1", | |
"type": "" | |
} | |
], | |
"src": "1006:305:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1362:51:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1372:35:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1401:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulIdentifier", | |
"src": "1383:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1383:24:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1372:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_address", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1344:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1354:7:1", | |
"type": "" | |
} | |
], | |
"src": "1317:96:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1464:81:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1474:65:1", | |
"value": { | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1489:5:1" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1496:42:1", | |
"type": "", | |
"value": "0xffffffffffffffffffffffffffffffffffffffff" | |
} | |
], | |
"functionName": { | |
"name": "and", | |
"nodeType": "YulIdentifier", | |
"src": "1485:3:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1485:54:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1474:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint160", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1446:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1456:7:1", | |
"type": "" | |
} | |
], | |
"src": "1419:126:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1596:32:1", | |
"statements": [ | |
{ | |
"nodeType": "YulAssignment", | |
"src": "1606:16:1", | |
"value": { | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1617:5:1" | |
}, | |
"variableNames": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulIdentifier", | |
"src": "1606:7:1" | |
} | |
] | |
} | |
] | |
}, | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1578:5:1", | |
"type": "" | |
} | |
], | |
"returnVariables": [ | |
{ | |
"name": "cleaned", | |
"nodeType": "YulTypedName", | |
"src": "1588:7:1", | |
"type": "" | |
} | |
], | |
"src": "1551:77:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1662:152:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1679:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1682:77:1", | |
"type": "", | |
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1672:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1672:88:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1672:88:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1776:1:1", | |
"type": "", | |
"value": "4" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1779:4:1", | |
"type": "", | |
"value": "0x11" | |
} | |
], | |
"functionName": { | |
"name": "mstore", | |
"nodeType": "YulIdentifier", | |
"src": "1769:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1769:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1769:15:1" | |
}, | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1800:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1803:4:1", | |
"type": "", | |
"value": "0x24" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1793:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1793:15:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1793:15:1" | |
} | |
] | |
}, | |
"name": "panic_error_0x11", | |
"nodeType": "YulFunctionDefinition", | |
"src": "1634:180:1" | |
}, | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1863:79:1", | |
"statements": [ | |
{ | |
"body": { | |
"nodeType": "YulBlock", | |
"src": "1920:16:1", | |
"statements": [ | |
{ | |
"expression": { | |
"arguments": [ | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1929:1:1", | |
"type": "", | |
"value": "0" | |
}, | |
{ | |
"kind": "number", | |
"nodeType": "YulLiteral", | |
"src": "1932:1:1", | |
"type": "", | |
"value": "0" | |
} | |
], | |
"functionName": { | |
"name": "revert", | |
"nodeType": "YulIdentifier", | |
"src": "1922:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1922:12:1" | |
}, | |
"nodeType": "YulExpressionStatement", | |
"src": "1922:12:1" | |
} | |
] | |
}, | |
"condition": { | |
"arguments": [ | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1886:5:1" | |
}, | |
{ | |
"arguments": [ | |
{ | |
"name": "value", | |
"nodeType": "YulIdentifier", | |
"src": "1911:5:1" | |
} | |
], | |
"functionName": { | |
"name": "cleanup_t_uint256", | |
"nodeType": "YulIdentifier", | |
"src": "1893:17:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1893:24:1" | |
} | |
], | |
"functionName": { | |
"name": "eq", | |
"nodeType": "YulIdentifier", | |
"src": "1883:2:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1883:35:1" | |
} | |
], | |
"functionName": { | |
"name": "iszero", | |
"nodeType": "YulIdentifier", | |
"src": "1876:6:1" | |
}, | |
"nodeType": "YulFunctionCall", | |
"src": "1876:43:1" | |
}, | |
"nodeType": "YulIf", | |
"src": "1873:2:1" | |
} | |
] | |
}, | |
"name": "validator_revert_t_uint256", | |
"nodeType": "YulFunctionDefinition", | |
"parameters": [ | |
{ | |
"name": "value", | |
"nodeType": "YulTypedName", | |
"src": "1856:5:1", | |
"type": "" | |
} | |
], | |
"src": "1820: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_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\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_address_t_uint256__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_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\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_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": "608060405234801561001057600080fd5b50600436106100365760003560e01c80630912f2321461003b5780637da1365e14610057575b600080fd5b610055600480360381019061005091906100dc565b610076565b005b61005f610095565b60405161006d929190610123565b60405180910390f35b806000600101600082825461008b919061014c565b9250508190555050565b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6000813590506100d68161020d565b92915050565b6000602082840312156100ee57600080fd5b60006100fc848285016100c7565b91505092915050565b61010e816101a2565b82525050565b61011d816101d4565b82525050565b60006040820190506101386000830185610105565b6101456020830184610114565b9392505050565b6000610157826101d4565b9150610162836101d4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610197576101966101de565b5b828201905092915050565b60006101ad826101b4565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610216816101d4565b811461022157600080fd5b5056fea2646970667358221220c2d80d0e62afdcb2fcdbb32e6317f6e8477f339b1beb6bf830ed605f3c8fecf864736f6c63430008040033", | |
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x912F232 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x7DA1365E EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xDC JUMP JUMPDEST PUSH2 0x76 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x95 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6D SWAP3 SWAP2 SWAP1 PUSH2 0x123 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x8B SWAP2 SWAP1 PUSH2 0x14C JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD SLOAD SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0xD6 DUP2 PUSH2 0x20D JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xEE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xFC DUP5 DUP3 DUP6 ADD PUSH2 0xC7 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x10E DUP2 PUSH2 0x1A2 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x11D DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x138 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x105 JUMP JUMPDEST PUSH2 0x145 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x114 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x157 DUP3 PUSH2 0x1D4 JUMP JUMPDEST SWAP2 POP PUSH2 0x162 DUP4 PUSH2 0x1D4 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x197 JUMPI PUSH2 0x196 PUSH2 0x1DE JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1AD DUP3 PUSH2 0x1B4 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 0x216 DUP2 PUSH2 0x1D4 JUMP JUMPDEST DUP2 EQ PUSH2 0x221 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC2 0xD8 0xD 0xE PUSH3 0xAFDCB2 0xFC 0xDB 0xB3 0x2E PUSH4 0x17F6E847 PUSH32 0x339B1BEB6BF830ED605F3C8FECF864736F6C6343000804003300000000000000 ", | |
"sourceMap": "34:307:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;256:83;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;132:113;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;256:83;323:9;309:3;:10;;;:23;;;;;;;:::i;:::-;;;;;;;;256:83;:::o;132:113::-;;;;;;;;;;;;;;;;;;;;;;;:::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:118::-;631:24;649:5;631:24;:::i;:::-;626:3;619:37;609:53;;:::o;668:332::-;789:4;827:2;816:9;812:18;804:26;;840:71;908:1;897:9;893:17;884:6;840:71;:::i;:::-;921:72;989:2;978:9;974:18;965:6;921:72;:::i;:::-;794:206;;;;;:::o;1006:305::-;1046:3;1065:20;1083:1;1065:20;:::i;:::-;1060:25;;1099:20;1117:1;1099:20;:::i;:::-;1094:25;;1253:1;1185:66;1181:74;1178:1;1175:81;1172:2;;;1259:18;;:::i;:::-;1172:2;1303:1;1300;1296:9;1289:16;;1050:261;;;;:::o;1317:96::-;1354:7;1383:24;1401:5;1383:24;:::i;:::-;1372:35;;1362:51;;;:::o;1419:126::-;1456:7;1496:42;1489:5;1485:54;1474:65;;1464:81;;;:::o;1551:77::-;1588:7;1617:5;1606:16;;1596:32;;;:::o;1634:180::-;1682:77;1679:1;1672:88;1779:4;1776:1;1769:15;1803:4;1800:1;1793:15;1820:122;1893:24;1911:5;1893:24;:::i;:::-;1886:5;1883:35;1873:2;;1932:1;1929;1922:12;1873:2;1863:79;:::o" | |
}, | |
"gasEstimates": { | |
"creation": { | |
"codeDepositCost": "120400", | |
"executionCost": "41131", | |
"totalCost": "161531" | |
}, | |
"external": { | |
"acc()": "2140", | |
"addAmount(uint256)": "infinite" | |
} | |
}, | |
"methodIdentifiers": { | |
"acc()": "7da1365e", | |
"addAmount(uint256)": "0912f232" | |
} | |
}, | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "acc", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_addMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "addAmount", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compiler": { | |
"version": "0.8.4+commit.c7e474f2" | |
}, | |
"language": "Solidity", | |
"output": { | |
"abi": [ | |
{ | |
"inputs": [], | |
"name": "acc", | |
"outputs": [ | |
{ | |
"internalType": "address", | |
"name": "addr", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", | |
"name": "amount", | |
"type": "uint256" | |
} | |
], | |
"stateMutability": "view", | |
"type": "function" | |
}, | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_addMoney", | |
"type": "uint256" | |
} | |
], | |
"name": "addAmount", | |
"outputs": [], | |
"stateMutability": "nonpayable", | |
"type": "function" | |
} | |
], | |
"devdoc": { | |
"kind": "dev", | |
"methods": {}, | |
"version": 1 | |
}, | |
"userdoc": { | |
"kind": "user", | |
"methods": {}, | |
"version": 1 | |
} | |
}, | |
"settings": { | |
"compilationTarget": { | |
"contracts/4_Structs.sol": "Structs" | |
}, | |
"evmVersion": "istanbul", | |
"libraries": {}, | |
"metadata": { | |
"bytecodeHash": "ipfs" | |
}, | |
"optimizer": { | |
"enabled": false, | |
"runs": 200 | |
}, | |
"remappings": [] | |
}, | |
"sources": { | |
"contracts/4_Structs.sol": { | |
"keccak256": "0x886449263dca168c15df85803915561f3cf477f6d4cb5b43230882ed05a59d4c", | |
"urls": [ | |
"bzz-raw://cf039e1a8a54d49ca5bf5ab83580e1444b134541c16917458afaf8fc778288a2", | |
"dweb:/ipfs/QmbPJmZKLv82gFm99917hUSRQUABYrMovMtnR5QeMkq4zH" | |
] | |
} | |
}, | |
"version": 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this line is added to create a gist. Empty file is not allowed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 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 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