Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
REMIX DEFAULT WORKSPACE
Remix default workspace is present when:
i. Remix loads for the very first time
ii. A new workspace is created with 'Default' template
iii. There are no files existing in the File Explorer
This workspace contains 3 directories:
1. 'contracts': Holds three contracts with increasing levels of complexity.
2. 'scripts': Contains four typescript files to deploy a contract. It is explained below.
3. 'tests': Contains one Solidity test file for 'Ballot' contract & one JS test file for 'Storage' contract.
SCRIPTS
The 'scripts' folder has four typescript files which help to deploy the 'Storage' contract using 'web3.js' and 'ethers.js' libraries.
For the deployment of any other contract, just update the contract's name from 'Storage' to the desired contract and provide constructor arguments accordingly
in the file `deploy_with_ethers.ts` or `deploy_with_web3.ts`
In the 'tests' folder there is a script containing Mocha-Chai unit tests for 'Storage' contract.
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.
Please note, require/import is supported in a limited manner for Remix supported modules.
For now, modules supported by Remix are ethers, web3, swarmgw, chai, multihashes, remix and hardhat only for hardhat.ethers object/plugin.
For unsupported modules, an error like this will be thrown: '<module_name> module require is not supported by Remix IDE' will be shown.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "hardhat/console.sol";
/**
* @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() {
console.log("Owner contract deployed by:", msg.sender);
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": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:961:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "70:80:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "80:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "95:6:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "89:5:1"
},
"nodeType": "YulFunctionCall",
"src": "89:13:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "80:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "138:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nodeType": "YulIdentifier",
"src": "111:26:1"
},
"nodeType": "YulFunctionCall",
"src": "111:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "111:33:1"
}
]
},
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "48:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "56:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "64:5:1",
"type": ""
}
],
"src": "7:143:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "250:346:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "296:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "305:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "308:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "298:6:1"
},
"nodeType": "YulFunctionCall",
"src": "298:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "298:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "271:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "280:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "267:3:1"
},
"nodeType": "YulFunctionCall",
"src": "267:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "292:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "263:3:1"
},
"nodeType": "YulFunctionCall",
"src": "263:32:1"
},
"nodeType": "YulIf",
"src": "260:2:1"
},
{
"nodeType": "YulBlock",
"src": "322:128:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "337:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "351:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "341:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "366:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "412:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "423:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "408:3:1"
},
"nodeType": "YulFunctionCall",
"src": "408:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "432:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulIdentifier",
"src": "376:31:1"
},
"nodeType": "YulFunctionCall",
"src": "376:64:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "366:6:1"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "460:129:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "475:16:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "489:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "479:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "505:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "551:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "562:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "547:3:1"
},
"nodeType": "YulFunctionCall",
"src": "547:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "571:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulIdentifier",
"src": "515:31:1"
},
"nodeType": "YulFunctionCall",
"src": "515:64:1"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "505:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_address_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "212:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "223:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "235:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "243:6:1",
"type": ""
}
],
"src": "156:440:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "647:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "657:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "686:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "668:17:1"
},
"nodeType": "YulFunctionCall",
"src": "668:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "657:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "629:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "639:7:1",
"type": ""
}
],
"src": "602:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "749:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "759:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "774:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "781:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "770:3:1"
},
"nodeType": "YulFunctionCall",
"src": "770:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "759:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "731:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "741:7:1",
"type": ""
}
],
"src": "704:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "879:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "936:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "945:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "948:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "938:6:1"
},
"nodeType": "YulFunctionCall",
"src": "938:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "938:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "902:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "927:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "909:17:1"
},
"nodeType": "YulFunctionCall",
"src": "909:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "899:2:1"
},
"nodeType": "YulFunctionCall",
"src": "899:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "892:6:1"
},
"nodeType": "YulFunctionCall",
"src": "892:43:1"
},
"nodeType": "YulIf",
"src": "889:2:1"
}
]
},
"name": "validator_revert_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "872:5:1",
"type": ""
}
],
"src": "836:122:1"
}
]
},
"contents": "{\n\n function abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_addresst_address_fromMemory(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b5060405161029b38038061029b833981810160405281019061003291906100d5565b816000800160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061015a565b6000815190506100cf81610143565b92915050565b600080604083850312156100e857600080fd5b60006100f6858286016100c0565b9250506020610107858286016100c0565b9150509250929050565b600061011c82610123565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b61014c81610111565b811461015757600080fd5b50565b610132806101696000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634e39baa414602d575b600080fd5b60336048565b604051603f92919060a7565b60405180910390f35b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b60a18160cc565b82525050565b600060408201905060ba6000830185609a565b60c56020830184609a565b9392505050565b600060d58260dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff8216905091905056fea26469706673582212200cf9e14e04a096c62112b57aa3d5e0a014e4aaeaf5039b420a626a8a3891da6164736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x29B CODESIZE SUB DUP1 PUSH2 0x29B DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0xD5 JUMP JUMPDEST DUP2 PUSH1 0x0 DUP1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP POP PUSH2 0x15A JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xCF DUP2 PUSH2 0x143 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xF6 DUP6 DUP3 DUP7 ADD PUSH2 0xC0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x107 DUP6 DUP3 DUP7 ADD PUSH2 0xC0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x11C DUP3 PUSH2 0x123 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x14C DUP2 PUSH2 0x111 JUMP JUMPDEST DUP2 EQ PUSH2 0x157 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x132 DUP1 PUSH2 0x169 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4E39BAA4 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x48 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3F SWAP3 SWAP2 SWAP1 PUSH1 0xA7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0xA1 DUP2 PUSH1 0xCC JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH1 0xBA PUSH1 0x0 DUP4 ADD DUP6 PUSH1 0x9A JUMP JUMPDEST PUSH1 0xC5 PUSH1 0x20 DUP4 ADD DUP5 PUSH1 0x9A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD5 DUP3 PUSH1 0xDC JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC 0xF9 0xE1 0x4E DIV LOG0 SWAP7 0xC6 0x21 SLT 0xB5 PUSH27 0xA3D5E0A014E4AAEAF5039B420A626A8A3891DA6164736F6C634300 ADDMOD DIV STOP CALLER ",
"sourceMap": "472:426:0:-:0;;;717:178;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;812:8;777:25;:32;;;:43;;;;;;;;;;;;;;;;;;878:10;830:25;:45;;;:58;;;;;;;;;;;;;;;;;;717:178;;472:426;;7:143:1;64:5;95:6;89:13;80:22;;111:33;138:5;111:33;:::i;:::-;70:80;;;;:::o;156:440::-;235:6;243;292:2;280:9;271:7;267:23;263:32;260:2;;;308:1;305;298:12;260:2;351:1;376:64;432:7;423:6;412:9;408:22;376:64;:::i;:::-;366:74;;322:128;489:2;515:64;571:7;562:6;551:9;547:22;515:64;:::i;:::-;505:74;;460:129;250:346;;;;;:::o;602:96::-;639:7;668:24;686:5;668:24;:::i;:::-;657:35;;647:51;;;:::o;704:126::-;741:7;781:42;774:5;770:54;759:65;;749:81;;;:::o;836:122::-;909:24;927:5;909:24;:::i;:::-;902:5;899:35;889:2;;948:1;945;938:12;889:2;879:79;:::o;472:426:0:-;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:700:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "72:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "89:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "112:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "94:17:1"
},
"nodeType": "YulFunctionCall",
"src": "94:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "82:6:1"
},
"nodeType": "YulFunctionCall",
"src": "82:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "82:37:1"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "60:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "67:3:1",
"type": ""
}
],
"src": "7:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "257:206:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "267:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "279:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "290:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "275:3:1"
},
"nodeType": "YulFunctionCall",
"src": "275:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "267:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "347:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "360:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "371:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "356:3:1"
},
"nodeType": "YulFunctionCall",
"src": "356:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "303:43:1"
},
"nodeType": "YulFunctionCall",
"src": "303:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "303:71:1"
},
{
"expression": {
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "428:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "441:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "452:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "437:3:1"
},
"nodeType": "YulFunctionCall",
"src": "437:18:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "384:43:1"
},
"nodeType": "YulFunctionCall",
"src": "384:72:1"
},
"nodeType": "YulExpressionStatement",
"src": "384:72:1"
}
]
},
"name": "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "221:9:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "233:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "241:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "252:4:1",
"type": ""
}
],
"src": "131:332:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "514:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "524:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "553:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "535:17:1"
},
"nodeType": "YulFunctionCall",
"src": "535:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "524:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "496:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "506:7:1",
"type": ""
}
],
"src": "469:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "616:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "626:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "641:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "648:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "637:3:1"
},
"nodeType": "YulFunctionCall",
"src": "637:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "626:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "598:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "608:7:1",
"type": ""
}
],
"src": "571:126:1"
}
]
},
"contents": "{\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_address_to_t_address_fromStack(value1, add(headStart, 32))\n\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"immutableReferences": {},
"linkReferences": {},
"object": "6080604052348015600f57600080fd5b506004361060285760003560e01c80634e39baa414602d575b600080fd5b60336048565b604051603f92919060a7565b60405180910390f35b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b60a18160cc565b82525050565b600060408201905060ba6000830185609a565b60c56020830184609a565b9392505050565b600060d58260dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff8216905091905056fea26469706673582212200cf9e14e04a096c62112b57aa3d5e0a014e4aaeaf5039b420a626a8a3891da6164736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4E39BAA4 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x48 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3F SWAP3 SWAP2 SWAP1 PUSH1 0xA7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0xA1 DUP2 PUSH1 0xCC JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH1 0xBA PUSH1 0x0 DUP4 ADD DUP6 PUSH1 0x9A JUMP JUMPDEST PUSH1 0xC5 PUSH1 0x20 DUP4 ADD DUP5 PUSH1 0x9A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD5 DUP3 PUSH1 0xDC JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xC 0xF9 0xE1 0x4E DIV LOG0 SWAP7 0xC6 0x21 SLT 0xB5 PUSH27 0xA3D5E0A014E4AAEAF5039B420A626A8A3891DA6164736F6C634300 ADDMOD DIV STOP CALLER ",
"sourceMap": "472:426:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;540:38;;;:::i;:::-;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:118:1:-;94:24;112:5;94:24;:::i;:::-;89:3;82:37;72:53;;:::o;131:332::-;252:4;290:2;279:9;275:18;267:26;;303:71;371:1;360:9;356:17;347:6;303:71;:::i;:::-;384:72;452:2;441:9;437:18;428:6;384:72;:::i;:::-;257:206;;;;;:::o;469:96::-;506:7;535:24;553:5;535:24;:::i;:::-;524:35;;514:51;;;:::o;571:126::-;608:7;648:42;641:5;637:54;626:65;;616:81;;;:::o"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "61200",
"executionCost": "infinite",
"totalCost": "infinite"
},
"external": {
"prime_creador_de_autobots()": "infinite"
}
},
"methodIdentifiers": {
"prime_creador_de_autobots()": "4e39baa4"
}
},
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_account",
"type": "address"
},
{
"internalType": "address",
"name": "_accountSC",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "prime_creador_de_autobots",
"outputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "address",
"name": "_smartcontractPadre",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
}
{
"compiler": {
"version": "0.8.4+commit.c7e474f2"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_account",
"type": "address"
},
{
"internalType": "address",
"name": "_accountSC",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "prime_creador_de_autobots",
"outputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "address",
"name": "_smartcontractPadre",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"compilationTarget": {
"contracts/cybertron.sol": "autobot"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
},
"sources": {
"contracts/cybertron.sol": {
"keccak256": "0x81aa77c49330a394d903432fc1a8abf66e51766c206121e6aaf896d290c16956",
"license": "MIT",
"urls": [
"bzz-raw://7caeb623c24ef496f603e8c7248f5e06fc9d08e237d4703ef38db37a7f4859cd",
"dweb:/ipfs/QmZFVhb4vXymeiiA2qBkYFDkgJpWyZtQfg1yBzfUKSJpRL"
]
}
},
"version": 1
}
{
"id": "392c71fc1164af341cbfd90e0af5db62",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.4",
"solcLongVersion": "0.8.4+commit.c7e474f2",
"input": {
"language": "Solidity",
"sources": {
"contracts/cybertron.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ncontract transformers {\n\n // Almacenamiento de la informacion del Factory\n mapping (address => address) public personal_contract;\n\n // Emision de los nuevos autobots (smart contracts)\n function Factory() public {\n address addr_personal_contract = address(new autobot(msg.sender, address(this)));\n personal_contract[msg.sender] = addr_personal_contract;\n }\n} \n\n\ncontract autobot {\n\n // Estructura de datos del propietario \n Owner public prime_creador_de_autobots;\n struct Owner {\n address _owner;\n address _smartcontractPadre;\n }\n\n // Datos recibido al nuevo Smart Contract\n constructor (address _account, address _accountSC){\n prime_creador_de_autobots._owner = _account;\n prime_creador_de_autobots._smartcontractPadre = _accountSC;\n }\n\n}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
}
}
},
"output": {
"contracts": {
"contracts/cybertron.sol": {
"autobot": {
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_account",
"type": "address"
},
{
"internalType": "address",
"name": "_accountSC",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "prime_creador_de_autobots",
"outputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "address",
"name": "_smartcontractPadre",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/cybertron.sol\":447:873 contract autobot {... */\n mstore(0x40, 0x80)\n /* \"contracts/cybertron.sol\":692:870 constructor (address _account, address _accountSC){... */\n callvalue\n dup1\n iszero\n tag_1\n jumpi\n 0x00\n dup1\n revert\ntag_1:\n pop\n mload(0x40)\n sub(codesize, bytecodeSize)\n dup1\n bytecodeSize\n dup4\n codecopy\n dup2\n dup2\n add\n 0x40\n mstore\n dup2\n add\n swap1\n tag_2\n swap2\n swap1\n tag_3\n jump\t// in\ntag_2:\n /* \"contracts/cybertron.sol\":787:795 _account */\n dup2\n /* \"contracts/cybertron.sol\":752:777 prime_creador_de_autobots */\n 0x00\n /* \"contracts/cybertron.sol\":752:784 prime_creador_de_autobots._owner */\n dup1\n add\n 0x00\n /* \"contracts/cybertron.sol\":752:795 prime_creador_de_autobots._owner = _account */\n 0x0100\n exp\n dup2\n sload\n dup2\n 0xffffffffffffffffffffffffffffffffffffffff\n mul\n not\n and\n swap1\n dup4\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n mul\n or\n swap1\n sstore\n pop\n /* \"contracts/cybertron.sol\":853:863 _accountSC */\n dup1\n /* \"contracts/cybertron.sol\":805:830 prime_creador_de_autobots */\n 0x00\n /* \"contracts/cybertron.sol\":805:850 prime_creador_de_autobots._smartcontractPadre */\n 0x01\n add\n 0x00\n /* \"contracts/cybertron.sol\":805:863 prime_creador_de_autobots._smartcontractPadre = _accountSC */\n 0x0100\n exp\n dup2\n sload\n dup2\n 0xffffffffffffffffffffffffffffffffffffffff\n mul\n not\n and\n swap1\n dup4\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n mul\n or\n swap1\n sstore\n pop\n /* \"contracts/cybertron.sol\":692:870 constructor (address _account, address _accountSC){... */\n pop\n pop\n /* \"contracts/cybertron.sol\":447:873 contract autobot {... */\n jump(tag_6)\n /* \"#utility.yul\":7:150 */\ntag_8:\n /* \"#utility.yul\":64:69 */\n 0x00\n /* \"#utility.yul\":95:101 */\n dup2\n /* \"#utility.yul\":89:102 */\n mload\n /* \"#utility.yul\":80:102 */\n swap1\n pop\n /* \"#utility.yul\":111:144 */\n tag_10\n /* \"#utility.yul\":138:143 */\n dup2\n /* \"#utility.yul\":111:144 */\n tag_11\n jump\t// in\ntag_10:\n /* \"#utility.yul\":70:150 */\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":156:596 */\ntag_3:\n /* \"#utility.yul\":235:241 */\n 0x00\n /* \"#utility.yul\":243:249 */\n dup1\n /* \"#utility.yul\":292:294 */\n 0x40\n /* \"#utility.yul\":280:289 */\n dup4\n /* \"#utility.yul\":271:278 */\n dup6\n /* \"#utility.yul\":267:290 */\n sub\n /* \"#utility.yul\":263:295 */\n slt\n /* \"#utility.yul\":260:262 */\n iszero\n tag_13\n jumpi\n /* \"#utility.yul\":308:309 */\n 0x00\n /* \"#utility.yul\":305:306 */\n dup1\n /* \"#utility.yul\":298:310 */\n revert\n /* \"#utility.yul\":260:262 */\ntag_13:\n /* \"#utility.yul\":351:352 */\n 0x00\n /* \"#utility.yul\":376:440 */\n tag_14\n /* \"#utility.yul\":432:439 */\n dup6\n /* \"#utility.yul\":423:429 */\n dup3\n /* \"#utility.yul\":412:421 */\n dup7\n /* \"#utility.yul\":408:430 */\n add\n /* \"#utility.yul\":376:440 */\n tag_8\n jump\t// in\ntag_14:\n /* \"#utility.yul\":366:440 */\n swap3\n pop\n /* \"#utility.yul\":322:450 */\n pop\n /* \"#utility.yul\":489:491 */\n 0x20\n /* \"#utility.yul\":515:579 */\n tag_15\n /* \"#utility.yul\":571:578 */\n dup6\n /* \"#utility.yul\":562:568 */\n dup3\n /* \"#utility.yul\":551:560 */\n dup7\n /* \"#utility.yul\":547:569 */\n add\n /* \"#utility.yul\":515:579 */\n tag_8\n jump\t// in\ntag_15:\n /* \"#utility.yul\":505:579 */\n swap2\n pop\n /* \"#utility.yul\":460:589 */\n pop\n /* \"#utility.yul\":250:596 */\n swap3\n pop\n swap3\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":602:698 */\ntag_16:\n /* \"#utility.yul\":639:646 */\n 0x00\n /* \"#utility.yul\":668:692 */\n tag_18\n /* \"#utility.yul\":686:691 */\n dup3\n /* \"#utility.yul\":668:692 */\n tag_19\n jump\t// in\ntag_18:\n /* \"#utility.yul\":657:692 */\n swap1\n pop\n /* \"#utility.yul\":647:698 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":704:830 */\ntag_19:\n /* \"#utility.yul\":741:748 */\n 0x00\n /* \"#utility.yul\":781:823 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"#utility.yul\":774:779 */\n dup3\n /* \"#utility.yul\":770:824 */\n and\n /* \"#utility.yul\":759:824 */\n swap1\n pop\n /* \"#utility.yul\":749:830 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":836:958 */\ntag_11:\n /* \"#utility.yul\":909:933 */\n tag_22\n /* \"#utility.yul\":927:932 */\n dup2\n /* \"#utility.yul\":909:933 */\n tag_16\n jump\t// in\ntag_22:\n /* \"#utility.yul\":902:907 */\n dup2\n /* \"#utility.yul\":899:934 */\n eq\n /* \"#utility.yul\":889:891 */\n tag_23\n jumpi\n /* \"#utility.yul\":948:949 */\n 0x00\n /* \"#utility.yul\":945:946 */\n dup1\n /* \"#utility.yul\":938:950 */\n revert\n /* \"#utility.yul\":889:891 */\ntag_23:\n /* \"#utility.yul\":879:958 */\n pop\n jump\t// out\n /* \"contracts/cybertron.sol\":447:873 contract autobot {... */\ntag_6:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x00\n codecopy\n 0x00\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/cybertron.sol\":447:873 contract autobot {... */\n mstore(0x40, 0x80)\n callvalue\n dup1\n iszero\n tag_1\n jumpi\n 0x00\n dup1\n revert\n tag_1:\n pop\n jumpi(tag_2, lt(calldatasize, 0x04))\n shr(0xe0, calldataload(0x00))\n dup1\n 0x4e39baa4\n eq\n tag_3\n jumpi\n tag_2:\n 0x00\n dup1\n revert\n /* \"contracts/cybertron.sol\":515:553 Owner public prime_creador_de_autobots */\n tag_3:\n tag_4\n tag_5\n jump\t// in\n tag_4:\n mload(0x40)\n tag_6\n swap3\n swap2\n swap1\n tag_7\n jump\t// in\n tag_6:\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n tag_5:\n 0x00\n dup1\n 0x00\n add\n 0x00\n swap1\n sload\n swap1\n 0x0100\n exp\n swap1\n div\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n swap1\n dup1\n 0x01\n add\n 0x00\n swap1\n sload\n swap1\n 0x0100\n exp\n swap1\n div\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n swap1\n pop\n dup3\n jump\t// out\n /* \"#utility.yul\":7:125 */\n tag_9:\n /* \"#utility.yul\":94:118 */\n tag_11\n /* \"#utility.yul\":112:117 */\n dup2\n /* \"#utility.yul\":94:118 */\n tag_12\n jump\t// in\n tag_11:\n /* \"#utility.yul\":89:92 */\n dup3\n /* \"#utility.yul\":82:119 */\n mstore\n /* \"#utility.yul\":72:125 */\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":131:463 */\n tag_7:\n /* \"#utility.yul\":252:256 */\n 0x00\n /* \"#utility.yul\":290:292 */\n 0x40\n /* \"#utility.yul\":279:288 */\n dup3\n /* \"#utility.yul\":275:293 */\n add\n /* \"#utility.yul\":267:293 */\n swap1\n pop\n /* \"#utility.yul\":303:374 */\n tag_14\n /* \"#utility.yul\":371:372 */\n 0x00\n /* \"#utility.yul\":360:369 */\n dup4\n /* \"#utility.yul\":356:373 */\n add\n /* \"#utility.yul\":347:353 */\n dup6\n /* \"#utility.yul\":303:374 */\n tag_9\n jump\t// in\n tag_14:\n /* \"#utility.yul\":384:456 */\n tag_15\n /* \"#utility.yul\":452:454 */\n 0x20\n /* \"#utility.yul\":441:450 */\n dup4\n /* \"#utility.yul\":437:455 */\n add\n /* \"#utility.yul\":428:434 */\n dup5\n /* \"#utility.yul\":384:456 */\n tag_9\n jump\t// in\n tag_15:\n /* \"#utility.yul\":257:463 */\n swap4\n swap3\n pop\n pop\n pop\n jump\t// out\n /* \"#utility.yul\":469:565 */\n tag_12:\n /* \"#utility.yul\":506:513 */\n 0x00\n /* \"#utility.yul\":535:559 */\n tag_17\n /* \"#utility.yul\":553:558 */\n dup3\n /* \"#utility.yul\":535:559 */\n tag_18\n jump\t// in\n tag_17:\n /* \"#utility.yul\":524:559 */\n swap1\n pop\n /* \"#utility.yul\":514:565 */\n swap2\n swap1\n pop\n jump\t// out\n /* \"#utility.yul\":571:697 */\n tag_18:\n /* \"#utility.yul\":608:615 */\n 0x00\n /* \"#utility.yul\":648:690 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"#utility.yul\":641:646 */\n dup3\n /* \"#utility.yul\":637:691 */\n and\n /* \"#utility.yul\":626:691 */\n swap1\n pop\n /* \"#utility.yul\":616:697 */\n swap2\n swap1\n pop\n jump\t// out\n\n auxdata: 0xa264697066735822122009911e4261029376d1c946665457b39d1a749c7a6cb25c1d75a1991fdde4872464736f6c63430008040033\n}\n",
"bytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:961:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "70:80:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "80:22:1",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "95:6:1"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "89:5:1"
},
"nodeType": "YulFunctionCall",
"src": "89:13:1"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "80:5:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "138:5:1"
}
],
"functionName": {
"name": "validator_revert_t_address",
"nodeType": "YulIdentifier",
"src": "111:26:1"
},
"nodeType": "YulFunctionCall",
"src": "111:33:1"
},
"nodeType": "YulExpressionStatement",
"src": "111:33:1"
}
]
},
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "48:6:1",
"type": ""
},
{
"name": "end",
"nodeType": "YulTypedName",
"src": "56:3:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "64:5:1",
"type": ""
}
],
"src": "7:143:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "250:346:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "296:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "305:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "308:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "298:6:1"
},
"nodeType": "YulFunctionCall",
"src": "298:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "298:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "271:7:1"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "280:9:1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "267:3:1"
},
"nodeType": "YulFunctionCall",
"src": "267:23:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "292:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "263:3:1"
},
"nodeType": "YulFunctionCall",
"src": "263:32:1"
},
"nodeType": "YulIf",
"src": "260:2:1"
},
{
"nodeType": "YulBlock",
"src": "322:128:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "337:15:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "351:1:1",
"type": "",
"value": "0"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "341:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "366:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "412:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "423:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "408:3:1"
},
"nodeType": "YulFunctionCall",
"src": "408:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "432:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulIdentifier",
"src": "376:31:1"
},
"nodeType": "YulFunctionCall",
"src": "376:64:1"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "366:6:1"
}
]
}
]
},
{
"nodeType": "YulBlock",
"src": "460:129:1",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "475:16:1",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "489:2:1",
"type": "",
"value": "32"
},
"variables": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "479:6:1",
"type": ""
}
]
},
{
"nodeType": "YulAssignment",
"src": "505:74:1",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "551:9:1"
},
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "562:6:1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "547:3:1"
},
"nodeType": "YulFunctionCall",
"src": "547:22:1"
},
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "571:7:1"
}
],
"functionName": {
"name": "abi_decode_t_address_fromMemory",
"nodeType": "YulIdentifier",
"src": "515:31:1"
},
"nodeType": "YulFunctionCall",
"src": "515:64:1"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "505:6:1"
}
]
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_address_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "212:9:1",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "223:7:1",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "235:6:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "243:6:1",
"type": ""
}
],
"src": "156:440:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "647:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "657:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "686:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "668:17:1"
},
"nodeType": "YulFunctionCall",
"src": "668:24:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "657:7:1"
}
]
}
]
},
"name": "cleanup_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "629:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "639:7:1",
"type": ""
}
],
"src": "602:96:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "749:81:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "759:65:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "774:5:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "781:42:1",
"type": "",
"value": "0xffffffffffffffffffffffffffffffffffffffff"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "770:3:1"
},
"nodeType": "YulFunctionCall",
"src": "770:54:1"
},
"variableNames": [
{
"name": "cleaned",
"nodeType": "YulIdentifier",
"src": "759:7:1"
}
]
}
]
},
"name": "cleanup_t_uint160",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "731:5:1",
"type": ""
}
],
"returnVariables": [
{
"name": "cleaned",
"nodeType": "YulTypedName",
"src": "741:7:1",
"type": ""
}
],
"src": "704:126:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "879:79:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "936:16:1",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "945:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "948:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "938:6:1"
},
"nodeType": "YulFunctionCall",
"src": "938:12:1"
},
"nodeType": "YulExpressionStatement",
"src": "938:12:1"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "902:5:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "927:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "909:17:1"
},
"nodeType": "YulFunctionCall",
"src": "909:24:1"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "899:2:1"
},
"nodeType": "YulFunctionCall",
"src": "899:35:1"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "892:6:1"
},
"nodeType": "YulFunctionCall",
"src": "892:43:1"
},
"nodeType": "YulIf",
"src": "889:2:1"
}
]
},
"name": "validator_revert_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "872:5:1",
"type": ""
}
],
"src": "836:122:1"
}
]
},
"contents": "{\n\n function abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_addresst_address_fromMemory(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n}\n",
"id": 1,
"language": "Yul",
"name": "#utility.yul"
}
],
"linkReferences": {},
"object": "608060405234801561001057600080fd5b5060405161029b38038061029b833981810160405281019061003291906100d5565b816000800160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061015a565b6000815190506100cf81610143565b92915050565b600080604083850312156100e857600080fd5b60006100f6858286016100c0565b9250506020610107858286016100c0565b9150509250929050565b600061011c82610123565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b61014c81610111565b811461015757600080fd5b50565b610132806101696000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634e39baa414602d575b600080fd5b60336048565b604051603f92919060a7565b60405180910390f35b60008060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b60a18160cc565b82525050565b600060408201905060ba6000830185609a565b60c56020830184609a565b9392505050565b600060d58260dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff8216905091905056fea264697066735822122009911e4261029376d1c946665457b39d1a749c7a6cb25c1d75a1991fdde4872464736f6c63430008040033",
"opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x29B CODESIZE SUB DUP1 PUSH2 0x29B DUP4 CODECOPY DUP2 DUP2 ADD PUSH1 0x40 MSTORE DUP2 ADD SWAP1 PUSH2 0x32 SWAP2 SWAP1 PUSH2 0xD5 JUMP JUMPDEST DUP2 PUSH1 0x0 DUP1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP DUP1 PUSH1 0x0 PUSH1 0x1 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP POP POP PUSH2 0x15A JUMP JUMPDEST PUSH1 0x0 DUP2 MLOAD SWAP1 POP PUSH2 0xCF DUP2 PUSH2 0x143 JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0xE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0xF6 DUP6 DUP3 DUP7 ADD PUSH2 0xC0 JUMP JUMPDEST SWAP3 POP POP PUSH1 0x20 PUSH2 0x107 DUP6 DUP3 DUP7 ADD PUSH2 0xC0 JUMP JUMPDEST SWAP2 POP POP SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x11C DUP3 PUSH2 0x123 JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x14C DUP2 PUSH2 0x111 JUMP JUMPDEST DUP2 EQ PUSH2 0x157 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP JUMP JUMPDEST PUSH2 0x132 DUP1 PUSH2 0x169 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x4E39BAA4 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x33 PUSH1 0x48 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x3F SWAP3 SWAP2 SWAP1 PUSH1 0xA7 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 DUP1 PUSH1 0x1 ADD PUSH1 0x0 SWAP1 SLOAD SWAP1 PUSH2 0x100 EXP SWAP1 DIV PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP3 JUMP JUMPDEST PUSH1 0xA1 DUP2 PUSH1 0xCC JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 DUP3 ADD SWAP1 POP PUSH1 0xBA PUSH1 0x0 DUP4 ADD DUP6 PUSH1 0x9A JUMP JUMPDEST PUSH1 0xC5 PUSH1 0x20 DUP4 ADD DUP5 PUSH1 0x9A JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xD5 DUP3 PUSH1 0xDC JUMP JUMPDEST SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND SWAP1 POP SWAP2 SWAP1 POP JUMP INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 MULMOD SWAP2 0x1E TIMESTAMP PUSH2 0x293 PUSH23 0xD1C946665457B39D1A749C7A6CB25C1D75A1991FDDE487 0x24 PUSH5 0x736F6C6343 STOP ADDMOD DIV STOP CALLER ",
"sourceMap": "447:426:0:-:0;;;692:178;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;787:8;752:25;:32;;;:43;;;;;;;;;;;;;;;;;;853:10;805:25;:45;;;:58;;;;;;;;;;;;;;;;;;692:178;;447:426;;7:143:1;64:5;95:6;89:13;80:22;;111:33;138:5;111:33;:::i;:::-;70:80;;;;:::o;156:440::-;235:6;243;292:2;280:9;271:7;267:23;263:32;260:2;;;308:1;305;298:12;260:2;351:1;376:64;432:7;423:6;412:9;408:22;376:64;:::i;:::-;366:74;;322:128;489:2;515:64;571:7;562:6;551:9;547:22;515:64;:::i;:::-;505:74;;460:129;250:346;;;;;:::o;602:96::-;639:7;668:24;686:5;668:24;:::i;:::-;657:35;;647:51;;;:::o;704:126::-;741:7;781:42;774:5;770:54;759:65;;749:81;;;:::o;836:122::-;909:24;927:5;909:24;:::i;:::-;902:5;899:35;889:2;;948:1;945;938:12;889:2;879:79;:::o;447:426:0:-;;;;;;;"
},
"deployedBytecode": {
"generatedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:700:1",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "72:53:1",
"statements": [
{
"expression": {
"arguments": [
{
"name": "pos",
"nodeType": "YulIdentifier",
"src": "89:3:1"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "112:5:1"
}
],
"functionName": {
"name": "cleanup_t_address",
"nodeType": "YulIdentifier",
"src": "94:17:1"
},
"nodeType": "YulFunctionCall",
"src": "94:24:1"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "82:6:1"
},
"nodeType": "YulFunctionCall",
"src": "82:37:1"
},
"nodeType": "YulExpressionStatement",
"src": "82:37:1"
}
]
},
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "60:5:1",
"type": ""
},
{
"name": "pos",
"nodeType": "YulTypedName",
"src": "67:3:1",
"type": ""
}
],
"src": "7:118:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "257:206:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "267:26:1",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "279:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "290:2:1",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "275:3:1"
},
"nodeType": "YulFunctionCall",
"src": "275:18:1"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "267:4:1"
}
]
},
{
"expression": {
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "347:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "360:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "371:1:1",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "356:3:1"
},
"nodeType": "YulFunctionCall",
"src": "356:17:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "303:43:1"
},
"nodeType": "YulFunctionCall",
"src": "303:71:1"
},
"nodeType": "YulExpressionStatement",
"src": "303:71:1"
},
{
"expression": {
"arguments": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "428:6:1"
},
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "441:9:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "452:2:1",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "437:3:1"
},
"nodeType": "YulFunctionCall",
"src": "437:18:1"
}
],
"functionName": {
"name": "abi_encode_t_address_to_t_address_fromStack",
"nodeType": "YulIdentifier",
"src": "384:43:1"
},
"nodeType": "YulFunctionCall",
"src": "384:72:1"
},
"nodeType": "YulExpressionStatement",
"src": "384:72:1"
}
]
},
"name": "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "221:9:1",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "233:6:1",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "241:6:1",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "252:4:1",
"type": ""
}
],
"src": "131:332:1"
},
{
"body": {
"nodeType": "YulBlock",
"src": "514:51:1",
"statements": [
{
"nodeType": "YulAssignment",
"src": "524:35:1",
"value": {
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "553:5:1"
}
],
"functionName": {
"name": "cleanup_t_uint160",
"nodeType": "YulIdentifier",
"src": "535:17:1"
},
"nodeType": "YulFunctionCall",
"src": "535:24:1"
},
"variableNames": [
{
"name": "cleaned",