Skip to content

Instantly share code, notes, and snippets.

@yoel3imari
Created March 5, 2022 16:04
Show Gist options
  • Save yoel3imari/0d7c5a84d01cb61845bd0915bf65074d to your computer and use it in GitHub Desktop.
Save yoel3imari/0d7c5a84d01cb61845bd0915bf65074d to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads for the 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;
}
}
{
"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": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b506104a8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635f3cbff51461003b5780639d0c139714610057575b600080fd5b61005560048036038101906100509190610234565b610075565b005b61005f61008f565b60405161006c91906102b6565b60405180910390f35b806000908051906020019061008b929190610121565b5050565b60606000805461009e9061038c565b80601f01602080910402602001604051908101604052809291908181526020018280546100ca9061038c565b80156101175780601f106100ec57610100808354040283529160200191610117565b820191906000526020600020905b8154815290600101906020018083116100fa57829003601f168201915b5050505050905090565b82805461012d9061038c565b90600052602060002090601f01602090048101928261014f5760008555610196565b82601f1061016857805160ff1916838001178555610196565b82800160010185558215610196579182015b8281111561019557825182559160200191906001019061017a565b5b5090506101a391906101a7565b5090565b5b808211156101c05760008160009055506001016101a8565b5090565b60006101d76101d2846102fd565b6102d8565b9050828152602081018484840111156101f3576101f2610452565b5b6101fe84828561034a565b509392505050565b600082601f83011261021b5761021a61044d565b5b813561022b8482602086016101c4565b91505092915050565b60006020828403121561024a5761024961045c565b5b600082013567ffffffffffffffff81111561026857610267610457565b5b61027484828501610206565b91505092915050565b60006102888261032e565b6102928185610339565b93506102a2818560208601610359565b6102ab81610461565b840191505092915050565b600060208201905081810360008301526102d0818461027d565b905092915050565b60006102e26102f3565b90506102ee82826103be565b919050565b6000604051905090565b600067ffffffffffffffff8211156103185761031761041e565b5b61032182610461565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b82818337600083830152505050565b60005b8381101561037757808201518184015260208101905061035c565b83811115610386576000848401525b50505050565b600060028204905060018216806103a457607f821691505b602082108114156103b8576103b76103ef565b5b50919050565b6103c782610461565b810181811067ffffffffffffffff821117156103e6576103e561041e565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f830116905091905056fea2646970667358221220ca403f09c15dd817f3fcd120408b35a323f4fc87a83a96f035a5a468a5bbadda64736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4A8 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x5F3CBFF5 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x9D0C1397 EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x234 JUMP JUMPDEST PUSH2 0x75 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x8F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6C SWAP2 SWAP1 PUSH2 0x2B6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x8B SWAP3 SWAP2 SWAP1 PUSH2 0x121 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH2 0x9E SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0xCA SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 ISZERO PUSH2 0x117 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xEC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x117 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xFA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x12D SWAP1 PUSH2 0x38C JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x14F JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0x168 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x196 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x195 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x17A JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x1A3 SWAP2 SWAP1 PUSH2 0x1A7 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1C0 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1A8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D7 PUSH2 0x1D2 DUP5 PUSH2 0x2FD JUMP JUMPDEST PUSH2 0x2D8 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x1F3 JUMPI PUSH2 0x1F2 PUSH2 0x452 JUMP JUMPDEST JUMPDEST PUSH2 0x1FE DUP5 DUP3 DUP6 PUSH2 0x34A JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x21B JUMPI PUSH2 0x21A PUSH2 0x44D JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x22B DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x1C4 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x24A JUMPI PUSH2 0x249 PUSH2 0x45C JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x268 JUMPI PUSH2 0x267 PUSH2 0x457 JUMP JUMPDEST JUMPDEST PUSH2 0x274 DUP5 DUP3 DUP6 ADD PUSH2 0x206 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288 DUP3 PUSH2 0x32E JUMP JUMPDEST PUSH2 0x292 DUP2 DUP6 PUSH2 0x339 JUMP JUMPDEST SWAP4 POP PUSH2 0x2A2 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x359 JUMP JUMPDEST PUSH2 0x2AB DUP2 PUSH2 0x461 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2D0 DUP2 DUP5 PUSH2 0x27D JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E2 PUSH2 0x2F3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2EE DUP3 DUP3 PUSH2 0x3BE JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x318 JUMPI PUSH2 0x317 PUSH2 0x41E JUMP JUMPDEST JUMPDEST PUSH2 0x321 DUP3 PUSH2 0x461 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x377 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x35C JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x386 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x3A4 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x3B8 JUMPI PUSH2 0x3B7 PUSH2 0x3EF JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x3C7 DUP3 PUSH2 0x461 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x3E6 JUMPI PUSH2 0x3E5 PUSH2 0x41E JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCA BLOCKHASH EXTCODEHASH MULMOD 0xC1 0x5D 0xD8 OR RETURN 0xFC 0xD1 KECCAK256 BLOCKHASH DUP12 CALLDATALOAD LOG3 0x23 DELEGATECALL 0xFC DUP8 0xA8 GASPRICE SWAP7 CREATE CALLDATALOAD 0xA5 LOG4 PUSH9 0xA5BBADDA64736F6C63 NUMBER STOP ADDMOD SMOD STOP CALLER ",
"sourceMap": "60:220:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@getMood_21": {
"entryPoint": 143,
"id": 21,
"parameterSlots": 0,
"returnSlots": 1
},
"@setMood_13": {
"entryPoint": 117,
"id": 13,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_available_length_t_string_memory_ptr": {
"entryPoint": 452,
"id": null,
"parameterSlots": 3,
"returnSlots": 1
},
"abi_decode_t_string_memory_ptr": {
"entryPoint": 518,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_string_memory_ptr": {
"entryPoint": 564,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack": {
"entryPoint": 637,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed": {
"entryPoint": 694,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_memory": {
"entryPoint": 728,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": 755,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"array_allocation_size_t_string_memory_ptr": {
"entryPoint": 765,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_length_t_string_memory_ptr": {
"entryPoint": 814,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"array_storeLengthForEncoding_t_string_memory_ptr_fromStack": {
"entryPoint": 825,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"copy_calldata_to_memory": {
"entryPoint": 842,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"copy_memory_to_memory": {
"entryPoint": 857,
"id": null,
"parameterSlots": 3,
"returnSlots": 0
},
"extract_byte_array_length": {
"entryPoint": 908,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"finalize_allocation": {
"entryPoint": 958,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"panic_error_0x22": {
"entryPoint": 1007,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"panic_error_0x41": {
"entryPoint": 1054,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d": {
"entryPoint": 1101,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae": {
"entryPoint": 1106,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": 1111,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 1116,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"round_up_to_mul_of_32": {
"entryPoint": 1121,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:4854:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "91:328:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "101:75:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "168:6:1"
}
],
"functionName": {
"name": "array_allocation_size_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "126:41:1"
},
"nodeType": "YulFunctionCall",
"src": "126:49:1"
}
],
"functionName": {
"name": "allocate_memory",
"nodeType": "YulIdentifier",
"src": "110:15:1"
},
"nodeType": "YulFunctionCall",
"src": "110:66:1"
},
"variableNames": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "101:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "192:5:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "199:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "185:6:1"
},
"nodeType": "YulFunctionCall",
"src": "185:21:1"
},
"nodeType": "YulExpressionStatement",
"src": "185:21:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "215:27:1",
"value": {
"arguments": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "230:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "237:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "226:3:1"
},
"nodeType": "YulFunctionCall",
"src": "226:16:1"
},
"variables": [
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "219:3:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "280:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
"nodeType": "YulIdentifier",
"src": "282:77:1"
},
"nodeType": "YulFunctionCall",
"src": "282:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "282:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "261:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "266:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "257:3:1"
},
"nodeType": "YulFunctionCall",
"src": "257:16:1"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "275:3:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "254:2:1"
},
"nodeType": "YulFunctionCall",
"src": "254:25:1"
},
"nodeType": "YulIf",
"src": "251:112:1"
},
{
"expression": {
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "396:3:1"
},
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "401:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "406:6:1"
}
],
"functionName": {
"name": "copy_calldata_to_memory",
"nodeType": "YulIdentifier",
"src": "372:23:1"
},
"nodeType": "YulFunctionCall",
"src": "372:41:1"
},
"nodeType": "YulExpressionStatement",
"src": "372:41:1"
}
]
},
"name": "abi_decode_available_length_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "64:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "69:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "77:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "array",
"nodeType": "YulTypedName",
"src": "85:5:1",
"type": ""
}
],
"src": "7:412:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "501:278:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "550:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nodeType": "YulIdentifier",
"src": "552:77:1"
},
"nodeType": "YulFunctionCall",
"src": "552:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "552:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "529:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "537:4:1",
"type": "",
"value": "0x1f"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "525:3:1"
},
"nodeType": "YulFunctionCall",
"src": "525:17:1"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "544:3:1"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "521:3:1"
},
"nodeType": "YulFunctionCall",
"src": "521:27:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "514:6:1"
},
"nodeType": "YulFunctionCall",
"src": "514:35:1"
},
"nodeType": "YulIf",
"src": "511:122:1"
},
{
"nodeType": "YulVariableDeclaration",
"src": "642:34:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "669:6:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "656:12:1"
},
"nodeType": "YulFunctionCall",
"src": "656:20:1"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "646:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "685:88:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "746:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "754:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "742:3:1"
},
"nodeType": "YulFunctionCall",
"src": "742:17:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "761:6:1"
},
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "769:3:1"
}
],
"functionName": {
"name": "abi_decode_available_length_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "694:47:1"
},
"nodeType": "YulFunctionCall",
"src": "694:79:1"
},
"variableNames": [
{
"name": "array",
"nodeType": "YulIdentifier",
"src": "685:5:1"
}
]
}
]
},
"name": "abi_decode_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "479:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "487:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "array",
"nodeType": "YulTypedName",
"src": "495:5:1",
"type": ""
}
],
"src": "439:340:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "861:433:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "907:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "909:77:1"
},
"nodeType": "YulFunctionCall",
"src": "909:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "909:79:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "882:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "891:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "878:3:1"
},
"nodeType": "YulFunctionCall",
"src": "878:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "903:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "874:3:1"
},
"nodeType": "YulFunctionCall",
"src": "874:32:1"
},
"nodeType": "YulIf",
"src": "871:119:1"
},
{
"nodeType": "YulBlock",
"src": "1000:287:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1015:45:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1046:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1057:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1042:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1042:17:1"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "1029:12:1"
},
"nodeType": "YulFunctionCall",
"src": "1029:31:1"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "1019:6:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1107:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulIdentifier",
"src": "1109:77:1"
},
"nodeType": "YulFunctionCall",
"src": "1109:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "1109:79:1"
}
]
},
"condition": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1079:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1087:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "1076:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1076:30:1"
},
"nodeType": "YulIf",
"src": "1073:117:1"
},
{
"nodeType": "YulAssignment",
"src": "1204:73:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1249:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "1260:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1245:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1245:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "1269:7:1"
}
],
"functionName": {
"name": "abi_decode_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "1214:30:1"
},
"nodeType": "YulFunctionCall",
"src": "1214:63:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1204:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "831:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "842:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "854:6:1",
"type": ""
}
],
"src": "785:509:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1392:272:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1402:53:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1449:5:1"
}
],
"functionName": {
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulIdentifier",
"src": "1416:32:1"
},
"nodeType": "YulFunctionCall",
"src": "1416:39:1"
},
"variables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "1406:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "1464:78:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1530:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1535:6:1"
}
],
"functionName": {
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1471:58:1"
},
"nodeType": "YulFunctionCall",
"src": "1471:71:1"
},
"variableNames": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1464:3:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1577:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1584:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1573:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1573:16:1"
},
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1591:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1596:6:1"
}
],
"functionName": {
"name": "copy_memory_to_memory",
"nodeType": "YulIdentifier",
"src": "1551:21:1"
},
"nodeType": "YulFunctionCall",
"src": "1551:52:1"
},
"nodeType": "YulExpressionStatement",
"src": "1551:52:1"
},
{
"nodeType": "YulAssignment",
"src": "1612:46:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "1623:3:1"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "1650:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "1628:21:1"
},
"nodeType": "YulFunctionCall",
"src": "1628:29:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1619:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1619:39:1"
},
"variableNames": [
{
"name": "end",
"nodeType": "YulIdentifier",
"src": "1612:3:1"
}
]
}
]
},
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1373:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "1380:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "end",
"nodeType": "YulTypedName",
"src": "1388:3:1",
"type": ""
}
],
"src": "1300:364:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1788:195:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1798:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1810:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1821:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1806:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1806:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1798:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1845:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1856:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1841:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1841:17:1"
},
{
"arguments": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1864:4:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1870:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1860:3:1"
},
"nodeType": "YulFunctionCall",
"src": "1860:20:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1834:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1834:47:1"
},
"nodeType": "YulExpressionStatement",
"src": "1834:47:1"
},
{
"nodeType": "YulAssignment",
"src": "1890:86:1",
"value": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1962:6:1"
},
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1971:4:1"
}
],
"functionName": {
"name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack",
"nodeType": "YulIdentifier",
"src": "1898:63:1"
},
"nodeType": "YulFunctionCall",
"src": "1898:78:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1890:4:1"
}
]
}
]
},
"name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1760:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1772:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1783:4:1",
"type": ""
}
],
"src": "1670:313:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2030:88:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2040:30:1",
"value": {
"arguments": [],
"functionName": {
"name": "allocate_unbounded",
"nodeType": "YulIdentifier",
"src": "2050:18:1"
},
"nodeType": "YulFunctionCall",
"src": "2050:20:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2040:6:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2099:6:1"
},
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2107:4:1"
}
],
"functionName": {
"name": "finalize_allocation",
"nodeType": "YulIdentifier",
"src": "2079:19:1"
},
"nodeType": "YulFunctionCall",
"src": "2079:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "2079:33:1"
}
]
},
"name": "allocate_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "size",
"nodeType": "YulTypedName",
"src": "2014:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "2023:6:1",
"type": ""
}
],
"src": "1989:129:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2164:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2174:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2190:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2184:5:1"
},
"nodeType": "YulFunctionCall",
"src": "2184:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "2174:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "2157:6:1",
"type": ""
}
],
"src": "2124:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2272:241:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2377:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "2379:16:1"
},
"nodeType": "YulFunctionCall",
"src": "2379:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "2379:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2349:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2357:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "2346:2:1"
},
"nodeType": "YulFunctionCall",
"src": "2346:30:1"
},
"nodeType": "YulIf",
"src": "2343:56:1"
},
{
"nodeType": "YulAssignment",
"src": "2409:37:1",
"value": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2439:6:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "2417:21:1"
},
"nodeType": "YulFunctionCall",
"src": "2417:29:1"
},
"variableNames": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2409:4:1"
}
]
},
{
"nodeType": "YulAssignment",
"src": "2483:23:1",
"value": {
"arguments": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2495:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2501:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2491:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2491:15:1"
},
"variableNames": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "2483:4:1"
}
]
}
]
},
"name": "array_allocation_size_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2256:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "size",
"nodeType": "YulTypedName",
"src": "2267:4:1",
"type": ""
}
],
"src": "2205:308:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2578:40:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "2589:22:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2605:5:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2599:5:1"
},
"nodeType": "YulFunctionCall",
"src": "2599:12:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2589:6:1"
}
]
}
]
},
"name": "array_length_t_string_memory_ptr",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2561:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2571:6:1",
"type": ""
}
],
"src": "2519:99:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2720:73:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2737:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2742:6:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2730:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2730:19:1"
},
"nodeType": "YulExpressionStatement",
"src": "2730:19:1"
},
{
"nodeType": "YulAssignment",
"src": "2758:29:1",
"value": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "2777:3:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2782:4:1",
"type": "",
"value": "0x20"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2773:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2773:14:1"
},
"variableNames": [
{
"name": "updated_pos",
"nodeType": "YulIdentifier",
"src": "2758:11:1"
}
]
}
]
},
"name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "2692:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2697:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "updated_pos",
"nodeType": "YulTypedName",
"src": "2708:11:1",
"type": ""
}
],
"src": "2624:169:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2850:103:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "2873:3:1"
},
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "2878:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2883:6:1"
}
],
"functionName": {
"name": "calldatacopy",
"nodeType": "YulIdentifier",
"src": "2860:12:1"
},
"nodeType": "YulFunctionCall",
"src": "2860:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "2860:30:1"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "2931:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "2936:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2927:3:1"
},
"nodeType": "YulFunctionCall",
"src": "2927:16:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2945:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2920:6:1"
},
"nodeType": "YulFunctionCall",
"src": "2920:27:1"
},
"nodeType": "YulExpressionStatement",
"src": "2920:27:1"
}
]
},
"name": "copy_calldata_to_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "2832:3:1",
"type": ""
},
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "2837:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "2842:6:1",
"type": ""
}
],
"src": "2799:154:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3008:258:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "3018:10:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "3027:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "i",
"nodeType": "YulTypedName",
"src": "3022:1:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "3087:63:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "3112:3:1"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3117:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3108:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3108:11:1"
},
{
"arguments": [
{
"arguments": [
{
"name": "src",
"nodeType": "YulIdentifier",
"src": "3131:3:1"
},
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3136:1:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3127:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3127:11:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3121:5:1"
},
"nodeType": "YulFunctionCall",
"src": "3121:18:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3101:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3101:39:1"
},
"nodeType": "YulExpressionStatement",
"src": "3101:39:1"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3048:1:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3051:6:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "3045:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3045:13:1"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "3059:19:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3061:15:1",
"value": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3070:1:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3073:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3066:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3066:10:1"
},
"variableNames": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3061:1:1"
}
]
}
]
},
"pre": {
"nodeType": "YulBlock",
"src": "3041:3:1",
"statements": []
},
"src": "3037:113:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3184:76:1",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "dst",
"nodeType": "YulIdentifier",
"src": "3234:3:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3239:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3230:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3230:16:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3248:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3223:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3223:27:1"
},
"nodeType": "YulExpressionStatement",
"src": "3223:27:1"
}
]
},
"condition": {
"arguments": [
{
"name": "i",
"nodeType": "YulIdentifier",
"src": "3165:1:1"
},
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3168:6:1"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "3162:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3162:13:1"
},
"nodeType": "YulIf",
"src": "3159:101:1"
}
]
},
"name": "copy_memory_to_memory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "src",
"nodeType": "YulTypedName",
"src": "2990:3:1",
"type": ""
},
{
"name": "dst",
"nodeType": "YulTypedName",
"src": "2995:3:1",
"type": ""
},
{
"name": "length",
"nodeType": "YulTypedName",
"src": "3000:6:1",
"type": ""
}
],
"src": "2959:307:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3323:269:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3333:22:1",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "3347:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3353:1:1",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "div",
"nodeType": "YulIdentifier",
"src": "3343:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3343:12:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3333:6:1"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "3364:38:1",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "3394:4:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3400:1:1",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3390:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3390:12:1"
},
"variables": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulTypedName",
"src": "3368:18:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "3441:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "3455:27:1",
"value": {
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3469:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3477:4:1",
"type": "",
"value": "0x7f"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3465:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3465:17:1"
},
"variableNames": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3455:6:1"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "3421:18:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "3414:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3414:26:1"
},
"nodeType": "YulIf",
"src": "3411:81:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3544:42:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x22",
"nodeType": "YulIdentifier",
"src": "3558:16:1"
},
"nodeType": "YulFunctionCall",
"src": "3558:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "3558:18:1"
}
]
},
"condition": {
"arguments": [
{
"name": "outOfPlaceEncoding",
"nodeType": "YulIdentifier",
"src": "3508:18:1"
},
{
"arguments": [
{
"name": "length",
"nodeType": "YulIdentifier",
"src": "3531:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3539:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "3528:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3528:14:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "3505:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3505:38:1"
},
"nodeType": "YulIf",
"src": "3502:84:1"
}
]
},
"name": "extract_byte_array_length",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "data",
"nodeType": "YulTypedName",
"src": "3307:4:1",
"type": ""
}
],
"returnVariables": [
{
"name": "length",
"nodeType": "YulTypedName",
"src": "3316:6:1",
"type": ""
}
],
"src": "3272:320:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3641:238:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "3651:58:1",
"value": {
"arguments": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "3673:6:1"
},
{
"arguments": [
{
"name": "size",
"nodeType": "YulIdentifier",
"src": "3703:4:1"
}
],
"functionName": {
"name": "round_up_to_mul_of_32",
"nodeType": "YulIdentifier",
"src": "3681:21:1"
},
"nodeType": "YulFunctionCall",
"src": "3681:27:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3669:3:1"
},
"nodeType": "YulFunctionCall",
"src": "3669:40:1"
},
"variables": [
{
"name": "newFreePtr",
"nodeType": "YulTypedName",
"src": "3655:10:1",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "3820:22:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "panic_error_0x41",
"nodeType": "YulIdentifier",
"src": "3822:16:1"
},
"nodeType": "YulFunctionCall",
"src": "3822:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "3822:18:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "3763:10:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3775:18:1",
"type": "",
"value": "0xffffffffffffffff"
}
],
"functionName": {
"name": "gt",
"nodeType": "YulIdentifier",
"src": "3760:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3760:34:1"
},
{
"arguments": [
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "3799:10:1"
},
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "3811:6:1"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "3796:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3796:22:1"
}
],
"functionName": {
"name": "or",
"nodeType": "YulIdentifier",
"src": "3757:2:1"
},
"nodeType": "YulFunctionCall",
"src": "3757:62:1"
},
"nodeType": "YulIf",
"src": "3754:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3858:2:1",
"type": "",
"value": "64"
},
{
"name": "newFreePtr",
"nodeType": "YulIdentifier",
"src": "3862:10:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3851:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3851:22:1"
},
"nodeType": "YulExpressionStatement",
"src": "3851:22:1"
}
]
},
"name": "finalize_allocation",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "3627:6:1",
"type": ""
},
{
"name": "size",
"nodeType": "YulTypedName",
"src": "3635:4:1",
"type": ""
}
],
"src": "3598:281:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "3913:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3930:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3933:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "3923:6:1"
},
"nodeType": "YulFunctionCall",
"src": "3923:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "3923:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4027:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4030:4:1",
"type": "",
"value": "0x22"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4020:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4020:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4020:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4051:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4054:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4044:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4044:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4044:15:1"
}
]
},
"name": "panic_error_0x22",
"nodeType": "YulFunctionDefinition",
"src": "3885:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4099:152:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4116:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4119:77:1",
"type": "",
"value": "35408467139433450592217433187231851964531694900788300625387963629091585785856"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4109:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4109:88:1"
},
"nodeType": "YulExpressionStatement",
"src": "4109:88:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4213:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4216:4:1",
"type": "",
"value": "0x41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "4206:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4206:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4206:15:1"
},
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4237:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4240:4:1",
"type": "",
"value": "0x24"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4230:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4230:15:1"
},
"nodeType": "YulExpressionStatement",
"src": "4230:15:1"
}
]
},
"name": "panic_error_0x41",
"nodeType": "YulFunctionDefinition",
"src": "4071:180:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4346:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4363:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4366:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4356:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4356:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4356:12:1"
}
]
},
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nodeType": "YulFunctionDefinition",
"src": "4257:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4469:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4486:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4489:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4479:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4479:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4479:12:1"
}
]
},
"name": "revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae",
"nodeType": "YulFunctionDefinition",
"src": "4380:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4592:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4609:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4612:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4602:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4602:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4602:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "4503:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4715:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4732:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4735:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "4725:6:1"
},
"nodeType": "YulFunctionCall",
"src": "4725:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "4725:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "4626:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "4797:54:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "4807:38:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "4825:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4832:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "4821:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4821:14:1"
},
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "4841:2:1",
"type": "",
"value": "31"
}
],
"functionName": {
"name": "not",
"nodeType": "YulIdentifier",
"src": "4837:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4837:7:1"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "4817:3:1"
},
"nodeType": "YulFunctionCall",
"src": "4817:28:1"
},
"variableNames": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "4807:6:1"
}
]
}
]
},
"name": "round_up_to_mul_of_32",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "4780:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "result",
"nodeType": "YulTypedName",
"src": "4790:6:1",
"type": ""
}
],
"src": "4749:102:1"
}
]
},
"contents": "{\n\n function abi_decode_available_length_t_string_memory_ptr(src, length, end) -> array {\n array := allocate_memory(array_allocation_size_t_string_memory_ptr(length))\n mstore(array, length)\n let dst := add(array, 0x20)\n if gt(add(src, length), end) { revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() }\n copy_calldata_to_memory(src, dst, length)\n }\n\n // string\n function abi_decode_t_string_memory_ptr(offset, end) -> array {\n if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }\n let length := calldataload(offset)\n array := abi_decode_available_length_t_string_memory_ptr(add(offset, 0x20), length, end)\n }\n\n function abi_decode_tuple_t_string_memory_ptr(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := calldataload(add(headStart, 0))\n if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }\n\n value0 := abi_decode_t_string_memory_ptr(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function allocate_memory(size) -> memPtr {\n memPtr := allocate_unbounded()\n finalize_allocation(memPtr, size)\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function array_allocation_size_t_string_memory_ptr(length) -> size {\n // Make sure we can allocate memory without overflow\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n\n size := round_up_to_mul_of_32(length)\n\n // add length slot\n size := add(size, 0x20)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function copy_calldata_to_memory(src, dst, length) {\n calldatacopy(dst, src, length)\n // clear end\n mstore(add(dst, length), 0)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function finalize_allocation(memPtr, size) {\n let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))\n // protect against overflow\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function panic_error_0x41() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n\n function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {\n revert(0, 0)\n }\n\n function revert_error_987264b3b1d58a9c7f8255e93e81c77d86d6299019c33110a076957a3e06e2ae() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c80635f3cbff51461003b5780639d0c139714610057575b600080fd5b61005560048036038101906100509190610234565b610075565b005b61005f61008f565b60405161006c91906102b6565b60405180910390f35b806000908051906020019061008b929190610121565b5050565b60606000805461009e9061038c565b80601f01602080910402602001604051908101604052809291908181526020018280546100ca9061038c565b80156101175780601f106100ec57610100808354040283529160200191610117565b820191906000526020600020905b8154815290600101906020018083116100fa57829003601f168201915b5050505050905090565b82805461012d9061038c565b90600052602060002090601f01602090048101928261014f5760008555610196565b82601f1061016857805160ff1916838001178555610196565b82800160010185558215610196579182015b8281111561019557825182559160200191906001019061017a565b5b5090506101a391906101a7565b5090565b5b808211156101c05760008160009055506001016101a8565b5090565b60006101d76101d2846102fd565b6102d8565b9050828152602081018484840111156101f3576101f2610452565b5b6101fe84828561034a565b509392505050565b600082601f83011261021b5761021a61044d565b5b813561022b8482602086016101c4565b91505092915050565b60006020828403121561024a5761024961045c565b5b600082013567ffffffffffffffff81111561026857610267610457565b5b61027484828501610206565b91505092915050565b60006102888261032e565b6102928185610339565b93506102a2818560208601610359565b6102ab81610461565b840191505092915050565b600060208201905081810360008301526102d0818461027d565b905092915050565b60006102e26102f3565b90506102ee82826103be565b919050565b6000604051905090565b600067ffffffffffffffff8211156103185761031761041e565b5b61032182610461565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b82818337600083830152505050565b60005b8381101561037757808201518184015260208101905061035c565b83811115610386576000848401525b50505050565b600060028204905060018216806103a457607f821691505b602082108114156103b8576103b76103ef565b5b50919050565b6103c782610461565b810181811067ffffffffffffffff821117156103e6576103e561041e565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f830116905091905056fea2646970667358221220ca403f09c15dd817f3fcd120408b35a323f4fc87a83a96f035a5a468a5bbadda64736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x5F3CBFF5 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x9D0C1397 EQ PUSH2 0x57 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x55 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x50 SWAP2 SWAP1 PUSH2 0x234 JUMP JUMPDEST PUSH2 0x75 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x5F PUSH2 0x8F JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x6C SWAP2 SWAP1 PUSH2 0x2B6 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST DUP1 PUSH1 0x0 SWAP1 DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 PUSH2 0x8B SWAP3 SWAP2 SWAP1 PUSH2 0x121 JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP1 SLOAD PUSH2 0x9E SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD PUSH2 0xCA SWAP1 PUSH2 0x38C JUMP JUMPDEST DUP1 ISZERO PUSH2 0x117 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xEC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x117 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xFA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH2 0x12D SWAP1 PUSH2 0x38C JUMP JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH2 0x14F JUMPI PUSH1 0x0 DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 PUSH1 0x1F LT PUSH2 0x168 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x196 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x196 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x195 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x17A JUMP JUMPDEST JUMPDEST POP SWAP1 POP PUSH2 0x1A3 SWAP2 SWAP1 PUSH2 0x1A7 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1C0 JUMPI PUSH1 0x0 DUP2 PUSH1 0x0 SWAP1 SSTORE POP PUSH1 0x1 ADD PUSH2 0x1A8 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1D7 PUSH2 0x1D2 DUP5 PUSH2 0x2FD JUMP JUMPDEST PUSH2 0x2D8 JUMP JUMPDEST SWAP1 POP DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 ADD DUP5 DUP5 DUP5 ADD GT ISZERO PUSH2 0x1F3 JUMPI PUSH2 0x1F2 PUSH2 0x452 JUMP JUMPDEST JUMPDEST PUSH2 0x1FE DUP5 DUP3 DUP6 PUSH2 0x34A JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH1 0x1F DUP4 ADD SLT PUSH2 0x21B JUMPI PUSH2 0x21A PUSH2 0x44D JUMP JUMPDEST JUMPDEST DUP2 CALLDATALOAD PUSH2 0x22B DUP5 DUP3 PUSH1 0x20 DUP7 ADD PUSH2 0x1C4 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x24A JUMPI PUSH2 0x249 PUSH2 0x45C JUMP JUMPDEST JUMPDEST PUSH1 0x0 DUP3 ADD CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x268 JUMPI PUSH2 0x267 PUSH2 0x457 JUMP JUMPDEST JUMPDEST PUSH2 0x274 DUP5 DUP3 DUP6 ADD PUSH2 0x206 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x288 DUP3 PUSH2 0x32E JUMP JUMPDEST PUSH2 0x292 DUP2 DUP6 PUSH2 0x339 JUMP JUMPDEST SWAP4 POP PUSH2 0x2A2 DUP2 DUP6 PUSH1 0x20 DUP7 ADD PUSH2 0x359 JUMP JUMPDEST PUSH2 0x2AB DUP2 PUSH2 0x461 JUMP JUMPDEST DUP5 ADD SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP DUP2 DUP2 SUB PUSH1 0x0 DUP4 ADD MSTORE PUSH2 0x2D0 DUP2 DUP5 PUSH2 0x27D JUMP JUMPDEST SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E2 PUSH2 0x2F3 JUMP JUMPDEST SWAP1 POP PUSH2 0x2EE DUP3 DUP3 PUSH2 0x3BE JUMP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x318 JUMPI PUSH2 0x317 PUSH2 0x41E JUMP JUMPDEST JUMPDEST PUSH2 0x321 DUP3 PUSH2 0x461 JUMP JUMPDEST SWAP1 POP PUSH1 0x20 DUP2 ADD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 MSTORE PUSH1 0x20 DUP3 ADD SWAP1 POP SWAP3 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY PUSH1 0x0 DUP4 DUP4 ADD MSTORE POP POP POP JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x377 JUMPI DUP1 DUP3 ADD MLOAD DUP2 DUP5 ADD MSTORE PUSH1 0x20 DUP2 ADD SWAP1 POP PUSH2 0x35C JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x386 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x2 DUP3 DIV SWAP1 POP PUSH1 0x1 DUP3 AND DUP1 PUSH2 0x3A4 JUMPI PUSH1 0x7F DUP3 AND SWAP2 POP JUMPDEST PUSH1 0x20 DUP3 LT DUP2 EQ ISZERO PUSH2 0x3B8 JUMPI PUSH2 0x3B7 PUSH2 0x3EF JUMP JUMPDEST JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x3C7 DUP3 PUSH2 0x461 JUMP JUMPDEST DUP2 ADD DUP2 DUP2 LT PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT OR ISZERO PUSH2 0x3E6 JUMPI PUSH2 0x3E5 PUSH2 0x41E JUMP JUMPDEST JUMPDEST DUP1 PUSH1 0x40 MSTORE POP POP POP JUMP JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x22 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xCA BLOCKHASH EXTCODEHASH MULMOD 0xC1 0x5D 0xD8 OR RETURN 0xFC 0xD1 KECCAK256 BLOCKHASH DUP12 CALLDATALOAD LOG3 0x23 DELEGATECALL 0xFC DUP8 0xA8 GASPRICE SWAP7 CREATE CALLDATALOAD 0xA5 LOG4 PUSH9 0xA5BBADDA64736F6C63 NUMBER STOP ADDMOD SMOD STOP CALLER ",
"sourceMap": "60:220:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;108:76;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;192:85;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;108:76;171:5;164:4;:12;;;;;;;;;;;;:::i;:::-;;108:76;:::o;192:85::-;232:13;265:4;258:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;192:85;:::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:412:1:-;85:5;110:66;126:49;168:6;126:49;:::i;:::-;110:66;:::i;:::-;101:75;;199:6;192:5;185:21;237:4;230:5;226:16;275:3;266:6;261:3;257:16;254:25;251:112;;;282:79;;:::i;:::-;251:112;372:41;406:6;401:3;396;372:41;:::i;:::-;91:328;7:412;;;;;:::o;439:340::-;495:5;544:3;537:4;529:6;525:17;521:27;511:122;;552:79;;:::i;:::-;511:122;669:6;656:20;694:79;769:3;761:6;754:4;746:6;742:17;694:79;:::i;:::-;685:88;;501:278;439:340;;;;:::o;785:509::-;854:6;903:2;891:9;882:7;878:23;874:32;871:119;;;909:79;;:::i;:::-;871:119;1057:1;1046:9;1042:17;1029:31;1087:18;1079:6;1076:30;1073:117;;;1109:79;;:::i;:::-;1073:117;1214:63;1269:7;1260:6;1249:9;1245:22;1214:63;:::i;:::-;1204:73;;1000:287;785:509;;;;:::o;1300:364::-;1388:3;1416:39;1449:5;1416:39;:::i;:::-;1471:71;1535:6;1530:3;1471:71;:::i;:::-;1464:78;;1551:52;1596:6;1591:3;1584:4;1577:5;1573:16;1551:52;:::i;:::-;1628:29;1650:6;1628:29;:::i;:::-;1623:3;1619:39;1612:46;;1392:272;1300:364;;;;:::o;1670:313::-;1783:4;1821:2;1810:9;1806:18;1798:26;;1870:9;1864:4;1860:20;1856:1;1845:9;1841:17;1834:47;1898:78;1971:4;1962:6;1898:78;:::i;:::-;1890:86;;1670:313;;;;:::o;1989:129::-;2023:6;2050:20;;:::i;:::-;2040:30;;2079:33;2107:4;2099:6;2079:33;:::i;:::-;1989:129;;;:::o;2124:75::-;2157:6;2190:2;2184:9;2174:19;;2124:75;:::o;2205:308::-;2267:4;2357:18;2349:6;2346:30;2343:56;;;2379:18;;:::i;:::-;2343:56;2417:29;2439:6;2417:29;:::i;:::-;2409:37;;2501:4;2495;2491:15;2483:23;;2205:308;;;:::o;2519:99::-;2571:6;2605:5;2599:12;2589:22;;2519:99;;;:::o;2624:169::-;2708:11;2742:6;2737:3;2730:19;2782:4;2777:3;2773:14;2758:29;;2624:169;;;;:::o;2799:154::-;2883:6;2878:3;2873;2860:30;2945:1;2936:6;2931:3;2927:16;2920:27;2799:154;;;:::o;2959:307::-;3027:1;3037:113;3051:6;3048:1;3045:13;3037:113;;;3136:1;3131:3;3127:11;3121:18;3117:1;3112:3;3108:11;3101:39;3073:2;3070:1;3066:10;3061:15;;3037:113;;;3168:6;3165:1;3162:13;3159:101;;;3248:1;3239:6;3234:3;3230:16;3223:27;3159:101;3008:258;2959:307;;;:::o;3272:320::-;3316:6;3353:1;3347:4;3343:12;3333:22;;3400:1;3394:4;3390:12;3421:18;3411:81;;3477:4;3469:6;3465:17;3455:27;;3411:81;3539:2;3531:6;3528:14;3508:18;3505:38;3502:84;;;3558:18;;:::i;:::-;3502:84;3323:269;3272:320;;;:::o;3598:281::-;3681:27;3703:4;3681:27;:::i;:::-;3673:6;3669:40;3811:6;3799:10;3796:22;3775:18;3763:10;3760:34;3757:62;3754:88;;;3822:18;;:::i;:::-;3754:88;3862:10;3858:2;3851:22;3641:238;3598:281;;:::o;3885:180::-;3933:77;3930:1;3923:88;4030:4;4027:1;4020:15;4054:4;4051:1;4044:15;4071:180;4119:77;4116:1;4109:88;4216:4;4213:1;4206:15;4240:4;4237:1;4230:15;4257:117;4366:1;4363;4356:12;4380:117;4489:1;4486;4479:12;4503:117;4612:1;4609;4602:12;4626:117;4735:1;4732;4725:12;4749:102;4790:6;4841:2;4837:7;4832:2;4825:5;4821:14;4817:28;4807:38;;4749:102;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "238400",
"executionCost": "281",
"totalCost": "238681"
},
"external": {
"getMood()": "infinite",
"setMood(string)": "infinite"
}
},
"methodIdentifiers": {
"getMood()": "9d0c1397",
"setMood(string)": "5f3cbff5"
}
},
"abi": [
{
"inputs": [],
"name": "getMood",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_mood",
"type": "string"
}
],
"name": "setMood",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.7+commit.e28d00a7"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "getMood",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_mood",
"type": "string"
}
],
"name": "setMood",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/artifacts/mood..sol": "DailyMood"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/artifacts/mood..sol": {
"keccak256": "0x57b520be0cf1d80bc64b407a5b621f8b1fccdc744db79b6bf5d1b2949ed9b489",
"license": "MIT",
"urls": [
"bzz-raw://7e85d600c8067e44f78d1c5620dbe3ca25aade75b9edbfb0bd154b8b526cbd58",
"dweb:/ipfs/QmSoRf6nRDkD53TCxGmTY2uPCDQzza2uQDoE83vNudCsGS"
]
}
},
"version": 1
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract DailyMood {
string mood;
function setMood(string memory _mood) public {
mood = _mood;
}
function getMood() public view returns (string memory) {
return mood;
}
}
{
"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": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x150 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xD9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x9D JUMP JUMPDEST PUSH2 0x7E 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 PUSH2 0x97 DUP2 PUSH2 0x103 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB3 JUMPI PUSH2 0xB2 PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xC1 DUP5 DUP3 DUP6 ADD PUSH2 0x88 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD3 DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xEE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xCA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10C DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP2 EQ PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4E CALLDATACOPY DELEGATECALL DUP8 0xA8 SWAP11 SWAP4 0x2D 0xCA 0x5E PUSH24 0xFAAF6CA2DE3B991F93D230604B1B8DAAEF64766264736F6C PUSH4 0x43000807 STOP CALLER ",
"sourceMap": "141:356:0:-:0;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {
"@retrieve_24": {
"entryPoint": 117,
"id": 24,
"parameterSlots": 0,
"returnSlots": 1
},
"@store_15": {
"entryPoint": 126,
"id": 15,
"parameterSlots": 1,
"returnSlots": 0
},
"abi_decode_t_uint256": {
"entryPoint": 136,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_decode_tuple_t_uint256": {
"entryPoint": 157,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_t_uint256_to_t_uint256_fromStack": {
"entryPoint": 202,
"id": null,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed": {
"entryPoint": 217,
"id": null,
"parameterSlots": 2,
"returnSlots": 1
},
"allocate_unbounded": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256": {
"entryPoint": 244,
"id": null,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db": {
"entryPoint": null,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b": {
"entryPoint": 254,
"id": null,
"parameterSlots": 0,
"returnSlots": 0
},
"validator_revert_t_uint256": {
"entryPoint": 259,
"id": null,
"parameterSlots": 1,
"returnSlots": 0
}
},
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:1374: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:263:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "264:83:1",
"statements": [
{
"expression": {
"arguments": [],
"functionName": {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulIdentifier",
"src": "266:77:1"
},
"nodeType": "YulFunctionCall",
"src": "266:79:1"
},
"nodeType": "YulExpressionStatement",
"src": "266:79: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:119:1"
},
{
"nodeType": "YulBlock",
"src": "357:117:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "372:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "386:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "376:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "401:63:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "436:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "447:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "432:3:1"
},
"nodeType": "YulFunctionCall",
"src": "432:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "456:7:1"
}
],
"functionName": {
"name": "abi_decode_t_uint256",
"nodeType": "YulIdentifier",
"src": "411:20:1"
},
"nodeType": "YulFunctionCall",
"src": "411:53:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "401: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:329:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "552:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "569:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "592:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "574:17:1"
},
"nodeType": "YulFunctionCall",
"src": "574:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "562:6:1"
},
"nodeType": "YulFunctionCall",
"src": "562:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "562:37:1"
}
]
},
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "540:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "547:3:1",
"type": ""
}
],
"src": "487:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "709:124:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "719:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "731:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "742:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "727:3:1"
},
"nodeType": "YulFunctionCall",
"src": "727:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "719:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "799:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "812:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "823:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "808:3:1"
},
"nodeType": "YulFunctionCall",
"src": "808:17:1"
}
],
"functionName": {
"name": "abi_encode_t_uint256_to_t_uint256_fromStack",
"nodeType": "YulIdentifier",
"src": "755:43:1"
},
"nodeType": "YulFunctionCall",
"src": "755:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "755:71:1"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "681:9:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "693:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "704:4:1",
"type": ""
}
],
"src": "611:222:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "879:35:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "889:19:1",
"value": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "905:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "899:5:1"
},
"nodeType": "YulFunctionCall",
"src": "899:9:1"
},
"variableNames": [
{
"name": "memPtr",
"nodeType": "YulIdentifier",
"src": "889:6:1"
}
]
}
]
},
"name": "allocate_unbounded",
"nodeType": "YulFunctionDefinition",
"returnVariables": [
{
"name": "memPtr",
"nodeType": "YulTypedName",
"src": "872:6:1",
"type": ""
}
],
"src": "839:75:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "965:32:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "975:16:1",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "986:5:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "975:7:1"
}
]
}
]
},
"name": "cleanup_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "947:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "957:7:1",
"type": ""
}
],
"src": "920:77:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1092:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1109:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1112:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1102:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1102:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1102:12:1"
}
]
},
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nodeType": "YulFunctionDefinition",
"src": "1003:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1215:28:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1232:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1235:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1225:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1225:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1225:12:1"
}
]
},
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nodeType": "YulFunctionDefinition",
"src": "1126:117:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1292:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "1349:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1358:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1361:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "1351:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1351:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "1351:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1315:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "1340:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint256",
"nodeType": "YulIdentifier",
"src": "1322:17:1"
},
"nodeType": "YulFunctionCall",
"src": "1322:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "1312:2:1"
},
"nodeType": "YulFunctionCall",
"src": "1312:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "1305:6:1"
},
"nodeType": "YulFunctionCall",
"src": "1305:43:1"
},
"nodeType": "YulIf",
"src": "1302:63:1"
}
]
},
"name": "validator_revert_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "1285:5:1",
"type": ""
}
],
"src": "1249: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_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\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 allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n 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"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x36 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x2E64CEC1 EQ PUSH2 0x3B JUMPI DUP1 PUSH4 0x6057361D EQ PUSH2 0x59 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x43 PUSH2 0x75 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x50 SWAP2 SWAP1 PUSH2 0xD9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB DUP2 ADD SWAP1 PUSH2 0x6E SWAP2 SWAP1 PUSH2 0x9D JUMP JUMPDEST PUSH2 0x7E 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 PUSH2 0x97 DUP2 PUSH2 0x103 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0xB3 JUMPI PUSH2 0xB2 PUSH2 0xFE JUMP JUMPDEST JUMPDEST PUSH1 0x0 PUSH2 0xC1 DUP5 DUP3 DUP6 ADD PUSH2 0x88 JUMP JUMPDEST SWAP2 POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0xD3 DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 ADD SWAP1 POP PUSH2 0xEE PUSH1 0x0 DUP4 ADD DUP5 PUSH2 0xCA JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x10C DUP2 PUSH2 0xF4 JUMP JUMPDEST DUP2 EQ PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 BLOCKHASH 0x4E CALLDATACOPY DELEGATECALL DUP8 0xA8 SWAP11 SWAP4 0x2D 0xCA 0x5E PUSH24 0xFAAF6CA2DE3B991F93D230604B1B8DAAEF64766264736F6C PUSH4 0x43000807 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;:::-;7:139;;;;:::o;152:329::-;211:6;260:2;248:9;239:7;235:23;231:32;228:119;;;266:79;;:::i;:::-;228:119;386:1;411:53;456:7;447:6;436:9;432:22;411:53;:::i;:::-;401:63;;357:117;152:329;;;;:::o;487:118::-;574:24;592:5;574:24;:::i;:::-;569:3;562:37;487:118;;:::o;611:222::-;704:4;742:2;731:9;727:18;719:26;;755:71;823:1;812:9;808:17;799:6;755:71;:::i;:::-;611:222;;;;:::o;920:77::-;957:7;986:5;975:16;;920:77;;;:::o;1126:117::-;1235:1;1232;1225:12;1249:122;1322:24;1340:5;1322:24;:::i;:::-;1315:5;1312:35;1302:63;;1361:1;1358;1351:12;1302:63;1249:122;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "67200",
"executionCost": "117",
"totalCost": "67317"
},
"external": {
"retrieve()": "2415",
"store(uint256)": "22520"
}
},
"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.7+commit.e28d00a7"
},
"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": "london",
"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