Skip to content

Instantly share code, notes, and snippets.

@vittominacori
Last active December 21, 2022 14:45
Show Gist options
  • Save vittominacori/bd1a43d91e93d9579bbea61fa642327b to your computer and use it in GitHub Desktop.
Save vittominacori/bd1a43d91e93d9579bbea61fa642327b to your computer and use it in GitHub Desktop.
SampleContract.truffle.json
{
"contractName": "SampleContract",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "WorkDone",
"type": "event"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenAmount",
"type": "uint256"
}
],
"name": "recoverERC20",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "creator",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "creatorDoesWork",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "ownerDoesWork",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"WorkDone\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"creator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"creatorDoesWork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"ownerDoesWork\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"recoverERC20(address,uint256)\":{\"details\":\"Remember that only owner can call so be careful when use on contracts generated from other contracts.\",\"params\":{\"tokenAddress\":\"The token contract address\",\"tokenAmount\":\"Number of tokens to be sent\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/SampleContract.sol\":\"SampleContract\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://40fb1b5102468f783961d0af743f91b9980cf66b50d1d12009f6bb1869cea4d2\",\"dweb:/ipfs/QmYqEbJML4jB1GHbzD4cUZDtJg5wVwNm3vDJq1GbyDus8y\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34\",\"dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"eth-token-recover/contracts/TokenRecover.sol\":{\"keccak256\":\"0x3009f93681d8e15172d59683f79007ebf9aa06b241e12f1f6453c8d0884e888a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://380ff8c3855bda5d12f468eac3198d3b8a145aca6249e710b10cd599a30f5a7f\",\"dweb:/ipfs/QmQYokVFaFCSmYCF4BatTubYsKzNrv6FDK4CedG8JgaQQa\"]},\"project:/contracts/SampleContract.sol\":{\"keccak256\":\"0x1eeb8bbc58151b418e6cf221d71bb5381b9d9fd76d7fa5e47e86fd8174f020b4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ca2b77c2f7980db220511790058aa7a142951ba943a71f0e50967fb8500d13f0\",\"dweb:/ipfs/QmcrudyezAEiiYUbFU2wrrCRDEMxJjno9jKxbBj3dvJpKZ\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061001a33610041565b600054600180546001600160a01b0319166001600160a01b03909216919091179055610091565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610479806100a06000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146100d35780638980f11f146100db5780638da5cb5b146100ee578063f2fde38b146100ff57600080fd5b8063022869ec1461008257806302d05d3f146100975780635c8195b4146100c0575b600080fd5b6100956100903660046103a0565b610112565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6100956100ce3660046103a0565b610150565b6100956101ca565b6100956100e93660046103d5565b6101de565b6000546001600160a01b03166100a4565b61009561010d3660046103ff565b61027d565b61011a6102f6565b6040518181527f94004e969cf8e2abdf779ed70428912ad0533a0a23c6cb25188997bbad9d771f9060200160405180910390a150565b6001546001600160a01b0316336001600160a01b03161461011a5760405162461bcd60e51b815260206004820152602960248201527f53616d706c65436f6e74726163743a2043616c6c6572206973206e6f74207468604482015268329031b932b0ba37b960b91b60648201526084015b60405180910390fd5b6101d26102f6565b6101dc6000610350565b565b6101e66102f6565b816001600160a01b031663a9059cbb6102076000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102789190610421565b505050565b6102856102f6565b6001600160a01b0381166102ea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c1565b6102f381610350565b50565b6000546001600160a01b031633146101dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101c1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156103b257600080fd5b5035919050565b80356001600160a01b03811681146103d057600080fd5b919050565b600080604083850312156103e857600080fd5b6103f1836103b9565b946020939093013593505050565b60006020828403121561041157600080fd5b61041a826103b9565b9392505050565b60006020828403121561043357600080fd5b8151801515811461041a57600080fdfea2646970667358221220c09815656808b9bee1d98bf3718e5e6cc87bfa4195ad47e84e5a3f76eb3cb96764736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146100d35780638980f11f146100db5780638da5cb5b146100ee578063f2fde38b146100ff57600080fd5b8063022869ec1461008257806302d05d3f146100975780635c8195b4146100c0575b600080fd5b6100956100903660046103a0565b610112565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6100956100ce3660046103a0565b610150565b6100956101ca565b6100956100e93660046103d5565b6101de565b6000546001600160a01b03166100a4565b61009561010d3660046103ff565b61027d565b61011a6102f6565b6040518181527f94004e969cf8e2abdf779ed70428912ad0533a0a23c6cb25188997bbad9d771f9060200160405180910390a150565b6001546001600160a01b0316336001600160a01b03161461011a5760405162461bcd60e51b815260206004820152602960248201527f53616d706c65436f6e74726163743a2043616c6c6572206973206e6f74207468604482015268329031b932b0ba37b960b91b60648201526084015b60405180910390fd5b6101d26102f6565b6101dc6000610350565b565b6101e66102f6565b816001600160a01b031663a9059cbb6102076000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102789190610421565b505050565b6102856102f6565b6001600160a01b0381166102ea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c1565b6102f381610350565b50565b6000546001600160a01b031633146101dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101c1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156103b257600080fd5b5035919050565b80356001600160a01b03811681146103d057600080fd5b919050565b600080604083850312156103e857600080fd5b6103f1836103b9565b946020939093013593505050565b60006020828403121561041157600080fd5b61041a826103b9565b9392505050565b60006020828403121561043357600080fd5b8151801515811461041a57600080fdfea2646970667358221220c09815656808b9bee1d98bf3718e5e6cc87bfa4195ad47e84e5a3f76eb3cb96764736f6c63430008110033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [
{
"ast": {
"nodeType": "YulBlock",
"src": "0:2953:8",
"statements": [
{
"nodeType": "YulBlock",
"src": "6:3:8",
"statements": []
},
{
"body": {
"nodeType": "YulBlock",
"src": "84:110:8",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "130:16:8",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "139:1:8",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "142:1:8",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "132:6:8"
},
"nodeType": "YulFunctionCall",
"src": "132:12:8"
},
"nodeType": "YulExpressionStatement",
"src": "132:12:8"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "105:7:8"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "114:9:8"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "101:3:8"
},
"nodeType": "YulFunctionCall",
"src": "101:23:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "126:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "97:3:8"
},
"nodeType": "YulFunctionCall",
"src": "97:32:8"
},
"nodeType": "YulIf",
"src": "94:52:8"
},
{
"nodeType": "YulAssignment",
"src": "155:33:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "178:9:8"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "165:12:8"
},
"nodeType": "YulFunctionCall",
"src": "165:23:8"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "155:6:8"
}
]
}
]
},
"name": "abi_decode_tuple_t_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "50:9:8",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "61:7:8",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "73:6:8",
"type": ""
}
],
"src": "14:180:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "300:102:8",
"statements": [
{
"nodeType": "YulAssignment",
"src": "310:26:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "322:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "333:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "318:3:8"
},
"nodeType": "YulFunctionCall",
"src": "318:18:8"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "310:4:8"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "352:9:8"
},
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "367:6:8"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "383:3:8",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "388:1:8",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "379:3:8"
},
"nodeType": "YulFunctionCall",
"src": "379:11:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "392:1:8",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "375:3:8"
},
"nodeType": "YulFunctionCall",
"src": "375:19:8"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "363:3:8"
},
"nodeType": "YulFunctionCall",
"src": "363:32:8"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "345:6:8"
},
"nodeType": "YulFunctionCall",
"src": "345:51:8"
},
"nodeType": "YulExpressionStatement",
"src": "345:51:8"
}
]
},
"name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "269:9:8",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "280:6:8",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "291:4:8",
"type": ""
}
],
"src": "199:203:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "456:124:8",
"statements": [
{
"nodeType": "YulAssignment",
"src": "466:29:8",
"value": {
"arguments": [
{
"name": "offset",
"nodeType": "YulIdentifier",
"src": "488:6:8"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "475:12:8"
},
"nodeType": "YulFunctionCall",
"src": "475:20:8"
},
"variableNames": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "466:5:8"
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "558:16:8",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "567:1:8",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "570:1:8",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "560:6:8"
},
"nodeType": "YulFunctionCall",
"src": "560:12:8"
},
"nodeType": "YulExpressionStatement",
"src": "560:12:8"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "517:5:8"
},
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "528:5:8"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "543:3:8",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "548:1:8",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "539:3:8"
},
"nodeType": "YulFunctionCall",
"src": "539:11:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "552:1:8",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "535:3:8"
},
"nodeType": "YulFunctionCall",
"src": "535:19:8"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "524:3:8"
},
"nodeType": "YulFunctionCall",
"src": "524:31:8"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "514:2:8"
},
"nodeType": "YulFunctionCall",
"src": "514:42:8"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "507:6:8"
},
"nodeType": "YulFunctionCall",
"src": "507:50:8"
},
"nodeType": "YulIf",
"src": "504:70:8"
}
]
},
"name": "abi_decode_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "offset",
"nodeType": "YulTypedName",
"src": "435:6:8",
"type": ""
}
],
"returnVariables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "446:5:8",
"type": ""
}
],
"src": "407:173:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "672:167:8",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "718:16:8",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "727:1:8",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "730:1:8",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "720:6:8"
},
"nodeType": "YulFunctionCall",
"src": "720:12:8"
},
"nodeType": "YulExpressionStatement",
"src": "720:12:8"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "693:7:8"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "702:9:8"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "689:3:8"
},
"nodeType": "YulFunctionCall",
"src": "689:23:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "714:2:8",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "685:3:8"
},
"nodeType": "YulFunctionCall",
"src": "685:32:8"
},
"nodeType": "YulIf",
"src": "682:52:8"
},
{
"nodeType": "YulAssignment",
"src": "743:39:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "772:9:8"
}
],
"functionName": {
"name": "abi_decode_address",
"nodeType": "YulIdentifier",
"src": "753:18:8"
},
"nodeType": "YulFunctionCall",
"src": "753:29:8"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "743:6:8"
}
]
},
{
"nodeType": "YulAssignment",
"src": "791:42:8",
"value": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "818:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "829:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "814:3:8"
},
"nodeType": "YulFunctionCall",
"src": "814:18:8"
}
],
"functionName": {
"name": "calldataload",
"nodeType": "YulIdentifier",
"src": "801:12:8"
},
"nodeType": "YulFunctionCall",
"src": "801:32:8"
},
"variableNames": [
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "791:6:8"
}
]
}
]
},
"name": "abi_decode_tuple_t_addresst_uint256",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "630:9:8",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "641:7:8",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "653:6:8",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "661:6:8",
"type": ""
}
],
"src": "585:254:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "914:116:8",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "960:16:8",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "969:1:8",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "972:1:8",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "962:6:8"
},
"nodeType": "YulFunctionCall",
"src": "962:12:8"
},
"nodeType": "YulExpressionStatement",
"src": "962:12:8"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "935:7:8"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "944:9:8"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "931:3:8"
},
"nodeType": "YulFunctionCall",
"src": "931:23:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "956:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "927:3:8"
},
"nodeType": "YulFunctionCall",
"src": "927:32:8"
},
"nodeType": "YulIf",
"src": "924:52:8"
},
{
"nodeType": "YulAssignment",
"src": "985:39:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1014:9:8"
}
],
"functionName": {
"name": "abi_decode_address",
"nodeType": "YulIdentifier",
"src": "995:18:8"
},
"nodeType": "YulFunctionCall",
"src": "995:29:8"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "985:6:8"
}
]
}
]
},
"name": "abi_decode_tuple_t_address",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "880:9:8",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "891:7:8",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "903:6:8",
"type": ""
}
],
"src": "844:186:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1136:76:8",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1146:26:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1158:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1169:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1154:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1154:18:8"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1146:4:8"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1188:9:8"
},
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1199:6:8"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1181:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1181:25:8"
},
"nodeType": "YulExpressionStatement",
"src": "1181:25:8"
}
]
},
"name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1105:9:8",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1116:6:8",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1127:4:8",
"type": ""
}
],
"src": "1035:177:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1391:231:8",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1408:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1419:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1401:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1401:21:8"
},
"nodeType": "YulExpressionStatement",
"src": "1401:21:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1442:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1453:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1438:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1438:18:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1458:2:8",
"type": "",
"value": "41"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1431:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1431:30:8"
},
"nodeType": "YulExpressionStatement",
"src": "1431:30:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1481:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1492:2:8",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1477:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1477:18:8"
},
{
"hexValue": "53616d706c65436f6e74726163743a2043616c6c6572206973206e6f74207468",
"kind": "string",
"nodeType": "YulLiteral",
"src": "1497:34:8",
"type": "",
"value": "SampleContract: Caller is not th"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1470:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1470:62:8"
},
"nodeType": "YulExpressionStatement",
"src": "1470:62:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1552:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1563:2:8",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1548:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1548:18:8"
},
{
"hexValue": "652063726561746f72",
"kind": "string",
"nodeType": "YulLiteral",
"src": "1568:11:8",
"type": "",
"value": "e creator"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1541:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1541:39:8"
},
"nodeType": "YulExpressionStatement",
"src": "1541:39:8"
},
{
"nodeType": "YulAssignment",
"src": "1589:27:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1601:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1612:3:8",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1597:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1597:19:8"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1589:4:8"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_e5c262411b699a4f01324917eca196ae2f2d1a40f33a1cb708aec943ebfe340e__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1368:9:8",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1382:4:8",
"type": ""
}
],
"src": "1217:405:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1756:145:8",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1766:26:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1778:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1789:2:8",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1774:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1774:18:8"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "1766:4:8"
}
]
},
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1808:9:8"
},
{
"arguments": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "1823:6:8"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1839:3:8",
"type": "",
"value": "160"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1844:1:8",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "shl",
"nodeType": "YulIdentifier",
"src": "1835:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1835:11:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1848:1:8",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "1831:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1831:19:8"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "1819:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1819:32:8"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1801:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1801:51:8"
},
"nodeType": "YulExpressionStatement",
"src": "1801:51:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "1872:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1883:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1868:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1868:18:8"
},
{
"name": "value1",
"nodeType": "YulIdentifier",
"src": "1888:6:8"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "1861:6:8"
},
"nodeType": "YulFunctionCall",
"src": "1861:34:8"
},
"nodeType": "YulExpressionStatement",
"src": "1861:34:8"
}
]
},
"name": "abi_encode_tuple_t_address_t_uint256__to_t_address_t_uint256__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1717:9:8",
"type": ""
},
{
"name": "value1",
"nodeType": "YulTypedName",
"src": "1728:6:8",
"type": ""
},
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1736:6:8",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "1747:4:8",
"type": ""
}
],
"src": "1627:274:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "1984:199:8",
"statements": [
{
"body": {
"nodeType": "YulBlock",
"src": "2030:16:8",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2039:1:8",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2042:1:8",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2032:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2032:12:8"
},
"nodeType": "YulExpressionStatement",
"src": "2032:12:8"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "dataEnd",
"nodeType": "YulIdentifier",
"src": "2005:7:8"
},
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2014:9:8"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "2001:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2001:23:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2026:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "slt",
"nodeType": "YulIdentifier",
"src": "1997:3:8"
},
"nodeType": "YulFunctionCall",
"src": "1997:32:8"
},
"nodeType": "YulIf",
"src": "1994:52:8"
},
{
"nodeType": "YulVariableDeclaration",
"src": "2055:29:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2074:9:8"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2068:5:8"
},
"nodeType": "YulFunctionCall",
"src": "2068:16:8"
},
"variables": [
{
"name": "value",
"nodeType": "YulTypedName",
"src": "2059:5:8",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "2137:16:8",
"statements": [
{
"expression": {
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2146:1:8",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2149:1:8",
"type": "",
"value": "0"
}
],
"functionName": {
"name": "revert",
"nodeType": "YulIdentifier",
"src": "2139:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2139:12:8"
},
"nodeType": "YulExpressionStatement",
"src": "2139:12:8"
}
]
},
"condition": {
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2106:5:8"
},
{
"arguments": [
{
"arguments": [
{
"name": "value",
"nodeType": "YulIdentifier",
"src": "2127:5:8"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2120:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2120:13:8"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2113:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2113:21:8"
}
],
"functionName": {
"name": "eq",
"nodeType": "YulIdentifier",
"src": "2103:2:8"
},
"nodeType": "YulFunctionCall",
"src": "2103:32:8"
}
],
"functionName": {
"name": "iszero",
"nodeType": "YulIdentifier",
"src": "2096:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2096:40:8"
},
"nodeType": "YulIf",
"src": "2093:60:8"
},
{
"nodeType": "YulAssignment",
"src": "2162:15:8",
"value": {
"name": "value",
"nodeType": "YulIdentifier",
"src": "2172:5:8"
},
"variableNames": [
{
"name": "value0",
"nodeType": "YulIdentifier",
"src": "2162:6:8"
}
]
}
]
},
"name": "abi_decode_tuple_t_bool_fromMemory",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "1950:9:8",
"type": ""
},
{
"name": "dataEnd",
"nodeType": "YulTypedName",
"src": "1961:7:8",
"type": ""
}
],
"returnVariables": [
{
"name": "value0",
"nodeType": "YulTypedName",
"src": "1973:6:8",
"type": ""
}
],
"src": "1906:277:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2362:228:8",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2379:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2390:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2372:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2372:21:8"
},
"nodeType": "YulExpressionStatement",
"src": "2372:21:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2413:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2424:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2409:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2409:18:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2429:2:8",
"type": "",
"value": "38"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2402:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2402:30:8"
},
"nodeType": "YulExpressionStatement",
"src": "2402:30:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2452:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2463:2:8",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2448:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2448:18:8"
},
{
"hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2468:34:8",
"type": "",
"value": "Ownable: new owner is the zero a"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2441:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2441:62:8"
},
"nodeType": "YulExpressionStatement",
"src": "2441:62:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2523:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2534:2:8",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2519:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2519:18:8"
},
{
"hexValue": "646472657373",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2539:8:8",
"type": "",
"value": "ddress"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2512:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2512:36:8"
},
"nodeType": "YulExpressionStatement",
"src": "2512:36:8"
},
{
"nodeType": "YulAssignment",
"src": "2557:27:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2569:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2580:3:8",
"type": "",
"value": "128"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2565:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2565:19:8"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2557:4:8"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2339:9:8",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2353:4:8",
"type": ""
}
],
"src": "2188:402:8"
},
{
"body": {
"nodeType": "YulBlock",
"src": "2769:182:8",
"statements": [
{
"expression": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2786:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2797:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2779:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2779:21:8"
},
"nodeType": "YulExpressionStatement",
"src": "2779:21:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2820:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2831:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2816:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2816:18:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2836:2:8",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2809:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2809:30:8"
},
"nodeType": "YulExpressionStatement",
"src": "2809:30:8"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2859:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2870:2:8",
"type": "",
"value": "64"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2855:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2855:18:8"
},
{
"hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",
"kind": "string",
"nodeType": "YulLiteral",
"src": "2875:34:8",
"type": "",
"value": "Ownable: caller is not the owner"
}
],
"functionName": {
"name": "mstore",
"nodeType": "YulIdentifier",
"src": "2848:6:8"
},
"nodeType": "YulFunctionCall",
"src": "2848:62:8"
},
"nodeType": "YulExpressionStatement",
"src": "2848:62:8"
},
{
"nodeType": "YulAssignment",
"src": "2919:26:8",
"value": {
"arguments": [
{
"name": "headStart",
"nodeType": "YulIdentifier",
"src": "2931:9:8"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2942:2:8",
"type": "",
"value": "96"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2927:3:8"
},
"nodeType": "YulFunctionCall",
"src": "2927:18:8"
},
"variableNames": [
{
"name": "tail",
"nodeType": "YulIdentifier",
"src": "2919:4:8"
}
]
}
]
},
"name": "abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__to_t_string_memory_ptr__fromStack_reversed",
"nodeType": "YulFunctionDefinition",
"parameters": [
{
"name": "headStart",
"nodeType": "YulTypedName",
"src": "2746:9:8",
"type": ""
}
],
"returnVariables": [
{
"name": "tail",
"nodeType": "YulTypedName",
"src": "2760:4:8",
"type": ""
}
],
"src": "2595:356:8"
}
]
},
"contents": "{\n { }\n function abi_decode_tuple_t_uint256(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := calldataload(headStart)\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_decode_address(offset) -> value\n {\n value := calldataload(offset)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_addresst_uint256(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n value0 := abi_decode_address(headStart)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := abi_decode_address(headStart)\n }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_encode_tuple_t_stringliteral_e5c262411b699a4f01324917eca196ae2f2d1a40f33a1cb708aec943ebfe340e__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 41)\n mstore(add(headStart, 64), \"SampleContract: Caller is not th\")\n mstore(add(headStart, 96), \"e creator\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_address_t_uint256__to_t_address_t_uint256__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n mstore(add(headStart, 32), value1)\n }\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, iszero(iszero(value)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 38)\n mstore(add(headStart, 64), \"Ownable: new owner is the zero a\")\n mstore(add(headStart, 96), \"ddress\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 32)\n mstore(add(headStart, 64), \"Ownable: caller is not the owner\")\n tail := add(headStart, 96)\n }\n}",
"id": 8,
"language": "Yul",
"name": "#utility.yul"
}
],
"sourceMap": "114:586:6:-:0;;;362:49;;;;;;;;;-1:-1:-1;936:32:0;719:10:4;936:18:0;:32::i;:::-;1247:7;1273:6;386:8:6;:18;;-1:-1:-1;;;;;;386:18:6;-1:-1:-1;;;;;1273:6:0;;;386:18:6;;;;;;114:586;;2433:187:0;2506:16;2525:6;;-1:-1:-1;;;;;2541:17:0;;;-1:-1:-1;;;;;;2541:17:0;;;;;;2573:40;;2525:6;;;;;;;2573:40;;2506:16;2573:40;2496:124;2433:187;:::o;114:586:6:-;;;;;;;",
"deployedSourceMap": "114:586:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;606:92;;;;;;:::i;:::-;;:::i;:::-;;417:81;483:8;;-1:-1:-1;;;;;483:8:6;417:81;;;-1:-1:-1;;;;;363:32:8;;;345:51;;333:2;318:18;417:81:6;;;;;;;504:96;;;;;;:::i;:::-;;:::i;1831:101:0:-;;;:::i;606:158:5:-;;;;;;:::i;:::-;;:::i;1201:85:0:-;1247:7;1273:6;-1:-1:-1;;;;;1273:6:0;1201:85;;2081:198;;;;;;:::i;:::-;;:::i;606:92:6:-;1094:13:0;:11;:13::i;:::-;676:15:6::1;::::0;1181:25:8;;;676:15:6::1;::::0;1169:2:8;1154:18;676:15:6::1;;;;;;;606:92:::0;:::o;504:96::-;284:8;;-1:-1:-1;;;;;284:8:6;719:10:4;-1:-1:-1;;;;;268:24:6;;260:78;;;;-1:-1:-1;;;260:78:6;;1419:2:8;260:78:6;;;1401:21:8;1458:2;1438:18;;;1431:30;1497:34;1477:18;;;1470:62;-1:-1:-1;;;1548:18:8;;;1541:39;1597:19;;260:78:6;;;;;;;;1831:101:0;1094:13;:11;:13::i;:::-;1895:30:::1;1922:1;1895:18;:30::i;:::-;1831:101::o:0;606:158:5:-;1094:13:0;:11;:13::i;:::-;713:12:5::1;-1:-1:-1::0;;;;;706:29:5::1;;736:7;1247::0::0;1273:6;-1:-1:-1;;;;;1273:6:0;;1201:85;736:7:5::1;706:51;::::0;-1:-1:-1;;;;;;706:51:5::1;::::0;;;;;;-1:-1:-1;;;;;1819:32:8;;;706:51:5::1;::::0;::::1;1801::8::0;1868:18;;;1861:34;;;1774:18;;706:51:5::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;606:158:::0;;:::o;2081:198:0:-;1094:13;:11;:13::i;:::-;-1:-1:-1;;;;;2169:22:0;::::1;2161:73;;;::::0;-1:-1:-1;;;2161:73:0;;2390:2:8;2161:73:0::1;::::0;::::1;2372:21:8::0;2429:2;2409:18;;;2402:30;2468:34;2448:18;;;2441:62;-1:-1:-1;;;2519:18:8;;;2512:36;2565:19;;2161:73:0::1;2188:402:8::0;2161:73:0::1;2244:28;2263:8;2244:18;:28::i;:::-;2081:198:::0;:::o;1359:130::-;1247:7;1273:6;-1:-1:-1;;;;;1273:6:0;719:10:4;1422:23:0;1414:68;;;;-1:-1:-1;;;1414:68:0;;2797:2:8;1414:68:0;;;2779:21:8;;;2816:18;;;2809:30;2875:34;2855:18;;;2848:62;2927:18;;1414:68:0;2595:356:8;2433:187:0;2506:16;2525:6;;-1:-1:-1;;;;;2541:17:0;;;-1:-1:-1;;;;;;2541:17:0;;;;;;2573:40;;2525:6;;;;;;;2573:40;;2506:16;2573:40;2496:124;2433:187;:::o;14:180:8:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:8;;14:180;-1:-1:-1;14:180:8:o;407:173::-;475:20;;-1:-1:-1;;;;;524:31:8;;514:42;;504:70;;570:1;567;560:12;504:70;407:173;;;:::o;585:254::-;653:6;661;714:2;702:9;693:7;689:23;685:32;682:52;;;730:1;727;720:12;682:52;753:29;772:9;753:29;:::i;:::-;743:39;829:2;814:18;;;;801:32;;-1:-1:-1;;;585:254:8:o;844:186::-;903:6;956:2;944:9;935:7;931:23;927:32;924:52;;;972:1;969;962:12;924:52;995:29;1014:9;995:29;:::i;:::-;985:39;844:186;-1:-1:-1;;;844:186:8:o;1906:277::-;1973:6;2026:2;2014:9;2005:7;2001:23;1997:32;1994:52;;;2042:1;2039;2032:12;1994:52;2074:9;2068:16;2127:5;2120:13;2113:21;2106:5;2103:32;2093:60;;2149:1;2146;2139:12",
"source": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"eth-token-recover/contracts/TokenRecover.sol\";\n\ncontract SampleContract is TokenRecover {\n event WorkDone(uint256 value);\n\n address private _creator;\n\n modifier onlyCreator() {\n require(_msgSender() == _creator, \"SampleContract: Caller is not the creator\");\n _;\n }\n\n constructor() {\n _creator = owner();\n }\n\n function creator() public view returns (address) {\n return _creator;\n }\n\n function creatorDoesWork(uint256 value) public onlyCreator {\n emit WorkDone(value);\n }\n\n function ownerDoesWork(uint256 value) public onlyOwner {\n emit WorkDone(value);\n }\n}\n",
"sourcePath": "/Users/vittominacori/Projects/noncept/packages/solidity-toolkit/contracts/SampleContract.sol",
"ast": {
"absolutePath": "project:/contracts/SampleContract.sol",
"exportedSymbols": {
"Context": [
824
],
"IERC20": [
777
],
"Ownable": [
112
],
"SampleContract": [
917
],
"TokenRecover": [
852
]
},
"id": 918,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 854,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "33:23:6"
},
{
"absolutePath": "eth-token-recover/contracts/TokenRecover.sol",
"file": "eth-token-recover/contracts/TokenRecover.sol",
"id": 855,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 918,
"sourceUnit": 853,
"src": "58:54:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 856,
"name": "TokenRecover",
"nameLocations": [
"141:12:6"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 852,
"src": "141:12:6"
},
"id": 857,
"nodeType": "InheritanceSpecifier",
"src": "141:12:6"
}
],
"canonicalName": "SampleContract",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 917,
"linearizedBaseContracts": [
917,
852,
112,
824
],
"name": "SampleContract",
"nameLocation": "123:14:6",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"eventSelector": "94004e969cf8e2abdf779ed70428912ad0533a0a23c6cb25188997bbad9d771f",
"id": 861,
"name": "WorkDone",
"nameLocation": "166:8:6",
"nodeType": "EventDefinition",
"parameters": {
"id": 860,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 859,
"indexed": false,
"mutability": "mutable",
"name": "value",
"nameLocation": "183:5:6",
"nodeType": "VariableDeclaration",
"scope": 861,
"src": "175:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 858,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "175:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "174:15:6"
},
"src": "160:30:6"
},
{
"constant": false,
"id": 863,
"mutability": "mutable",
"name": "_creator",
"nameLocation": "212:8:6",
"nodeType": "VariableDeclaration",
"scope": 917,
"src": "196:24:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 862,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "196:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "private"
},
{
"body": {
"id": 874,
"nodeType": "Block",
"src": "250:106:6",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 866,
"name": "_msgSender",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 814,
"src": "268:10:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 867,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "268:12:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"id": 868,
"name": "_creator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 863,
"src": "284:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "268:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "53616d706c65436f6e74726163743a2043616c6c6572206973206e6f74207468652063726561746f72",
"id": 870,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "294:43:6",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e5c262411b699a4f01324917eca196ae2f2d1a40f33a1cb708aec943ebfe340e",
"typeString": "literal_string \"SampleContract: Caller is not the creator\""
},
"value": "SampleContract: Caller is not the creator"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e5c262411b699a4f01324917eca196ae2f2d1a40f33a1cb708aec943ebfe340e",
"typeString": "literal_string \"SampleContract: Caller is not the creator\""
}
],
"id": 865,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "260:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 871,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "260:78:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 872,
"nodeType": "ExpressionStatement",
"src": "260:78:6"
},
{
"id": 873,
"nodeType": "PlaceholderStatement",
"src": "348:1:6"
}
]
},
"id": 875,
"name": "onlyCreator",
"nameLocation": "236:11:6",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 864,
"nodeType": "ParameterList",
"parameters": [],
"src": "247:2:6"
},
"src": "227:129:6",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 883,
"nodeType": "Block",
"src": "376:35:6",
"statements": [
{
"expression": {
"id": 881,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 878,
"name": "_creator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 863,
"src": "386:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 879,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 40,
"src": "397:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
"typeString": "function () view returns (address)"
}
},
"id": 880,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "397:7:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "386:18:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 882,
"nodeType": "ExpressionStatement",
"src": "386:18:6"
}
]
},
"id": 884,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 876,
"nodeType": "ParameterList",
"parameters": [],
"src": "373:2:6"
},
"returnParameters": {
"id": 877,
"nodeType": "ParameterList",
"parameters": [],
"src": "376:0:6"
},
"scope": 917,
"src": "362:49:6",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 891,
"nodeType": "Block",
"src": "466:32:6",
"statements": [
{
"expression": {
"id": 889,
"name": "_creator",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 863,
"src": "483:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 888,
"id": 890,
"nodeType": "Return",
"src": "476:15:6"
}
]
},
"functionSelector": "02d05d3f",
"id": 892,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "creator",
"nameLocation": "426:7:6",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 885,
"nodeType": "ParameterList",
"parameters": [],
"src": "433:2:6"
},
"returnParameters": {
"id": 888,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 887,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 892,
"src": "457:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 886,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "457:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "456:9:6"
},
"scope": 917,
"src": "417:81:6",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 903,
"nodeType": "Block",
"src": "563:37:6",
"statements": [
{
"eventCall": {
"arguments": [
{
"id": 900,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 894,
"src": "587:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 899,
"name": "WorkDone",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 861,
"src": "578:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 901,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "578:15:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 902,
"nodeType": "EmitStatement",
"src": "573:20:6"
}
]
},
"functionSelector": "5c8195b4",
"id": 904,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 897,
"kind": "modifierInvocation",
"modifierName": {
"id": 896,
"name": "onlyCreator",
"nameLocations": [
"551:11:6"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 875,
"src": "551:11:6"
},
"nodeType": "ModifierInvocation",
"src": "551:11:6"
}
],
"name": "creatorDoesWork",
"nameLocation": "513:15:6",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 895,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 894,
"mutability": "mutable",
"name": "value",
"nameLocation": "537:5:6",
"nodeType": "VariableDeclaration",
"scope": 904,
"src": "529:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 893,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "529:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "528:15:6"
},
"returnParameters": {
"id": 898,
"nodeType": "ParameterList",
"parameters": [],
"src": "563:0:6"
},
"scope": 917,
"src": "504:96:6",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 915,
"nodeType": "Block",
"src": "661:37:6",
"statements": [
{
"eventCall": {
"arguments": [
{
"id": 912,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 906,
"src": "685:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 911,
"name": "WorkDone",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 861,
"src": "676:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 913,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "676:15:6",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 914,
"nodeType": "EmitStatement",
"src": "671:20:6"
}
]
},
"functionSelector": "022869ec",
"id": 916,
"implemented": true,
"kind": "function",
"modifiers": [
{
"id": 909,
"kind": "modifierInvocation",
"modifierName": {
"id": 908,
"name": "onlyOwner",
"nameLocations": [
"651:9:6"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 31,
"src": "651:9:6"
},
"nodeType": "ModifierInvocation",
"src": "651:9:6"
}
],
"name": "ownerDoesWork",
"nameLocation": "615:13:6",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 907,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 906,
"mutability": "mutable",
"name": "value",
"nameLocation": "637:5:6",
"nodeType": "VariableDeclaration",
"scope": 916,
"src": "629:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 905,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "629:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "628:15:6"
},
"returnParameters": {
"id": 910,
"nodeType": "ParameterList",
"parameters": [],
"src": "661:0:6"
},
"scope": 917,
"src": "606:92:6",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 918,
"src": "114:586:6",
"usedErrors": []
}
],
"src": "33:668:6"
},
"compiler": {
"name": "solc",
"version": "0.8.17+commit.8df45f5f.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.11",
"updatedAt": "2022-12-21T14:43:10.064Z",
"devdoc": {
"kind": "dev",
"methods": {
"owner()": {
"details": "Returns the address of the current owner."
},
"recoverERC20(address,uint256)": {
"details": "Remember that only owner can call so be careful when use on contracts generated from other contracts.",
"params": {
"tokenAddress": "The token contract address",
"tokenAmount": "Number of tokens to be sent"
}
},
"renounceOwnership()": {
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment