Skip to content

Instantly share code, notes, and snippets.

@satyambnsal
Created July 28, 2021 11:05
Show Gist options
  • Select an option

  • Save satyambnsal/bfde6c006a55acae1415ba3967fd19df to your computer and use it in GitHub Desktop.

Select an option

Save satyambnsal/bfde6c006a55acae1415ba3967fd19df 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=builtin&optimize=false&runs=200&gist=
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.
// 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;
}
}
// 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;
}
}
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
* @dev Implements voting process along with vote delegation
*/
contract Ballot {
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted
address delegate; // person delegated to
uint vote; // index of the voted proposal
}
struct Proposal {
// If you can limit the length to a certain number of bytes,
// always use one of bytes1 to bytes32 because they are much cheaper
bytes32 name; // short name (up to 32 bytes)
uint voteCount; // number of accumulated votes
}
address public chairperson;
mapping(address => Voter) public voters;
Proposal[] public proposals;
/**
* @dev Create a new ballot to choose one of 'proposalNames'.
* @param proposalNames names of proposals
*/
constructor(bytes32[] memory proposalNames) {
chairperson = msg.sender;
voters[chairperson].weight = 1;
for (uint i = 0; i < proposalNames.length; i++) {
// 'Proposal({...})' creates a temporary
// Proposal object and 'proposals.push(...)'
// appends it to the end of 'proposals'.
proposals.push(Proposal({
name: proposalNames[i],
voteCount: 0
}));
}
}
/**
* @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'.
* @param voter address of voter
*/
function giveRightToVote(address voter) public {
require(
msg.sender == chairperson,
"Only chairperson can give right to vote."
);
require(
!voters[voter].voted,
"The voter already voted."
);
require(voters[voter].weight == 0);
voters[voter].weight = 1;
}
/**
* @dev Delegate your vote to the voter 'to'.
* @param to address to which vote is delegated
*/
function delegate(address to) public {
Voter storage sender = voters[msg.sender];
require(!sender.voted, "You already voted.");
require(to != msg.sender, "Self-delegation is disallowed.");
while (voters[to].delegate != address(0)) {
to = voters[to].delegate;
// We found a loop in the delegation, not allowed.
require(to != msg.sender, "Found loop in delegation.");
}
sender.voted = true;
sender.delegate = to;
Voter storage delegate_ = voters[to];
if (delegate_.voted) {
// If the delegate already voted,
// directly add to the number of votes
proposals[delegate_.vote].voteCount += sender.weight;
} else {
// If the delegate did not vote yet,
// add to her weight.
delegate_.weight += sender.weight;
}
}
/**
* @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'.
* @param proposal index of proposal in the proposals array
*/
function vote(uint proposal) public {
Voter storage sender = voters[msg.sender];
require(sender.weight != 0, "Has no right to vote");
require(!sender.voted, "Already voted.");
sender.voted = true;
sender.vote = proposal;
// If 'proposal' is out of the range of the array,
// this will throw automatically and revert all
// changes.
proposals[proposal].voteCount += sender.weight;
}
/**
* @dev Computes the winning proposal taking all previous votes into account.
* @return winningProposal_ index of winning proposal in the proposals array
*/
function winningProposal() public view
returns (uint winningProposal_)
{
uint winningVoteCount = 0;
for (uint p = 0; p < proposals.length; p++) {
if (proposals[p].voteCount > winningVoteCount) {
winningVoteCount = proposals[p].voteCount;
winningProposal_ = p;
}
}
}
/**
* @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then
* @return winnerName_ the name of the winner
*/
function winnerName() public view
returns (bytes32 winnerName_)
{
winnerName_ = proposals[winningProposal()].name;
}
}
pragma solidity >=0.7.0 <0.9.0;
contract Faucet {
address payable owner;
constructor(){
owner = payable(msg.sender);
}
receive() external payable {}
// Give out ether to anyone who asks
function withdraw(uint256 withdraw_amount) public payable {
address payable to = payable(msg.sender);
// Limit withdrawal amount
require(withdraw_amount <= 100000000000000000);
// Send the amount to the address that requested it
to.transfer(withdraw_amount);
}
function destroy() public {
require(msg.sender == owner);
selfdestruct(owner);
}
}
// SPDX-Licence-Identifier: GPL-3.0
pragma solidity ^0.8.4;
contract SimpleAuction {
address payable public beneficiary;
uint public auctionEndTime;
address public highestBidder;
uint public highestBid;
mapping(address => uint) pendingReturns;
bool ended;
event HighestBidIncreased(address bidder, uint amount);
event AuctionEnded(address winner, uint amount);
/// The auction has already ended
error AuctionAlreadyEnded();
/// There is already a higher or equal bid
error BidNotHighEnough(uint highestBid);
/// The auction has not ended yet
error AuctionNotYetEnded();
/// the function auctionEnd has already been called
error AuctionEndAlreadyCalled();
constructor(uint _biddingTime, address payable _beneficiary) {
beneficiary = _beneficiary;
auctionEndTime = block.timestamp + _biddingTime;
}
function bid() public payable {
if(block.timestamp > auctionEndTime) {
revert AuctionAlreadyEnded();
}
if(msg.value <= highestBid) {
revert BidNotHighEnough(highestBid);
}
if(highestBid != 0) {
pendingReturns[highestBidder] += highestBid;
}
highestBidder = msg.sender;
highestBid = msg.value;
emit HighestBidIncreased(msg.sender, msg.value);
}
function withdraw() public returns (bool) {
uint amount = pendingReturns[msg.sender];
if(amount > 0) {
pendingReturns[msg.sender] = 0;
if(!payable(msg.sender).send(amount)) {
pendingReturns[msg.sender] = amount;
return false;
}
}
return true;
}
function auctionEnd() public {
if(block.timestamp < auctionEndTime) {
revert AuctionNotYetEnded();
}
if(ended) {
revert AuctionEndAlreadyCalled();
}
ended = true;
emit AuctionEnded(highestBidder, highestBid);
beneficiary.transfer(highestBid);
}
}
{
"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": "608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101f7806100606000396000f3fe60806040526004361061002d5760003560e01c80632e1a7d4d1461003957806383197ef01461005557610034565b3661003457005b600080fd5b610053600480360381019061004e9190610177565b61006c565b005b34801561006157600080fd5b5061006a6100d1565b005b600033905067016345785d8a000082111561008657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156100cc573d6000803e3d6000fd5b505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461012957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b600081359050610171816101aa565b92915050565b60006020828403121561018957600080fd5b600061019784828501610162565b91505092915050565b6000819050919050565b6101b3816101a0565b81146101be57600080fd5b5056fea2646970667358221220a372e14588ef7b29917c2c59edab627ded3f5a551d74b97253e257923ac5fbcc64736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLER PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x1F7 DUP1 PUSH2 0x60 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x39 JUMPI DUP1 PUSH4 0x83197EF0 EQ PUSH2 0x55 JUMPI PUSH2 0x34 JUMP JUMPDEST CALLDATASIZE PUSH2 0x34 JUMPI STOP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x53 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x4E SWAP2 SWAP1 PUSH2 0x177 JUMP JUMPDEST PUSH2 0x6C JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x61 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6A PUSH2 0xD1 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 CALLER SWAP1 POP PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH2 0x86 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC DUP4 SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0xCC JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x129 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SELFDESTRUCT JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x171 DUP2 PUSH2 0x1AA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x189 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x197 DUP5 DUP3 DUP6 ADD PUSH2 0x162 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1B3 DUP2 PUSH2 0x1A0 JUMP JUMPDEST DUP2 EQ PUSH2 0x1BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 LOG3 PUSH19 0xE14588EF7B29917C2C59EDAB627DED3F5A551D PUSH21 0xB97253E257923AC5FBCC64736F6C63430008040033 ",
"sourceMap": "33:632:0:-:0;;;87:66;;;;;;;;;;126:10;110:5;;:27;;;;;;;;;;;;;;;;;;33:632;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:628: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": "465:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "475:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "486:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "475:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "447:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "457:7:1",
"type": ""
}
],
"src": "420:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "546:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "603:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "612:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "615:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "605:6:1"
},
"nodeType": "YulFunctionCall",
"src": "605:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "605:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "569:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "594:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "576:17:1"
},
"nodeType": "YulFunctionCall",
"src": "576:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "566:2:1"
},
"nodeType": "YulFunctionCall",
"src": "566:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "559:6:1"
},
"nodeType": "YulFunctionCall",
"src": "559:43:1"
},
"nodeType": "YulIf",
"src": "556:2:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "539:5:1",
"type": ""
}
],
"src": "503: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 cleanup_t_uint256(value) -> cleaned {\n cleaned := value\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": "60806040526004361061002d5760003560e01c80632e1a7d4d1461003957806383197ef01461005557610034565b3661003457005b600080fd5b610053600480360381019061004e9190610177565b61006c565b005b34801561006157600080fd5b5061006a6100d1565b005b600033905067016345785d8a000082111561008657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156100cc573d6000803e3d6000fd5b505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461012957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b600081359050610171816101aa565b92915050565b60006020828403121561018957600080fd5b600061019784828501610162565b91505092915050565b6000819050919050565b6101b3816101a0565b81146101be57600080fd5b5056fea2646970667358221220a372e14588ef7b29917c2c59edab627ded3f5a551d74b97253e257923ac5fbcc64736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x2D JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E1A7D4D EQ PUSH2 0x39 JUMPI DUP1 PUSH4 0x83197EF0 EQ PUSH2 0x55 JUMPI PUSH2 0x34 JUMP JUMPDEST CALLDATASIZE PUSH2 0x34 JUMPI STOP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x53 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x4E SWAP2 SWAP1 PUSH2 0x177 JUMP JUMPDEST PUSH2 0x6C JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x61 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x6A PUSH2 0xD1 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 CALLER SWAP1 POP PUSH8 0x16345785D8A0000 DUP3 GT ISZERO PUSH2 0x86 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC DUP4 SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0xCC JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0x129 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SELFDESTRUCT JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH2 0x171 DUP2 PUSH2 0x1AA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x189 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x197 DUP5 DUP3 DUP6 ADD PUSH2 0x162 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x1B3 DUP2 PUSH2 0x1A0 JUMP JUMPDEST DUP2 EQ PUSH2 0x1BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 LOG3 PUSH19 0xE14588EF7B29917C2C59EDAB627DED3F5A551D PUSH21 0xB97253E257923AC5FBCC64736F6C63430008040033 ",
"sourceMap": "33:632:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;239:314;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;563:100;;;;;;;;;;;;;:::i;:::-;;239:314;316:18;345:10;316:40;;428:18;409:15;:37;;401:46;;;;;;518:2;:11;;:28;530:15;518:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;239:314;;:::o;563:100::-;621:5;;;;;;;;;;607:19;;:10;:19;;;599:28;;;;;;650:5;;;;;;;;;;637:19;;;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:77::-;457:7;486:5;475:16;;465:32;;;:::o;503:122::-;576:24;594:5;576:24;:::i;:::-;569:5;566:35;556:2;;615:1;612;605:12;556:2;546:79;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "100600",
"executionCost": "21013",
"totalCost": "121613"
},
"external": {
"destroy()": "31844",
"withdraw(uint256)": "infinite"
}
},
"methodIdentifiers": {
"destroy()": "83197ef0",
"withdraw(uint256)": "2e1a7d4d"
}
},
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "destroy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "withdraw_amount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
}
{
"compiler": {
"version": "0.8.4+commit.c7e474f2"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "destroy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "withdraw_amount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/4_Faucet.sol": "Faucet"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/4_Faucet.sol": {
"keccak256": "0x8e5f09eedeff503c829d1520ad1dc049031d0aee85b32da5e9fbdc87430984da",
"urls": [
"bzz-raw://e0280a355a0c869b306bce650b1cdf8606b9a67d979175c699107db405bb9b7d",
"dweb:/ipfs/Qmd7YWMSdT71T5L2oAZM4gPd1SrpbJVqveU9JaVnXAHoCo"
]
}
},
"version": 1
}
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
"ropsten:3": {
"linkReferences": {},
"autoDeployLib": true
},
"rinkeby:4": {
"linkReferences": {},
"autoDeployLib": true
},
"kovan:42": {
"linkReferences": {},
"autoDeployLib": true
},
"görli:5": {
"linkReferences": {},
"autoDeployLib": true
},
"Custom": {
"linkReferences": {},
"autoDeployLib": true
}
},
"data": {
"bytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1874:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "78:88:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "88:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "103:6:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "97:5:1"
},
"nodeType": "YulFunctionCall",
"src": "97:13:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "88:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "154:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address_payable",
"nodeType": "YulIdentifier",
"src": "119:34:1"
},
"nodeType": "YulFunctionCall",
"src": "119:41:1"
},
"nodeType": "YulExpressionStatement",
"src": "119:41:1"
}
]
},
"name": "abi_decode_t_address_payable_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "56:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "64:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "72:5:1",
"type": ""
}
],
"src": "7:159:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "235:80:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "245:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "260:6:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "254:5:1"
},
"nodeType": "YulFunctionCall",
"src": "254:13:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "245:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "303:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "276:26:1"
},
"nodeType": "YulFunctionCall",
"src": "276:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "276:33:1"
}
]
},
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "213:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "221:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "229:5:1",
"type": ""
}
],
"src": "172:143:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "423:354:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "469:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "478:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "481:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "471:6:1"
},
"nodeType": "YulFunctionCall",
"src": "471:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "471:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "444:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "453:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "440:3:1"
},
"nodeType": "YulFunctionCall",
"src": "440:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "465:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "436:3:1"
},
"nodeType": "YulFunctionCall",
"src": "436:32:1"
},
"nodeType": "YulIf",
"src": "433:2:1"
},
{
"nodeType": "YulBlock",
"src": "495:128:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "510:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "524:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "514:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "539:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "585:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "596:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "581:3:1"
},
"nodeType": "YulFunctionCall",
"src": "581:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "605:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256_fromMemory",
"nodeType": "YulIdentifier",
"src": "549:31:1"
},
"nodeType": "YulFunctionCall",
"src": "549:64:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "539:6:1"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "633:137:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "648:16:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "662:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "652:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "678:82:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "732:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "743:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "728:3:1"
},
"nodeType": "YulFunctionCall",
"src": "728:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "752:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_payable_fromMemory",
"nodeType": "YulIdentifier",
"src": "688:39:1"
},
"nodeType": "YulFunctionCall",
"src": "688:72:1"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "678:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256t_address_payable_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "385:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "396:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "408:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "416:6:1",
"type": ""
}
],
"src": "321:456:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "827:261:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "837:25:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "860:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "842:17:1"
},
"nodeType": "YulFunctionCall",
"src": "842:20:1"
},
"variableNames": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "837:1:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "871:25:1",
"value": {
"arguments": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "894:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "876:17:1"
},
"nodeType": "YulFunctionCall",
"src": "876:20:1"
},
"variableNames": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "871:1:1"
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1034:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "1036:16:1"
},
"nodeType": "YulFunctionCall",
"src": "1036:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "1036:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "955:1:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "962:66:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "1030:1:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "958:3:1"
},
"nodeType": "YulFunctionCall",
"src": "958:74:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "952:2:1"
},
"nodeType": "YulFunctionCall",
"src": "952:81:1"
},
"nodeType": "YulIf",
"src": "949:2:1"
},
{
"nodeType": "YulAssignment",
"src": "1066:16:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "1077:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "1080:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1073:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1073:9:1"
},
"variableNames": [
{
"name": "sum",
"nodeType": "YulIdentifier",
"src": "1066:3:1"
}
]
}
]
},
"name": "checked_add_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "814:1:1",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "817:1:1",
"type": ""
}
],
"returnVariables": [
{
"name": "sum",
"nodeType": "YulTypedName",
"src": "823:3:1",
"type": ""
}
],
"src": "783:305:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1147:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1157:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1186:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "1168:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1168:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1157:7:1"
}
]
}
]
},
"name": "cleanup_t_address_payable",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1129:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1139:7:1",
"type": ""
}
],
"src": "1094:104:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1249:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1259:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1274:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1281:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "1270:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1270:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1259:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1231:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1241:7:1",
"type": ""
}
],
"src": "1204:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1381:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1391:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "1402:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "1391:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1363:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "1373:7:1",
"type": ""
}
],
"src": "1336:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1447:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1464:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1467:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1457:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1457:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "1457:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1561:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1564:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1554:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1554:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1554:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1585:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1588:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1578:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1578:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "1578:15:1"
}
]
},
"name": "panic_error_0x11",
"nodeType": "YulFunctionDefinition",
"src": "1419:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1656:87:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1721:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1730:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1733:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1723:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1723:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1723:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1679:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1712:5:1"
}
],
"functionName": {
"name": "cleanup_t_address_payable",
"nodeType": "YulIdentifier",
"src": "1686:25:1"
},
"nodeType": "YulFunctionCall",
"src": "1686:32:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1676:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1676:43:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "1669:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1669:51:1"
},
"nodeType": "YulIf",
"src": "1666:2:1"
}
]
},
"name": "validator_revert_t_address_payable",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1649:5:1",
"type": ""
}
],
"src": "1605:138:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1792:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1849:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1858:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1861:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1851:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1851:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1851:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1815:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1840:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1822:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1822:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1812:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1812:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "1805:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1805:43:1"
},
"nodeType": "YulIf",
"src": "1802:2:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1785:5:1",
"type": ""
}
],
"src": "1749:122:1"
}
]
},
"contents": "{\n\n function abi_decode_t_address_payable_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address_payable(value)\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256t_address_payable_fromMemory(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address_payable_fromMemory(add(headStart, offset), dataEnd)\n }\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_payable(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function validator_revert_t_address_payable(value) {\n if iszero(eq(value, cleanup_t_address_payable(value))) { revert(0, 0) }\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"
}
],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506040516109ae3803806109ae833981810160405281019061003291906100b5565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550814261007e91906100f1565b60018190555050506101e0565b60008151905061009a816101b2565b92915050565b6000815190506100af816101c9565b92915050565b600080604083850312156100c857600080fd5b60006100d6858286016100a0565b92505060206100e78582860161008b565b9150509250929050565b60006100fc82610179565b915061010783610179565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561013c5761013b610183565b5b828201905092915050565b600061015282610159565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6101bb81610147565b81146101c657600080fd5b50565b6101d281610179565b81146101dd57600080fd5b50565b6107bf806101ef6000396000f3fe6080604052600436106100705760003560e01c80633ccfd60b1161004e5780633ccfd60b146100c15780634b449cba146100ec57806391f9015714610117578063d57bde791461014257610070565b80631998aeef146100755780632a24f46c1461007f57806338af3eed14610096575b600080fd5b61007d61016d565b005b34801561008b57600080fd5b506100946102f9565b005b3480156100a257600080fd5b506100ab61045f565b6040516100b89190610630565b60405180910390f35b3480156100cd57600080fd5b506100d6610483565b6040516100e39190610674565b60405180910390f35b3480156100f857600080fd5b506101016105a7565b60405161010e919061068f565b60405180910390f35b34801561012357600080fd5b5061012c6105ad565b6040516101399190610615565b60405180910390f35b34801561014e57600080fd5b506101576105d3565b604051610164919061068f565b60405180910390f35b6001544211156101a9576040517fd02e774d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035434116101f1576003546040517f4e12c1bb0000000000000000000000000000000000000000000000000000000081526004016101e8919061068f565b60405180910390fd5b6000600354146102765760035460046000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461026e91906106aa565b925050819055505b33600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550346003819055507ff4757a49b326036464bec6fe419a4ae38c8a02ce3e68bf0809674f6aab8ad30033346040516102ef92919061064b565b60405180910390a1565b600154421015610335576040517f44cee29000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600560009054906101000a900460ff161561037c576040517f61cfdcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600560006101000a81548160ff0219169083151502179055507fdaec4582d5d9595688c8c98545fdd1c696d41c6aeaeb636737e84ed2f5c00eda600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166003546040516103ec92919061064b565b60405180910390a160008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6003549081150290604051600060405180830381858888f1935050505015801561045c573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111561059e576000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061059d5780600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060009150506105a4565b5b60019150505b90565b60015481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6105e281610712565b82525050565b6105f181610700565b82525050565b61060081610724565b82525050565b61060f81610750565b82525050565b600060208201905061062a60008301846105e8565b92915050565b600060208201905061064560008301846105d9565b92915050565b600060408201905061066060008301856105e8565b61066d6020830184610606565b9392505050565b600060208201905061068960008301846105f7565b92915050565b60006020820190506106a46000830184610606565b92915050565b60006106b582610750565b91506106c083610750565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106f5576106f461075a565b5b828201905092915050565b600061070b82610730565b9050919050565b600061071d82610730565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212209661a8848f974f973a4e1e8edbf9fe45c4c62f5ede022dbe87977b01532047ca64736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x9AE CODESIZE SUB DUP1 PUSH2 0x9AE DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0xB5 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP1 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP2 TIMESTAMP PUSH2 0x7E SWAP2 SWAP1 PUSH2 0xF1 JUMP JUMPDEST PUSH1 0x1 DUP2 SWAP1 SSTORE POP POP POP PUSH2 0x1E0 JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0x9A DUP2 PUSH2 0x1B2 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xAF DUP2 PUSH2 0x1C9 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xC8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xD6 DUP6 DUP3 DUP7 ADD PUSH2 0xA0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0xE7 DUP6 DUP3 DUP7 ADD PUSH2 0x8B JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0xFC DUP3 PUSH2 0x179 JUMP JUMPDEST SWAP2 POP PUSH2 0x107 DUP4 PUSH2 0x179 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x13C JUMPI PUSH2 0x13B PUSH2 0x183 JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x152 DUP3 PUSH2 0x159 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 0x1BB DUP2 PUSH2 0x147 JUMP JUMPDEST DUP2 EQ PUSH2 0x1C6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x1D2 DUP2 PUSH2 0x179 JUMP JUMPDEST DUP2 EQ PUSH2 0x1DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x7BF DUP1 PUSH2 0x1EF PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x70 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3CCFD60B GT PUSH2 0x4E JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0xC1 JUMPI DUP1 PUSH4 0x4B449CBA EQ PUSH2 0xEC JUMPI DUP1 PUSH4 0x91F90157 EQ PUSH2 0x117 JUMPI DUP1 PUSH4 0xD57BDE79 EQ PUSH2 0x142 JUMPI PUSH2 0x70 JUMP JUMPDEST DUP1 PUSH4 0x1998AEEF EQ PUSH2 0x75 JUMPI DUP1 PUSH4 0x2A24F46C EQ PUSH2 0x7F JUMPI DUP1 PUSH4 0x38AF3EED EQ PUSH2 0x96 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x7D PUSH2 0x16D JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x94 PUSH2 0x2F9 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xAB PUSH2 0x45F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xB8 SWAP2 SWAP1 PUSH2 0x630 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x483 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x674 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xF8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x101 PUSH2 0x5A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x10E SWAP2 SWAP1 PUSH2 0x68F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x123 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x12C PUSH2 0x5AD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x139 SWAP2 SWAP1 PUSH2 0x615 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x157 PUSH2 0x5D3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x164 SWAP2 SWAP1 PUSH2 0x68F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x1 SLOAD TIMESTAMP GT ISZERO PUSH2 0x1A9 JUMPI PUSH1 0x40 MLOAD PUSH32 0xD02E774D00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x3 SLOAD CALLVALUE GT PUSH2 0x1F1 JUMPI PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH32 0x4E12C1BB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1E8 SWAP2 SWAP1 PUSH2 0x68F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x3 SLOAD EQ PUSH2 0x276 JUMPI PUSH1 0x3 SLOAD PUSH1 0x4 PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x26E SWAP2 SWAP1 PUSH2 0x6AA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMPDEST CALLER PUSH1 0x2 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP CALLVALUE PUSH1 0x3 DUP2 SWAP1 SSTORE POP PUSH32 0xF4757A49B326036464BEC6FE419A4AE38C8A02CE3E68BF0809674F6AAB8AD300 CALLER CALLVALUE PUSH1 0x40 MLOAD PUSH2 0x2EF SWAP3 SWAP2 SWAP1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x1 SLOAD TIMESTAMP LT ISZERO PUSH2 0x335 JUMPI PUSH1 0x40 MLOAD PUSH32 0x44CEE29000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x37C JUMPI PUSH1 0x40 MLOAD PUSH32 0x61CFDCF800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x5 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP PUSH32 0xDAEC4582D5D9595688C8C98545FDD1C696D41C6AEAEB636737E84ED2F5C00EDA PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0x3EC SWAP3 SWAP2 SWAP1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC PUSH1 0x3 SLOAD SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x45C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x4 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x59E JUMPI PUSH1 0x0 PUSH1 0x4 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC DUP3 SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP PUSH2 0x59D JUMPI DUP1 PUSH1 0x4 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP PUSH1 0x0 SWAP2 POP POP PUSH2 0x5A4 JUMP JUMPDEST JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x1 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x5E2 DUP2 PUSH2 0x712 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x5F1 DUP2 PUSH2 0x700 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x600 DUP2 PUSH2 0x724 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x60F DUP2 PUSH2 0x750 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x62A PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x5E8 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x645 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x5D9 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x660 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x5E8 JUMP JUMPDEST PUSH2 0x66D PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x606 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x689 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x5F7 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x6A4 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x606 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6B5 DUP3 PUSH2 0x750 JUMP JUMPDEST SWAP2 POP PUSH2 0x6C0 DUP4 PUSH2 0x750 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x6F5 JUMPI PUSH2 0x6F4 PUSH2 0x75A JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x70B DUP3 PUSH2 0x730 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x71D DUP3 PUSH2 0x730 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 ISZERO ISZERO 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 INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP7 PUSH2 0xA884 DUP16 SWAP8 0x4F SWAP8 GASPRICE 0x4E 0x1E DUP15 0xDB 0xF9 INVALID GASLIMIT 0xC4 0xC6 0x2F 0x5E 0xDE MUL 0x2D 0xBE DUP8 SWAP8 PUSH28 0x1532047CA64736F6C63430008040033000000000000000000000000 ",
"sourceMap": "62:2109:0:-:0;;;775:161;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;860:12;846:11;;:26;;;;;;;;;;;;;;;;;;917:12;899:15;:30;;;;:::i;:::-;882:14;:47;;;;775:161;;62:2109;;7:159:1;72:5;103:6;97:13;88:22;;119:41;154:5;119:41;:::i;:::-;78:88;;;;:::o;172:143::-;229:5;260:6;254:13;245:22;;276:33;303:5;276:33;:::i;:::-;235:80;;;;:::o;321:456::-;408:6;416;465:2;453:9;444:7;440:23;436:32;433:2;;;481:1;478;471:12;433:2;524:1;549:64;605:7;596:6;585:9;581:22;549:64;:::i;:::-;539:74;;495:128;662:2;688:72;752:7;743:6;732:9;728:22;688:72;:::i;:::-;678:82;;633:137;423:354;;;;;:::o;783:305::-;823:3;842:20;860:1;842:20;:::i;:::-;837:25;;876:20;894:1;876:20;:::i;:::-;871:25;;1030:1;962:66;958:74;955:1;952:81;949:2;;;1036:18;;:::i;:::-;949:2;1080:1;1077;1073:9;1066:16;;827:261;;;;:::o;1094:104::-;1139:7;1168:24;1186:5;1168:24;:::i;:::-;1157:35;;1147:51;;;:::o;1204:126::-;1241:7;1281:42;1274:5;1270:54;1259:65;;1249:81;;;:::o;1336:77::-;1373:7;1402:5;1391:16;;1381:32;;;:::o;1419:180::-;1467:77;1464:1;1457:88;1564:4;1561:1;1554:15;1588:4;1585:1;1578:15;1605:138;1686:32;1712:5;1686:32;:::i;:::-;1679:5;1676:43;1666:2;;1733:1;1730;1723:12;1666:2;1656:87;:::o;1749:122::-;1822:24;1840:5;1822:24;:::i;:::-;1815:5;1812:35;1802:2;;1861:1;1858;1851:12;1802:2;1792:79;:::o;62:2109:0:-;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:2805:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "88:61:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "105:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "136:5:1"
}
],
"functionName": {
"name": "cleanup_t_address_payable",
"nodeType": "YulIdentifier",
"src": "110:25:1"
},
"nodeType": "YulFunctionCall",
"src": "110:32:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "98:6:1"
},
"nodeType": "YulFunctionCall",
"src": "98:45:1"
},
"nodeType": "YulExpressionStatement",
"src": "98:45:1"
}
]
},
"name": "abi_encode_t_address_payable_to_t_address_payable_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "76:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "83:3:1",
"type": ""
}
],
"src": "7:142:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "220:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "237:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "260:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "242:17:1"
},
"nodeType": "YulFunctionCall",
"src": "242:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "230:6:1"
},
"nodeType": "YulFunctionCall",
"src": "230:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "230:37:1"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "208:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "215:3:1",
"type": ""
}
],
"src": "155:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "338:50:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "355:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "375:5:1"
}
],
"functionName": {
"name": "cleanup_t_bool",
"nodeType": "YulIdentifier",
"src": "360:14:1"
},
"nodeType": "YulFunctionCall",
"src": "360:21:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "348:6:1"
},
"nodeType": "YulFunctionCall",
"src": "348:34:1"
},
"nodeType": "YulExpressionStatement",
"src": "348:34:1"
}
]
},
"name": "abi_encode_t_bool_to_t_bool_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "326:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "333:3:1",
"type": ""
}
],
"src": "279:109:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "459:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "476:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "499:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "481:17:1"
},
"nodeType": "YulFunctionCall",
"src": "481:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "469:6:1"
},
"nodeType": "YulFunctionCall",
"src": "469:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "469:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "447:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "454:3:1",
"type": ""
}
],
"src": "394:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "616:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "626:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "638:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "649:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "634:3:1"
},
"nodeType": "YulFunctionCall",
"src": "634:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "626:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "706:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "719:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "730:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "715:3:1"
},
"nodeType": "YulFunctionCall",
"src": "715:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "662:43:1"
},
"nodeType": "YulFunctionCall",
"src": "662:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "662:71:1"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "588:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "600:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "611:4:1",
"type": ""
}
],
"src": "518:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "860:140:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "870:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "882:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "893:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "878:3:1"
},
"nodeType": "YulFunctionCall",
"src": "878:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "870:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "966:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "979:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "990:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "975:3:1"
},
"nodeType": "YulFunctionCall",
"src": "975:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_payable_to_t_address_payable_fromStack",
"nodeType": "YulIdentifier",
"src": "906:59:1"
},
"nodeType": "YulFunctionCall",
"src": "906:87:1"
},
"nodeType": "YulExpressionStatement",
"src": "906:87:1"
}
]
},
"name": "abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "832:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "844:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "855:4:1",
"type": ""
}
],
"src": "746:254:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1132:206:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1142:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1154:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1165:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1150:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1150:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1142:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1222:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1235:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1246:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1231:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "1178:43:1"
},
"nodeType": "YulFunctionCall",
"src": "1178:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "1178:71:1"
},
{
"expression": {
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1303:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1316:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1327:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1312:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1312:18:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "1259:43:1"
},
"nodeType": "YulFunctionCall",
"src": "1259:72:1"
},
"nodeType": "YulExpressionStatement",
"src": "1259: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": "1096:9:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "1108:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1116:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1127:4:1",
"type": ""
}
],
"src": "1006:332:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1436:118:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1446:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1458:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1469:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1454:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1454:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1446:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1520:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1533:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1544:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1529:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1529:17:1"
}
],
"functionName": {
"name": "abi_encode_t_bool_to_t_bool_fromStack",
"nodeType": "YulIdentifier",
"src": "1482:37:1"
},
"nodeType": "YulFunctionCall",
"src": "1482:65:1"
},
"nodeType": "YulExpressionStatement",
"src": "1482:65:1"
}
]
},
"name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1408:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1420:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1431:4:1",
"type": ""
}
],
"src": "1344:210:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1658:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1668:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1680:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1691:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1676:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1676:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1668:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1748:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1761:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1772:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1757:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1757:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "1704:43:1"
},
"nodeType": "YulFunctionCall",
"src": "1704:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "1704:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1630:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1642:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1653:4:1",
"type": ""
}
],
"src": "1560:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1832:261:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1842:25:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "1865:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1847:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1847:20:1"
},
"variableNames": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "1842:1:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "1876:25:1",
"value": {
"arguments": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "1899:1:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1881:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1881:20:1"
},
"variableNames": [
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "1876:1:1"
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "2039:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x11",
"nodeType": "YulIdentifier",
"src": "2041:16:1"
},
"nodeType": "YulFunctionCall",
"src": "2041:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "2041:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "1960:1:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1967:66:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2035:1:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1963:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1963:74:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "1957:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1957:81:1"
},
"nodeType": "YulIf",
"src": "1954:2:1"
},
{
"nodeType": "YulAssignment",
"src": "2071:16:1",
"value": {
"arguments": [
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "2082:1:1"
},
{
"name": "y",
"nodeType": "YulIdentifier",
"src": "2085:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2078:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2078:9:1"
},
"variableNames": [
{
"name": "sum",
"nodeType": "YulIdentifier",
"src": "2071:3:1"
}
]
}
]
},
"name": "checked_add_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "x",
"nodeType": "YulTypedName",
"src": "1819:1:1",
"type": ""
},
{
"name": "y",
"nodeType": "YulTypedName",
"src": "1822:1:1",
"type": ""
}
],
"returnVariables": [
{
"name": "sum",
"nodeType": "YulTypedName",
"src": "1828:3:1",
"type": ""
}
],
"src": "1788:305:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2144:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2154:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2183:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "2165:17:1"
},
"nodeType": "YulFunctionCall",
"src": "2165:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "2154:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2126:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "2136:7:1",
"type": ""
}
],
"src": "2099:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2254:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2264:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2293:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "2275:17:1"
},
"nodeType": "YulFunctionCall",
"src": "2275:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "2264:7:1"
}
]
}
]
},
"name": "cleanup_t_address_payable",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2236:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "2246:7:1",
"type": ""
}
],
"src": "2201:104:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2353:48:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2363:32:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2388:5:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2381:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2381:13:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2374:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2374:21:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "2363:7:1"
}
]
}
]
},
"name": "cleanup_t_bool",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2335:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "2345:7:1",
"type": ""
}
],
"src": "2311:90:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2452:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2462:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2477:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2484:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2473:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2473:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "2462:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2434:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "2444:7:1",
"type": ""
}
],
"src": "2407:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2584:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2594:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "2605:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "2594:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2566:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "2576:7:1",
"type": ""
}
],
"src": "2539:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2650:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2667:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2670:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2660:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2660:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "2660:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2764:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2767:4:1",
"type": "",
"value": "0x11"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2757:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2757:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "2757:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2788:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2791:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2781:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2781:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "2781:15:1"
}
]
},
"name": "panic_error_0x11",
"nodeType": "YulFunctionDefinition",
"src": "2622:180:1"
}
]
},
"contents": "{\n\n function abi_encode_t_address_payable_to_t_address_payable_fromStack(value, pos) {\n mstore(pos, cleanup_t_address_payable(value))\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_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(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__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_address_payable__to_t_address_payable__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_payable_to_t_address_payable_fromStack(value0, add(headStart, 0))\n\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 abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bool_to_t_bool_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function 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_address_payable(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(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}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "6080604052600436106100705760003560e01c80633ccfd60b1161004e5780633ccfd60b146100c15780634b449cba146100ec57806391f9015714610117578063d57bde791461014257610070565b80631998aeef146100755780632a24f46c1461007f57806338af3eed14610096575b600080fd5b61007d61016d565b005b34801561008b57600080fd5b506100946102f9565b005b3480156100a257600080fd5b506100ab61045f565b6040516100b89190610630565b60405180910390f35b3480156100cd57600080fd5b506100d6610483565b6040516100e39190610674565b60405180910390f35b3480156100f857600080fd5b506101016105a7565b60405161010e919061068f565b60405180910390f35b34801561012357600080fd5b5061012c6105ad565b6040516101399190610615565b60405180910390f35b34801561014e57600080fd5b506101576105d3565b604051610164919061068f565b60405180910390f35b6001544211156101a9576040517fd02e774d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035434116101f1576003546040517f4e12c1bb0000000000000000000000000000000000000000000000000000000081526004016101e8919061068f565b60405180910390fd5b6000600354146102765760035460046000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461026e91906106aa565b925050819055505b33600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550346003819055507ff4757a49b326036464bec6fe419a4ae38c8a02ce3e68bf0809674f6aab8ad30033346040516102ef92919061064b565b60405180910390a1565b600154421015610335576040517f44cee29000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600560009054906101000a900460ff161561037c576040517f61cfdcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600560006101000a81548160ff0219169083151502179055507fdaec4582d5d9595688c8c98545fdd1c696d41c6aeaeb636737e84ed2f5c00eda600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166003546040516103ec92919061064b565b60405180910390a160008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6003549081150290604051600060405180830381858888f1935050505015801561045c573d6000803e3d6000fd5b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600081111561059e576000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061059d5780600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060009150506105a4565b5b60019150505b90565b60015481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6105e281610712565b82525050565b6105f181610700565b82525050565b61060081610724565b82525050565b61060f81610750565b82525050565b600060208201905061062a60008301846105e8565b92915050565b600060208201905061064560008301846105d9565b92915050565b600060408201905061066060008301856105e8565b61066d6020830184610606565b9392505050565b600060208201905061068960008301846105f7565b92915050565b60006020820190506106a46000830184610606565b92915050565b60006106b582610750565b91506106c083610750565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106f5576106f461075a565b5b828201905092915050565b600061070b82610730565b9050919050565b600061071d82610730565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212209661a8848f974f973a4e1e8edbf9fe45c4c62f5ede022dbe87977b01532047ca64736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x70 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3CCFD60B GT PUSH2 0x4E JUMPI DUP1 PUSH4 0x3CCFD60B EQ PUSH2 0xC1 JUMPI DUP1 PUSH4 0x4B449CBA EQ PUSH2 0xEC JUMPI DUP1 PUSH4 0x91F90157 EQ PUSH2 0x117 JUMPI DUP1 PUSH4 0xD57BDE79 EQ PUSH2 0x142 JUMPI PUSH2 0x70 JUMP JUMPDEST DUP1 PUSH4 0x1998AEEF EQ PUSH2 0x75 JUMPI DUP1 PUSH4 0x2A24F46C EQ PUSH2 0x7F JUMPI DUP1 PUSH4 0x38AF3EED EQ PUSH2 0x96 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x7D PUSH2 0x16D JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x8B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x94 PUSH2 0x2F9 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xAB PUSH2 0x45F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xB8 SWAP2 SWAP1 PUSH2 0x630 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD6 PUSH2 0x483 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE3 SWAP2 SWAP1 PUSH2 0x674 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xF8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x101 PUSH2 0x5A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x10E SWAP2 SWAP1 PUSH2 0x68F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x123 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x12C PUSH2 0x5AD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x139 SWAP2 SWAP1 PUSH2 0x615 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x157 PUSH2 0x5D3 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x164 SWAP2 SWAP1 PUSH2 0x68F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x1 SLOAD TIMESTAMP GT ISZERO PUSH2 0x1A9 JUMPI PUSH1 0x40 MLOAD PUSH32 0xD02E774D00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x3 SLOAD CALLVALUE GT PUSH2 0x1F1 JUMPI PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH32 0x4E12C1BB00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x1E8 SWAP2 SWAP1 PUSH2 0x68F JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x3 SLOAD EQ PUSH2 0x276 JUMPI PUSH1 0x3 SLOAD PUSH1 0x4 PUSH1 0x0 PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 PUSH1 0x0 DUP3 DUP3 SLOAD PUSH2 0x26E SWAP2 SWAP1 PUSH2 0x6AA JUMP JUMPDEST SWAP3 POP POP DUP2 SWAP1 SSTORE POP JUMPDEST CALLER PUSH1 0x2 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP CALLVALUE PUSH1 0x3 DUP2 SWAP1 SSTORE POP PUSH32 0xF4757A49B326036464BEC6FE419A4AE38C8A02CE3E68BF0809674F6AAB8AD300 CALLER CALLVALUE PUSH1 0x40 MLOAD PUSH2 0x2EF SWAP3 SWAP2 SWAP1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x1 SLOAD TIMESTAMP LT ISZERO PUSH2 0x335 JUMPI PUSH1 0x40 MLOAD PUSH32 0x44CEE29000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x5 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x37C JUMPI PUSH1 0x40 MLOAD PUSH32 0x61CFDCF800000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x5 PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0xFF MUL NOT AND SWAP1 DUP4 ISZERO ISZERO MUL OR SWAP1 SSTORE POP PUSH32 0xDAEC4582D5D9595688C8C98545FDD1C696D41C6AEAEB636737E84ED2F5C00EDA PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 SLOAD PUSH1 0x40 MLOAD PUSH2 0x3EC SWAP3 SWAP2 SWAP1 PUSH2 0x64B JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG1 PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC PUSH1 0x3 SLOAD SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP ISZERO DUP1 ISZERO PUSH2 0x45C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x4 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 SLOAD SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x59E JUMPI PUSH1 0x0 PUSH1 0x4 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x8FC DUP3 SWAP1 DUP2 ISZERO MUL SWAP1 PUSH1 0x40 MLOAD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP9 DUP9 CALL SWAP4 POP POP POP POP PUSH2 0x59D JUMPI DUP1 PUSH1 0x4 PUSH1 0x0 CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 KECCAK256 DUP2 SWAP1 SSTORE POP PUSH1 0x0 SWAP2 POP POP PUSH2 0x5A4 JUMP JUMPDEST JUMPDEST PUSH1 0x1 SWAP2 POP POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x1 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x2 PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH2 0x5E2 DUP2 PUSH2 0x712 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x5F1 DUP2 PUSH2 0x700 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x600 DUP2 PUSH2 0x724 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH2 0x60F DUP2 PUSH2 0x750 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x62A PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x5E8 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x645 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x5D9 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH2 0x660 PUSH1 0x0 DUP4 ADD DUP6 PUSH2 0x5E8 JUMP JUMPDEST PUSH2 0x66D PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x606 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x689 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x5F7 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0x6A4 PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0x606 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6B5 DUP3 PUSH2 0x750 JUMP JUMPDEST SWAP2 POP PUSH2 0x6C0 DUP4 PUSH2 0x750 JUMP JUMPDEST SWAP3 POP DUP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SUB DUP3 GT ISZERO PUSH2 0x6F5 JUMPI PUSH2 0x6F4 PUSH2 0x75A JUMP JUMPDEST JUMPDEST DUP3 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x70B DUP3 PUSH2 0x730 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x71D DUP3 PUSH2 0x730 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 ISZERO ISZERO 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 INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 SWAP7 PUSH2 0xA884 DUP16 SWAP8 0x4F SWAP8 GASPRICE 0x4E 0x1E DUP15 0xDB 0xF9 INVALID GASLIMIT 0xC4 0xC6 0x2F 0x5E 0xDE MUL 0x2D 0xBE DUP8 SWAP8 PUSH28 0x1532047CA64736F6C63430008040033000000000000000000000000 ",
"sourceMap": "62:2109:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;946:473;;;:::i;:::-;;1818:346;;;;;;;;;;;;;:::i;:::-;;91:34;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1429:379;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;131:26;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;168:28;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;202:22;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;946:473;1007:14;;989:15;:32;986:90;;;1044:21;;;;;;;;;;;;;;986:90;1110:10;;1097:9;:23;1094:88;;1160:10;;1143:28;;;;;;;;;;;:::i;:::-;;;;;;;;1094:88;1217:1;1203:10;;:15;1200:88;;1267:10;;1234:14;:29;1249:13;;;;;;;;;;;1234:29;;;;;;;;;;;;;;;;:43;;;;;;;:::i;:::-;;;;;;;;1200:88;1313:10;1297:13;;:26;;;;;;;;;;;;;;;;;;1346:9;1333:10;:22;;;;1370:42;1390:10;1402:9;1370:42;;;;;;;:::i;:::-;;;;;;;;946:473::o;1818:346::-;1878:14;;1860:15;:32;1857:89;;;1915:20;;;;;;;;;;;;;;1857:89;1958:5;;;;;;;;;;;1955:67;;;1986:25;;;;;;;;;;;;;;1955:67;2048:4;2040:5;;:12;;;;;;;;;;;;;;;;;;2067:39;2080:13;;;;;;;;;;;2095:10;;2067:39;;;;;;;:::i;:::-;;;;;;;;2125:11;;;;;;;;;;:20;;:32;2146:10;;2125:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1818:346::o;91:34::-;;;;;;;;;;;;:::o;1429:379::-;1465:4;1481:11;1495:14;:26;1510:10;1495:26;;;;;;;;;;;;;;;;1481:40;;1552:1;1543:6;:10;1540:232;;;1598:1;1569:14;:26;1584:10;1569:26;;;;;;;;;;;;;;;:30;;;;1638:10;1630:24;;:32;1655:6;1630:32;;;;;;;;;;;;;;;;;;;;;;;1626:136;;1711:6;1682:14;:26;1697:10;1682:26;;;;;;;;;;;;;;;:35;;;;1742:5;1735:12;;;;;1626:136;1540:232;1788:4;1781:11;;;1429:379;;:::o;131:26::-;;;;:::o;168:28::-;;;;;;;;;;;;;:::o;202:22::-;;;;:::o;7:142:1:-;110:32;136:5;110:32;:::i;:::-;105:3;98:45;88:61;;:::o;155:118::-;242:24;260:5;242:24;:::i;:::-;237:3;230:37;220:53;;:::o;279:109::-;360:21;375:5;360:21;:::i;:::-;355:3;348:34;338:50;;:::o;394:118::-;481:24;499:5;481:24;:::i;:::-;476:3;469:37;459:53;;:::o;518:222::-;611:4;649:2;638:9;634:18;626:26;;662:71;730:1;719:9;715:17;706:6;662:71;:::i;:::-;616:124;;;;:::o;746:254::-;855:4;893:2;882:9;878:18;870:26;;906:87;990:1;979:9;975:17;966:6;906:87;:::i;:::-;860:140;;;;:::o;1006:332::-;1127:4;1165:2;1154:9;1150:18;1142:26;;1178:71;1246:1;1235:9;1231:17;1222:6;1178:71;:::i;:::-;1259:72;1327:2;1316:9;1312:18;1303:6;1259:72;:::i;:::-;1132:206;;;;;:::o;1344:210::-;1431:4;1469:2;1458:9;1454:18;1446:26;;1482:65;1544:1;1533:9;1529:17;1520:6;1482:65;:::i;:::-;1436:118;;;;:::o;1560:222::-;1653:4;1691:2;1680:9;1676:18;1668:26;;1704:71;1772:1;1761:9;1757:17;1748:6;1704:71;:::i;:::-;1658:124;;;;:::o;1788:305::-;1828:3;1847:20;1865:1;1847:20;:::i;:::-;1842:25;;1881:20;1899:1;1881:20;:::i;:::-;1876:25;;2035:1;1967:66;1963:74;1960:1;1957:81;1954:2;;;2041:18;;:::i;:::-;1954:2;2085:1;2082;2078:9;2071:16;;1832:261;;;;:::o;2099:96::-;2136:7;2165:24;2183:5;2165:24;:::i;:::-;2154:35;;2144:51;;;:::o;2201:104::-;2246:7;2275:24;2293:5;2275:24;:::i;:::-;2264:35;;2254:51;;;:::o;2311:90::-;2345:7;2388:5;2381:13;2374:21;2363:32;;2353:48;;;:::o;2407:126::-;2444:7;2484:42;2477:5;2473:54;2462:65;;2452:81;;;:::o;2539:77::-;2576:7;2605:5;2594:16;;2584:32;;;:::o;2622:180::-;2670:77;2667:1;2660:88;2767:4;2764:1;2757:15;2791:4;2788:1;2781:15"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "396600",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"auctionEnd()": "infinite",
"auctionEndTime()": "1151",
"beneficiary()": "1256",
"bid()": "infinite",
"highestBid()": "1195",
"highestBidder()": "1258",
"withdraw()": "infinite"
}
},
"methodIdentifiers": {
"auctionEnd()": "2a24f46c",
"auctionEndTime()": "4b449cba",
"beneficiary()": "38af3eed",
"bid()": "1998aeef",
"highestBid()": "d57bde79",
"highestBidder()": "91f90157",
"withdraw()": "3ccfd60b"
}
},
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_biddingTime",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "_beneficiary",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AuctionAlreadyEnded",
"type": "error"
},
{
"inputs": [],
"name": "AuctionEndAlreadyCalled",
"type": "error"
},
{
"inputs": [],
"name": "AuctionNotYetEnded",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "highestBid",
"type": "uint256"
}
],
"name": "BidNotHighEnough",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "winner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "AuctionEnded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "bidder",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "HighestBidIncreased",
"type": "event"
},
{
"inputs": [],
"name": "auctionEnd",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "auctionEndTime",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "beneficiary",
"outputs": [
{
"internalType": "address payable",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "bid",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "highestBid",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "highestBidder",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.4+commit.c7e474f2"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_biddingTime",
"type": "uint256"
},
{
"internalType": "address payable",
"name": "_beneficiary",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AuctionAlreadyEnded",
"type": "error"
},
{
"inputs": [],
"name": "AuctionEndAlreadyCalled",
"type": "error"
},
{
"inputs": [],
"name": "AuctionNotYetEnded",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "highestBid",
"type": "uint256"
}
],
"name": "BidNotHighEnough",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "winner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "AuctionEnded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "bidder",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "HighestBidIncreased",
"type": "event"
},
{
"inputs": [],
"name": "auctionEnd",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "auctionEndTime",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "beneficiary",
"outputs": [
{
"internalType": "address payable",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "bid",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "highestBid",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "highestBidder",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"errors": {
"AuctionAlreadyEnded()": [
{
"notice": "The auction has already ended"
}
],
"AuctionEndAlreadyCalled()": [
{
"notice": "the function auctionEnd has already been called"
}
],
"AuctionNotYetEnded()": [
{
"notice": "The auction has not ended yet"
}
],
"BidNotHighEnough(uint256)": [
{
"notice": "There is already a higher or equal bid"
}
]
},
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/5_SimpleAucton.sol": "SimpleAuction"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/5_SimpleAucton.sol": {
"keccak256": "0xeba3e0af7f53040566940538f5c886d349b9e2d254a87e3a06fc40ba99c41bf8",
"urls": [
"bzz-raw://de8fa38ae114fc5c54ff970f64cd8afc7db8674550238f66da8135fe2163aa2e",
"dweb:/ipfs/QmX91mXhJXdMvZZWF8CWDA8P7NzL28iSmoEQRQzB96sbZb"
]
}
},
"version": 1
}
{
"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": "608060405234801561001057600080fd5b5061012f806100206000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80632e64cec11460375780636057361d146051575b600080fd5b603d6069565b6040516048919060c2565b60405180910390f35b6067600480360381019060639190608f565b6072565b005b60008054905090565b8060008190555050565b60008135905060898160e5565b92915050565b60006020828403121560a057600080fd5b600060ac84828501607c565b91505092915050565b60bc8160db565b82525050565b600060208201905060d5600083018460b5565b92915050565b6000819050919050565b60ec8160db565b811460f657600080fd5b5056fea2646970667358221220c019e4614043d8adc295c3046ba5142c603ab309adeef171f330c51c38f1498964736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x12F DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH1 0x51 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3D PUSH1 0x69 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x48 SWAP2 SWAP1 PUSH1 0xC2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x67 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH1 0x63 SWAP2 SWAP1 PUSH1 0x8F JUMP JUMPDEST PUSH1 0x72 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH1 0x89 DUP2 PUSH1 0xE5 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0xA0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0xAC DUP5 DUP3 DUP6 ADD PUSH1 0x7C JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xBC DUP2 PUSH1 0xDB JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0xD5 PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0xB5 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0xEC DUP2 PUSH1 0xDB JUMP JUMPDEST DUP2 EQ PUSH1 0xF6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC0 NOT 0xE4 PUSH2 0x4043 0xD8 0xAD 0xC2 SWAP6 0xC3 DIV PUSH12 0xA5142C603AB309ADEEF171F3 ADDRESS 0xC5 SHR CODESIZE CALL 0x49 DUP10 PUSH5 0x736F6C6343 STOP ADDMOD DIV STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:980:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "59:87:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "69:29:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "91:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "78:12:1"
},
"nodeType": "YulFunctionCall",
"src": "78:20:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "69:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "134:5:1"
}
],
"functionName": {
"name": "validator_revert_t_uint256",
"nodeType": "YulIdentifier",
"src": "107:26:1"
},
"nodeType": "YulFunctionCall",
"src": "107:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "107:33:1"
}
]
},
"name": "abi_decode_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "37:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "45:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "53:5:1",
"type": ""
}
],
"src": "7:139:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "218:196:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "264:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "273:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "276:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "266:6:1"
},
"nodeType": "YulFunctionCall",
"src": "266:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "239:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "248:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "235:3:1"
},
"nodeType": "YulFunctionCall",
"src": "235:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "260:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "231:3:1"
},
"nodeType": "YulFunctionCall",
"src": "231:32:1"
},
"nodeType": "YulIf",
"src": "228:2:1"
},
{
"nodeType": "YulBlock",
"src": "290:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "305:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "319:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "309:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "334:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "369:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "380:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "365:3:1"
},
"nodeType": "YulFunctionCall",
"src": "365:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "389:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "344:20:1"
},
"nodeType": "YulFunctionCall",
"src": "344:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "334:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "188:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "199:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "211:6:1",
"type": ""
}
],
"src": "152:262:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "485:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "502:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "525:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "507:17:1"
},
"nodeType": "YulFunctionCall",
"src": "507:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "495:6:1"
},
"nodeType": "YulFunctionCall",
"src": "495:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "495:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "473:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "480:3:1",
"type": ""
}
],
"src": "420:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "642:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "652:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "664:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "675:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "660:3:1"
},
"nodeType": "YulFunctionCall",
"src": "660:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "652:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "732:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "745:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "756:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "741:3:1"
},
"nodeType": "YulFunctionCall",
"src": "741:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "688:43:1"
},
"nodeType": "YulFunctionCall",
"src": "688:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "688:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "614:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "626:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "637:4:1",
"type": ""
}
],
"src": "544:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "817:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "827:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "838:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "827:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "799:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "809:7:1",
"type": ""
}
],
"src": "772:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "898:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "955:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "964:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "967:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "957:6:1"
},
"nodeType": "YulFunctionCall",
"src": "957:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "957:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "921:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "946:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "928:17:1"
},
"nodeType": "YulFunctionCall",
"src": "928:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "918:2:1"
},
"nodeType": "YulFunctionCall",
"src": "918:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "911:6:1"
},
"nodeType": "YulFunctionCall",
"src": "911:43:1"
},
"nodeType": "YulIf",
"src": "908:2:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "891:5:1",
"type": ""
}
],
"src": "855:122:1"
}
]
},
"contents": "{\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\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": "6080604052348015600f57600080fd5b506004361060325760003560e01c80632e64cec11460375780636057361d146051575b600080fd5b603d6069565b6040516048919060c2565b60405180910390f35b6067600480360381019060639190608f565b6072565b005b60008054905090565b8060008190555050565b60008135905060898160e5565b92915050565b60006020828403121560a057600080fd5b600060ac84828501607c565b91505092915050565b60bc8160db565b82525050565b600060208201905060d5600083018460b5565b92915050565b6000819050919050565b60ec8160db565b811460f657600080fd5b5056fea2646970667358221220c019e4614043d8adc295c3046ba5142c603ab309adeef171f330c51c38f1498964736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x32 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH1 0x37 JUMPI DUP1 PUSH4 0x6057361D EQ PUSH1 0x51 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3D PUSH1 0x69 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x48 SWAP2 SWAP1 PUSH1 0xC2 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x67 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH1 0x63 SWAP2 SWAP1 PUSH1 0x8F JUMP JUMPDEST PUSH1 0x72 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x0 DUP1 SLOAD SWAP1 POP SWAP1 JUMP JUMPDEST DUP1 PUSH1 0x0 DUP2 SWAP1 SSTORE POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 CALLDATALOAD SWAP1 POP PUSH1 0x89 DUP2 PUSH1 0xE5 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH1 0xA0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0xAC DUP5 DUP3 DUP6 ADD PUSH1 0x7C JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0xBC DUP2 PUSH1 0xDB JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH1 0xD5 PUSH1 0x0 DUP4 ADD DUP5 PUSH1 0xB5 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0xEC DUP2 PUSH1 0xDB JUMP JUMPDEST DUP2 EQ PUSH1 0xF6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC0 NOT 0xE4 PUSH2 0x4043 0xD8 0xAD 0xC2 SWAP6 0xC3 DIV PUSH12 0xA5142C603AB309ADEEF171F3 ADDRESS 0xC5 SHR CODESIZE CALL 0x49 DUP10 PUSH5 0x736F6C6343 STOP ADDMOD DIV STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:79;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;271:64;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;416:79;457:7;482:6;;475:13;;416:79;:::o;271:64::-;325:3;316:6;:12;;;;271:64;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:262::-;211:6;260:2;248:9;239:7;235:23;231:32;228:2;;;276:1;273;266:12;228:2;319:1;344:53;389:7;380:6;369:9;365:22;344:53;:::i;:::-;334:63;;290:117;218:196;;;;:::o;420:118::-;507:24;525:5;507:24;:::i;:::-;502:3;495:37;485:53;;:::o;544:222::-;637:4;675:2;664:9;660:18;652:26;;688:71;756:1;745:9;741:17;732:6;688:71;:::i;:::-;642:124;;;;:::o;772:77::-;809:7;838:5;827:16;;817:32;;;:::o;855:122::-;928:24;946:5;928:24;:::i;:::-;921:5;918:35;908:2;;967:1;964;957:12;908:2;898:79;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "60600",
"executionCost": "111",
"totalCost": "60711"
},
"external": {
"retrieve()": "1115",
"store(uint256)": "20420"
}
},
"methodIdentifiers": {
"retrieve()": "2e64cec1",
"store(uint256)": "6057361d"
}
},
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.4+commit.c7e474f2"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "num",
"type": "uint256"
}
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": {
"_0": "value of 'number'"
}
},
"store(uint256)": {
"details": "Store value in variable",
"params": {
"num": "value to store"
}
}
},
"title": "Storage",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/1_Storage.sol": "Storage"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/1_Storage.sol": {
"keccak256": "0xb6ee9d528b336942dd70d3b41e2811be10a473776352009fd73f85604f5ed206",
"license": "GPL-3.0",
"urls": [
"bzz-raw://fe52c6e3c04ba5d83ede6cc1a43c45fa43caa435b207f64707afb17d3af1bcf1",
"dweb:/ipfs/QmawU3NM1WNWkBauRudYCiFvuFE1tTLHB98akyBvb9UWwA"
]
}
},
"version": 1
}
// 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)
}
})()
// 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)
}
})()
// 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