diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 66c51d9..576d765 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -912,6 +912,12 @@ "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": { + "5777": { + "events": {}, + "links": {}, + "address": "0xf27cb3e890F920aB5db54A6Fc39bd14663DFF5Cf", + "transactionHash": "0x5748d2eb12351865eb575b03e5c2e0a6a6509aa184c281878df75dc3de5c3e23" + }, "1617704049410": { "events": {}, "links": {}, @@ -923,10 +929,16 @@ "links": {}, "address": "0x75d8f3196cCC798380f786073F549A35Da53E400", "transactionHash": "0x894561c5f23679cdebc8a3a067eed5a3e15bb288d5002b80ec74feff9c711154" + }, + "1618780535164": { + "events": {}, + "links": {}, + "address": "0x0B45A4cCC5138EDEFddcc98938D4F019BA31d34c", + "transactionHash": "0xa921c3a7658d48b489981b2d94064eed5502a8370a2b3d2de57baec78a143e08" } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-06T12:02:18.519Z", + "updatedAt": "2021-05-19T00:16:34.028Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/build/contracts/MyToken.json b/build/contracts/MyToken.json index 496ae8f..82eea23 100644 --- a/build/contracts/MyToken.json +++ b/build/contracts/MyToken.json @@ -31,6 +31,56 @@ "name": "Approval", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "CustomApproval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "CustomTransfer", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -56,6 +106,20 @@ "name": "Transfer", "type": "event" }, + { + "inputs": [], + "name": "allocate_token", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, { "inputs": [ { @@ -85,25 +149,26 @@ "inputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "approve", + "name": "allowances", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "view", + "type": "function", + "constant": true }, { "inputs": [ @@ -125,6 +190,26 @@ "type": "function", "constant": true }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, { "inputs": [ { @@ -201,6 +286,20 @@ "type": "function", "constant": true }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function", + "constant": true + }, { "inputs": [], "name": "totalSupply", @@ -219,12 +318,12 @@ "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "_recipient", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], @@ -232,7 +331,7 @@ "outputs": [ { "internalType": "bool", - "name": "", + "name": "success", "type": "bool" } ], @@ -243,17 +342,17 @@ "inputs": [ { "internalType": "address", - "name": "sender", + "name": "_sender", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "_recipient", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], @@ -261,7 +360,7 @@ "outputs": [ { "internalType": "bool", - "name": "", + "name": "success", "type": "bool" } ], @@ -269,29 +368,39 @@ "type": "function" }, { - "inputs": [], - "name": "decimals", + "inputs": [ + { + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "approve", "outputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "internalType": "bool", + "name": "success", + "type": "bool" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "stateMutability": "nonpayable", + "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.8.2+commit.661d1103\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overloaded; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/mac/codes/token_wallets/contracts/MyToken.sol\":\"MyToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/mac/codes/token_wallets/contracts/MyToken.sol\":{\"keccak256\":\"0xb19affe7194ff6f029cc5890d52b75490e95a35fc0945e5a54de8d0853273e36\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e38bd4db2d546cf66d2bf8a4b0761b46a4f1cd6e21df0072ec48169694bddc49\",\"dweb:/ipfs/Qme61tphJSsBQcxJJjU8NDnLyDcRXrD6VYzCYAHXnJTsHM\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x21d8a5dd396bee41e4a039d150af08b66b6d09eef416daf8e5edf13ef219084e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://682f1e9c20780070df3c8b52bf3b48d2aa6debcdff5a924e212d78bbaedb945f\",\"dweb:/ipfs/QmXGhsAPeemtVQ8ip5CsParvX3sgpMm4Lq8EccS3YaTtwA\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9ec48567e7ad06acb670980d5cdf3fd7f3949bf12894f02d68c3bb43e75aa84f\",\"dweb:/ipfs/QmaG3R2J9cz92YT77vFjYrjMNU2wHp4ypwYD62HqDUqS5U\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xf930d2df426bfcfc1f7415be724f04081c96f4fb9ec8d0e3a521c07692dface0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc2bfdea0d2562c76fb3c4cf70a86c6ba25c5a30e8f8515c95aafdf8383f8395\",\"dweb:/ipfs/QmTbFya18786ckJfLYUoWau9jBTKfmWnWm5XSViWvB7PXN\"]}},\"version\":1}", - "bytecode": "0x608060405260058060006101000a81548160ff021916908360ff1602179055506103e86006553480156200003257600080fd5b506040518060400160405280600a81526020017f4461766964546f6b656e000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f44544e00000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000b792919062000257565b508060049080519060200190620000d092919062000257565b505050620000e733600654620000ed60201b60201c565b620004b3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000157906200033f565b60405180910390fd5b62000174600083836200025260201b60201c565b80600260008282546200018891906200038f565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254620001df91906200038f565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162000246919062000361565b60405180910390a35050565b505050565b8280546200026590620003f6565b90600052602060002090601f016020900481019282620002895760008555620002d5565b82601f10620002a457805160ff1916838001178555620002d5565b82800160010185558215620002d5579182015b82811115620002d4578251825591602001919060010190620002b7565b5b509050620002e49190620002e8565b5090565b5b8082111562000303576000816000905550600101620002e9565b5090565b600062000316601f836200037e565b915062000323826200048a565b602082019050919050565b6200033981620003ec565b82525050565b600060208201905081810360008301526200035a8162000307565b9050919050565b60006020820190506200037860008301846200032e565b92915050565b600082825260208201905092915050565b60006200039c82620003ec565b9150620003a983620003ec565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115620003e157620003e06200042c565b5b828201905092915050565b6000819050919050565b600060028204905060018216806200040f57607f821691505b602082108114156200042657620004256200045b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6113e280620004c36000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610e4e565b60405180910390f35b6100e660048036038101906100e19190610c9c565b610308565b6040516100f39190610e33565b60405180910390f35b610104610326565b6040516101119190610f50565b60405180910390f35b610134600480360381019061012f9190610c4d565b610330565b6040516101419190610e33565b60405180910390f35b610152610431565b60405161015f9190610f6b565b60405180910390f35b610182600480360381019061017d9190610c9c565b610448565b60405161018f9190610e33565b60405180910390f35b6101b260048036038101906101ad9190610be8565b6104f4565b6040516101bf9190610f50565b60405180910390f35b6101d061053c565b6040516101dd9190610e4e565b60405180910390f35b61020060048036038101906101fb9190610c9c565b6105ce565b60405161020d9190610e33565b60405180910390f35b610230600480360381019061022b9190610c9c565b6106c2565b60405161023d9190610e33565b60405180910390f35b610260600480360381019061025b9190610c11565b6106e0565b60405161026d9190610f50565b60405180910390f35b606060038054610285906110b4565b80601f01602080910402602001604051908101604052809291908181526020018280546102b1906110b4565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610767565b848461076f565b6001905092915050565b6000600254905090565b600061033d84848461093a565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90610ed0565b60405180910390fd5b61042585610414610767565b85846104209190610ff8565b61076f565b60019150509392505050565b6000600560009054906101000a900460ff16905090565b60006104ea610455610767565b848460016000610463610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104e59190610fa2565b61076f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461054b906110b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610577906110b4565b80156105c45780601f10610599576101008083540402835291602001916105c4565b820191906000526020600020905b8154815290600101906020018083116105a757829003601f168201915b5050505050905090565b600080600160006105dd610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561069a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069190610f30565b60405180910390fd5b6106b76106a5610767565b8585846106b29190610ff8565b61076f565b600191505092915050565b60006106d66106cf610767565b848461093a565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d690610f10565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561084f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084690610e90565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161092d9190610f50565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a190610ef0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1190610e70565b60405180910390fd5b610a25838383610bb9565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610aab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa290610eb0565b60405180910390fd5b8181610ab79190610ff8565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b479190610fa2565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bab9190610f50565b60405180910390a350505050565b505050565b600081359050610bcd8161137e565b92915050565b600081359050610be281611395565b92915050565b600060208284031215610bfa57600080fd5b6000610c0884828501610bbe565b91505092915050565b60008060408385031215610c2457600080fd5b6000610c3285828601610bbe565b9250506020610c4385828601610bbe565b9150509250929050565b600080600060608486031215610c6257600080fd5b6000610c7086828701610bbe565b9350506020610c8186828701610bbe565b9250506040610c9286828701610bd3565b9150509250925092565b60008060408385031215610caf57600080fd5b6000610cbd85828601610bbe565b9250506020610cce85828601610bd3565b9150509250929050565b610ce18161103e565b82525050565b6000610cf282610f86565b610cfc8185610f91565b9350610d0c818560208601611081565b610d1581611144565b840191505092915050565b6000610d2d602383610f91565b9150610d3882611155565b604082019050919050565b6000610d50602283610f91565b9150610d5b826111a4565b604082019050919050565b6000610d73602683610f91565b9150610d7e826111f3565b604082019050919050565b6000610d96602883610f91565b9150610da182611242565b604082019050919050565b6000610db9602583610f91565b9150610dc482611291565b604082019050919050565b6000610ddc602483610f91565b9150610de7826112e0565b604082019050919050565b6000610dff602583610f91565b9150610e0a8261132f565b604082019050919050565b610e1e8161106a565b82525050565b610e2d81611074565b82525050565b6000602082019050610e486000830184610cd8565b92915050565b60006020820190508181036000830152610e688184610ce7565b905092915050565b60006020820190508181036000830152610e8981610d20565b9050919050565b60006020820190508181036000830152610ea981610d43565b9050919050565b60006020820190508181036000830152610ec981610d66565b9050919050565b60006020820190508181036000830152610ee981610d89565b9050919050565b60006020820190508181036000830152610f0981610dac565b9050919050565b60006020820190508181036000830152610f2981610dcf565b9050919050565b60006020820190508181036000830152610f4981610df2565b9050919050565b6000602082019050610f656000830184610e15565b92915050565b6000602082019050610f806000830184610e24565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610fad8261106a565b9150610fb88361106a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fed57610fec6110e6565b5b828201905092915050565b60006110038261106a565b915061100e8361106a565b925082821015611021576110206110e6565b5b828203905092915050565b60006110378261104a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561109f578082015181840152602081019050611084565b838111156110ae576000848401525b50505050565b600060028204905060018216806110cc57607f821691505b602082108114156110e0576110df611115565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6113878161102c565b811461139257600080fd5b50565b61139e8161106a565b81146113a957600080fd5b5056fea2646970667358221220aaeff397e31b743a9d640b10cf143cafb10e911acd2ccd980312a89de2a2b01c64736f6c63430008020033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610e4e565b60405180910390f35b6100e660048036038101906100e19190610c9c565b610308565b6040516100f39190610e33565b60405180910390f35b610104610326565b6040516101119190610f50565b60405180910390f35b610134600480360381019061012f9190610c4d565b610330565b6040516101419190610e33565b60405180910390f35b610152610431565b60405161015f9190610f6b565b60405180910390f35b610182600480360381019061017d9190610c9c565b610448565b60405161018f9190610e33565b60405180910390f35b6101b260048036038101906101ad9190610be8565b6104f4565b6040516101bf9190610f50565b60405180910390f35b6101d061053c565b6040516101dd9190610e4e565b60405180910390f35b61020060048036038101906101fb9190610c9c565b6105ce565b60405161020d9190610e33565b60405180910390f35b610230600480360381019061022b9190610c9c565b6106c2565b60405161023d9190610e33565b60405180910390f35b610260600480360381019061025b9190610c11565b6106e0565b60405161026d9190610f50565b60405180910390f35b606060038054610285906110b4565b80601f01602080910402602001604051908101604052809291908181526020018280546102b1906110b4565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610767565b848461076f565b6001905092915050565b6000600254905090565b600061033d84848461093a565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90610ed0565b60405180910390fd5b61042585610414610767565b85846104209190610ff8565b61076f565b60019150509392505050565b6000600560009054906101000a900460ff16905090565b60006104ea610455610767565b848460016000610463610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104e59190610fa2565b61076f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461054b906110b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610577906110b4565b80156105c45780601f10610599576101008083540402835291602001916105c4565b820191906000526020600020905b8154815290600101906020018083116105a757829003601f168201915b5050505050905090565b600080600160006105dd610767565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561069a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069190610f30565b60405180910390fd5b6106b76106a5610767565b8585846106b29190610ff8565b61076f565b600191505092915050565b60006106d66106cf610767565b848461093a565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d690610f10565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561084f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084690610e90565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161092d9190610f50565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a190610ef0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1190610e70565b60405180910390fd5b610a25838383610bb9565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610aab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa290610eb0565b60405180910390fd5b8181610ab79190610ff8565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b479190610fa2565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bab9190610f50565b60405180910390a350505050565b505050565b600081359050610bcd8161137e565b92915050565b600081359050610be281611395565b92915050565b600060208284031215610bfa57600080fd5b6000610c0884828501610bbe565b91505092915050565b60008060408385031215610c2457600080fd5b6000610c3285828601610bbe565b9250506020610c4385828601610bbe565b9150509250929050565b600080600060608486031215610c6257600080fd5b6000610c7086828701610bbe565b9350506020610c8186828701610bbe565b9250506040610c9286828701610bd3565b9150509250925092565b60008060408385031215610caf57600080fd5b6000610cbd85828601610bbe565b9250506020610cce85828601610bd3565b9150509250929050565b610ce18161103e565b82525050565b6000610cf282610f86565b610cfc8185610f91565b9350610d0c818560208601611081565b610d1581611144565b840191505092915050565b6000610d2d602383610f91565b9150610d3882611155565b604082019050919050565b6000610d50602283610f91565b9150610d5b826111a4565b604082019050919050565b6000610d73602683610f91565b9150610d7e826111f3565b604082019050919050565b6000610d96602883610f91565b9150610da182611242565b604082019050919050565b6000610db9602583610f91565b9150610dc482611291565b604082019050919050565b6000610ddc602483610f91565b9150610de7826112e0565b604082019050919050565b6000610dff602583610f91565b9150610e0a8261132f565b604082019050919050565b610e1e8161106a565b82525050565b610e2d81611074565b82525050565b6000602082019050610e486000830184610cd8565b92915050565b60006020820190508181036000830152610e688184610ce7565b905092915050565b60006020820190508181036000830152610e8981610d20565b9050919050565b60006020820190508181036000830152610ea981610d43565b9050919050565b60006020820190508181036000830152610ec981610d66565b9050919050565b60006020820190508181036000830152610ee981610d89565b9050919050565b60006020820190508181036000830152610f0981610dac565b9050919050565b60006020820190508181036000830152610f2981610dcf565b9050919050565b60006020820190508181036000830152610f4981610df2565b9050919050565b6000602082019050610f656000830184610e15565b92915050565b6000602082019050610f806000830184610e24565b92915050565b600081519050919050565b600082825260208201905092915050565b6000610fad8261106a565b9150610fb88361106a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610fed57610fec6110e6565b5b828201905092915050565b60006110038261106a565b915061100e8361106a565b925082821015611021576110206110e6565b5b828203905092915050565b60006110378261104a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561109f578082015181840152602081019050611084565b838111156110ae576000848401525b50505050565b600060028204905060018216806110cc57607f821691505b602082108114156110e0576110df611115565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6113878161102c565b811461139257600080fd5b50565b61139e8161106a565b81146113a957600080fd5b5056fea2646970667358221220aaeff397e31b743a9d640b10cf143cafb10e911acd2ccd980312a89de2a2b01c64736f6c63430008020033", + "metadata": "{\"compiler\":{\"version\":\"0.8.2+commit.661d1103\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"CustomApproval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"CustomTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"allocate_token\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overloaded; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/mac/codes/token_wallets/contracts/MyToken.sol\":\"MyToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/mac/codes/token_wallets/contracts/MyToken.sol\":{\"keccak256\":\"0x9773680d3e9adbb65d0eb148d4494397cd338febde5cafe741876a8706039f6b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://891f577c2ba07e8dae04590abea3ba8749d627d243108d6f37493826303d8fc8\",\"dweb:/ipfs/QmanGiZoSaqHJDxjpob8DbJYH8Gehp1aqLTAXwTzwCpaaR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x21d8a5dd396bee41e4a039d150af08b66b6d09eef416daf8e5edf13ef219084e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://682f1e9c20780070df3c8b52bf3b48d2aa6debcdff5a924e212d78bbaedb945f\",\"dweb:/ipfs/QmXGhsAPeemtVQ8ip5CsParvX3sgpMm4Lq8EccS3YaTtwA\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9ec48567e7ad06acb670980d5cdf3fd7f3949bf12894f02d68c3bb43e75aa84f\",\"dweb:/ipfs/QmaG3R2J9cz92YT77vFjYrjMNU2wHp4ypwYD62HqDUqS5U\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xf930d2df426bfcfc1f7415be724f04081c96f4fb9ec8d0e3a521c07692dface0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc2bfdea0d2562c76fb3c4cf70a86c6ba25c5a30e8f8515c95aafdf8383f8395\",\"dweb:/ipfs/QmTbFya18786ckJfLYUoWau9jBTKfmWnWm5XSViWvB7PXN\"]}},\"version\":1}", + "bytecode": "0x608060405260058060006101000a81548160ff021916908360ff160217905550600560009054906101000a900460ff1660ff16600a62000040919062000476565b633b9aca00620000519190620005b3565b6006553480156200006157600080fd5b506040518060400160405280600a81526020017f4461766964546f6b656e000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f44544e00000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000e692919062000286565b508060049080519060200190620000ff92919062000286565b50505062000116336006546200011c60201b60201c565b620006e8565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200018f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000186906200036e565b60405180910390fd5b620001a3600083836200028160201b60201c565b8060026000828254620001b79190620003be565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200020e9190620003be565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405162000275919062000390565b60405180910390a35050565b505050565b82805462000294906200061e565b90600052602060002090601f016020900481019282620002b8576000855562000304565b82601f10620002d357805160ff191683800117855562000304565b8280016001018555821562000304579182015b8281111562000303578251825591602001919060010190620002e6565b5b50905062000313919062000317565b5090565b5b808211156200033257600081600090555060010162000318565b5090565b600062000345601f83620003ad565b91506200035282620006bf565b602082019050919050565b620003688162000614565b82525050565b60006020820190508181036000830152620003898162000336565b9050919050565b6000602082019050620003a760008301846200035d565b92915050565b600082825260208201905092915050565b6000620003cb8262000614565b9150620003d88362000614565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562000410576200040f62000654565b5b828201905092915050565b6000808291508390505b60018511156200046d5780860481111562000445576200044462000654565b5b6001851615620004555780820291505b80810290506200046585620006b2565b945062000425565b94509492505050565b6000620004838262000614565b9150620004908362000614565b9250620004bf7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484620004c7565b905092915050565b600082620004d95760019050620005ac565b81620004e95760009050620005ac565b81600181146200050257600281146200050d5762000543565b6001915050620005ac565b60ff84111562000522576200052162000654565b5b8360020a9150848211156200053c576200053b62000654565b5b50620005ac565b5060208310610133831016604e8410600b84101617156200057d5782820a90508381111562000577576200057662000654565b5b620005ac565b6200058c84848460016200041b565b92509050818404811115620005a657620005a562000654565b5b81810290505b9392505050565b6000620005c08262000614565b9150620005cd8362000614565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161562000609576200060862000654565b5b828202905092915050565b6000819050919050565b600060028204905060018216806200063757607f821691505b602082108114156200064e576200064d62000683565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60008160011c9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b61152e80620006f86000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806355b6ed5c1161008c578063a457c2d711610066578063a457c2d714610287578063a9059cbb146102b7578063c4f390dc146102e7578063dd62ed3e14610305576100ea565b806355b6ed5c1461020957806370a082311461023957806395d89b4114610269576100ea565b806323b872dd116100c857806323b872dd1461015b57806327e235e31461018b578063313ce567146101bb57806339509351146101d9576100ea565b806306fdde03146100ef578063095ea7b31461010d57806318160ddd1461013d575b600080fd5b6100f7610335565b60405161010491906110e7565b60405180910390f35b61012760048036038101906101229190610f9e565b6103c7565b60405161013491906110cc565b60405180910390f35b6101456104b9565b6040516101529190611189565b60405180910390f35b61017560048036038101906101709190610f4f565b6104c3565b60405161018291906110cc565b60405180910390f35b6101a560048036038101906101a09190610eea565b6107b9565b6040516101b29190611189565b60405180910390f35b6101c36107d1565b6040516101d091906111a4565b60405180910390f35b6101f360048036038101906101ee9190610f9e565b6107e8565b60405161020091906110cc565b60405180910390f35b610223600480360381019061021e9190610f13565b610894565b6040516102309190611189565b60405180910390f35b610253600480360381019061024e9190610eea565b6108b9565b6040516102609190611189565b60405180910390f35b610271610901565b60405161027e91906110e7565b60405180910390f35b6102a1600480360381019061029c9190610f9e565b610993565b6040516102ae91906110cc565b60405180910390f35b6102d160048036038101906102cc9190610f9e565b610a87565b6040516102de91906110cc565b60405180910390f35b6102ef610c60565b6040516102fc9190611189565b60405180910390f35b61031f600480360381019061031a9190610f13565b610c66565b60405161032c9190611189565b60405180910390f35b606060038054610344906112ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610370906112ed565b80156103bd5780601f10610392576101008083540402835291602001916103bd565b820191906000526020600020905b8154815290600101906020018083116103a057829003601f168201915b5050505050905090565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa5b63270bc30dbece5a3561130b09ca66d4c9a98b85da30bb24181c102ee584d846040516104a79190611189565b60405180910390a36001905092915050565b6000600654905090565b600081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561051157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610581576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057890611109565b60405180910390fd5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561060a57600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106599190611231565b9250508190555081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106af91906111db565b9250508190555081600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107429190611231565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fe5e0aab7feb98b539542ebe6f8ae203f58e3ca9648e12808e9298825debc15be846040516107a69190611189565b60405180910390a3600190509392505050565b60076020528060005260406000206000915090505481565b6000600560009054906101000a900460ff16905090565b600061088a6107f5610ced565b848460016000610803610ced565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461088591906111db565b610cf5565b6001905092915050565b6008602052816000526040600020602052806000526040600020600091509150505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054610910906112ed565b80601f016020809104026020016040519081016040528092919081815260200182805461093c906112ed565b80156109895780601f1061095e57610100808354040283529160200191610989565b820191906000526020600020905b81548152906001019060200180831161096c57829003601f168201915b5050505050905090565b600080600160006109a2610ced565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610a5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5690611169565b60405180910390fd5b610a7c610a6a610ced565b858584610a779190611231565b610cf5565b600191505092915050565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610ad557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90611109565b60405180910390fd5b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b949190611231565b9250508190555081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610bea91906111db565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe5e0aab7feb98b539542ebe6f8ae203f58e3ca9648e12808e9298825debc15be84604051610c4e9190611189565b60405180910390a36001905092915050565b60065481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c90611149565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcc90611129565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610eb39190611189565b60405180910390a3505050565b600081359050610ecf816114ca565b92915050565b600081359050610ee4816114e1565b92915050565b600060208284031215610efc57600080fd5b6000610f0a84828501610ec0565b91505092915050565b60008060408385031215610f2657600080fd5b6000610f3485828601610ec0565b9250506020610f4585828601610ec0565b9150509250929050565b600080600060608486031215610f6457600080fd5b6000610f7286828701610ec0565b9350506020610f8386828701610ec0565b9250506040610f9486828701610ed5565b9150509250925092565b60008060408385031215610fb157600080fd5b6000610fbf85828601610ec0565b9250506020610fd085828601610ed5565b9150509250929050565b610fe381611277565b82525050565b6000610ff4826111bf565b610ffe81856111ca565b935061100e8185602086016112ba565b6110178161137d565b840191505092915050565b600061102f6023836111ca565b915061103a8261138e565b604082019050919050565b60006110526022836111ca565b915061105d826113dd565b604082019050919050565b60006110756024836111ca565b91506110808261142c565b604082019050919050565b60006110986025836111ca565b91506110a38261147b565b604082019050919050565b6110b7816112a3565b82525050565b6110c6816112ad565b82525050565b60006020820190506110e16000830184610fda565b92915050565b600060208201905081810360008301526111018184610fe9565b905092915050565b6000602082019050818103600083015261112281611022565b9050919050565b6000602082019050818103600083015261114281611045565b9050919050565b6000602082019050818103600083015261116281611068565b9050919050565b600060208201905081810360008301526111828161108b565b9050919050565b600060208201905061119e60008301846110ae565b92915050565b60006020820190506111b960008301846110bd565b92915050565b600081519050919050565b600082825260208201905092915050565b60006111e6826112a3565b91506111f1836112a3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156112265761122561131f565b5b828201905092915050565b600061123c826112a3565b9150611247836112a3565b92508282101561125a5761125961131f565b5b828203905092915050565b600061127082611283565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156112d85780820151818401526020810190506112bd565b838111156112e7576000848401525b50505050565b6000600282049050600182168061130557607f821691505b602082108114156113195761131861134e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4572726f723a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6114d381611265565b81146114de57600080fd5b50565b6114ea816112a3565b81146114f557600080fd5b5056fea26469706673582212200f15de6e6e7cf7d4e706d0d193f99a6d2c19f3c05d5e0309de97679c8a30346464736f6c63430008020033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806355b6ed5c1161008c578063a457c2d711610066578063a457c2d714610287578063a9059cbb146102b7578063c4f390dc146102e7578063dd62ed3e14610305576100ea565b806355b6ed5c1461020957806370a082311461023957806395d89b4114610269576100ea565b806323b872dd116100c857806323b872dd1461015b57806327e235e31461018b578063313ce567146101bb57806339509351146101d9576100ea565b806306fdde03146100ef578063095ea7b31461010d57806318160ddd1461013d575b600080fd5b6100f7610335565b60405161010491906110e7565b60405180910390f35b61012760048036038101906101229190610f9e565b6103c7565b60405161013491906110cc565b60405180910390f35b6101456104b9565b6040516101529190611189565b60405180910390f35b61017560048036038101906101709190610f4f565b6104c3565b60405161018291906110cc565b60405180910390f35b6101a560048036038101906101a09190610eea565b6107b9565b6040516101b29190611189565b60405180910390f35b6101c36107d1565b6040516101d091906111a4565b60405180910390f35b6101f360048036038101906101ee9190610f9e565b6107e8565b60405161020091906110cc565b60405180910390f35b610223600480360381019061021e9190610f13565b610894565b6040516102309190611189565b60405180910390f35b610253600480360381019061024e9190610eea565b6108b9565b6040516102609190611189565b60405180910390f35b610271610901565b60405161027e91906110e7565b60405180910390f35b6102a1600480360381019061029c9190610f9e565b610993565b6040516102ae91906110cc565b60405180910390f35b6102d160048036038101906102cc9190610f9e565b610a87565b6040516102de91906110cc565b60405180910390f35b6102ef610c60565b6040516102fc9190611189565b60405180910390f35b61031f600480360381019061031a9190610f13565b610c66565b60405161032c9190611189565b60405180910390f35b606060038054610344906112ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610370906112ed565b80156103bd5780601f10610392576101008083540402835291602001916103bd565b820191906000526020600020905b8154815290600101906020018083116103a057829003601f168201915b5050505050905090565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa5b63270bc30dbece5a3561130b09ca66d4c9a98b85da30bb24181c102ee584d846040516104a79190611189565b60405180910390a36001905092915050565b6000600654905090565b600081600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561051157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610581576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057890611109565b60405180910390fd5b600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561060a57600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106599190611231565b9250508190555081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546106af91906111db565b9250508190555081600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546107429190611231565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fe5e0aab7feb98b539542ebe6f8ae203f58e3ca9648e12808e9298825debc15be846040516107a69190611189565b60405180910390a3600190509392505050565b60076020528060005260406000206000915090505481565b6000600560009054906101000a900460ff16905090565b600061088a6107f5610ced565b848460016000610803610ced565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461088591906111db565b610cf5565b6001905092915050565b6008602052816000526040600020602052806000526040600020600091509150505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054610910906112ed565b80601f016020809104026020016040519081016040528092919081815260200182805461093c906112ed565b80156109895780601f1061095e57610100808354040283529160200191610989565b820191906000526020600020905b81548152906001019060200180831161096c57829003601f168201915b5050505050905090565b600080600160006109a2610ced565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610a5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5690611169565b60405180910390fd5b610a7c610a6a610ced565b858584610a779190611231565b610cf5565b600191505092915050565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610ad557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3c90611109565b60405180910390fd5b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b949190611231565b9250508190555081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610bea91906111db565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe5e0aab7feb98b539542ebe6f8ae203f58e3ca9648e12808e9298825debc15be84604051610c4e9190611189565b60405180910390a36001905092915050565b60065481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c90611149565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dcc90611129565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610eb39190611189565b60405180910390a3505050565b600081359050610ecf816114ca565b92915050565b600081359050610ee4816114e1565b92915050565b600060208284031215610efc57600080fd5b6000610f0a84828501610ec0565b91505092915050565b60008060408385031215610f2657600080fd5b6000610f3485828601610ec0565b9250506020610f4585828601610ec0565b9150509250929050565b600080600060608486031215610f6457600080fd5b6000610f7286828701610ec0565b9350506020610f8386828701610ec0565b9250506040610f9486828701610ed5565b9150509250925092565b60008060408385031215610fb157600080fd5b6000610fbf85828601610ec0565b9250506020610fd085828601610ed5565b9150509250929050565b610fe381611277565b82525050565b6000610ff4826111bf565b610ffe81856111ca565b935061100e8185602086016112ba565b6110178161137d565b840191505092915050565b600061102f6023836111ca565b915061103a8261138e565b604082019050919050565b60006110526022836111ca565b915061105d826113dd565b604082019050919050565b60006110756024836111ca565b91506110808261142c565b604082019050919050565b60006110986025836111ca565b91506110a38261147b565b604082019050919050565b6110b7816112a3565b82525050565b6110c6816112ad565b82525050565b60006020820190506110e16000830184610fda565b92915050565b600060208201905081810360008301526111018184610fe9565b905092915050565b6000602082019050818103600083015261112281611022565b9050919050565b6000602082019050818103600083015261114281611045565b9050919050565b6000602082019050818103600083015261116281611068565b9050919050565b600060208201905081810360008301526111828161108b565b9050919050565b600060208201905061119e60008301846110ae565b92915050565b60006020820190506111b960008301846110bd565b92915050565b600081519050919050565b600082825260208201905092915050565b60006111e6826112a3565b91506111f1836112a3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156112265761122561131f565b5b828201905092915050565b600061123c826112a3565b9150611247836112a3565b92508282101561125a5761125961131f565b5b828203905092915050565b600061127082611283565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156112d85780820151818401526020810190506112bd565b838111156112e7576000848401525b50505050565b6000600282049050600182168061130557607f821691505b602082108114156113195761131861134e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f4572726f723a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6114d381611265565b81146114de57600080fd5b50565b6114ea816112a3565b81146114f557600080fd5b5056fea26469706673582212200f15de6e6e7cf7d4e706d0d193f99a6d2c19f3c05d5e0309de97679c8a30346464736f6c63430008020033", "immutableReferences": {}, "generatedSources": [ { "ast": { "nodeType": "YulBlock", - "src": "0:2607:4", + "src": "0:5293:4", "statements": [ { "body": { @@ -1003,737 +1112,1207 @@ { "body": { "nodeType": "YulBlock", - "src": "1687:32:4", + "src": "1715:775:4", "statements": [ { "nodeType": "YulAssignment", - "src": "1697:16:4", + "src": "1725:15:4", "value": { - "name": "value", + "name": "_power", "nodeType": "YulIdentifier", - "src": "1708:5:4" + "src": "1734:6:4" }, "variableNames": [ { - "name": "cleaned", + "name": "power", "nodeType": "YulIdentifier", - "src": "1697:7:4" + "src": "1725:5:4" } ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "1669:5:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "1679:7:4", - "type": "" - } - ], - "src": "1642:77:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1776:269:4", - "statements": [ + }, { "nodeType": "YulAssignment", - "src": "1786:22:4", + "src": "1749:14:4", "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "1800:4:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1806:1:4", - "type": "", - "value": "2" - } - ], - "functionName": { - "name": "div", - "nodeType": "YulIdentifier", - "src": "1796:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1796:12:4" + "name": "_base", + "nodeType": "YulIdentifier", + "src": "1758:5:4" }, "variableNames": [ { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1786:6:4" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "1817:38:4", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "1847:4:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1853:1:4", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", + "name": "base", "nodeType": "YulIdentifier", - "src": "1843:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1843:12:4" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "1821:18:4", - "type": "" + "src": "1749:4:4" } ] }, { "body": { "nodeType": "YulBlock", - "src": "1894:51:4", + "src": "1807:677:4", "statements": [ { - "nodeType": "YulAssignment", - "src": "1908:27:4", - "value": { + "body": { + "nodeType": "YulBlock", + "src": "1895:22:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "1897:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "1897:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "1897:18:4" + } + ] + }, + "condition": { "arguments": [ { - "name": "length", + "name": "base", + "nodeType": "YulIdentifier", + "src": "1873:4:4" + }, + { + "arguments": [ + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "1883:3:4" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "1888:4:4" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1879:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1879:14:4" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "1870:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "1870:24:4" + }, + "nodeType": "YulIf", + "src": "1867:2:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1962:419:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2342:25:4", + "value": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "2355:5:4" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "2362:4:4" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "2351:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "2351:16:4" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "2342:5:4" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", "nodeType": "YulIdentifier", - "src": "1922:6:4" + "src": "1937:8:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "1930:4:4", + "src": "1947:1:4", "type": "", - "value": "0x7f" + "value": "1" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", - "src": "1918:3:4" + "src": "1933:3:4" }, "nodeType": "YulFunctionCall", - "src": "1918:17:4" + "src": "1933:16:4" }, - "variableNames": [ - { - "name": "length", + "nodeType": "YulIf", + "src": "1930:2:4" + }, + { + "nodeType": "YulAssignment", + "src": "2394:23:4", + "value": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "2406:4:4" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "2412:4:4" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "2402:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "2402:15:4" + }, + "variableNames": [ + { + "name": "base", "nodeType": "YulIdentifier", - "src": "1908:6:4" + "src": "2394:4:4" } ] - } - ] - }, - "condition": { - "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "1874:18:4" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "1867:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "1867:26:4" - }, - "nodeType": "YulIf", - "src": "1864:2:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "1997:42:4", - "statements": [ + }, { - "expression": { - "arguments": [], + "nodeType": "YulAssignment", + "src": "2430:44:4", + "value": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "2465:8:4" + } + ], "functionName": { - "name": "panic_error_0x22", + "name": "shift_right_1_unsigned", "nodeType": "YulIdentifier", - "src": "2011:16:4" + "src": "2442:22:4" }, "nodeType": "YulFunctionCall", - "src": "2011:18:4" + "src": "2442:32:4" }, - "nodeType": "YulExpressionStatement", - "src": "2011:18:4" + "variableNames": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "2430:8:4" + } + ] } ] }, "condition": { "arguments": [ { - "name": "outOfPlaceEncoding", + "name": "exponent", "nodeType": "YulIdentifier", - "src": "1961:18:4" + "src": "1783:8:4" }, { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "1984:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1992:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "1981:2:4" - }, - "nodeType": "YulFunctionCall", - "src": "1981:14:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "1793:1:4", + "type": "", + "value": "1" } ], "functionName": { - "name": "eq", + "name": "gt", "nodeType": "YulIdentifier", - "src": "1958:2:4" + "src": "1780:2:4" }, "nodeType": "YulFunctionCall", - "src": "1958:38:4" + "src": "1780:15:4" }, - "nodeType": "YulIf", - "src": "1955:2:4" + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "1796:2:4", + "statements": [] + }, + "pre": { + "nodeType": "YulBlock", + "src": "1776:3:4", + "statements": [] + }, + "src": "1772:712:4" } ] }, - "name": "extract_byte_array_length", + "name": "checked_exp_helper", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "data", + "name": "_power", + "nodeType": "YulTypedName", + "src": "1670:6:4", + "type": "" + }, + { + "name": "_base", + "nodeType": "YulTypedName", + "src": "1678:5:4", + "type": "" + }, + { + "name": "exponent", + "nodeType": "YulTypedName", + "src": "1685:8:4", + "type": "" + }, + { + "name": "max", "nodeType": "YulTypedName", - "src": "1760:4:4", + "src": "1695:3:4", "type": "" } ], "returnVariables": [ { - "name": "length", + "name": "power", + "nodeType": "YulTypedName", + "src": "1703:5:4", + "type": "" + }, + { + "name": "base", "nodeType": "YulTypedName", - "src": "1769:6:4", + "src": "1710:4:4", "type": "" } ], - "src": "1725:320:4" + "src": "1642:848:4" }, { "body": { "nodeType": "YulBlock", - "src": "2079:152:4", + "src": "2562:219:4", "statements": [ { - "expression": { + "nodeType": "YulAssignment", + "src": "2572:31:4", + "value": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2096:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2099:77:4", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + "name": "base", + "nodeType": "YulIdentifier", + "src": "2598:4:4" } ], "functionName": { - "name": "mstore", + "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "2089:6:4" + "src": "2580:17:4" }, "nodeType": "YulFunctionCall", - "src": "2089:88:4" + "src": "2580:23:4" }, - "nodeType": "YulExpressionStatement", - "src": "2089:88:4" + "variableNames": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "2572:4:4" + } + ] }, { - "expression": { + "nodeType": "YulAssignment", + "src": "2612:39:4", + "value": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2193:1:4", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2196:4:4", - "type": "", - "value": "0x11" + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "2642:8:4" } ], "functionName": { - "name": "mstore", + "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "2186:6:4" + "src": "2624:17:4" }, "nodeType": "YulFunctionCall", - "src": "2186:15:4" + "src": "2624:27:4" }, - "nodeType": "YulExpressionStatement", - "src": "2186:15:4" + "variableNames": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "2612:8:4" + } + ] }, { - "expression": { + "nodeType": "YulAssignment", + "src": "2661:113:4", + "value": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2217:1:4", - "type": "", - "value": "0" + "name": "base", + "nodeType": "YulIdentifier", + "src": "2691:4:4" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "2697:8:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "2220:4:4", + "src": "2707:66:4", "type": "", - "value": "0x24" + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" } ], "functionName": { - "name": "revert", + "name": "checked_exp_unsigned", "nodeType": "YulIdentifier", - "src": "2210:6:4" + "src": "2670:20:4" }, "nodeType": "YulFunctionCall", - "src": "2210:15:4" + "src": "2670:104:4" }, - "nodeType": "YulExpressionStatement", - "src": "2210:15:4" + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "2661:5:4" + } + ] } ] }, - "name": "panic_error_0x11", + "name": "checked_exp_t_uint256_t_uint256", "nodeType": "YulFunctionDefinition", - "src": "2051:180:4" + "parameters": [ + { + "name": "base", + "nodeType": "YulTypedName", + "src": "2537:4:4", + "type": "" + }, + { + "name": "exponent", + "nodeType": "YulTypedName", + "src": "2543:8:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "power", + "nodeType": "YulTypedName", + "src": "2556:5:4", + "type": "" + } + ], + "src": "2496:285:4" }, { "body": { "nodeType": "YulBlock", - "src": "2265:152:4", + "src": "2847:1013:4", "statements": [ { - "expression": { - "arguments": [ + "body": { + "nodeType": "YulBlock", + "src": "3042:20:4", + "statements": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2282:1:4", - "type": "", - "value": "0" + "nodeType": "YulAssignment", + "src": "3044:10:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3053:1:4", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3044:5:4" + } + ] }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2285:77:4", - "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + "nodeType": "YulLeave", + "src": "3055:5:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3032:8:4" } ], "functionName": { - "name": "mstore", + "name": "iszero", "nodeType": "YulIdentifier", - "src": "2275:6:4" + "src": "3025:6:4" }, "nodeType": "YulFunctionCall", - "src": "2275:88:4" + "src": "3025:16:4" }, - "nodeType": "YulExpressionStatement", - "src": "2275:88:4" + "nodeType": "YulIf", + "src": "3022:2:4" }, { - "expression": { - "arguments": [ + "body": { + "nodeType": "YulBlock", + "src": "3087:20:4", + "statements": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2379:1:4", - "type": "", - "value": "4" + "nodeType": "YulAssignment", + "src": "3089:10:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3098:1:4", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3089:5:4" + } + ] }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2382:4:4", - "type": "", - "value": "0x22" + "nodeType": "YulLeave", + "src": "3100:5:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3081:4:4" } ], "functionName": { - "name": "mstore", + "name": "iszero", "nodeType": "YulIdentifier", - "src": "2372:6:4" + "src": "3074:6:4" }, "nodeType": "YulFunctionCall", - "src": "2372:15:4" + "src": "3074:12:4" }, - "nodeType": "YulExpressionStatement", - "src": "2372:15:4" + "nodeType": "YulIf", + "src": "3071:2:4" }, { - "expression": { - "arguments": [ - { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3217:20:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3219:10:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3228:1:4", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3219:5:4" + } + ] + }, + { + "nodeType": "YulLeave", + "src": "3230:5:4" + } + ] + }, + "nodeType": "YulCase", + "src": "3210:27:4", + "value": { "kind": "number", "nodeType": "YulLiteral", - "src": "2403:1:4", + "src": "3215:1:4", "type": "", - "value": "0" + "value": "1" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3261:176:4", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3296:22:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "3298:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "3298:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "3298:18:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3281:8:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3291:3:4", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3278:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3278:17:4" + }, + "nodeType": "YulIf", + "src": "3275:2:4" + }, + { + "nodeType": "YulAssignment", + "src": "3331:25:4", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3344:1:4", + "type": "", + "value": "2" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3347:8:4" + } + ], + "functionName": { + "name": "exp", + "nodeType": "YulIdentifier", + "src": "3340:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "3340:16:4" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3331:5:4" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3387:22:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "3389:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "3389:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "3389:18:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3375:5:4" + }, + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "3382:3:4" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3372:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3372:14:4" + }, + "nodeType": "YulIf", + "src": "3369:2:4" + }, + { + "nodeType": "YulLeave", + "src": "3422:5:4" + } + ] }, - { + "nodeType": "YulCase", + "src": "3246:191:4", + "value": { "kind": "number", "nodeType": "YulLiteral", - "src": "2406:4:4", + "src": "3251:1:4", "type": "", - "value": "0x24" + "value": "2" } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "2396:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "2396:15:4" + } + ], + "expression": { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3167:4:4" }, - "nodeType": "YulExpressionStatement", - "src": "2396:15:4" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "2237:180:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2529:75:4", - "statements": [ + "nodeType": "YulSwitch", + "src": "3160:277:4" + }, { - "expression": { + "body": { + "nodeType": "YulBlock", + "src": "3569:123:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3583:28:4", + "value": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3596:4:4" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3602:8:4" + } + ], + "functionName": { + "name": "exp", + "nodeType": "YulIdentifier", + "src": "3592:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "3592:19:4" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3583:5:4" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3642:22:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "3644:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "3644:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "3644:18:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3630:5:4" + }, + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "3637:3:4" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "3627:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3627:14:4" + }, + "nodeType": "YulIf", + "src": "3624:2:4" + }, + { + "nodeType": "YulLeave", + "src": "3677:5:4" + } + ] + }, + "condition": { "arguments": [ { "arguments": [ { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "2551:6:4" + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3472:4:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3478:2:4", + "type": "", + "value": "11" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3469:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3469:12:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2559:1:4", - "type": "", - "value": "0" + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3486:8:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3496:2:4", + "type": "", + "value": "78" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3483:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3483:16:4" } ], "functionName": { - "name": "add", + "name": "and", "nodeType": "YulIdentifier", - "src": "2547:3:4" + "src": "3465:3:4" }, "nodeType": "YulFunctionCall", - "src": "2547:14:4" + "src": "3465:35:4" }, { - "kind": "string", + "arguments": [ + { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3521:4:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3527:3:4", + "type": "", + "value": "307" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3518:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3518:13:4" + }, + { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3536:8:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3546:2:4", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "3533:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3533:16:4" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "3514:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "3514:36:4" + } + ], + "functionName": { + "name": "or", + "nodeType": "YulIdentifier", + "src": "3449:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "3449:111:4" + }, + "nodeType": "YulIf", + "src": "3446:2:4" + }, + { + "nodeType": "YulAssignment", + "src": "3702:57:4", + "value": { + "arguments": [ + { + "kind": "number", "nodeType": "YulLiteral", - "src": "2563:33:4", + "src": "3736:1:4", "type": "", - "value": "ERC20: mint to the zero address" + "value": "1" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3739:4:4" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "3745:8:4" + }, + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "3755:3:4" } ], "functionName": { - "name": "mstore", + "name": "checked_exp_helper", "nodeType": "YulIdentifier", - "src": "2540:6:4" + "src": "3717:18:4" }, "nodeType": "YulFunctionCall", - "src": "2540:57:4" + "src": "3717:42:4" }, - "nodeType": "YulExpressionStatement", - "src": "2540:57:4" - } - ] - }, - "name": "store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "2521:6:4", - "type": "" - } - ], - "src": "2423:181:4" - } - ] - }, - "contents": "{\n\n function abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 31)\n store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: mint to the zero address\")\n\n }\n\n}\n", - "id": 4, - "language": "Yul", - "name": "#utility.yul" - } - ], - "deployedGeneratedSources": [ - { - "ast": { - "nodeType": "YulBlock", - "src": "0:13511:4", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "59:87:4", - "statements": [ + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3702:5:4" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3709:4:4" + } + ] + }, { - "nodeType": "YulAssignment", - "src": "69:29:4", - "value": { + "body": { + "nodeType": "YulBlock", + "src": "3798:22:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "3800:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "3800:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "3800:18:4" + } + ] + }, + "condition": { "arguments": [ { - "name": "offset", + "name": "power", "nodeType": "YulIdentifier", - "src": "91:6:4" + "src": "3775:5:4" + }, + { + "arguments": [ + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "3786:3:4" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3791:4:4" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "3782:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "3782:14:4" } ], "functionName": { - "name": "calldataload", + "name": "gt", "nodeType": "YulIdentifier", - "src": "78:12:4" + "src": "3772:2:4" }, "nodeType": "YulFunctionCall", - "src": "78:20:4" + "src": "3772:25:4" }, - "variableNames": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "69:5:4" - } - ] + "nodeType": "YulIf", + "src": "3769:2:4" }, { - "expression": { + "nodeType": "YulAssignment", + "src": "3829:25:4", + "value": { "arguments": [ { - "name": "value", + "name": "power", "nodeType": "YulIdentifier", - "src": "134:5:4" + "src": "3842:5:4" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "3849:4:4" } ], "functionName": { - "name": "validator_revert_t_address", + "name": "mul", "nodeType": "YulIdentifier", - "src": "107:26:4" + "src": "3838:3:4" }, "nodeType": "YulFunctionCall", - "src": "107:33:4" + "src": "3838:16:4" }, - "nodeType": "YulExpressionStatement", - "src": "107:33:4" + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "3829:5:4" + } + ] } ] }, - "name": "abi_decode_t_address", + "name": "checked_exp_unsigned", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "offset", + "name": "base", "nodeType": "YulTypedName", - "src": "37:6:4", + "src": "2817:4:4", "type": "" }, { - "name": "end", + "name": "exponent", "nodeType": "YulTypedName", - "src": "45:3:4", + "src": "2823:8:4", + "type": "" + }, + { + "name": "max", + "nodeType": "YulTypedName", + "src": "2833:3:4", "type": "" } ], "returnVariables": [ { - "name": "value", + "name": "power", "nodeType": "YulTypedName", - "src": "53:5:4", + "src": "2841:5:4", "type": "" } ], - "src": "7:139:4" + "src": "2787:1073:4" }, { "body": { "nodeType": "YulBlock", - "src": "204:87:4", + "src": "3914:300:4", "statements": [ { "nodeType": "YulAssignment", - "src": "214:29:4", + "src": "3924:25:4", "value": { "arguments": [ { - "name": "offset", + "name": "x", "nodeType": "YulIdentifier", - "src": "236:6:4" + "src": "3947:1:4" } ], "functionName": { - "name": "calldataload", + "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "223:12:4" + "src": "3929:17:4" }, "nodeType": "YulFunctionCall", - "src": "223:20:4" + "src": "3929:20:4" }, "variableNames": [ { - "name": "value", + "name": "x", "nodeType": "YulIdentifier", - "src": "214:5:4" + "src": "3924:1:4" } ] }, { - "expression": { + "nodeType": "YulAssignment", + "src": "3958:25:4", + "value": { "arguments": [ { - "name": "value", + "name": "y", "nodeType": "YulIdentifier", - "src": "279:5:4" + "src": "3981:1:4" } ], "functionName": { - "name": "validator_revert_t_uint256", + "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "252:26:4" + "src": "3963:17:4" }, "nodeType": "YulFunctionCall", - "src": "252:33:4" + "src": "3963:20:4" }, - "nodeType": "YulExpressionStatement", - "src": "252:33:4" - } - ] - }, - "name": "abi_decode_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "182:6:4", - "type": "" - }, - { - "name": "end", - "nodeType": "YulTypedName", - "src": "190:3:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "198:5:4", - "type": "" - } - ], - "src": "152:139:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "363:196:4", - "statements": [ + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "3958:1:4" + } + ] + }, { "body": { "nodeType": "YulBlock", - "src": "409:16:4", + "src": "4156:22:4", "statements": [ { "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "418:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "421:1:4", - "type": "", - "value": "0" - } - ], + "arguments": [], "functionName": { - "name": "revert", + "name": "panic_error_0x11", "nodeType": "YulIdentifier", - "src": "411:6:4" + "src": "4158:16:4" }, "nodeType": "YulFunctionCall", - "src": "411:12:4" + "src": "4158:18:4" }, "nodeType": "YulExpressionStatement", - "src": "411:12:4" + "src": "4158:18:4" } ] }, @@ -1742,931 +2321,1007 @@ { "arguments": [ { - "name": "dataEnd", + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "4068:1:4" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "4061:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "4061:9:4" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "4054:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "4054:17:4" + }, + { + "arguments": [ + { + "name": "y", "nodeType": "YulIdentifier", - "src": "384:7:4" + "src": "4076:1:4" }, { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "393:9:4" + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4083:66:4", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + }, + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "4151:1:4" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "4079:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "4079:74:4" } ], "functionName": { - "name": "sub", + "name": "gt", "nodeType": "YulIdentifier", - "src": "380:3:4" + "src": "4073:2:4" }, "nodeType": "YulFunctionCall", - "src": "380:23:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "405:2:4", - "type": "", - "value": "32" + "src": "4073:81:4" } ], "functionName": { - "name": "slt", + "name": "and", "nodeType": "YulIdentifier", - "src": "376:3:4" + "src": "4050:3:4" }, "nodeType": "YulFunctionCall", - "src": "376:32:4" + "src": "4050:105:4" }, "nodeType": "YulIf", - "src": "373:2:4" + "src": "4047:2:4" }, { - "nodeType": "YulBlock", - "src": "435:117:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "450:15:4", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "464:1:4", - "type": "", - "value": "0" + "nodeType": "YulAssignment", + "src": "4188:20:4", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "4203:1:4" }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "454:6:4", - "type": "" - } - ] + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "4206:1:4" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "4199:3:4" }, + "nodeType": "YulFunctionCall", + "src": "4199:9:4" + }, + "variableNames": [ { - "nodeType": "YulAssignment", - "src": "479:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "514:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "525:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "510:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "510:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "534:7:4" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "489:20:4" - }, - "nodeType": "YulFunctionCall", - "src": "489:53:4" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "479:6:4" - } - ] + "name": "product", + "nodeType": "YulIdentifier", + "src": "4188:7:4" } ] } ] }, - "name": "abi_decode_tuple_t_address", + "name": "checked_mul_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "headStart", + "name": "x", "nodeType": "YulTypedName", - "src": "333:9:4", + "src": "3897:1:4", "type": "" }, { - "name": "dataEnd", + "name": "y", "nodeType": "YulTypedName", - "src": "344:7:4", + "src": "3900:1:4", "type": "" } ], "returnVariables": [ { - "name": "value0", + "name": "product", "nodeType": "YulTypedName", - "src": "356:6:4", + "src": "3906:7:4", "type": "" } ], - "src": "297:262:4" + "src": "3866:348:4" }, { "body": { "nodeType": "YulBlock", - "src": "648:324:4", + "src": "4265:32:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4275:16:4", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "4286:5:4" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "4275:7:4" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "4247:5:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "4257:7:4", + "type": "" + } + ], + "src": "4220:77:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4354:269:4", "statements": [ + { + "nodeType": "YulAssignment", + "src": "4364:22:4", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "4378:4:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4384:1:4", + "type": "", + "value": "2" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "4374:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "4374:12:4" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4364:6:4" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "4395:38:4", + "value": { + "arguments": [ + { + "name": "data", + "nodeType": "YulIdentifier", + "src": "4425:4:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4431:1:4", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "4421:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "4421:12:4" + }, + "variables": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "4399:18:4", + "type": "" + } + ] + }, { "body": { "nodeType": "YulBlock", - "src": "694:16:4", + "src": "4472:51:4", "statements": [ { - "expression": { + "nodeType": "YulAssignment", + "src": "4486:27:4", + "value": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "703:1:4", - "type": "", - "value": "0" + "name": "length", + "nodeType": "YulIdentifier", + "src": "4500:6:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "706:1:4", + "src": "4508:4:4", "type": "", - "value": "0" + "value": "0x7f" } ], "functionName": { - "name": "revert", + "name": "and", "nodeType": "YulIdentifier", - "src": "696:6:4" + "src": "4496:3:4" }, "nodeType": "YulFunctionCall", - "src": "696:12:4" + "src": "4496:17:4" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "4486:6:4" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "4452:18:4" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "4445:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "4445:26:4" + }, + "nodeType": "YulIf", + "src": "4442:2:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4575:42:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "4589:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "4589:18:4" }, "nodeType": "YulExpressionStatement", - "src": "696:12:4" + "src": "4589:18:4" } ] }, "condition": { "arguments": [ + { + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "4539:18:4" + }, { "arguments": [ { - "name": "dataEnd", + "name": "length", "nodeType": "YulIdentifier", - "src": "669:7:4" + "src": "4562:6:4" }, { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "678:9:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "4570:2:4", + "type": "", + "value": "32" } ], "functionName": { - "name": "sub", + "name": "lt", "nodeType": "YulIdentifier", - "src": "665:3:4" + "src": "4559:2:4" }, "nodeType": "YulFunctionCall", - "src": "665:23:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "690:2:4", - "type": "", - "value": "64" + "src": "4559:14:4" } ], "functionName": { - "name": "slt", + "name": "eq", "nodeType": "YulIdentifier", - "src": "661:3:4" + "src": "4536:2:4" }, "nodeType": "YulFunctionCall", - "src": "661:32:4" + "src": "4536:38:4" }, "nodeType": "YulIf", - "src": "658:2:4" - }, - { - "nodeType": "YulBlock", - "src": "720:117:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "735:15:4", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "749:1:4", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "739:6:4", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "764:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "799:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "810:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "795:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "795:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "819:7:4" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "774:20:4" - }, - "nodeType": "YulFunctionCall", - "src": "774:53:4" - }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "764:6:4" - } - ] - } - ] - }, - { - "nodeType": "YulBlock", - "src": "847:118:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "862:16:4", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "876:2:4", - "type": "", - "value": "32" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "866:6:4", - "type": "" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "892:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "927:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "938:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "923:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "923:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "947:7:4" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "902:20:4" - }, - "nodeType": "YulFunctionCall", - "src": "902:53:4" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "892:6:4" - } - ] - } - ] + "src": "4533:2:4" } ] }, - "name": "abi_decode_tuple_t_addresst_address", + "name": "extract_byte_array_length", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "610:9:4", - "type": "" - }, - { - "name": "dataEnd", + "name": "data", "nodeType": "YulTypedName", - "src": "621:7:4", + "src": "4338:4:4", "type": "" } ], "returnVariables": [ { - "name": "value0", - "nodeType": "YulTypedName", - "src": "633:6:4", - "type": "" - }, - { - "name": "value1", + "name": "length", "nodeType": "YulTypedName", - "src": "641:6:4", + "src": "4347:6:4", "type": "" } ], - "src": "565:407:4" + "src": "4303:320:4" }, { "body": { "nodeType": "YulBlock", - "src": "1078:452:4", + "src": "4657:152:4", "statements": [ { - "body": { - "nodeType": "YulBlock", - "src": "1124:16:4", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1133:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1136:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1126:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "1126:12:4" - }, - "nodeType": "YulExpressionStatement", - "src": "1126:12:4" - } - ] - }, - "condition": { + "expression": { "arguments": [ { - "arguments": [ - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1099:7:4" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1108:9:4" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "1095:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1095:23:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "4674:1:4", + "type": "", + "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "1120:2:4", + "src": "4677:77:4", "type": "", - "value": "96" + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" } ], "functionName": { - "name": "slt", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "1091:3:4" + "src": "4667:6:4" }, "nodeType": "YulFunctionCall", - "src": "1091:32:4" + "src": "4667:88:4" }, - "nodeType": "YulIf", - "src": "1088:2:4" + "nodeType": "YulExpressionStatement", + "src": "4667:88:4" }, { - "nodeType": "YulBlock", - "src": "1150:117:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1165:15:4", - "value": { + "expression": { + "arguments": [ + { "kind": "number", "nodeType": "YulLiteral", - "src": "1179:1:4", + "src": "4771:1:4", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4774:4:4", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4764:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "4764:15:4" + }, + "nodeType": "YulExpressionStatement", + "src": "4764:15:4" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4795:1:4", "type": "", "value": "0" }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1169:6:4", - "type": "" - } - ] + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4798:4:4", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "4788:6:4" }, - { - "nodeType": "YulAssignment", - "src": "1194:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1229:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1240:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1225:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1225:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1249:7:4" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "1204:20:4" - }, - "nodeType": "YulFunctionCall", - "src": "1204:53:4" + "nodeType": "YulFunctionCall", + "src": "4788:15:4" + }, + "nodeType": "YulExpressionStatement", + "src": "4788:15:4" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "4629:180:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4843:152:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4860:1:4", + "type": "", + "value": "0" }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1194:6:4" - } - ] - } - ] + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4863:77:4", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4853:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "4853:88:4" + }, + "nodeType": "YulExpressionStatement", + "src": "4853:88:4" }, { - "nodeType": "YulBlock", - "src": "1277:118:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1292:16:4", - "value": { + "expression": { + "arguments": [ + { "kind": "number", "nodeType": "YulLiteral", - "src": "1306:2:4", + "src": "4957:1:4", "type": "", - "value": "32" + "value": "4" }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1296:6:4", - "type": "" - } - ] + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4960:4:4", + "type": "", + "value": "0x22" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4950:6:4" }, - { - "nodeType": "YulAssignment", - "src": "1322:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1357:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1368:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1353:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1353:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1377:7:4" - } - ], - "functionName": { - "name": "abi_decode_t_address", - "nodeType": "YulIdentifier", - "src": "1332:20:4" - }, - "nodeType": "YulFunctionCall", - "src": "1332:53:4" - }, - "variableNames": [ - { - "name": "value1", - "nodeType": "YulIdentifier", - "src": "1322:6:4" - } - ] - } - ] + "nodeType": "YulFunctionCall", + "src": "4950:15:4" + }, + "nodeType": "YulExpressionStatement", + "src": "4950:15:4" }, { - "nodeType": "YulBlock", - "src": "1405:118:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1420:16:4", - "value": { + "expression": { + "arguments": [ + { "kind": "number", "nodeType": "YulLiteral", - "src": "1434:2:4", + "src": "4981:1:4", "type": "", - "value": "64" + "value": "0" }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1424:6:4", - "type": "" - } - ] + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4984:4:4", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "4974:6:4" }, - { - "nodeType": "YulAssignment", - "src": "1450:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1485:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1496:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1481:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1481:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1505:7:4" - } - ], - "functionName": { - "name": "abi_decode_t_uint256", - "nodeType": "YulIdentifier", - "src": "1460:20:4" - }, - "nodeType": "YulFunctionCall", - "src": "1460:53:4" + "nodeType": "YulFunctionCall", + "src": "4974:15:4" + }, + "nodeType": "YulExpressionStatement", + "src": "4974:15:4" + } + ] + }, + "name": "panic_error_0x22", + "nodeType": "YulFunctionDefinition", + "src": "4815:180:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5052:51:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5062:34:4", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5087:1:4", + "type": "", + "value": "1" }, - "variableNames": [ - { - "name": "value2", - "nodeType": "YulIdentifier", - "src": "1450:6:4" - } - ] + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "5090:5:4" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "5083:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "5083:13:4" + }, + "variableNames": [ + { + "name": "newValue", + "nodeType": "YulIdentifier", + "src": "5062:8:4" } ] } ] }, - "name": "abi_decode_tuple_t_addresst_addresst_uint256", + "name": "shift_right_1_unsigned", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "headStart", - "nodeType": "YulTypedName", - "src": "1032:9:4", - "type": "" - }, - { - "name": "dataEnd", + "name": "value", "nodeType": "YulTypedName", - "src": "1043:7:4", + "src": "5033:5:4", "type": "" } ], "returnVariables": [ { - "name": "value0", - "nodeType": "YulTypedName", - "src": "1055:6:4", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "1063:6:4", - "type": "" - }, - { - "name": "value2", + "name": "newValue", "nodeType": "YulTypedName", - "src": "1071:6:4", + "src": "5043:8:4", "type": "" } ], - "src": "978:552:4" + "src": "5001:102:4" }, { "body": { "nodeType": "YulBlock", - "src": "1619:324:4", + "src": "5215:75:4", "statements": [ { - "body": { - "nodeType": "YulBlock", - "src": "1665:16:4", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1674:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1677:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "1667:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "1667:12:4" - }, - "nodeType": "YulExpressionStatement", - "src": "1667:12:4" - } - ] - }, - "condition": { + "expression": { "arguments": [ { "arguments": [ { - "name": "dataEnd", + "name": "memPtr", "nodeType": "YulIdentifier", - "src": "1640:7:4" + "src": "5237:6:4" }, { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1649:9:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "5245:1:4", + "type": "", + "value": "0" } ], "functionName": { - "name": "sub", + "name": "add", "nodeType": "YulIdentifier", - "src": "1636:3:4" + "src": "5233:3:4" }, "nodeType": "YulFunctionCall", - "src": "1636:23:4" + "src": "5233:14:4" }, { - "kind": "number", + "kind": "string", "nodeType": "YulLiteral", - "src": "1661:2:4", + "src": "5249:33:4", "type": "", - "value": "64" + "value": "ERC20: mint to the zero address" } ], "functionName": { - "name": "slt", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "1632:3:4" + "src": "5226:6:4" }, "nodeType": "YulFunctionCall", - "src": "1632:32:4" + "src": "5226:57:4" }, - "nodeType": "YulIf", - "src": "1629:2:4" - }, + "nodeType": "YulExpressionStatement", + "src": "5226:57:4" + } + ] + }, + "name": "store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "5207:6:4", + "type": "" + } + ], + "src": "5109:181:4" + } + ] + }, + "contents": "{\n\n function abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 31)\n store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function checked_exp_helper(_power, _base, exponent, max) -> power, base {\n power := _power\n base := _base\n for { } gt(exponent, 1) {}\n {\n // overflow check for base * base\n if gt(base, div(max, base)) { panic_error_0x11() }\n if and(exponent, 1)\n {\n // No checks for power := mul(power, base) needed, because the check\n // for base * base above is sufficient, since:\n // |power| <= base (proof by induction) and thus:\n // |power * base| <= base * base <= max <= |min| (for signed)\n // (this is equally true for signed and unsigned exp)\n power := mul(power, base)\n }\n base := mul(base, base)\n exponent := shift_right_1_unsigned(exponent)\n }\n }\n\n function checked_exp_t_uint256_t_uint256(base, exponent) -> power {\n base := cleanup_t_uint256(base)\n exponent := cleanup_t_uint256(exponent)\n\n power := checked_exp_unsigned(base, exponent, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n\n }\n\n function checked_exp_unsigned(base, exponent, max) -> power {\n // This function currently cannot be inlined because of the\n // \"leave\" statements. We have to improve the optimizer.\n\n // Note that 0**0 == 1\n if iszero(exponent) { power := 1 leave }\n if iszero(base) { power := 0 leave }\n\n // Specializations for small bases\n switch base\n // 0 is handled above\n case 1 { power := 1 leave }\n case 2\n {\n if gt(exponent, 255) { panic_error_0x11() }\n power := exp(2, exponent)\n if gt(power, max) { panic_error_0x11() }\n leave\n }\n if or(\n and(lt(base, 11), lt(exponent, 78)),\n and(lt(base, 307), lt(exponent, 32))\n )\n {\n power := exp(base, exponent)\n if gt(power, max) { panic_error_0x11() }\n leave\n }\n\n power, base := checked_exp_helper(1, base, exponent, max)\n\n if gt(power, div(max, base)) { panic_error_0x11() }\n power := mul(power, base)\n }\n\n function checked_mul_t_uint256(x, y) -> product {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x != 0 and y > (maxValue / x)\n if and(iszero(iszero(x)), gt(y, div(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, x))) { panic_error_0x11() }\n\n product := mul(x, y)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function shift_right_1_unsigned(value) -> newValue {\n newValue :=\n\n shr(1, value)\n\n }\n\n function store_literal_in_memory_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: mint to the zero address\")\n\n }\n\n}\n", + "id": 4, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:10426:4", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "59:87:4", + "statements": [ { - "nodeType": "YulBlock", - "src": "1691:117:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "1706:15:4", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "1720:1:4", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "offset", - "nodeType": "YulTypedName", - "src": "1710:6:4", - "type": "" - } - ] + "nodeType": "YulAssignment", + "src": "69:29:4", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "91:6:4" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "78:12:4" }, + "nodeType": "YulFunctionCall", + "src": "78:20:4" + }, + "variableNames": [ { - "nodeType": "YulAssignment", - "src": "1735:63:4", - "value": { - "arguments": [ - { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "1770:9:4" - }, - { - "name": "offset", - "nodeType": "YulIdentifier", - "src": "1781:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "1766:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "1766:22:4" - }, - { - "name": "dataEnd", - "nodeType": "YulIdentifier", - "src": "1790:7:4" + "name": "value", + "nodeType": "YulIdentifier", + "src": "69:5:4" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "134:5:4" + } + ], + "functionName": { + "name": "validator_revert_t_address", + "nodeType": "YulIdentifier", + "src": "107:26:4" + }, + "nodeType": "YulFunctionCall", + "src": "107:33:4" + }, + "nodeType": "YulExpressionStatement", + "src": "107:33:4" + } + ] + }, + "name": "abi_decode_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "37:6:4", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "45:3:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "53:5:4", + "type": "" + } + ], + "src": "7:139:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "204:87:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "214:29:4", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "236:6:4" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "223:12:4" + }, + "nodeType": "YulFunctionCall", + "src": "223:20:4" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "214:5:4" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "279:5:4" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "252:26:4" + }, + "nodeType": "YulFunctionCall", + "src": "252:33:4" + }, + "nodeType": "YulExpressionStatement", + "src": "252:33:4" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "182:6:4", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "190:3:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "198:5:4", + "type": "" + } + ], + "src": "152:139:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "363:196:4", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "409:16:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "418:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "421:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "411:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "411:12:4" + }, + "nodeType": "YulExpressionStatement", + "src": "411:12:4" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "384:7:4" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "393:9:4" } ], "functionName": { - "name": "abi_decode_t_address", + "name": "sub", "nodeType": "YulIdentifier", - "src": "1745:20:4" + "src": "380:3:4" }, "nodeType": "YulFunctionCall", - "src": "1745:53:4" + "src": "380:23:4" }, - "variableNames": [ - { - "name": "value0", - "nodeType": "YulIdentifier", - "src": "1735:6:4" - } - ] - } - ] + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "405:2:4", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "376:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "376:32:4" + }, + "nodeType": "YulIf", + "src": "373:2:4" }, { "nodeType": "YulBlock", - "src": "1818:118:4", + "src": "435:117:4", "statements": [ { "nodeType": "YulVariableDeclaration", - "src": "1833:16:4", + "src": "450:15:4", "value": { "kind": "number", "nodeType": "YulLiteral", - "src": "1847:2:4", + "src": "464:1:4", "type": "", - "value": "32" + "value": "0" }, "variables": [ { "name": "offset", "nodeType": "YulTypedName", - "src": "1837:6:4", + "src": "454:6:4", "type": "" } ] }, { "nodeType": "YulAssignment", - "src": "1863:63:4", + "src": "479:63:4", "value": { "arguments": [ { @@ -2674,41 +3329,41 @@ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "1898:9:4" + "src": "514:9:4" }, { "name": "offset", "nodeType": "YulIdentifier", - "src": "1909:6:4" + "src": "525:6:4" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "1894:3:4" + "src": "510:3:4" }, "nodeType": "YulFunctionCall", - "src": "1894:22:4" + "src": "510:22:4" }, { "name": "dataEnd", "nodeType": "YulIdentifier", - "src": "1918:7:4" + "src": "534:7:4" } ], "functionName": { - "name": "abi_decode_t_uint256", + "name": "abi_decode_t_address", "nodeType": "YulIdentifier", - "src": "1873:20:4" + "src": "489:20:4" }, "nodeType": "YulFunctionCall", - "src": "1873:53:4" + "src": "489:53:4" }, "variableNames": [ { - "name": "value1", + "name": "value0", "nodeType": "YulIdentifier", - "src": "1863:6:4" + "src": "479:6:4" } ] } @@ -2716,19 +3371,19 @@ } ] }, - "name": "abi_decode_tuple_t_addresst_uint256", + "name": "abi_decode_tuple_t_address", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", - "src": "1581:9:4", + "src": "333:9:4", "type": "" }, { "name": "dataEnd", "nodeType": "YulTypedName", - "src": "1592:7:4", + "src": "344:7:4", "type": "" } ], @@ -2736,595 +3391,1112 @@ { "name": "value0", "nodeType": "YulTypedName", - "src": "1604:6:4", - "type": "" - }, - { - "name": "value1", - "nodeType": "YulTypedName", - "src": "1612:6:4", + "src": "356:6:4", "type": "" } ], - "src": "1536:407:4" + "src": "297:262:4" }, { "body": { "nodeType": "YulBlock", - "src": "2008:50:4", + "src": "648:324:4", "statements": [ { - "expression": { - "arguments": [ + "body": { + "nodeType": "YulBlock", + "src": "694:16:4", + "statements": [ { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2025:3:4" - }, + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "703:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "706:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "696:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "696:12:4" + }, + "nodeType": "YulExpressionStatement", + "src": "696:12:4" + } + ] + }, + "condition": { + "arguments": [ { "arguments": [ { - "name": "value", + "name": "dataEnd", "nodeType": "YulIdentifier", - "src": "2045:5:4" + "src": "669:7:4" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "678:9:4" } ], "functionName": { - "name": "cleanup_t_bool", + "name": "sub", "nodeType": "YulIdentifier", - "src": "2030:14:4" + "src": "665:3:4" }, "nodeType": "YulFunctionCall", - "src": "2030:21:4" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "2018:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "2018:34:4" - }, - "nodeType": "YulExpressionStatement", - "src": "2018:34:4" - } - ] - }, - "name": "abi_encode_t_bool_to_t_bool_fromStack", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "1996:5:4", - "type": "" - }, - { - "name": "pos", - "nodeType": "YulTypedName", - "src": "2003:3:4", - "type": "" - } - ], - "src": "1949:109:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "2156:272:4", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "2166:53:4", - "value": { - "arguments": [ + "src": "665:23:4" + }, { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2213:5:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "690:2:4", + "type": "", + "value": "64" } ], "functionName": { - "name": "array_length_t_string_memory_ptr", + "name": "slt", "nodeType": "YulIdentifier", - "src": "2180:32:4" + "src": "661:3:4" }, "nodeType": "YulFunctionCall", - "src": "2180:39:4" + "src": "661:32:4" }, - "variables": [ - { - "name": "length", - "nodeType": "YulTypedName", - "src": "2170:6:4", - "type": "" - } - ] + "nodeType": "YulIf", + "src": "658:2:4" }, { - "nodeType": "YulAssignment", - "src": "2228:78:4", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2294:3:4" + "nodeType": "YulBlock", + "src": "720:117:4", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "735:15:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "749:1:4", + "type": "", + "value": "0" }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2299:6:4" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2235:58:4" + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "739:6:4", + "type": "" + } + ] }, - "nodeType": "YulFunctionCall", - "src": "2235:71:4" - }, - "variableNames": [ { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2228:3:4" - } - ] - }, - { - "expression": { - "arguments": [ - { + "nodeType": "YulAssignment", + "src": "764:63:4", + "value": { "arguments": [ { - "name": "value", - "nodeType": "YulIdentifier", - "src": "2341:5:4" + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "799:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "810:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "795:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "795:22:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "2348:4:4", - "type": "", - "value": "0x20" + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "819:7:4" } ], "functionName": { - "name": "add", + "name": "abi_decode_t_address", "nodeType": "YulIdentifier", - "src": "2337:3:4" + "src": "774:20:4" }, "nodeType": "YulFunctionCall", - "src": "2337:16:4" - }, - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2355:3:4" + "src": "774:53:4" }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "2360:6:4" - } - ], - "functionName": { - "name": "copy_memory_to_memory", - "nodeType": "YulIdentifier", - "src": "2315:21:4" - }, - "nodeType": "YulFunctionCall", - "src": "2315:52:4" - }, - "nodeType": "YulExpressionStatement", - "src": "2315:52:4" - }, - { - "nodeType": "YulAssignment", - "src": "2376:46:4", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2387:3:4" + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "764:6:4" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "847:118:4", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "862:16:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "876:2:4", + "type": "", + "value": "32" }, - { + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "866:6:4", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "892:63:4", + "value": { "arguments": [ { - "name": "length", + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "927:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "938:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "923:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "923:22:4" + }, + { + "name": "dataEnd", "nodeType": "YulIdentifier", - "src": "2414:6:4" + "src": "947:7:4" } ], "functionName": { - "name": "round_up_to_mul_of_32", + "name": "abi_decode_t_address", "nodeType": "YulIdentifier", - "src": "2392:21:4" + "src": "902:20:4" }, "nodeType": "YulFunctionCall", - "src": "2392:29:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2383:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "2383:39:4" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2376:3:4" + "src": "902:53:4" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "892:6:4" + } + ] } ] } ] }, - "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "name": "abi_decode_tuple_t_addresst_address", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "value", + "name": "headStart", "nodeType": "YulTypedName", - "src": "2137:5:4", + "src": "610:9:4", "type": "" }, { - "name": "pos", + "name": "dataEnd", "nodeType": "YulTypedName", - "src": "2144:3:4", + "src": "621:7:4", "type": "" } ], "returnVariables": [ { - "name": "end", + "name": "value0", "nodeType": "YulTypedName", - "src": "2152:3:4", + "src": "633:6:4", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "641:6:4", "type": "" } ], - "src": "2064:364:4" + "src": "565:407:4" }, { "body": { "nodeType": "YulBlock", - "src": "2580:220:4", + "src": "1078:452:4", "statements": [ { - "nodeType": "YulAssignment", - "src": "2590:74:4", - "value": { + "body": { + "nodeType": "YulBlock", + "src": "1124:16:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1133:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1136:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1126:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "1126:12:4" + }, + "nodeType": "YulExpressionStatement", + "src": "1126:12:4" + } + ] + }, + "condition": { "arguments": [ { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2656:3:4" + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1099:7:4" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1108:9:4" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1095:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1095:23:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "2661:2:4", + "src": "1120:2:4", "type": "", - "value": "35" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2597:58:4" - }, - "nodeType": "YulFunctionCall", - "src": "2597:67:4" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2590:3:4" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2762:3:4" + "value": "96" } ], "functionName": { - "name": "store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "name": "slt", "nodeType": "YulIdentifier", - "src": "2673:88:4" + "src": "1091:3:4" }, "nodeType": "YulFunctionCall", - "src": "2673:93:4" + "src": "1091:32:4" }, - "nodeType": "YulExpressionStatement", - "src": "2673:93:4" + "nodeType": "YulIf", + "src": "1088:2:4" }, { - "nodeType": "YulAssignment", - "src": "2775:19:4", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2786:3:4" - }, - { + "nodeType": "YulBlock", + "src": "1150:117:4", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1165:15:4", + "value": { "kind": "number", "nodeType": "YulLiteral", - "src": "2791:2:4", + "src": "1179:1:4", "type": "", - "value": "64" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "2782:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "2782:12:4" - }, - "variableNames": [ - { - "name": "end", - "nodeType": "YulIdentifier", - "src": "2775:3:4" + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1169:6:4", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1194:63:4", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1229:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1240:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1225:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1225:22:4" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1249:7:4" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "1204:20:4" + }, + "nodeType": "YulFunctionCall", + "src": "1204:53:4" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1194:6:4" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "1277:118:4", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1292:16:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1306:2:4", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1296:6:4", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1322:63:4", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1357:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1368:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1353:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1353:22:4" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1377:7:4" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "1332:20:4" + }, + "nodeType": "YulFunctionCall", + "src": "1332:53:4" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "1322:6:4" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "1405:118:4", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1420:16:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1434:2:4", + "type": "", + "value": "64" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1424:6:4", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1450:63:4", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1485:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1496:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1481:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1481:22:4" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1505:7:4" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "1460:20:4" + }, + "nodeType": "YulFunctionCall", + "src": "1460:53:4" + }, + "variableNames": [ + { + "name": "value2", + "nodeType": "YulIdentifier", + "src": "1450:6:4" + } + ] } ] } ] }, - "name": "abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack", + "name": "abi_decode_tuple_t_addresst_addresst_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "pos", + "name": "headStart", "nodeType": "YulTypedName", - "src": "2568:3:4", + "src": "1032:9:4", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "1043:7:4", "type": "" } ], "returnVariables": [ { - "name": "end", + "name": "value0", "nodeType": "YulTypedName", - "src": "2576:3:4", + "src": "1055:6:4", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "1063:6:4", + "type": "" + }, + { + "name": "value2", + "nodeType": "YulTypedName", + "src": "1071:6:4", "type": "" } ], - "src": "2434:366:4" + "src": "978:552:4" }, { "body": { "nodeType": "YulBlock", - "src": "2952:220:4", + "src": "1619:324:4", "statements": [ { - "nodeType": "YulAssignment", - "src": "2962:74:4", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3028:3:4" - }, + "body": { + "nodeType": "YulBlock", + "src": "1665:16:4", + "statements": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3033:2:4", - "type": "", - "value": "34" - } - ], - "functionName": { - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "2969:58:4" - }, - "nodeType": "YulFunctionCall", - "src": "2969:67:4" - }, - "variableNames": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "2962:3:4" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3134:3:4" + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1674:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1677:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1667:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "1667:12:4" + }, + "nodeType": "YulExpressionStatement", + "src": "1667:12:4" } - ], - "functionName": { - "name": "store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", - "nodeType": "YulIdentifier", - "src": "3045:88:4" - }, - "nodeType": "YulFunctionCall", - "src": "3045:93:4" + ] }, - "nodeType": "YulExpressionStatement", - "src": "3045:93:4" - }, - { - "nodeType": "YulAssignment", - "src": "3147:19:4", - "value": { + "condition": { "arguments": [ { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "3158:3:4" + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1640:7:4" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1649:9:4" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1636:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1636:23:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "3163:2:4", + "src": "1661:2:4", "type": "", "value": "64" } ], "functionName": { - "name": "add", + "name": "slt", "nodeType": "YulIdentifier", - "src": "3154:3:4" + "src": "1632:3:4" }, "nodeType": "YulFunctionCall", - "src": "3154:12:4" + "src": "1632:32:4" }, - "variableNames": [ + "nodeType": "YulIf", + "src": "1629:2:4" + }, + { + "nodeType": "YulBlock", + "src": "1691:117:4", + "statements": [ { - "name": "end", - "nodeType": "YulIdentifier", - "src": "3147:3:4" + "nodeType": "YulVariableDeclaration", + "src": "1706:15:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1720:1:4", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1710:6:4", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1735:63:4", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1770:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1781:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1766:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1766:22:4" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1790:7:4" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "1745:20:4" + }, + "nodeType": "YulFunctionCall", + "src": "1745:53:4" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1735:6:4" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "1818:118:4", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1833:16:4", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1847:2:4", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1837:6:4", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1863:63:4", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1898:9:4" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1909:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1894:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "1894:22:4" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1918:7:4" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "1873:20:4" + }, + "nodeType": "YulFunctionCall", + "src": "1873:53:4" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "1863:6:4" + } + ] } ] } ] }, - "name": "abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack", + "name": "abi_decode_tuple_t_addresst_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "pos", + "name": "headStart", "nodeType": "YulTypedName", - "src": "2940:3:4", + "src": "1581:9:4", "type": "" - } - ], - "returnVariables": [ + }, { - "name": "end", + "name": "dataEnd", "nodeType": "YulTypedName", - "src": "2948:3:4", + "src": "1592:7:4", "type": "" } ], - "src": "2806:366:4" + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1604:6:4", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "1612:6:4", + "type": "" + } + ], + "src": "1536:407:4" }, { "body": { "nodeType": "YulBlock", - "src": "3324:220:4", + "src": "2008:50:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2025:3:4" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2045:5:4" + } + ], + "functionName": { + "name": "cleanup_t_bool", + "nodeType": "YulIdentifier", + "src": "2030:14:4" + }, + "nodeType": "YulFunctionCall", + "src": "2030:21:4" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2018:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "2018:34:4" + }, + "nodeType": "YulExpressionStatement", + "src": "2018:34:4" + } + ] + }, + "name": "abi_encode_t_bool_to_t_bool_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1996:5:4", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2003:3:4", + "type": "" + } + ], + "src": "1949:109:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2156:272:4", "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "2166:53:4", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2213:5:4" + } + ], + "functionName": { + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "2180:32:4" + }, + "nodeType": "YulFunctionCall", + "src": "2180:39:4" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "2170:6:4", + "type": "" + } + ] + }, { "nodeType": "YulAssignment", - "src": "3334:74:4", + "src": "2228:78:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3400:3:4" + "src": "2294:3:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3405:2:4", - "type": "", - "value": "38" + "name": "length", + "nodeType": "YulIdentifier", + "src": "2299:6:4" } ], "functionName": { "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "3341:58:4" + "src": "2235:58:4" }, "nodeType": "YulFunctionCall", - "src": "3341:67:4" + "src": "2235:71:4" }, "variableNames": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3334:3:4" + "src": "2228:3:4" } ] }, { "expression": { "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2341:5:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2348:4:4", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2337:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "2337:16:4" + }, { "name": "pos", "nodeType": "YulIdentifier", - "src": "3506:3:4" + "src": "2355:3:4" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2360:6:4" } ], "functionName": { - "name": "store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "name": "copy_memory_to_memory", "nodeType": "YulIdentifier", - "src": "3417:88:4" + "src": "2315:21:4" }, "nodeType": "YulFunctionCall", - "src": "3417:93:4" + "src": "2315:52:4" }, "nodeType": "YulExpressionStatement", - "src": "3417:93:4" + "src": "2315:52:4" }, { "nodeType": "YulAssignment", - "src": "3519:19:4", + "src": "2376:46:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3530:3:4" + "src": "2387:3:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "3535:2:4", - "type": "", - "value": "64" + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "2414:6:4" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "2392:21:4" + }, + "nodeType": "YulFunctionCall", + "src": "2392:29:4" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "3526:3:4" + "src": "2383:3:4" }, "nodeType": "YulFunctionCall", - "src": "3526:12:4" + "src": "2383:39:4" }, "variableNames": [ { "name": "end", "nodeType": "YulIdentifier", - "src": "3519:3:4" + "src": "2376:3:4" } ] } ] }, - "name": "abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack", + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", "nodeType": "YulFunctionDefinition", "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2137:5:4", + "type": "" + }, { "name": "pos", "nodeType": "YulTypedName", - "src": "3312:3:4", + "src": "2144:3:4", "type": "" } ], @@ -3332,48 +4504,48 @@ { "name": "end", "nodeType": "YulTypedName", - "src": "3320:3:4", + "src": "2152:3:4", "type": "" } ], - "src": "3178:366:4" + "src": "2064:364:4" }, { "body": { "nodeType": "YulBlock", - "src": "3696:220:4", + "src": "2580:220:4", "statements": [ { "nodeType": "YulAssignment", - "src": "3706:74:4", + "src": "2590:74:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3772:3:4" + "src": "2656:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "3777:2:4", + "src": "2661:2:4", "type": "", - "value": "40" + "value": "35" } ], "functionName": { "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "3713:58:4" + "src": "2597:58:4" }, "nodeType": "YulFunctionCall", - "src": "3713:67:4" + "src": "2597:67:4" }, "variableNames": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3706:3:4" + "src": "2590:3:4" } ] }, @@ -3383,34 +4555,34 @@ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3878:3:4" + "src": "2762:3:4" } ], "functionName": { - "name": "store_literal_in_memory_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "name": "store_literal_in_memory_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", "nodeType": "YulIdentifier", - "src": "3789:88:4" + "src": "2673:88:4" }, "nodeType": "YulFunctionCall", - "src": "3789:93:4" + "src": "2673:93:4" }, "nodeType": "YulExpressionStatement", - "src": "3789:93:4" + "src": "2673:93:4" }, { "nodeType": "YulAssignment", - "src": "3891:19:4", + "src": "2775:19:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "3902:3:4" + "src": "2786:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "3907:2:4", + "src": "2791:2:4", "type": "", "value": "64" } @@ -3418,28 +4590,28 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "3898:3:4" + "src": "2782:3:4" }, "nodeType": "YulFunctionCall", - "src": "3898:12:4" + "src": "2782:12:4" }, "variableNames": [ { "name": "end", "nodeType": "YulIdentifier", - "src": "3891:3:4" + "src": "2775:3:4" } ] } ] }, - "name": "abi_encode_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330_to_t_string_memory_ptr_fromStack", + "name": "abi_encode_t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1_to_t_string_memory_ptr_fromStack", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "pos", "nodeType": "YulTypedName", - "src": "3684:3:4", + "src": "2568:3:4", "type": "" } ], @@ -3447,48 +4619,48 @@ { "name": "end", "nodeType": "YulTypedName", - "src": "3692:3:4", + "src": "2576:3:4", "type": "" } ], - "src": "3550:366:4" + "src": "2434:366:4" }, { "body": { "nodeType": "YulBlock", - "src": "4068:220:4", + "src": "2952:220:4", "statements": [ { "nodeType": "YulAssignment", - "src": "4078:74:4", + "src": "2962:74:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4144:3:4" + "src": "3028:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "4149:2:4", + "src": "3033:2:4", "type": "", - "value": "37" + "value": "34" } ], "functionName": { "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "4085:58:4" + "src": "2969:58:4" }, "nodeType": "YulFunctionCall", - "src": "4085:67:4" + "src": "2969:67:4" }, "variableNames": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4078:3:4" + "src": "2962:3:4" } ] }, @@ -3498,34 +4670,34 @@ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4250:3:4" + "src": "3134:3:4" } ], "functionName": { - "name": "store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "name": "store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", "nodeType": "YulIdentifier", - "src": "4161:88:4" + "src": "3045:88:4" }, "nodeType": "YulFunctionCall", - "src": "4161:93:4" + "src": "3045:93:4" }, "nodeType": "YulExpressionStatement", - "src": "4161:93:4" + "src": "3045:93:4" }, { "nodeType": "YulAssignment", - "src": "4263:19:4", + "src": "3147:19:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4274:3:4" + "src": "3158:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "4279:2:4", + "src": "3163:2:4", "type": "", "value": "64" } @@ -3533,28 +4705,28 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "4270:3:4" + "src": "3154:3:4" }, "nodeType": "YulFunctionCall", - "src": "4270:12:4" + "src": "3154:12:4" }, "variableNames": [ { "name": "end", "nodeType": "YulIdentifier", - "src": "4263:3:4" + "src": "3147:3:4" } ] } ] }, - "name": "abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack", + "name": "abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "pos", "nodeType": "YulTypedName", - "src": "4056:3:4", + "src": "2940:3:4", "type": "" } ], @@ -3562,31 +4734,31 @@ { "name": "end", "nodeType": "YulTypedName", - "src": "4064:3:4", + "src": "2948:3:4", "type": "" } ], - "src": "3922:366:4" + "src": "2806:366:4" }, { "body": { "nodeType": "YulBlock", - "src": "4440:220:4", + "src": "3324:220:4", "statements": [ { "nodeType": "YulAssignment", - "src": "4450:74:4", + "src": "3334:74:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4516:3:4" + "src": "3400:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "4521:2:4", + "src": "3405:2:4", "type": "", "value": "36" } @@ -3594,16 +4766,16 @@ "functionName": { "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "4457:58:4" + "src": "3341:58:4" }, "nodeType": "YulFunctionCall", - "src": "4457:67:4" + "src": "3341:67:4" }, "variableNames": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4450:3:4" + "src": "3334:3:4" } ] }, @@ -3613,34 +4785,34 @@ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4622:3:4" + "src": "3506:3:4" } ], "functionName": { "name": "store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", "nodeType": "YulIdentifier", - "src": "4533:88:4" + "src": "3417:88:4" }, "nodeType": "YulFunctionCall", - "src": "4533:93:4" + "src": "3417:93:4" }, "nodeType": "YulExpressionStatement", - "src": "4533:93:4" + "src": "3417:93:4" }, { "nodeType": "YulAssignment", - "src": "4635:19:4", + "src": "3519:19:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4646:3:4" + "src": "3530:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "4651:2:4", + "src": "3535:2:4", "type": "", "value": "64" } @@ -3648,16 +4820,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "4642:3:4" + "src": "3526:3:4" }, "nodeType": "YulFunctionCall", - "src": "4642:12:4" + "src": "3526:12:4" }, "variableNames": [ { "name": "end", "nodeType": "YulIdentifier", - "src": "4635:3:4" + "src": "3519:3:4" } ] } @@ -3669,7 +4841,7 @@ { "name": "pos", "nodeType": "YulTypedName", - "src": "4428:3:4", + "src": "3312:3:4", "type": "" } ], @@ -3677,31 +4849,31 @@ { "name": "end", "nodeType": "YulTypedName", - "src": "4436:3:4", + "src": "3320:3:4", "type": "" } ], - "src": "4294:366:4" + "src": "3178:366:4" }, { "body": { "nodeType": "YulBlock", - "src": "4812:220:4", + "src": "3696:220:4", "statements": [ { "nodeType": "YulAssignment", - "src": "4822:74:4", + "src": "3706:74:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4888:3:4" + "src": "3772:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "4893:2:4", + "src": "3777:2:4", "type": "", "value": "37" } @@ -3709,16 +4881,16 @@ "functionName": { "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "4829:58:4" + "src": "3713:58:4" }, "nodeType": "YulFunctionCall", - "src": "4829:67:4" + "src": "3713:67:4" }, "variableNames": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4822:3:4" + "src": "3706:3:4" } ] }, @@ -3728,34 +4900,34 @@ { "name": "pos", "nodeType": "YulIdentifier", - "src": "4994:3:4" + "src": "3878:3:4" } ], "functionName": { "name": "store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", "nodeType": "YulIdentifier", - "src": "4905:88:4" + "src": "3789:88:4" }, "nodeType": "YulFunctionCall", - "src": "4905:93:4" + "src": "3789:93:4" }, "nodeType": "YulExpressionStatement", - "src": "4905:93:4" + "src": "3789:93:4" }, { "nodeType": "YulAssignment", - "src": "5007:19:4", + "src": "3891:19:4", "value": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", - "src": "5018:3:4" + "src": "3902:3:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "5023:2:4", + "src": "3907:2:4", "type": "", "value": "64" } @@ -3763,16 +4935,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "5014:3:4" + "src": "3898:3:4" }, "nodeType": "YulFunctionCall", - "src": "5014:12:4" + "src": "3898:12:4" }, "variableNames": [ { "name": "end", "nodeType": "YulIdentifier", - "src": "5007:3:4" + "src": "3891:3:4" } ] } @@ -3784,7 +4956,7 @@ { "name": "pos", "nodeType": "YulTypedName", - "src": "4800:3:4", + "src": "3684:3:4", "type": "" } ], @@ -3792,16 +4964,16 @@ { "name": "end", "nodeType": "YulTypedName", - "src": "4808:3:4", + "src": "3692:3:4", "type": "" } ], - "src": "4666:366:4" + "src": "3550:366:4" }, { "body": { "nodeType": "YulBlock", - "src": "5103:53:4", + "src": "3987:53:4", "statements": [ { "expression": { @@ -3809,35 +4981,35 @@ { "name": "pos", "nodeType": "YulIdentifier", - "src": "5120:3:4" + "src": "4004:3:4" }, { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", - "src": "5143:5:4" + "src": "4027:5:4" } ], "functionName": { "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "5125:17:4" + "src": "4009:17:4" }, "nodeType": "YulFunctionCall", - "src": "5125:24:4" + "src": "4009:24:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "5113:6:4" + "src": "3997:6:4" }, "nodeType": "YulFunctionCall", - "src": "5113:37:4" + "src": "3997:37:4" }, "nodeType": "YulExpressionStatement", - "src": "5113:37:4" + "src": "3997:37:4" } ] }, @@ -3847,22 +5019,22 @@ { "name": "value", "nodeType": "YulTypedName", - "src": "5091:5:4", + "src": "3975:5:4", "type": "" }, { "name": "pos", "nodeType": "YulTypedName", - "src": "5098:3:4", + "src": "3982:3:4", "type": "" } ], - "src": "5038:118:4" + "src": "3922:118:4" }, { "body": { "nodeType": "YulBlock", - "src": "5223:51:4", + "src": "4107:51:4", "statements": [ { "expression": { @@ -3870,35 +5042,35 @@ { "name": "pos", "nodeType": "YulIdentifier", - "src": "5240:3:4" + "src": "4124:3:4" }, { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", - "src": "5261:5:4" + "src": "4145:5:4" } ], "functionName": { "name": "cleanup_t_uint8", "nodeType": "YulIdentifier", - "src": "5245:15:4" + "src": "4129:15:4" }, "nodeType": "YulFunctionCall", - "src": "5245:22:4" + "src": "4129:22:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "5233:6:4" + "src": "4117:6:4" }, "nodeType": "YulFunctionCall", - "src": "5233:35:4" + "src": "4117:35:4" }, "nodeType": "YulExpressionStatement", - "src": "5233:35:4" + "src": "4117:35:4" } ] }, @@ -3908,37 +5080,37 @@ { "name": "value", "nodeType": "YulTypedName", - "src": "5211:5:4", + "src": "4095:5:4", "type": "" }, { "name": "pos", "nodeType": "YulTypedName", - "src": "5218:3:4", + "src": "4102:3:4", "type": "" } ], - "src": "5162:112:4" + "src": "4046:112:4" }, { "body": { "nodeType": "YulBlock", - "src": "5372:118:4", + "src": "4256:118:4", "statements": [ { "nodeType": "YulAssignment", - "src": "5382:26:4", + "src": "4266:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "5394:9:4" + "src": "4278:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "5405:2:4", + "src": "4289:2:4", "type": "", "value": "32" } @@ -3946,16 +5118,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "5390:3:4" + "src": "4274:3:4" }, "nodeType": "YulFunctionCall", - "src": "5390:18:4" + "src": "4274:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "5382:4:4" + "src": "4266:4:4" } ] }, @@ -3965,19 +5137,19 @@ { "name": "value0", "nodeType": "YulIdentifier", - "src": "5456:6:4" + "src": "4340:6:4" }, { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "5469:9:4" + "src": "4353:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "5480:1:4", + "src": "4364:1:4", "type": "", "value": "0" } @@ -3985,22 +5157,22 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "5465:3:4" + "src": "4349:3:4" }, "nodeType": "YulFunctionCall", - "src": "5465:17:4" + "src": "4349:17:4" } ], "functionName": { "name": "abi_encode_t_bool_to_t_bool_fromStack", "nodeType": "YulIdentifier", - "src": "5418:37:4" + "src": "4302:37:4" }, "nodeType": "YulFunctionCall", - "src": "5418:65:4" + "src": "4302:65:4" }, "nodeType": "YulExpressionStatement", - "src": "5418:65:4" + "src": "4302:65:4" } ] }, @@ -4010,13 +5182,13 @@ { "name": "headStart", "nodeType": "YulTypedName", - "src": "5344:9:4", + "src": "4228:9:4", "type": "" }, { "name": "value0", "nodeType": "YulTypedName", - "src": "5356:6:4", + "src": "4240:6:4", "type": "" } ], @@ -4024,31 +5196,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "5367:4:4", + "src": "4251:4:4", "type": "" } ], - "src": "5280:210:4" + "src": "4164:210:4" }, { "body": { "nodeType": "YulBlock", - "src": "5614:195:4", + "src": "4498:195:4", "statements": [ { "nodeType": "YulAssignment", - "src": "5624:26:4", + "src": "4508:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "5636:9:4" + "src": "4520:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "5647:2:4", + "src": "4531:2:4", "type": "", "value": "32" } @@ -4056,16 +5228,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "5632:3:4" + "src": "4516:3:4" }, "nodeType": "YulFunctionCall", - "src": "5632:18:4" + "src": "4516:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "5624:4:4" + "src": "4508:4:4" } ] }, @@ -4077,12 +5249,12 @@ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "5671:9:4" + "src": "4555:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "5682:1:4", + "src": "4566:1:4", "type": "", "value": "0" } @@ -4090,73 +5262,73 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "5667:3:4" + "src": "4551:3:4" }, "nodeType": "YulFunctionCall", - "src": "5667:17:4" + "src": "4551:17:4" }, { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "5690:4:4" + "src": "4574:4:4" }, { "name": "headStart", "nodeType": "YulIdentifier", - "src": "5696:9:4" + "src": "4580:9:4" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", - "src": "5686:3:4" + "src": "4570:3:4" }, "nodeType": "YulFunctionCall", - "src": "5686:20:4" + "src": "4570:20:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "5660:6:4" + "src": "4544:6:4" }, "nodeType": "YulFunctionCall", - "src": "5660:47:4" + "src": "4544:47:4" }, "nodeType": "YulExpressionStatement", - "src": "5660:47:4" + "src": "4544:47:4" }, { "nodeType": "YulAssignment", - "src": "5716:86:4", + "src": "4600:86:4", "value": { "arguments": [ { "name": "value0", "nodeType": "YulIdentifier", - "src": "5788:6:4" + "src": "4672:6:4" }, { "name": "tail", "nodeType": "YulIdentifier", - "src": "5797:4:4" + "src": "4681:4:4" } ], "functionName": { "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "5724:63:4" + "src": "4608:63:4" }, "nodeType": "YulFunctionCall", - "src": "5724:78:4" + "src": "4608:78:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "5716:4:4" + "src": "4600:4:4" } ] } @@ -4168,13 +5340,13 @@ { "name": "headStart", "nodeType": "YulTypedName", - "src": "5586:9:4", + "src": "4470:9:4", "type": "" }, { "name": "value0", "nodeType": "YulTypedName", - "src": "5598:6:4", + "src": "4482:6:4", "type": "" } ], @@ -4182,31 +5354,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "5609:4:4", + "src": "4493:4:4", "type": "" } ], - "src": "5496:313:4" + "src": "4380:313:4" }, { "body": { "nodeType": "YulBlock", - "src": "5986:248:4", + "src": "4870:248:4", "statements": [ { "nodeType": "YulAssignment", - "src": "5996:26:4", + "src": "4880:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6008:9:4" + "src": "4892:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "6019:2:4", + "src": "4903:2:4", "type": "", "value": "32" } @@ -4214,16 +5386,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "6004:3:4" + "src": "4888:3:4" }, "nodeType": "YulFunctionCall", - "src": "6004:18:4" + "src": "4888:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "5996:4:4" + "src": "4880:4:4" } ] }, @@ -4235,12 +5407,12 @@ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6043:9:4" + "src": "4927:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "6054:1:4", + "src": "4938:1:4", "type": "", "value": "0" } @@ -4248,80 +5420,80 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "6039:3:4" + "src": "4923:3:4" }, "nodeType": "YulFunctionCall", - "src": "6039:17:4" + "src": "4923:17:4" }, { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6062:4:4" + "src": "4946:4:4" }, { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6068:9:4" + "src": "4952:9:4" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", - "src": "6058:3:4" + "src": "4942:3:4" }, "nodeType": "YulFunctionCall", - "src": "6058:20:4" + "src": "4942:20:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "6032:6:4" + "src": "4916:6:4" }, "nodeType": "YulFunctionCall", - "src": "6032:47:4" + "src": "4916:47:4" }, "nodeType": "YulExpressionStatement", - "src": "6032:47:4" + "src": "4916:47:4" }, { "nodeType": "YulAssignment", - "src": "6088:139:4", + "src": "4972:139:4", "value": { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6222:4:4" + "src": "5106:4:4" } ], "functionName": { - "name": "abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack", + "name": "abi_encode_t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1_to_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "6096:124:4" + "src": "4980:124:4" }, "nodeType": "YulFunctionCall", - "src": "6096:131:4" + "src": "4980:131:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6088:4:4" + "src": "4972:4:4" } ] } ] }, - "name": "abi_encode_tuple_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f__to_t_string_memory_ptr__fromStack_reversed", + "name": "abi_encode_tuple_t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1__to_t_string_memory_ptr__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", - "src": "5966:9:4", + "src": "4850:9:4", "type": "" } ], @@ -4329,31 +5501,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "5981:4:4", + "src": "4865:4:4", "type": "" } ], - "src": "5815:419:4" + "src": "4699:419:4" }, { "body": { "nodeType": "YulBlock", - "src": "6411:248:4", + "src": "5295:248:4", "statements": [ { "nodeType": "YulAssignment", - "src": "6421:26:4", + "src": "5305:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6433:9:4" + "src": "5317:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "6444:2:4", + "src": "5328:2:4", "type": "", "value": "32" } @@ -4361,16 +5533,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "6429:3:4" + "src": "5313:3:4" }, "nodeType": "YulFunctionCall", - "src": "6429:18:4" + "src": "5313:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6421:4:4" + "src": "5305:4:4" } ] }, @@ -4382,12 +5554,12 @@ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6468:9:4" + "src": "5352:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "6479:1:4", + "src": "5363:1:4", "type": "", "value": "0" } @@ -4395,68 +5567,68 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "6464:3:4" + "src": "5348:3:4" }, "nodeType": "YulFunctionCall", - "src": "6464:17:4" + "src": "5348:17:4" }, { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6487:4:4" + "src": "5371:4:4" }, { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6493:9:4" + "src": "5377:9:4" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", - "src": "6483:3:4" + "src": "5367:3:4" }, "nodeType": "YulFunctionCall", - "src": "6483:20:4" + "src": "5367:20:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "6457:6:4" + "src": "5341:6:4" }, "nodeType": "YulFunctionCall", - "src": "6457:47:4" + "src": "5341:47:4" }, "nodeType": "YulExpressionStatement", - "src": "6457:47:4" + "src": "5341:47:4" }, { "nodeType": "YulAssignment", - "src": "6513:139:4", + "src": "5397:139:4", "value": { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6647:4:4" + "src": "5531:4:4" } ], "functionName": { "name": "abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "6521:124:4" + "src": "5405:124:4" }, "nodeType": "YulFunctionCall", - "src": "6521:131:4" + "src": "5405:131:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6513:4:4" + "src": "5397:4:4" } ] } @@ -4468,7 +5640,7 @@ { "name": "headStart", "nodeType": "YulTypedName", - "src": "6391:9:4", + "src": "5275:9:4", "type": "" } ], @@ -4476,31 +5648,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "6406:4:4", + "src": "5290:4:4", "type": "" } ], - "src": "6240:419:4" + "src": "5124:419:4" }, { "body": { "nodeType": "YulBlock", - "src": "6836:248:4", + "src": "5720:248:4", "statements": [ { "nodeType": "YulAssignment", - "src": "6846:26:4", + "src": "5730:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6858:9:4" + "src": "5742:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "6869:2:4", + "src": "5753:2:4", "type": "", "value": "32" } @@ -4508,16 +5680,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "6854:3:4" + "src": "5738:3:4" }, "nodeType": "YulFunctionCall", - "src": "6854:18:4" + "src": "5738:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6846:4:4" + "src": "5730:4:4" } ] }, @@ -4529,12 +5701,12 @@ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6893:9:4" + "src": "5777:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "6904:1:4", + "src": "5788:1:4", "type": "", "value": "0" } @@ -4542,80 +5714,80 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "6889:3:4" + "src": "5773:3:4" }, "nodeType": "YulFunctionCall", - "src": "6889:17:4" + "src": "5773:17:4" }, { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6912:4:4" + "src": "5796:4:4" }, { "name": "headStart", "nodeType": "YulIdentifier", - "src": "6918:9:4" + "src": "5802:9:4" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", - "src": "6908:3:4" + "src": "5792:3:4" }, "nodeType": "YulFunctionCall", - "src": "6908:20:4" + "src": "5792:20:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "6882:6:4" + "src": "5766:6:4" }, "nodeType": "YulFunctionCall", - "src": "6882:47:4" + "src": "5766:47:4" }, "nodeType": "YulExpressionStatement", - "src": "6882:47:4" + "src": "5766:47:4" }, { "nodeType": "YulAssignment", - "src": "6938:139:4", + "src": "5822:139:4", "value": { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "7072:4:4" + "src": "5956:4:4" } ], "functionName": { - "name": "abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack", + "name": "abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "6946:124:4" + "src": "5830:124:4" }, "nodeType": "YulFunctionCall", - "src": "6946:131:4" + "src": "5830:131:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "6938:4:4" + "src": "5822:4:4" } ] } ] }, - "name": "abi_encode_tuple_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6__to_t_string_memory_ptr__fromStack_reversed", + "name": "abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", - "src": "6816:9:4", + "src": "5700:9:4", "type": "" } ], @@ -4623,31 +5795,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "6831:4:4", + "src": "5715:4:4", "type": "" } ], - "src": "6665:419:4" + "src": "5549:419:4" }, { "body": { "nodeType": "YulBlock", - "src": "7261:248:4", + "src": "6145:248:4", "statements": [ { "nodeType": "YulAssignment", - "src": "7271:26:4", + "src": "6155:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "7283:9:4" + "src": "6167:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "7294:2:4", + "src": "6178:2:4", "type": "", "value": "32" } @@ -4655,16 +5827,16 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "7279:3:4" + "src": "6163:3:4" }, "nodeType": "YulFunctionCall", - "src": "7279:18:4" + "src": "6163:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "7271:4:4" + "src": "6155:4:4" } ] }, @@ -4676,12 +5848,12 @@ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "7318:9:4" + "src": "6202:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "7329:1:4", + "src": "6213:1:4", "type": "", "value": "0" } @@ -4689,80 +5861,80 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "7314:3:4" + "src": "6198:3:4" }, "nodeType": "YulFunctionCall", - "src": "7314:17:4" + "src": "6198:17:4" }, { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "7337:4:4" + "src": "6221:4:4" }, { "name": "headStart", "nodeType": "YulIdentifier", - "src": "7343:9:4" + "src": "6227:9:4" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", - "src": "7333:3:4" + "src": "6217:3:4" }, "nodeType": "YulFunctionCall", - "src": "7333:20:4" + "src": "6217:20:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "7307:6:4" + "src": "6191:6:4" }, "nodeType": "YulFunctionCall", - "src": "7307:47:4" + "src": "6191:47:4" }, "nodeType": "YulExpressionStatement", - "src": "7307:47:4" + "src": "6191:47:4" }, { "nodeType": "YulAssignment", - "src": "7363:139:4", + "src": "6247:139:4", "value": { "arguments": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "7497:4:4" + "src": "6381:4:4" } ], "functionName": { - "name": "abi_encode_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330_to_t_string_memory_ptr_fromStack", + "name": "abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack", "nodeType": "YulIdentifier", - "src": "7371:124:4" + "src": "6255:124:4" }, "nodeType": "YulFunctionCall", - "src": "7371:131:4" + "src": "6255:131:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "7363:4:4" + "src": "6247:4:4" } ] } ] }, - "name": "abi_encode_tuple_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330__to_t_string_memory_ptr__fromStack_reversed", + "name": "abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", - "src": "7241:9:4", + "src": "6125:9:4", "type": "" } ], @@ -4770,31 +5942,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "7256:4:4", + "src": "6140:4:4", "type": "" } ], - "src": "7090:419:4" + "src": "5974:419:4" }, { "body": { "nodeType": "YulBlock", - "src": "7686:248:4", + "src": "6497:124:4", "statements": [ { "nodeType": "YulAssignment", - "src": "7696:26:4", + "src": "6507:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "7708:9:4" + "src": "6519:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "7719:2:4", + "src": "6530:2:4", "type": "", "value": "32" } @@ -4802,33 +5974,38 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "7704:3:4" + "src": "6515:3:4" }, "nodeType": "YulFunctionCall", - "src": "7704:18:4" + "src": "6515:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "7696:4:4" + "src": "6507:4:4" } ] }, { "expression": { "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "6587:6:4" + }, { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "7743:9:4" + "src": "6600:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "7754:1:4", + "src": "6611:1:4", "type": "", "value": "0" } @@ -4836,80 +6013,38 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "7739:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "7739:17:4" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7762:4:4" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "7768:9:4" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "7758:3:4" + "src": "6596:3:4" }, "nodeType": "YulFunctionCall", - "src": "7758:20:4" + "src": "6596:17:4" } ], "functionName": { - "name": "mstore", + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", "nodeType": "YulIdentifier", - "src": "7732:6:4" + "src": "6543:43:4" }, "nodeType": "YulFunctionCall", - "src": "7732:47:4" + "src": "6543:71:4" }, "nodeType": "YulExpressionStatement", - "src": "7732:47:4" - }, - { - "nodeType": "YulAssignment", - "src": "7788:139:4", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7922:4:4" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "7796:124:4" - }, - "nodeType": "YulFunctionCall", - "src": "7796:131:4" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "7788:4:4" - } - ] + "src": "6543:71:4" } ] }, - "name": "abi_encode_tuple_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea__to_t_string_memory_ptr__fromStack_reversed", + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", - "src": "7666:9:4", + "src": "6469:9:4", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "6481:6:4", "type": "" } ], @@ -4917,31 +6052,31 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "7681:4:4", + "src": "6492:4:4", "type": "" } ], - "src": "7515:419:4" + "src": "6399:222:4" }, { "body": { "nodeType": "YulBlock", - "src": "8111:248:4", + "src": "6721:120:4", "statements": [ { "nodeType": "YulAssignment", - "src": "8121:26:4", + "src": "6731:26:4", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "8133:9:4" + "src": "6743:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "8144:2:4", + "src": "6754:2:4", "type": "", "value": "32" } @@ -4949,33 +6084,38 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "8129:3:4" + "src": "6739:3:4" }, "nodeType": "YulFunctionCall", - "src": "8129:18:4" + "src": "6739:18:4" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", - "src": "8121:4:4" + "src": "6731:4:4" } ] }, { "expression": { "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "6807:6:4" + }, { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", - "src": "8168:9:4" + "src": "6820:9:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "8179:1:4", + "src": "6831:1:4", "type": "", "value": "0" } @@ -4983,80 +6123,38 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "8164:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "8164:17:4" - }, - { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "8187:4:4" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8193:9:4" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "8183:3:4" + "src": "6816:3:4" }, "nodeType": "YulFunctionCall", - "src": "8183:20:4" + "src": "6816:17:4" } ], "functionName": { - "name": "mstore", + "name": "abi_encode_t_uint8_to_t_uint8_fromStack", "nodeType": "YulIdentifier", - "src": "8157:6:4" + "src": "6767:39:4" }, "nodeType": "YulFunctionCall", - "src": "8157:47:4" + "src": "6767:67:4" }, "nodeType": "YulExpressionStatement", - "src": "8157:47:4" - }, - { - "nodeType": "YulAssignment", - "src": "8213:139:4", - "value": { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "8347:4:4" - } - ], - "functionName": { - "name": "abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack", - "nodeType": "YulIdentifier", - "src": "8221:124:4" - }, - "nodeType": "YulFunctionCall", - "src": "8221:131:4" - }, - "variableNames": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "8213:4:4" - } - ] + "src": "6767:67:4" } ] }, - "name": "abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed", + "name": "abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", - "src": "8091:9:4", + "src": "6693:9:4", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "6705:6:4", "type": "" } ], @@ -5064,1932 +6162,1892 @@ { "name": "tail", "nodeType": "YulTypedName", - "src": "8106:4:4", + "src": "6716:4:4", "type": "" } ], - "src": "7940:419:4" + "src": "6627:214:4" }, { "body": { "nodeType": "YulBlock", - "src": "8536:248:4", + "src": "6906:40:4", "statements": [ { "nodeType": "YulAssignment", - "src": "8546:26:4", + "src": "6917:22:4", "value": { "arguments": [ { - "name": "headStart", + "name": "value", "nodeType": "YulIdentifier", - "src": "8558:9:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8569:2:4", - "type": "", - "value": "32" + "src": "6933:5:4" } ], "functionName": { - "name": "add", + "name": "mload", "nodeType": "YulIdentifier", - "src": "8554:3:4" + "src": "6927:5:4" }, "nodeType": "YulFunctionCall", - "src": "8554:18:4" + "src": "6927:12:4" }, "variableNames": [ { - "name": "tail", + "name": "length", "nodeType": "YulIdentifier", - "src": "8546:4:4" + "src": "6917:6:4" } ] - }, + } + ] + }, + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "6889:5:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "6899:6:4", + "type": "" + } + ], + "src": "6847:99:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7048:73:4", + "statements": [ { "expression": { "arguments": [ { - "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8593:9:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8604:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "8589:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "8589:17:4" + "name": "pos", + "nodeType": "YulIdentifier", + "src": "7065:3:4" }, { - "arguments": [ - { - "name": "tail", - "nodeType": "YulIdentifier", - "src": "8612:4:4" - }, - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8618:9:4" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "8608:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "8608:20:4" + "name": "length", + "nodeType": "YulIdentifier", + "src": "7070:6:4" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "8582:6:4" + "src": "7058:6:4" }, "nodeType": "YulFunctionCall", - "src": "8582:47:4" + "src": "7058:19:4" }, "nodeType": "YulExpressionStatement", - "src": "8582:47:4" + "src": "7058:19:4" }, { "nodeType": "YulAssignment", - "src": "8638:139:4", + "src": "7086:29:4", "value": { "arguments": [ { - "name": "tail", + "name": "pos", "nodeType": "YulIdentifier", - "src": "8772:4:4" + "src": "7105:3:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7110:4:4", + "type": "", + "value": "0x20" } ], "functionName": { - "name": "abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack", + "name": "add", "nodeType": "YulIdentifier", - "src": "8646:124:4" + "src": "7101:3:4" }, "nodeType": "YulFunctionCall", - "src": "8646:131:4" + "src": "7101:14:4" }, "variableNames": [ { - "name": "tail", + "name": "updated_pos", "nodeType": "YulIdentifier", - "src": "8638:4:4" + "src": "7086:11:4" } ] } ] }, - "name": "abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed", + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "headStart", + "name": "pos", "nodeType": "YulTypedName", - "src": "8516:9:4", + "src": "7020:3:4", "type": "" - } - ], - "returnVariables": [ + }, { - "name": "tail", + "name": "length", "nodeType": "YulTypedName", - "src": "8531:4:4", + "src": "7025:6:4", "type": "" } ], - "src": "8365:419:4" + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "7036:11:4", + "type": "" + } + ], + "src": "6952:169:4" }, { "body": { "nodeType": "YulBlock", - "src": "8888:124:4", + "src": "7171:261:4", "statements": [ { "nodeType": "YulAssignment", - "src": "8898:26:4", + "src": "7181:25:4", "value": { "arguments": [ { - "name": "headStart", + "name": "x", "nodeType": "YulIdentifier", - "src": "8910:9:4" - }, + "src": "7204:1:4" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "7186:17:4" + }, + "nodeType": "YulFunctionCall", + "src": "7186:20:4" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "7181:1:4" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "7215:25:4", + "value": { + "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "8921:2:4", - "type": "", - "value": "32" + "name": "y", + "nodeType": "YulIdentifier", + "src": "7238:1:4" } ], "functionName": { - "name": "add", + "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "8906:3:4" + "src": "7220:17:4" }, "nodeType": "YulFunctionCall", - "src": "8906:18:4" + "src": "7220:20:4" }, "variableNames": [ { - "name": "tail", + "name": "y", "nodeType": "YulIdentifier", - "src": "8898:4:4" + "src": "7215:1:4" } ] }, { - "expression": { + "body": { + "nodeType": "YulBlock", + "src": "7378:22:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "7380:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "7380:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "7380:18:4" + } + ] + }, + "condition": { "arguments": [ { - "name": "value0", + "name": "x", "nodeType": "YulIdentifier", - "src": "8978:6:4" + "src": "7299:1:4" }, { "arguments": [ - { - "name": "headStart", - "nodeType": "YulIdentifier", - "src": "8991:9:4" - }, { "kind": "number", "nodeType": "YulLiteral", - "src": "9002:1:4", + "src": "7306:66:4", "type": "", - "value": "0" + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "7374:1:4" } ], "functionName": { - "name": "add", + "name": "sub", "nodeType": "YulIdentifier", - "src": "8987:3:4" + "src": "7302:3:4" }, "nodeType": "YulFunctionCall", - "src": "8987:17:4" + "src": "7302:74:4" } ], "functionName": { - "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "name": "gt", "nodeType": "YulIdentifier", - "src": "8934:43:4" + "src": "7296:2:4" }, "nodeType": "YulFunctionCall", - "src": "8934:71:4" + "src": "7296:81:4" }, - "nodeType": "YulExpressionStatement", - "src": "8934:71:4" + "nodeType": "YulIf", + "src": "7293:2:4" + }, + { + "nodeType": "YulAssignment", + "src": "7410:16:4", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "7421:1:4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "7424:1:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7417:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "7417:9:4" + }, + "variableNames": [ + { + "name": "sum", + "nodeType": "YulIdentifier", + "src": "7410:3:4" + } + ] } ] }, - "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "name": "checked_add_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "headStart", + "name": "x", "nodeType": "YulTypedName", - "src": "8860:9:4", + "src": "7158:1:4", "type": "" }, { - "name": "value0", + "name": "y", "nodeType": "YulTypedName", - "src": "8872:6:4", + "src": "7161:1:4", "type": "" } ], "returnVariables": [ { - "name": "tail", + "name": "sum", "nodeType": "YulTypedName", - "src": "8883:4:4", + "src": "7167:3:4", "type": "" } ], - "src": "8790:222:4" + "src": "7127:305:4" }, { "body": { "nodeType": "YulBlock", - "src": "9112:120:4", + "src": "7483:146:4", "statements": [ { "nodeType": "YulAssignment", - "src": "9122:26:4", + "src": "7493:25:4", "value": { "arguments": [ { - "name": "headStart", + "name": "x", "nodeType": "YulIdentifier", - "src": "9134:9:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9145:2:4", - "type": "", - "value": "32" + "src": "7516:1:4" } ], "functionName": { - "name": "add", + "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", - "src": "9130:3:4" + "src": "7498:17:4" }, "nodeType": "YulFunctionCall", - "src": "9130:18:4" + "src": "7498:20:4" }, "variableNames": [ { - "name": "tail", + "name": "x", "nodeType": "YulIdentifier", - "src": "9122:4:4" + "src": "7493:1:4" } ] }, { - "expression": { + "nodeType": "YulAssignment", + "src": "7527:25:4", + "value": { "arguments": [ { - "name": "value0", + "name": "y", "nodeType": "YulIdentifier", - "src": "9198:6:4" - }, + "src": "7550:1:4" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "7532:17:4" + }, + "nodeType": "YulFunctionCall", + "src": "7532:20:4" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "7527:1:4" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7574:22:4", + "statements": [ { - "arguments": [ - { - "name": "headStart", + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", "nodeType": "YulIdentifier", - "src": "9211:9:4" + "src": "7576:16:4" }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9222:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9207:3:4" + "nodeType": "YulFunctionCall", + "src": "7576:18:4" }, - "nodeType": "YulFunctionCall", - "src": "9207:17:4" + "nodeType": "YulExpressionStatement", + "src": "7576:18:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "7568:1:4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "7571:1:4" } ], "functionName": { - "name": "abi_encode_t_uint8_to_t_uint8_fromStack", + "name": "lt", "nodeType": "YulIdentifier", - "src": "9158:39:4" + "src": "7565:2:4" }, "nodeType": "YulFunctionCall", - "src": "9158:67:4" + "src": "7565:8:4" }, - "nodeType": "YulExpressionStatement", - "src": "9158:67:4" + "nodeType": "YulIf", + "src": "7562:2:4" + }, + { + "nodeType": "YulAssignment", + "src": "7606:17:4", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "7618:1:4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "7621:1:4" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "7614:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "7614:9:4" + }, + "variableNames": [ + { + "name": "diff", + "nodeType": "YulIdentifier", + "src": "7606:4:4" + } + ] } ] }, - "name": "abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed", + "name": "checked_sub_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "headStart", + "name": "x", "nodeType": "YulTypedName", - "src": "9084:9:4", + "src": "7469:1:4", "type": "" }, { - "name": "value0", + "name": "y", "nodeType": "YulTypedName", - "src": "9096:6:4", + "src": "7472:1:4", "type": "" } ], "returnVariables": [ { - "name": "tail", + "name": "diff", "nodeType": "YulTypedName", - "src": "9107:4:4", + "src": "7478:4:4", "type": "" } ], - "src": "9018:214:4" + "src": "7438:191:4" }, { "body": { "nodeType": "YulBlock", - "src": "9297:40:4", + "src": "7680:51:4", "statements": [ { "nodeType": "YulAssignment", - "src": "9308:22:4", + "src": "7690:35:4", "value": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", - "src": "9324:5:4" + "src": "7719:5:4" } ], "functionName": { - "name": "mload", + "name": "cleanup_t_uint160", "nodeType": "YulIdentifier", - "src": "9318:5:4" + "src": "7701:17:4" }, "nodeType": "YulFunctionCall", - "src": "9318:12:4" + "src": "7701:24:4" }, "variableNames": [ { - "name": "length", + "name": "cleaned", "nodeType": "YulIdentifier", - "src": "9308:6:4" + "src": "7690:7:4" } ] } ] }, - "name": "array_length_t_string_memory_ptr", + "name": "cleanup_t_address", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", - "src": "9280:5:4", + "src": "7662:5:4", "type": "" } ], "returnVariables": [ { - "name": "length", + "name": "cleaned", "nodeType": "YulTypedName", - "src": "9290:6:4", + "src": "7672:7:4", "type": "" } ], - "src": "9238:99:4" + "src": "7635:96:4" }, { "body": { "nodeType": "YulBlock", - "src": "9439:73:4", + "src": "7779:48:4", "statements": [ { - "expression": { + "nodeType": "YulAssignment", + "src": "7789:32:4", + "value": { "arguments": [ { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "9456:3:4" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "9461:6:4" + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "7814:5:4" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "7807:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "7807:13:4" } ], "functionName": { - "name": "mstore", + "name": "iszero", "nodeType": "YulIdentifier", - "src": "9449:6:4" + "src": "7800:6:4" }, "nodeType": "YulFunctionCall", - "src": "9449:19:4" - }, - "nodeType": "YulExpressionStatement", - "src": "9449:19:4" - }, - { - "nodeType": "YulAssignment", - "src": "9477:29:4", - "value": { - "arguments": [ - { - "name": "pos", - "nodeType": "YulIdentifier", - "src": "9496:3:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9501:4:4", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "9492:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "9492:14:4" + "src": "7800:21:4" }, "variableNames": [ { - "name": "updated_pos", + "name": "cleaned", "nodeType": "YulIdentifier", - "src": "9477:11:4" + "src": "7789:7:4" } ] } ] }, - "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "name": "cleanup_t_bool", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "pos", - "nodeType": "YulTypedName", - "src": "9411:3:4", - "type": "" - }, - { - "name": "length", + "name": "value", "nodeType": "YulTypedName", - "src": "9416:6:4", + "src": "7761:5:4", "type": "" } ], "returnVariables": [ { - "name": "updated_pos", + "name": "cleaned", "nodeType": "YulTypedName", - "src": "9427:11:4", + "src": "7771:7:4", "type": "" } ], - "src": "9343:169:4" + "src": "7737:90:4" }, { "body": { "nodeType": "YulBlock", - "src": "9562:261:4", + "src": "7878:81:4", "statements": [ { "nodeType": "YulAssignment", - "src": "9572:25:4", + "src": "7888:65:4", "value": { "arguments": [ { - "name": "x", + "name": "value", "nodeType": "YulIdentifier", - "src": "9595:1:4" + "src": "7903:5:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7910:42:4", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" } ], "functionName": { - "name": "cleanup_t_uint256", + "name": "and", "nodeType": "YulIdentifier", - "src": "9577:17:4" + "src": "7899:3:4" }, "nodeType": "YulFunctionCall", - "src": "9577:20:4" + "src": "7899:54:4" }, "variableNames": [ { - "name": "x", + "name": "cleaned", "nodeType": "YulIdentifier", - "src": "9572:1:4" + "src": "7888:7:4" } ] - }, + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "7860:5:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "7870:7:4", + "type": "" + } + ], + "src": "7833:126:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8010:32:4", + "statements": [ { "nodeType": "YulAssignment", - "src": "9606:25:4", + "src": "8020:16:4", "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "9629:1:4" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "9611:17:4" - }, - "nodeType": "YulFunctionCall", - "src": "9611:20:4" + "name": "value", + "nodeType": "YulIdentifier", + "src": "8031:5:4" }, "variableNames": [ { - "name": "y", + "name": "cleaned", "nodeType": "YulIdentifier", - "src": "9606:1:4" + "src": "8020:7:4" } ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "9769:22:4", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "9771:16:4" - }, - "nodeType": "YulFunctionCall", - "src": "9771:18:4" - }, - "nodeType": "YulExpressionStatement", - "src": "9771:18:4" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "9690:1:4" - }, - { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "9697:66:4", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "9765:1:4" - } - ], - "functionName": { - "name": "sub", - "nodeType": "YulIdentifier", - "src": "9693:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "9693:74:4" - } - ], - "functionName": { - "name": "gt", - "nodeType": "YulIdentifier", - "src": "9687:2:4" - }, - "nodeType": "YulFunctionCall", - "src": "9687:81:4" - }, - "nodeType": "YulIf", - "src": "9684:2:4" - }, + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "7992:5:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "8002:7:4", + "type": "" + } + ], + "src": "7965:77:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8091:43:4", + "statements": [ { "nodeType": "YulAssignment", - "src": "9801:16:4", + "src": "8101:27:4", "value": { "arguments": [ { - "name": "x", + "name": "value", "nodeType": "YulIdentifier", - "src": "9812:1:4" + "src": "8116:5:4" }, { - "name": "y", - "nodeType": "YulIdentifier", - "src": "9815:1:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "8123:4:4", + "type": "", + "value": "0xff" } ], "functionName": { - "name": "add", + "name": "and", "nodeType": "YulIdentifier", - "src": "9808:3:4" + "src": "8112:3:4" }, "nodeType": "YulFunctionCall", - "src": "9808:9:4" + "src": "8112:16:4" }, "variableNames": [ { - "name": "sum", + "name": "cleaned", "nodeType": "YulIdentifier", - "src": "9801:3:4" + "src": "8101:7:4" } ] } ] }, - "name": "checked_add_t_uint256", + "name": "cleanup_t_uint8", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "x", - "nodeType": "YulTypedName", - "src": "9549:1:4", - "type": "" - }, - { - "name": "y", + "name": "value", "nodeType": "YulTypedName", - "src": "9552:1:4", + "src": "8073:5:4", "type": "" } ], "returnVariables": [ { - "name": "sum", + "name": "cleaned", "nodeType": "YulTypedName", - "src": "9558:3:4", + "src": "8083:7:4", "type": "" } ], - "src": "9518:305:4" + "src": "8048:86:4" }, { "body": { "nodeType": "YulBlock", - "src": "9874:146:4", + "src": "8189:258:4", "statements": [ { - "nodeType": "YulAssignment", - "src": "9884:25:4", - "value": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "9907:1:4" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "9889:17:4" - }, - "nodeType": "YulFunctionCall", - "src": "9889:20:4" - }, - "variableNames": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "9884:1:4" - } - ] - }, - { - "nodeType": "YulAssignment", - "src": "9918:25:4", + "nodeType": "YulVariableDeclaration", + "src": "8199:10:4", "value": { - "arguments": [ - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "9941:1:4" - } - ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "9923:17:4" - }, - "nodeType": "YulFunctionCall", - "src": "9923:20:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "8208:1:4", + "type": "", + "value": "0" }, - "variableNames": [ + "variables": [ { - "name": "y", - "nodeType": "YulIdentifier", - "src": "9918:1:4" + "name": "i", + "nodeType": "YulTypedName", + "src": "8203:1:4", + "type": "" } ] }, { "body": { "nodeType": "YulBlock", - "src": "9965:22:4", + "src": "8268:63:4", "statements": [ { "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x11", - "nodeType": "YulIdentifier", - "src": "9967:16:4" - }, - "nodeType": "YulFunctionCall", - "src": "9967:18:4" - }, - "nodeType": "YulExpressionStatement", - "src": "9967:18:4" - } - ] - }, - "condition": { - "arguments": [ - { - "name": "x", - "nodeType": "YulIdentifier", - "src": "9959:1:4" - }, - { - "name": "y", - "nodeType": "YulIdentifier", - "src": "9962:1:4" - } - ], - "functionName": { - "name": "lt", - "nodeType": "YulIdentifier", - "src": "9956:2:4" - }, - "nodeType": "YulFunctionCall", - "src": "9956:8:4" - }, - "nodeType": "YulIf", - "src": "9953:2:4" - }, - { - "nodeType": "YulAssignment", - "src": "9997:17:4", - "value": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "8293:3:4" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "8298:1:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8289:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "8289:11:4" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "8312:3:4" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "8317:1:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8308:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "8308:11:4" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "8302:5:4" + }, + "nodeType": "YulFunctionCall", + "src": "8302:18:4" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "8282:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "8282:39:4" + }, + "nodeType": "YulExpressionStatement", + "src": "8282:39:4" + } + ] + }, + "condition": { "arguments": [ { - "name": "x", + "name": "i", "nodeType": "YulIdentifier", - "src": "10009:1:4" + "src": "8229:1:4" }, { - "name": "y", + "name": "length", "nodeType": "YulIdentifier", - "src": "10012:1:4" + "src": "8232:6:4" } ], "functionName": { - "name": "sub", + "name": "lt", "nodeType": "YulIdentifier", - "src": "10005:3:4" + "src": "8226:2:4" }, "nodeType": "YulFunctionCall", - "src": "10005:9:4" + "src": "8226:13:4" }, - "variableNames": [ - { - "name": "diff", + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "8240:19:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8242:15:4", + "value": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "8251:1:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8254:2:4", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8247:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "8247:10:4" + }, + "variableNames": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "8242:1:4" + } + ] + } + ] + }, + "pre": { + "nodeType": "YulBlock", + "src": "8222:3:4", + "statements": [] + }, + "src": "8218:113:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8365:76:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "8415:3:4" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8420:6:4" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "8411:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "8411:16:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8429:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "8404:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "8404:27:4" + }, + "nodeType": "YulExpressionStatement", + "src": "8404:27:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "8346:1:4" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8349:6:4" + } + ], + "functionName": { + "name": "gt", "nodeType": "YulIdentifier", - "src": "9997:4:4" - } - ] + "src": "8343:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "8343:13:4" + }, + "nodeType": "YulIf", + "src": "8340:2:4" } ] }, - "name": "checked_sub_t_uint256", + "name": "copy_memory_to_memory", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "x", + "name": "src", "nodeType": "YulTypedName", - "src": "9860:1:4", + "src": "8171:3:4", "type": "" }, { - "name": "y", + "name": "dst", "nodeType": "YulTypedName", - "src": "9863:1:4", + "src": "8176:3:4", "type": "" - } - ], - "returnVariables": [ + }, { - "name": "diff", + "name": "length", "nodeType": "YulTypedName", - "src": "9869:4:4", + "src": "8181:6:4", "type": "" } ], - "src": "9829:191:4" + "src": "8140:307:4" }, { "body": { "nodeType": "YulBlock", - "src": "10071:51:4", + "src": "8504:269:4", "statements": [ { "nodeType": "YulAssignment", - "src": "10081:35:4", + "src": "8514:22:4", "value": { "arguments": [ { - "name": "value", + "name": "data", "nodeType": "YulIdentifier", - "src": "10110:5:4" + "src": "8528:4:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8534:1:4", + "type": "", + "value": "2" } ], "functionName": { - "name": "cleanup_t_uint160", + "name": "div", "nodeType": "YulIdentifier", - "src": "10092:17:4" + "src": "8524:3:4" }, "nodeType": "YulFunctionCall", - "src": "10092:24:4" + "src": "8524:12:4" }, "variableNames": [ { - "name": "cleaned", + "name": "length", "nodeType": "YulIdentifier", - "src": "10081:7:4" + "src": "8514:6:4" } ] - } - ] - }, - "name": "cleanup_t_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "10053:5:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "10063:7:4", - "type": "" - } - ], - "src": "10026:96:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10170:48:4", - "statements": [ + }, { - "nodeType": "YulAssignment", - "src": "10180:32:4", + "nodeType": "YulVariableDeclaration", + "src": "8545:38:4", "value": { "arguments": [ { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "10205:5:4" - } - ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "10198:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "10198:13:4" + "name": "data", + "nodeType": "YulIdentifier", + "src": "8575:4:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8581:1:4", + "type": "", + "value": "1" } ], "functionName": { - "name": "iszero", + "name": "and", "nodeType": "YulIdentifier", - "src": "10191:6:4" + "src": "8571:3:4" }, "nodeType": "YulFunctionCall", - "src": "10191:21:4" + "src": "8571:12:4" }, - "variableNames": [ + "variables": [ { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "10180:7:4" + "name": "outOfPlaceEncoding", + "nodeType": "YulTypedName", + "src": "8549:18:4", + "type": "" } ] - } - ] - }, - "name": "cleanup_t_bool", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "10152:5:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "10162:7:4", - "type": "" - } - ], - "src": "10128:90:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10269:81:4", - "statements": [ + }, { - "nodeType": "YulAssignment", - "src": "10279:65:4", - "value": { + "body": { + "nodeType": "YulBlock", + "src": "8622:51:4", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8636:27:4", + "value": { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8650:6:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8658:4:4", + "type": "", + "value": "0x7f" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "8646:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "8646:17:4" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8636:6:4" + } + ] + } + ] + }, + "condition": { "arguments": [ { - "name": "value", + "name": "outOfPlaceEncoding", + "nodeType": "YulIdentifier", + "src": "8602:18:4" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "8595:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "8595:26:4" + }, + "nodeType": "YulIf", + "src": "8592:2:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8725:42:4", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x22", + "nodeType": "YulIdentifier", + "src": "8739:16:4" + }, + "nodeType": "YulFunctionCall", + "src": "8739:18:4" + }, + "nodeType": "YulExpressionStatement", + "src": "8739:18:4" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "outOfPlaceEncoding", "nodeType": "YulIdentifier", - "src": "10294:5:4" + "src": "8689:18:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10301:42:4", - "type": "", - "value": "0xffffffffffffffffffffffffffffffffffffffff" + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "8712:6:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8720:2:4", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8709:2:4" + }, + "nodeType": "YulFunctionCall", + "src": "8709:14:4" } ], "functionName": { - "name": "and", + "name": "eq", "nodeType": "YulIdentifier", - "src": "10290:3:4" + "src": "8686:2:4" }, "nodeType": "YulFunctionCall", - "src": "10290:54:4" + "src": "8686:38:4" }, - "variableNames": [ - { - "name": "cleaned", - "nodeType": "YulIdentifier", - "src": "10279:7:4" - } - ] + "nodeType": "YulIf", + "src": "8683:2:4" } ] }, - "name": "cleanup_t_uint160", + "name": "extract_byte_array_length", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "value", + "name": "data", "nodeType": "YulTypedName", - "src": "10251:5:4", + "src": "8488:4:4", "type": "" } ], "returnVariables": [ { - "name": "cleaned", + "name": "length", "nodeType": "YulTypedName", - "src": "10261:7:4", + "src": "8497:6:4", "type": "" } ], - "src": "10224:126:4" + "src": "8453:320:4" }, { "body": { "nodeType": "YulBlock", - "src": "10401:32:4", + "src": "8807:152:4", "statements": [ { - "nodeType": "YulAssignment", - "src": "10411:16:4", - "value": { - "name": "value", - "nodeType": "YulIdentifier", - "src": "10422:5:4" - }, - "variableNames": [ - { - "name": "cleaned", + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8824:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8827:77:4", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", "nodeType": "YulIdentifier", - "src": "10411:7:4" - } - ] - } - ] - }, - "name": "cleanup_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "10383:5:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "10393:7:4", - "type": "" - } - ], - "src": "10356:77:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10482:43:4", - "statements": [ + "src": "8817:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "8817:88:4" + }, + "nodeType": "YulExpressionStatement", + "src": "8817:88:4" + }, { - "nodeType": "YulAssignment", - "src": "10492:27:4", - "value": { + "expression": { "arguments": [ { - "name": "value", - "nodeType": "YulIdentifier", - "src": "10507:5:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "8921:1:4", + "type": "", + "value": "4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "10514:4:4", + "src": "8924:4:4", "type": "", - "value": "0xff" + "value": "0x11" } ], "functionName": { - "name": "and", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "10503:3:4" + "src": "8914:6:4" }, "nodeType": "YulFunctionCall", - "src": "10503:16:4" + "src": "8914:15:4" }, - "variableNames": [ - { - "name": "cleaned", + "nodeType": "YulExpressionStatement", + "src": "8914:15:4" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8945:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8948:4:4", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", "nodeType": "YulIdentifier", - "src": "10492:7:4" - } - ] + "src": "8938:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "8938:15:4" + }, + "nodeType": "YulExpressionStatement", + "src": "8938:15:4" } ] }, - "name": "cleanup_t_uint8", + "name": "panic_error_0x11", "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "10464:5:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "cleaned", - "nodeType": "YulTypedName", - "src": "10474:7:4", - "type": "" - } - ], - "src": "10439:86:4" + "src": "8779:180:4" }, { "body": { "nodeType": "YulBlock", - "src": "10580:258:4", + "src": "8993:152:4", "statements": [ { - "nodeType": "YulVariableDeclaration", - "src": "10590:10:4", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10599:1:4", - "type": "", - "value": "0" - }, - "variables": [ - { - "name": "i", - "nodeType": "YulTypedName", - "src": "10594:1:4", - "type": "" - } - ] - }, - { - "body": { - "nodeType": "YulBlock", - "src": "10659:63:4", - "statements": [ + "expression": { + "arguments": [ { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "10684:3:4" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10689:1:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10680:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "10680:11:4" - }, - { - "arguments": [ - { - "arguments": [ - { - "name": "src", - "nodeType": "YulIdentifier", - "src": "10703:3:4" - }, - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10708:1:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10699:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "10699:11:4" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "10693:5:4" - }, - "nodeType": "YulFunctionCall", - "src": "10693:18:4" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "10673:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "10673:39:4" - }, - "nodeType": "YulExpressionStatement", - "src": "10673:39:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "9010:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9013:77:4", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" } - ] + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "9003:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "9003:88:4" }, - "condition": { + "nodeType": "YulExpressionStatement", + "src": "9003:88:4" + }, + { + "expression": { "arguments": [ { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10620:1:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "9107:1:4", + "type": "", + "value": "4" }, { - "name": "length", - "nodeType": "YulIdentifier", - "src": "10623:6:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "9110:4:4", + "type": "", + "value": "0x22" } ], "functionName": { - "name": "lt", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "10617:2:4" + "src": "9100:6:4" }, "nodeType": "YulFunctionCall", - "src": "10617:13:4" - }, - "nodeType": "YulForLoop", - "post": { - "nodeType": "YulBlock", - "src": "10631:19:4", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "10633:15:4", - "value": { - "arguments": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10642:1:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10645:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10638:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "10638:10:4" - }, - "variableNames": [ - { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10633:1:4" - } - ] - } - ] + "src": "9100:15:4" }, - "pre": { - "nodeType": "YulBlock", - "src": "10613:3:4", - "statements": [] - }, - "src": "10609:113:4" + "nodeType": "YulExpressionStatement", + "src": "9100:15:4" }, { - "body": { - "nodeType": "YulBlock", - "src": "10756:76:4", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "dst", - "nodeType": "YulIdentifier", - "src": "10806:3:4" - }, - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "10811:6:4" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "10802:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "10802:16:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10820:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "10795:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "10795:27:4" - }, - "nodeType": "YulExpressionStatement", - "src": "10795:27:4" - } - ] - }, - "condition": { + "expression": { "arguments": [ { - "name": "i", - "nodeType": "YulIdentifier", - "src": "10737:1:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "9131:1:4", + "type": "", + "value": "0" }, { - "name": "length", - "nodeType": "YulIdentifier", - "src": "10740:6:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "9134:4:4", + "type": "", + "value": "0x24" } ], "functionName": { - "name": "gt", + "name": "revert", "nodeType": "YulIdentifier", - "src": "10734:2:4" + "src": "9124:6:4" }, "nodeType": "YulFunctionCall", - "src": "10734:13:4" + "src": "9124:15:4" }, - "nodeType": "YulIf", - "src": "10731:2:4" + "nodeType": "YulExpressionStatement", + "src": "9124:15:4" } ] }, - "name": "copy_memory_to_memory", + "name": "panic_error_0x22", "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "src", - "nodeType": "YulTypedName", - "src": "10562:3:4", - "type": "" - }, - { - "name": "dst", - "nodeType": "YulTypedName", - "src": "10567:3:4", - "type": "" - }, - { - "name": "length", - "nodeType": "YulTypedName", - "src": "10572:6:4", - "type": "" - } - ], - "src": "10531:307:4" + "src": "8965:180:4" }, { "body": { "nodeType": "YulBlock", - "src": "10895:269:4", + "src": "9199:54:4", "statements": [ { "nodeType": "YulAssignment", - "src": "10905:22:4", + "src": "9209:38:4", "value": { "arguments": [ { - "name": "data", - "nodeType": "YulIdentifier", - "src": "10919:4:4" + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "9227:5:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9234:2:4", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9223:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "9223:14:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10925:1:4", - "type": "", - "value": "2" + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9243:2:4", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "9239:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "9239:7:4" } ], "functionName": { - "name": "div", + "name": "and", "nodeType": "YulIdentifier", - "src": "10915:3:4" + "src": "9219:3:4" }, "nodeType": "YulFunctionCall", - "src": "10915:12:4" + "src": "9219:28:4" }, "variableNames": [ { - "name": "length", + "name": "result", "nodeType": "YulIdentifier", - "src": "10905:6:4" + "src": "9209:6:4" } ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "10936:38:4", - "value": { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "10966:4:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "10972:1:4", - "type": "", - "value": "1" - } - ], - "functionName": { - "name": "and", - "nodeType": "YulIdentifier", - "src": "10962:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "10962:12:4" - }, - "variables": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulTypedName", - "src": "10940:18:4", - "type": "" - } - ] - }, + } + ] + }, + "name": "round_up_to_mul_of_32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "9182:5:4", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "9192:6:4", + "type": "" + } + ], + "src": "9151:102:4" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9365:116:4", + "statements": [ { - "body": { - "nodeType": "YulBlock", - "src": "11013:51:4", - "statements": [ + "expression": { + "arguments": [ { - "nodeType": "YulAssignment", - "src": "11027:27:4", - "value": { - "arguments": [ - { - "name": "length", - "nodeType": "YulIdentifier", - "src": "11041:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11049:4:4", - "type": "", - "value": "0x7f" - } - ], - "functionName": { - "name": "and", + "arguments": [ + { + "name": "memPtr", "nodeType": "YulIdentifier", - "src": "11037:3:4" + "src": "9387:6:4" }, - "nodeType": "YulFunctionCall", - "src": "11037:17:4" - }, - "variableNames": [ { - "name": "length", - "nodeType": "YulIdentifier", - "src": "11027:6:4" + "kind": "number", + "nodeType": "YulLiteral", + "src": "9395:1:4", + "type": "", + "value": "0" } - ] - } - ] - }, - "condition": { - "arguments": [ + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9383:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "9383:14:4" + }, { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "10993:18:4" + "kind": "string", + "nodeType": "YulLiteral", + "src": "9399:34:4", + "type": "", + "value": "Error: transfer to the zero addr" } ], "functionName": { - "name": "iszero", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "10986:6:4" + "src": "9376:6:4" }, "nodeType": "YulFunctionCall", - "src": "10986:26:4" + "src": "9376:58:4" }, - "nodeType": "YulIf", - "src": "10983:2:4" + "nodeType": "YulExpressionStatement", + "src": "9376:58:4" }, { - "body": { - "nodeType": "YulBlock", - "src": "11116:42:4", - "statements": [ - { - "expression": { - "arguments": [], - "functionName": { - "name": "panic_error_0x22", - "nodeType": "YulIdentifier", - "src": "11130:16:4" - }, - "nodeType": "YulFunctionCall", - "src": "11130:18:4" - }, - "nodeType": "YulExpressionStatement", - "src": "11130:18:4" - } - ] - }, - "condition": { + "expression": { "arguments": [ - { - "name": "outOfPlaceEncoding", - "nodeType": "YulIdentifier", - "src": "11080:18:4" - }, { "arguments": [ { - "name": "length", + "name": "memPtr", "nodeType": "YulIdentifier", - "src": "11103:6:4" + "src": "9455:6:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "11111:2:4", + "src": "9463:2:4", "type": "", "value": "32" } ], "functionName": { - "name": "lt", + "name": "add", "nodeType": "YulIdentifier", - "src": "11100:2:4" + "src": "9451:3:4" }, "nodeType": "YulFunctionCall", - "src": "11100:14:4" + "src": "9451:15:4" + }, + { + "kind": "string", + "nodeType": "YulLiteral", + "src": "9468:5:4", + "type": "", + "value": "ess" } ], "functionName": { - "name": "eq", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "11077:2:4" + "src": "9444:6:4" }, "nodeType": "YulFunctionCall", - "src": "11077:38:4" + "src": "9444:30:4" }, - "nodeType": "YulIf", - "src": "11074:2:4" + "nodeType": "YulExpressionStatement", + "src": "9444:30:4" } ] }, - "name": "extract_byte_array_length", + "name": "store_literal_in_memory_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "data", - "nodeType": "YulTypedName", - "src": "10879:4:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "length", + "name": "memPtr", "nodeType": "YulTypedName", - "src": "10888:6:4", + "src": "9357:6:4", "type": "" } ], - "src": "10844:320:4" + "src": "9259:222:4" }, { "body": { "nodeType": "YulBlock", - "src": "11198:152:4", + "src": "9593:115:4", "statements": [ { "expression": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11215:1:4", - "type": "", - "value": "0" + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "9615:6:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9623:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9611:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "9611:14:4" }, { - "kind": "number", + "kind": "string", "nodeType": "YulLiteral", - "src": "11218:77:4", + "src": "9627:34:4", "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + "value": "ERC20: approve to the zero addre" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "11208:6:4" + "src": "9604:6:4" }, "nodeType": "YulFunctionCall", - "src": "11208:88:4" + "src": "9604:58:4" }, "nodeType": "YulExpressionStatement", - "src": "11208:88:4" + "src": "9604:58:4" }, { "expression": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11312:1:4", - "type": "", - "value": "4" + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "9683:6:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9691:2:4", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9679:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "9679:15:4" }, { - "kind": "number", + "kind": "string", "nodeType": "YulLiteral", - "src": "11315:4:4", + "src": "9696:4:4", "type": "", - "value": "0x11" + "value": "ss" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "11305:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "11305:15:4" - }, - "nodeType": "YulExpressionStatement", - "src": "11305:15:4" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11336:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11339:4:4", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "11329:6:4" + "src": "9672:6:4" }, "nodeType": "YulFunctionCall", - "src": "11329:15:4" + "src": "9672:29:4" }, "nodeType": "YulExpressionStatement", - "src": "11329:15:4" + "src": "9672:29:4" } ] }, - "name": "panic_error_0x11", + "name": "store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", "nodeType": "YulFunctionDefinition", - "src": "11170:180:4" + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "9585:6:4", + "type": "" + } + ], + "src": "9487:221:4" }, { "body": { "nodeType": "YulBlock", - "src": "11384:152:4", + "src": "9820:117:4", "statements": [ { "expression": { "arguments": [ { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11401:1:4", - "type": "", - "value": "0" + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "9842:6:4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9850:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "9838:3:4" + }, + "nodeType": "YulFunctionCall", + "src": "9838:14:4" }, { - "kind": "number", + "kind": "string", "nodeType": "YulLiteral", - "src": "11404:77:4", + "src": "9854:34:4", "type": "", - "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + "value": "ERC20: approve from the zero add" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "11394:6:4" + "src": "9831:6:4" }, "nodeType": "YulFunctionCall", - "src": "11394:88:4" + "src": "9831:58:4" }, "nodeType": "YulExpressionStatement", - "src": "11394:88:4" + "src": "9831:58:4" }, { "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11498:1:4", - "type": "", - "value": "4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11501:4:4", - "type": "", - "value": "0x22" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "11491:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "11491:15:4" - }, - "nodeType": "YulExpressionStatement", - "src": "11491:15:4" - }, - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11522:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11525:4:4", - "type": "", - "value": "0x24" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "11515:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "11515:15:4" - }, - "nodeType": "YulExpressionStatement", - "src": "11515:15:4" - } - ] - }, - "name": "panic_error_0x22", - "nodeType": "YulFunctionDefinition", - "src": "11356:180:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "11590:54:4", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "11600:38:4", - "value": { "arguments": [ { "arguments": [ { - "name": "value", + "name": "memPtr", "nodeType": "YulIdentifier", - "src": "11618:5:4" + "src": "9910:6:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "11625:2:4", + "src": "9918:2:4", "type": "", - "value": "31" + "value": "32" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "11614:3:4" + "src": "9906:3:4" }, "nodeType": "YulFunctionCall", - "src": "11614:14:4" + "src": "9906:15:4" }, { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "11634:2:4", - "type": "", - "value": "31" - } - ], - "functionName": { - "name": "not", - "nodeType": "YulIdentifier", - "src": "11630:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "11630:7:4" + "kind": "string", + "nodeType": "YulLiteral", + "src": "9923:6:4", + "type": "", + "value": "ress" } ], "functionName": { - "name": "and", + "name": "mstore", "nodeType": "YulIdentifier", - "src": "11610:3:4" + "src": "9899:6:4" }, "nodeType": "YulFunctionCall", - "src": "11610:28:4" + "src": "9899:31:4" }, - "variableNames": [ - { - "name": "result", - "nodeType": "YulIdentifier", - "src": "11600:6:4" - } - ] + "nodeType": "YulExpressionStatement", + "src": "9899:31:4" } ] }, - "name": "round_up_to_mul_of_32", + "name": "store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "value", - "nodeType": "YulTypedName", - "src": "11573:5:4", - "type": "" - } - ], - "returnVariables": [ - { - "name": "result", + "name": "memPtr", "nodeType": "YulTypedName", - "src": "11583:6:4", + "src": "9812:6:4", "type": "" } ], - "src": "11542:102:4" + "src": "9714:223:4" }, { "body": { "nodeType": "YulBlock", - "src": "11756:116:4", + "src": "10049:118:4", "statements": [ { "expression": { @@ -6999,12 +8057,12 @@ { "name": "memPtr", "nodeType": "YulIdentifier", - "src": "11778:6:4" + "src": "10071:6:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "11786:1:4", + "src": "10079:1:4", "type": "", "value": "0" } @@ -7012,29 +8070,29 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "11774:3:4" + "src": "10067:3:4" }, "nodeType": "YulFunctionCall", - "src": "11774:14:4" + "src": "10067:14:4" }, { "kind": "string", "nodeType": "YulLiteral", - "src": "11790:34:4", + "src": "10083:34:4", "type": "", - "value": "ERC20: transfer to the zero addr" + "value": "ERC20: decreased allowance below" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "11767:6:4" + "src": "10060:6:4" }, "nodeType": "YulFunctionCall", - "src": "11767:58:4" + "src": "10060:58:4" }, "nodeType": "YulExpressionStatement", - "src": "11767:58:4" + "src": "10060:58:4" }, { "expression": { @@ -7044,12 +8102,12 @@ { "name": "memPtr", "nodeType": "YulIdentifier", - "src": "11846:6:4" + "src": "10139:6:4" }, { "kind": "number", "nodeType": "YulLiteral", - "src": "11854:2:4", + "src": "10147:2:4", "type": "", "value": "32" } @@ -7057,1120 +8115,5481 @@ "functionName": { "name": "add", "nodeType": "YulIdentifier", - "src": "11842:3:4" + "src": "10135:3:4" }, "nodeType": "YulFunctionCall", - "src": "11842:15:4" + "src": "10135:15:4" }, { "kind": "string", "nodeType": "YulLiteral", - "src": "11859:5:4", + "src": "10152:7:4", "type": "", - "value": "ess" + "value": " zero" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", - "src": "11835:6:4" + "src": "10128:6:4" }, "nodeType": "YulFunctionCall", - "src": "11835:30:4" + "src": "10128:32:4" }, "nodeType": "YulExpressionStatement", - "src": "11835:30:4" + "src": "10128:32:4" } ] }, - "name": "store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "name": "store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "memPtr", "nodeType": "YulTypedName", - "src": "11748:6:4", + "src": "10041:6:4", "type": "" } ], - "src": "11650:222:4" + "src": "9943:224:4" }, { "body": { "nodeType": "YulBlock", - "src": "11984:115:4", + "src": "10216:79:4", "statements": [ { - "expression": { - "arguments": [ + "body": { + "nodeType": "YulBlock", + "src": "10273:16:4", + "statements": [ { - "arguments": [ - { - "name": "memPtr", + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10282:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10285:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", "nodeType": "YulIdentifier", - "src": "12006:6:4" + "src": "10275:6:4" }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12014:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12002:3:4" + "nodeType": "YulFunctionCall", + "src": "10275:12:4" }, - "nodeType": "YulFunctionCall", - "src": "12002:14:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12018:34:4", - "type": "", - "value": "ERC20: approve to the zero addre" + "nodeType": "YulExpressionStatement", + "src": "10275:12:4" } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "11995:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "11995:58:4" + ] }, - "nodeType": "YulExpressionStatement", - "src": "11995:58:4" - }, - { - "expression": { + "condition": { "arguments": [ { "arguments": [ { - "name": "memPtr", + "name": "value", "nodeType": "YulIdentifier", - "src": "12074:6:4" + "src": "10239:5:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12082:2:4", - "type": "", - "value": "32" + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "10264:5:4" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "10246:17:4" + }, + "nodeType": "YulFunctionCall", + "src": "10246:24:4" } ], "functionName": { - "name": "add", + "name": "eq", "nodeType": "YulIdentifier", - "src": "12070:3:4" + "src": "10236:2:4" }, "nodeType": "YulFunctionCall", - "src": "12070:15:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12087:4:4", - "type": "", - "value": "ss" + "src": "10236:35:4" } ], "functionName": { - "name": "mstore", + "name": "iszero", "nodeType": "YulIdentifier", - "src": "12063:6:4" + "src": "10229:6:4" }, "nodeType": "YulFunctionCall", - "src": "12063:29:4" + "src": "10229:43:4" }, - "nodeType": "YulExpressionStatement", - "src": "12063:29:4" + "nodeType": "YulIf", + "src": "10226:2:4" } ] }, - "name": "store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "name": "validator_revert_t_address", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "memPtr", + "name": "value", "nodeType": "YulTypedName", - "src": "11976:6:4", + "src": "10209:5:4", "type": "" } ], - "src": "11878:221:4" + "src": "10173:122:4" }, { "body": { "nodeType": "YulBlock", - "src": "12211:119:4", + "src": "10344:79:4", "statements": [ { - "expression": { + "body": { + "nodeType": "YulBlock", + "src": "10401:16:4", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10410:1:4", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10413:1:4", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "10403:6:4" + }, + "nodeType": "YulFunctionCall", + "src": "10403:12:4" + }, + "nodeType": "YulExpressionStatement", + "src": "10403:12:4" + } + ] + }, + "condition": { "arguments": [ { "arguments": [ { - "name": "memPtr", + "name": "value", "nodeType": "YulIdentifier", - "src": "12233:6:4" + "src": "10367:5:4" }, { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12241:1:4", - "type": "", - "value": "0" + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "10392:5:4" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10374:17:4" + }, + "nodeType": "YulFunctionCall", + "src": "10374:24:4" } ], "functionName": { - "name": "add", + "name": "eq", "nodeType": "YulIdentifier", - "src": "12229:3:4" + "src": "10364:2:4" }, "nodeType": "YulFunctionCall", - "src": "12229:14:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12245:34:4", - "type": "", - "value": "ERC20: transfer amount exceeds b" + "src": "10364:35:4" } ], "functionName": { - "name": "mstore", + "name": "iszero", "nodeType": "YulIdentifier", - "src": "12222:6:4" + "src": "10357:6:4" }, "nodeType": "YulFunctionCall", - "src": "12222:58:4" + "src": "10357:43:4" }, - "nodeType": "YulExpressionStatement", - "src": "12222:58:4" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12301:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12309:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12297:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "12297:15:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12314:8:4", - "type": "", - "value": "alance" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12290:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "12290:33:4" - }, - "nodeType": "YulExpressionStatement", - "src": "12290:33:4" + "nodeType": "YulIf", + "src": "10354:2:4" } ] }, - "name": "store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "name": "validator_revert_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { - "name": "memPtr", + "name": "value", "nodeType": "YulTypedName", - "src": "12203:6:4", + "src": "10337:5:4", "type": "" } ], - "src": "12105:225:4" + "src": "10301:122:4" + } + ] + }, + "contents": "{\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_address(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(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_addresst_uint256(headStart, dataEnd) -> value0, value1, value2 {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_uint256(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(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(value))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 34)\n store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 36)\n store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 37)\n store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_t_uint8_to_t_uint8_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint8(value))\n }\n\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bool_to_t_bool_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint8_to_t_uint8_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function checked_sub_t_uint256(x, y) -> diff {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n if lt(x, y) { panic_error_0x11() }\n\n diff := sub(x, y)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(value))\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function cleanup_t_uint8(value) -> cleaned {\n cleaned := and(value, 0xff)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function store_literal_in_memory_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1(memPtr) {\n\n mstore(add(memPtr, 0), \"Error: transfer to the zero addr\")\n\n mstore(add(memPtr, 32), \"ess\")\n\n }\n\n function store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: approve to the zero addre\")\n\n mstore(add(memPtr, 32), \"ss\")\n\n }\n\n function store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: approve from the zero add\")\n\n mstore(add(memPtr, 32), \"ress\")\n\n }\n\n function store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: decreased allowance below\")\n\n mstore(add(memPtr, 32), \" zero\")\n\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", + "id": 4, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "182:2014:0:-:0;;;239:1;214:26;;;;;;;;;;;;;;;;;;;;302:8;;;;;;;;;;;297:14;;291:2;:20;;;;:::i;:::-;278:10;:33;;;;:::i;:::-;246:65;;683:92;;;;;;;;;;1842:114:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1917:5;1909;:13;;;;;;;;;;;;:::i;:::-;;1942:7;1932;:17;;;;;;;;;;;;:::i;:::-;;1842:114;;735:33:0::1;741:10;753:14;;735:5;;;:33;;:::i;:::-;182:2014:::0;;7940:330:1;8042:1;8023:21;;:7;:21;;;;8015:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;8091:49;8120:1;8124:7;8133:6;8091:20;;;:49;;:::i;:::-;8167:6;8151:12;;:22;;;;;;;:::i;:::-;;;;;;;;8205:6;8183:9;:18;8193:7;8183:18;;;;;;;;;;;;;;;;:28;;;;;;;:::i;:::-;;;;;;;;8247:7;8226:37;;8243:1;8226:37;;;8256:6;8226:37;;;;;;:::i;:::-;;;;;;;;7940:330;;:::o;10423:92::-;;;;:::o;182:2014:0:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:366:4:-;;170:67;234:2;229:3;170:67;:::i;:::-;163:74;;246:93;335:3;246:93;:::i;:::-;364:2;359:3;355:12;348:19;;153:220;;;:::o;379:118::-;466:24;484:5;466:24;:::i;:::-;461:3;454:37;444:53;;:::o;503:419::-;;707:2;696:9;692:18;684:26;;756:9;750:4;746:20;742:1;731:9;727:17;720:47;784:131;910:4;784:131;:::i;:::-;776:139;;674:248;;;:::o;928:222::-;;1059:2;1048:9;1044:18;1036:26;;1072:71;1140:1;1129:9;1125:17;1116:6;1072:71;:::i;:::-;1026:124;;;;:::o;1156:169::-;;1274:6;1269:3;1262:19;1314:4;1309:3;1305:14;1290:29;;1252:73;;;;:::o;1331:305::-;;1390:20;1408:1;1390:20;:::i;:::-;1385:25;;1424:20;1442:1;1424:20;:::i;:::-;1419:25;;1578:1;1510:66;1506:74;1503:1;1500:81;1497:2;;;1584:18;;:::i;:::-;1497:2;1628:1;1625;1621:9;1614:16;;1375:261;;;;:::o;1642:848::-;;;1734:6;1725:15;;1758:5;1749:14;;1772:712;1793:1;1783:8;1780:15;1772:712;;;1888:4;1883:3;1879:14;1873:4;1870:24;1867:2;;;1897:18;;:::i;:::-;1867:2;1947:1;1937:8;1933:16;1930:2;;;2362:4;2355:5;2351:16;2342:25;;1930:2;2412:4;2406;2402:15;2394:23;;2442:32;2465:8;2442:32;:::i;:::-;2430:44;;1772:712;;;1715:775;;;;;;;:::o;2496:285::-;;2580:23;2598:4;2580:23;:::i;:::-;2572:31;;2624:27;2642:8;2624:27;:::i;:::-;2612:39;;2670:104;2707:66;2697:8;2691:4;2670:104;:::i;:::-;2661:113;;2562:219;;;;:::o;2787:1073::-;;3032:8;3022:2;;3053:1;3044:10;;3055:5;;3022:2;3081:4;3071:2;;3098:1;3089:10;;3100:5;;3071:2;3167:4;3215:1;3210:27;;;;3251:1;3246:191;;;;3160:277;;3210:27;3228:1;3219:10;;3230:5;;;3246:191;3291:3;3281:8;3278:17;3275:2;;;3298:18;;:::i;:::-;3275:2;3347:8;3344:1;3340:16;3331:25;;3382:3;3375:5;3372:14;3369:2;;;3389:18;;:::i;:::-;3369:2;3422:5;;;3160:277;;3546:2;3536:8;3533:16;3527:3;3521:4;3518:13;3514:36;3496:2;3486:8;3483:16;3478:2;3472:4;3469:12;3465:35;3449:111;3446:2;;;3602:8;3596:4;3592:19;3583:28;;3637:3;3630:5;3627:14;3624:2;;;3644:18;;:::i;:::-;3624:2;3677:5;;3446:2;3717:42;3755:3;3745:8;3739:4;3736:1;3717:42;:::i;:::-;3702:57;;;;3791:4;3786:3;3782:14;3775:5;3772:25;3769:2;;;3800:18;;:::i;:::-;3769:2;3849:4;3842:5;3838:16;3829:25;;2847:1013;;;;;;:::o;3866:348::-;;3929:20;3947:1;3929:20;:::i;:::-;3924:25;;3963:20;3981:1;3963:20;:::i;:::-;3958:25;;4151:1;4083:66;4079:74;4076:1;4073:81;4068:1;4061:9;4054:17;4050:105;4047:2;;;4158:18;;:::i;:::-;4047:2;4206:1;4203;4199:9;4188:20;;3914:300;;;;:::o;4220:77::-;;4286:5;4275:16;;4265:32;;;:::o;4303:320::-;;4384:1;4378:4;4374:12;4364:22;;4431:1;4425:4;4421:12;4452:18;4442:2;;4508:4;4500:6;4496:17;4486:27;;4442:2;4570;4562:6;4559:14;4539:18;4536:38;4533:2;;;4589:18;;:::i;:::-;4533:2;4354:269;;;;:::o;4629:180::-;4677:77;4674:1;4667:88;4774:4;4771:1;4764:15;4798:4;4795:1;4788:15;4815:180;4863:77;4860:1;4853:88;4960:4;4957:1;4950:15;4984:4;4981:1;4974:15;5001:102;;5090:5;5087:1;5083:13;5062:34;;5052:51;;;:::o;5109:181::-;5249:33;5245:1;5237:6;5233:14;5226:57;5215:75;:::o;182:2014:0:-;;;;;;;", + "deployedSourceMap": "182:2014:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2021:89:1;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1965:228:0;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;877:97;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1383:577;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;560:44;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;782:89;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5533:212:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;610:66:0;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3246:125:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2223:93;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6232:371;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;980:398:0;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;246:65;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3804:149:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2021:89;2066:13;2098:5;2091:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2021:89;:::o;1965:228:0:-;2042:12;2100:7;2065:10;:22;2076:10;2065:22;;;;;;;;;;;;;;;:32;2088:8;2065:32;;;;;;;;;;;;;;;:42;;;;2148:8;2122:43;;2137:10;2122:43;;;2157:7;2122:43;;;;;;:::i;:::-;;;;;;;;2182:4;2175:11;;1965:228;;;;:::o;877:97::-;930:4;953:14;;946:21;;877:97;:::o;1383:577::-;1484:12;1538:7;1516:8;:17;1525:7;1516:17;;;;;;;;;;;;;;;;:29;;1508:38;;;;;;1586:1;1564:24;;:10;:24;;;;1556:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;1710:10;:19;1721:7;1710:19;;;;;;;;;;;;;;;:31;1730:10;1710:31;;;;;;;;;;;;;;;;1699:7;:42;;1691:51;;;;;;1773:7;1752:8;:17;1761:7;1752:17;;;;;;;;;;;;;;;;:28;;;;;;;:::i;:::-;;;;;;;;1814:7;1790:8;:20;1799:10;1790:20;;;;;;;;;;;;;;;;:31;;;;;;;:::i;:::-;;;;;;;;1866:7;1831:10;:19;1842:7;1831:19;;;;;;;;;;;;;;;:31;1851:10;1831:31;;;;;;;;;;;;;;;;:42;;;;;;;:::i;:::-;;;;;;;;1912:10;1888:44;;1903:7;1888:44;;;1924:7;1888:44;;;;;;:::i;:::-;;;;;;;;1949:4;1942:11;;1383:577;;;;;:::o;560:44::-;;;;;;;;;;;;;;;;;:::o;782:89::-;832:5;856:8;;;;;;;;;;;849:15;;782:89;:::o;5533:212:1:-;5621:4;5637:80;5646:12;:10;:12::i;:::-;5660:7;5706:10;5669:11;:25;5681:12;:10;:12::i;:::-;5669:25;;;;;;;;;;;;;;;:34;5695:7;5669:34;;;;;;;;;;;;;;;;:47;;;;:::i;:::-;5637:8;:80::i;:::-;5734:4;5727:11;;5533:212;;;;:::o;610:66:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3246:125:1:-;3320:7;3346:9;:18;3356:7;3346:18;;;;;;;;;;;;;;;;3339:25;;3246:125;;;:::o;2223:93::-;2270:13;2302:7;2295:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2223:93;:::o;6232:371::-;6325:4;6341:24;6368:11;:25;6380:12;:10;:12::i;:::-;6368:25;;;;;;;;;;;;;;;:34;6394:7;6368:34;;;;;;;;;;;;;;;;6341:61;;6440:15;6420:16;:35;;6412:85;;;;;;;;;;;;:::i;:::-;;;;;;;;;6507:67;6516:12;:10;:12::i;:::-;6530:7;6558:15;6539:16;:34;;;;:::i;:::-;6507:8;:67::i;:::-;6592:4;6585:11;;;6232:371;;;;:::o;980:398:0:-;1060:12;1116:7;1092:8;:20;1101:10;1092:20;;;;;;;;;;;;;;;;:31;;1084:40;;;;;;1164:1;1142:24;;:10;:24;;;;1134:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;1240:7;1216:8;:20;1225:10;1216:20;;;;;;;;;;;;;;;;:31;;;;;;;:::i;:::-;;;;;;;;1281:7;1257:8;:20;1266:10;1257:20;;;;;;;;;;;;;;;;:31;;;;;;;:::i;:::-;;;;;;;;1330:10;1303:47;;1318:10;1303:47;;;1342:7;1303:47;;;;;;:::i;:::-;;;;;;;;1367:4;1360:11;;980:398;;;;:::o;246:65::-;;;;:::o;3804:149:1:-;3893:7;3919:11;:18;3931:5;3919:18;;;;;;;;;;;;;;;:27;3938:7;3919:27;;;;;;;;;;;;;;;;3912:34;;3804:149;;;;:::o;586:96:3:-;639:7;665:10;658:17;;586:96;:::o;9496:340:1:-;9614:1;9597:19;;:5;:19;;;;9589:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;9694:1;9675:21;;:7;:21;;;;9667:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;9776:6;9746:11;:18;9758:5;9746:18;;;;;;;;;;;;;;;:27;9765:7;9746:27;;;;;;;;;;;;;;;:36;;;;9813:7;9797:32;;9806:5;9797:32;;;9822:6;9797:32;;;;;;:::i;:::-;;;;;;;;9496:340;;;:::o;7:139:4:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:139::-;;236:6;223:20;214:29;;252:33;279:5;252:33;:::i;:::-;204:87;;;;:::o;297:262::-;;405:2;393:9;384:7;380:23;376:32;373:2;;;421:1;418;411:12;373:2;464:1;489:53;534:7;525:6;514:9;510:22;489:53;:::i;:::-;479:63;;435:117;363:196;;;;:::o;565:407::-;;;690:2;678:9;669:7;665:23;661:32;658:2;;;706:1;703;696:12;658:2;749:1;774:53;819:7;810:6;799:9;795:22;774:53;:::i;:::-;764:63;;720:117;876:2;902:53;947:7;938:6;927:9;923:22;902:53;:::i;:::-;892:63;;847:118;648:324;;;;;:::o;978:552::-;;;;1120:2;1108:9;1099:7;1095:23;1091:32;1088:2;;;1136:1;1133;1126:12;1088:2;1179:1;1204:53;1249:7;1240:6;1229:9;1225:22;1204:53;:::i;:::-;1194:63;;1150:117;1306:2;1332:53;1377:7;1368:6;1357:9;1353:22;1332:53;:::i;:::-;1322:63;;1277:118;1434:2;1460:53;1505:7;1496:6;1485:9;1481:22;1460:53;:::i;:::-;1450:63;;1405:118;1078:452;;;;;:::o;1536:407::-;;;1661:2;1649:9;1640:7;1636:23;1632:32;1629:2;;;1677:1;1674;1667:12;1629:2;1720:1;1745:53;1790:7;1781:6;1770:9;1766:22;1745:53;:::i;:::-;1735:63;;1691:117;1847:2;1873:53;1918:7;1909:6;1898:9;1894:22;1873:53;:::i;:::-;1863:63;;1818:118;1619:324;;;;;:::o;1949:109::-;2030:21;2045:5;2030:21;:::i;:::-;2025:3;2018:34;2008:50;;:::o;2064:364::-;;2180:39;2213:5;2180:39;:::i;:::-;2235:71;2299:6;2294:3;2235:71;:::i;:::-;2228:78;;2315:52;2360:6;2355:3;2348:4;2341:5;2337:16;2315:52;:::i;:::-;2392:29;2414:6;2392:29;:::i;:::-;2387:3;2383:39;2376:46;;2156:272;;;;;:::o;2434:366::-;;2597:67;2661:2;2656:3;2597:67;:::i;:::-;2590:74;;2673:93;2762:3;2673:93;:::i;:::-;2791:2;2786:3;2782:12;2775:19;;2580:220;;;:::o;2806:366::-;;2969:67;3033:2;3028:3;2969:67;:::i;:::-;2962:74;;3045:93;3134:3;3045:93;:::i;:::-;3163:2;3158:3;3154:12;3147:19;;2952:220;;;:::o;3178:366::-;;3341:67;3405:2;3400:3;3341:67;:::i;:::-;3334:74;;3417:93;3506:3;3417:93;:::i;:::-;3535:2;3530:3;3526:12;3519:19;;3324:220;;;:::o;3550:366::-;;3713:67;3777:2;3772:3;3713:67;:::i;:::-;3706:74;;3789:93;3878:3;3789:93;:::i;:::-;3907:2;3902:3;3898:12;3891:19;;3696:220;;;:::o;3922:118::-;4009:24;4027:5;4009:24;:::i;:::-;4004:3;3997:37;3987:53;;:::o;4046:112::-;4129:22;4145:5;4129:22;:::i;:::-;4124:3;4117:35;4107:51;;:::o;4164:210::-;;4289:2;4278:9;4274:18;4266:26;;4302:65;4364:1;4353:9;4349:17;4340:6;4302:65;:::i;:::-;4256:118;;;;:::o;4380:313::-;;4531:2;4520:9;4516:18;4508:26;;4580:9;4574:4;4570:20;4566:1;4555:9;4551:17;4544:47;4608:78;4681:4;4672:6;4608:78;:::i;:::-;4600:86;;4498:195;;;;:::o;4699:419::-;;4903:2;4892:9;4888:18;4880:26;;4952:9;4946:4;4942:20;4938:1;4927:9;4923:17;4916:47;4980:131;5106:4;4980:131;:::i;:::-;4972:139;;4870:248;;;:::o;5124:419::-;;5328:2;5317:9;5313:18;5305:26;;5377:9;5371:4;5367:20;5363:1;5352:9;5348:17;5341:47;5405:131;5531:4;5405:131;:::i;:::-;5397:139;;5295:248;;;:::o;5549:419::-;;5753:2;5742:9;5738:18;5730:26;;5802:9;5796:4;5792:20;5788:1;5777:9;5773:17;5766:47;5830:131;5956:4;5830:131;:::i;:::-;5822:139;;5720:248;;;:::o;5974:419::-;;6178:2;6167:9;6163:18;6155:26;;6227:9;6221:4;6217:20;6213:1;6202:9;6198:17;6191:47;6255:131;6381:4;6255:131;:::i;:::-;6247:139;;6145:248;;;:::o;6399:222::-;;6530:2;6519:9;6515:18;6507:26;;6543:71;6611:1;6600:9;6596:17;6587:6;6543:71;:::i;:::-;6497:124;;;;:::o;6627:214::-;;6754:2;6743:9;6739:18;6731:26;;6767:67;6831:1;6820:9;6816:17;6807:6;6767:67;:::i;:::-;6721:120;;;;:::o;6847:99::-;;6933:5;6927:12;6917:22;;6906:40;;;:::o;6952:169::-;;7070:6;7065:3;7058:19;7110:4;7105:3;7101:14;7086:29;;7048:73;;;;:::o;7127:305::-;;7186:20;7204:1;7186:20;:::i;:::-;7181:25;;7220:20;7238:1;7220:20;:::i;:::-;7215:25;;7374:1;7306:66;7302:74;7299:1;7296:81;7293:2;;;7380:18;;:::i;:::-;7293:2;7424:1;7421;7417:9;7410:16;;7171:261;;;;:::o;7438:191::-;;7498:20;7516:1;7498:20;:::i;:::-;7493:25;;7532:20;7550:1;7532:20;:::i;:::-;7527:25;;7571:1;7568;7565:8;7562:2;;;7576:18;;:::i;:::-;7562:2;7621:1;7618;7614:9;7606:17;;7483:146;;;;:::o;7635:96::-;;7701:24;7719:5;7701:24;:::i;:::-;7690:35;;7680:51;;;:::o;7737:90::-;;7814:5;7807:13;7800:21;7789:32;;7779:48;;;:::o;7833:126::-;;7910:42;7903:5;7899:54;7888:65;;7878:81;;;:::o;7965:77::-;;8031:5;8020:16;;8010:32;;;:::o;8048:86::-;;8123:4;8116:5;8112:16;8101:27;;8091:43;;;:::o;8140:307::-;8208:1;8218:113;8232:6;8229:1;8226:13;8218:113;;;8317:1;8312:3;8308:11;8302:18;8298:1;8293:3;8289:11;8282:39;8254:2;8251:1;8247:10;8242:15;;8218:113;;;8349:6;8346:1;8343:13;8340:2;;;8429:1;8420:6;8415:3;8411:16;8404:27;8340:2;8189:258;;;;:::o;8453:320::-;;8534:1;8528:4;8524:12;8514:22;;8581:1;8575:4;8571:12;8602:18;8592:2;;8658:4;8650:6;8646:17;8636:27;;8592:2;8720;8712:6;8709:14;8689:18;8686:38;8683:2;;;8739:18;;:::i;:::-;8683:2;8504:269;;;;:::o;8779:180::-;8827:77;8824:1;8817:88;8924:4;8921:1;8914:15;8948:4;8945:1;8938:15;8965:180;9013:77;9010:1;9003:88;9110:4;9107:1;9100:15;9134:4;9131:1;9124:15;9151:102;;9243:2;9239:7;9234:2;9227:5;9223:14;9219:28;9209:38;;9199:54;;;:::o;9259:222::-;9399:34;9395:1;9387:6;9383:14;9376:58;9468:5;9463:2;9455:6;9451:15;9444:30;9365:116;:::o;9487:221::-;9627:34;9623:1;9615:6;9611:14;9604:58;9696:4;9691:2;9683:6;9679:15;9672:29;9593:115;:::o;9714:223::-;9854:34;9850:1;9842:6;9838:14;9831:58;9923:6;9918:2;9910:6;9906:15;9899:31;9820:117;:::o;9943:224::-;10083:34;10079:1;10071:6;10067:14;10060:58;10152:7;10147:2;10139:6;10135:15;10128:32;10049:118;:::o;10173:122::-;10246:24;10264:5;10246:24;:::i;:::-;10239:5;10236:35;10226:2;;10285:1;10282;10275:12;10226:2;10216:79;:::o;10301:122::-;10374:24;10392:5;10374:24;:::i;:::-;10367:5;10364:35;10354:2;;10413:1;10410;10403:12;10354:2;10344:79;:::o", + "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n\n\ncontract MyToken is ERC20 {\n uint8 private _decimal = 5;\n uint256 public allocate_token = 1000000000 * 10 ** uint(_decimal);\n\n event CustomTransfer (\n address indexed _from,\n address indexed _to,\n uint256 _amount\n );\n\n event CustomApproval(\n address indexed _owner,\n address indexed _spender,\n uint256 _amount\n );\n mapping(address => uint256) public balances;\n mapping(address => mapping(address => uint256)) public allowances;\n\n constructor() ERC20 (\"DavidToken\", \"DTN\") {\n _mint(msg.sender, allocate_token);\n } \n\n function decimals() override public view returns (uint8) {\n return _decimal;\n }\n\n function totalSupply() override public view returns (uint) {\n return allocate_token;\n }\n\n function transfer(address _recipient, uint256 _amount) public override returns (bool success) {\n require(balances[msg.sender] >= _amount);\n require(_recipient != address(0), \"Error: transfer to the zero address\");\n balances[msg.sender] -= _amount;\n balances[_recipient] += _amount;\n emit CustomTransfer(msg.sender, _recipient, _amount);\n return true;\n }\n function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool success) {\n require(balances[_sender] >= _amount);\n require(_recipient != address(0), \"Error: transfer to the zero address\");\n // this specify the amount entitled to spend\n require(_amount <= allowances[_sender][msg.sender]);\n balances[_sender] -= _amount;\n balances[_recipient] += _amount;\n allowances[_sender][msg.sender] -= _amount;\n emit CustomTransfer(_sender, _recipient, _amount);\n return true;\n }\n function approve(address _spender, uint256 _amount) public override returns (bool success){\n allowances[msg.sender][_spender] = _amount;\n emit CustomApproval(msg.sender,_spender,_amount);\n return true;\n }\n\n}", + "sourcePath": "/Users/mac/codes/token_wallets/contracts/MyToken.sol", + "ast": { + "absolutePath": "/Users/mac/codes/token_wallets/contracts/MyToken.sol", + "exportedSymbols": { + "Context": [ + 831 + ], + "ERC20": [ + 730 + ], + "IERC20": [ + 808 + ], + "MyToken": [ + 229 + ] + }, + "id": 230, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.4", + ".22", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:32:0" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "id": 2, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 731, + "src": "66:55:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 809, + "src": "122:56:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4, + "name": "ERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 730, + "src": "202:5:0" + }, + "id": 5, + "nodeType": "InheritanceSpecifier", + "src": "202:5:0" + } + ], + "contractDependencies": [ + 730, + 808, + 831 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 229, + "linearizedBaseContracts": [ + 229, + 730, + 808, + 831 + ], + "name": "MyToken", + "nameLocation": "191:7:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "_decimal", + "nameLocation": "228:8:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "214:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "214:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "hexValue": "35", + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "239:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "visibility": "private" }, { - "body": { - "nodeType": "YulBlock", - "src": "12442:121:4", - "statements": [ - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12464:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12472:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12460:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "12460:14:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12476:34:4", - "type": "", - "value": "ERC20: transfer amount exceeds a" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12453:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "12453:58:4" + "constant": false, + "functionSelector": "c4f390dc", + "id": 18, + "mutability": "mutable", + "name": "allocate_token", + "nameLocation": "261:14:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "246:65:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "246:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31303030303030303030", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "278:10:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000_by_1", + "typeString": "int_const 1000000000" + }, + "value": "1000000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "291:2:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" }, - "nodeType": "YulExpressionStatement", - "src": "12453:58:4" + "value": "10" }, - { + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "arguments": [ + { + "id": 14, + "name": "_decimal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "302:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12532:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12540:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12528:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "12528:15:4" - }, + "argumentTypes": [ { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12545:10:4", - "type": "", - "value": "llowance" + "typeIdentifier": "t_uint8", + "typeString": "uint8" } ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12521:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "12521:35:4" + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "297:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 12, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "297:4:0", + "typeDescriptions": {} + } }, - "nodeType": "YulExpressionStatement", - "src": "12521:35:4" + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "297:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "291:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ] + }, + "src": "278:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "name": "store_literal_in_memory_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "12434:6:4", - "type": "" - } - ], - "src": "12336:227:4" + "visibility": "public" }, { - "body": { - "nodeType": "YulBlock", - "src": "12675:118:4", - "statements": [ + "anonymous": false, + "id": 26, + "name": "CustomTransfer", + "nameLocation": "324:14:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 25, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12697:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12705:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12693:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "12693:14:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12709:34:4", - "type": "", - "value": "ERC20: transfer from the zero ad" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12686:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "12686:58:4" + "constant": false, + "id": 20, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nameLocation": "365:5:0", + "nodeType": "VariableDeclaration", + "scope": 26, + "src": "349:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "nodeType": "YulExpressionStatement", - "src": "12686:58:4" + "typeName": { + "id": 19, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "349:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" }, { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12765:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12773:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12761:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "12761:15:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12778:7:4", - "type": "", - "value": "dress" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12754:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "12754:32:4" + "constant": false, + "id": 22, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nameLocation": "396:3:0", + "nodeType": "VariableDeclaration", + "scope": 26, + "src": "380:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "nodeType": "YulExpressionStatement", - "src": "12754:32:4" + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 24, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "417:7:0", + "nodeType": "VariableDeclaration", + "scope": 26, + "src": "409:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 23, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "409:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" } - ] + ], + "src": "339:91:0" }, - "name": "store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "12667:6:4", - "type": "" + "src": "318:113:0" + }, + { + "anonymous": false, + "id": 34, + "name": "CustomApproval", + "nameLocation": "443:14:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 28, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nameLocation": "483:6:0", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "467:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "467:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 30, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nameLocation": "515:8:0", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "499:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "499:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 32, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "541:7:0", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "533:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 31, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "533:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "457:97:0" + }, + "src": "437:118:0" + }, + { + "constant": false, + "functionSelector": "27e235e3", + "id": 38, + "mutability": "mutable", + "name": "balances", + "nameLocation": "596:8:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "560:44:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 37, + "keyType": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "568:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "560:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 36, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "579:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } - ], - "src": "12569:224:4" + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "55b6ed5c", + "id": 44, + "mutability": "mutable", + "name": "allowances", + "nameLocation": "666:10:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "610:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 43, + "keyType": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "618:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "610:47:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 42, + "keyType": { + "id": 40, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "637:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "629:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 41, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "648:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "visibility": "public" }, { "body": { - "nodeType": "YulBlock", - "src": "12905:117:4", + "id": 57, + "nodeType": "Block", + "src": "725:50:0", "statements": [ { "expression": { "arguments": [ { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12927:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "12935:1:4", - "type": "", - "value": "0" + "expression": { + "id": 52, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "741:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12923:3:4" }, - "nodeType": "YulFunctionCall", - "src": "12923:14:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "12939:34:4", - "type": "", - "value": "ERC20: approve from the zero add" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12916:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "12916:58:4" - }, - "nodeType": "YulExpressionStatement", - "src": "12916:58:4" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "12995:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13003:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "12991:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "12991:15:4" + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "741:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, { - "kind": "string", - "nodeType": "YulLiteral", - "src": "13008:6:4", - "type": "", - "value": "ress" + "id": 54, + "name": "allocate_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "753:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "12984:6:4" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 611, + "src": "735:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } }, - "nodeType": "YulFunctionCall", - "src": "12984:31:4" + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "735:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "nodeType": "YulExpressionStatement", - "src": "12984:31:4" + "id": 56, + "nodeType": "ExpressionStatement", + "src": "735:33:0" } ] }, - "name": "store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", - "nodeType": "YulFunctionDefinition", - "parameters": [ + "id": 58, + "implemented": true, + "kind": "constructor", + "modifiers": [ { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "12897:6:4", - "type": "" + "arguments": [ + { + "hexValue": "4461766964546f6b656e", + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "704:12:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d8e1c984adfcdd8f7acf742370a24786ed2598abc9f6eebe53ae5a629842b46c", + "typeString": "literal_string \"DavidToken\"" + }, + "value": "DavidToken" + }, + { + "hexValue": "44544e", + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "718:5:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2bd632785d9f1390e0bf7134c274246c4157a33314fce7063450ad83048a973d", + "typeString": "literal_string \"DTN\"" + }, + "value": "DTN" + } + ], + "id": 49, + "modifierName": { + "id": 46, + "name": "ERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 730, + "src": "697:5:0" + }, + "nodeType": "ModifierInvocation", + "src": "697:27:0" } ], - "src": "12799:223:4" + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 45, + "nodeType": "ParameterList", + "parameters": [], + "src": "694:2:0" + }, + "returnParameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "725:0:0" + }, + "scope": 229, + "src": "683:92:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" }, { + "baseFunctions": [ + 298 + ], "body": { - "nodeType": "YulBlock", - "src": "13134:118:4", + "id": 66, + "nodeType": "Block", + "src": "839:32:0", "statements": [ { "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "13156:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13164:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13152:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "13152:14:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "13168:34:4", - "type": "", - "value": "ERC20: decreased allowance below" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "13145:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "13145:58:4" - }, - "nodeType": "YulExpressionStatement", - "src": "13145:58:4" - }, - { - "expression": { - "arguments": [ - { - "arguments": [ - { - "name": "memPtr", - "nodeType": "YulIdentifier", - "src": "13224:6:4" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13232:2:4", - "type": "", - "value": "32" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "13220:3:4" - }, - "nodeType": "YulFunctionCall", - "src": "13220:15:4" - }, - { - "kind": "string", - "nodeType": "YulLiteral", - "src": "13237:7:4", - "type": "", - "value": " zero" - } - ], - "functionName": { - "name": "mstore", - "nodeType": "YulIdentifier", - "src": "13213:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "13213:32:4" + "id": 64, + "name": "_decimal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "856:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } }, - "nodeType": "YulExpressionStatement", - "src": "13213:32:4" + "functionReturnParameters": 63, + "id": 65, + "nodeType": "Return", + "src": "849:15:0" } ] }, - "name": "store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "memPtr", - "nodeType": "YulTypedName", - "src": "13126:6:4", - "type": "" - } - ], - "src": "13028:224:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "13301:79:4", - "statements": [ - { - "body": { - "nodeType": "YulBlock", - "src": "13358:16:4", - "statements": [ - { - "expression": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13367:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13370:1:4", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "13360:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "13360:12:4" - }, - "nodeType": "YulExpressionStatement", - "src": "13360:12:4" - } - ] + "functionSelector": "313ce567", + "id": 67, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nameLocation": "791:8:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 60, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "802:8:0" + }, + "parameters": { + "id": 59, + "nodeType": "ParameterList", + "parameters": [], + "src": "799:2:0" + }, + "returnParameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "832:5:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" }, - "condition": { + "typeName": { + "id": 61, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "832:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "831:7:0" + }, + "scope": 229, + "src": "782:89:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 308 + ], + "body": { + "id": 75, + "nodeType": "Block", + "src": "936:38:0", + "statements": [ + { + "expression": { + "id": 73, + "name": "allocate_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "953:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 72, + "id": 74, + "nodeType": "Return", + "src": "946:21:0" + } + ] + }, + "functionSelector": "18160ddd", + "id": 76, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nameLocation": "886:11:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 69, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "900:8:0" + }, + "parameters": { + "id": 68, + "nodeType": "ParameterList", + "parameters": [], + "src": "897:2:0" + }, + "returnParameters": { + "id": 72, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 71, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "930:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 70, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "930:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "929:6:0" + }, + "scope": 229, + "src": "877:97:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 343 + ], + "body": { + "id": 127, + "nodeType": "Block", + "src": "1074:304:0", + "statements": [ + { + "expression": { "arguments": [ { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "13324:5:4" + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 87, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1092:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } }, - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "13349:5:4" + "id": 90, + "indexExpression": { + "expression": { + "id": 88, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1101:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" } - ], - "functionName": { - "name": "cleanup_t_address", - "nodeType": "YulIdentifier", - "src": "13331:17:4" }, - "nodeType": "YulFunctionCall", - "src": "13331:24:4" + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1101:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1092:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "13321:2:4" }, - "nodeType": "YulFunctionCall", - "src": "13321:35:4" + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 91, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1092:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } } ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "13314:6:4" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 86, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1084:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } }, - "nodeType": "YulFunctionCall", - "src": "13314:43:4" + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1084:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "nodeType": "YulIf", - "src": "13311:2:4" - } - ] - }, - "name": "validator_revert_t_address", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "13294:5:4", - "type": "" - } - ], - "src": "13258:122:4" - }, - { - "body": { - "nodeType": "YulBlock", - "src": "13429:79:4", - "statements": [ + "id": 94, + "nodeType": "ExpressionStatement", + "src": "1084:40:0" + }, { - "body": { - "nodeType": "YulBlock", - "src": "13486:16:4", - "statements": [ + "expression": { + "arguments": [ { - "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 96, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "1142:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { "arguments": [ { + "hexValue": "30", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, "kind": "number", - "nodeType": "YulLiteral", - "src": "13495:1:4", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "13498:1:4", - "type": "", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1164:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, "value": "0" } ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "13488:6:4" - }, - "nodeType": "YulFunctionCall", - "src": "13488:12:4" - }, - "nodeType": "YulExpressionStatement", - "src": "13488:12:4" - } - ] - }, - "condition": { - "arguments": [ - { - "arguments": [ - { - "name": "value", - "nodeType": "YulIdentifier", - "src": "13452:5:4" - }, - { - "arguments": [ + "expression": { + "argumentTypes": [ { - "name": "value", - "nodeType": "YulIdentifier", - "src": "13477:5:4" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" } ], - "functionName": { - "name": "cleanup_t_uint256", - "nodeType": "YulIdentifier", - "src": "13459:17:4" + "id": 98, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1156:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" }, - "nodeType": "YulFunctionCall", - "src": "13459:24:4" + "typeName": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1156:7:0", + "typeDescriptions": {} + } + }, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1156:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "functionName": { - "name": "eq", - "nodeType": "YulIdentifier", - "src": "13449:2:4" }, - "nodeType": "YulFunctionCall", - "src": "13449:35:4" + "src": "1142:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4572726f723a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1168:37:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + }, + "value": "Error: transfer to the zero address" } ], - "functionName": { - "name": "iszero", - "nodeType": "YulIdentifier", - "src": "13442:6:4" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + } + ], + "id": 95, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1134:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } }, - "nodeType": "YulFunctionCall", - "src": "13442:43:4" + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1134:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "nodeType": "YulIf", - "src": "13439:2:4" + "id": 104, + "nodeType": "ExpressionStatement", + "src": "1134:72:0" + }, + { + "expression": { + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 105, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1216:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 108, + "indexExpression": { + "expression": { + "id": 106, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1225:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1225:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1216:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 109, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1240:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1216:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 111, + "nodeType": "ExpressionStatement", + "src": "1216:31:0" + }, + { + "expression": { + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 112, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 114, + "indexExpression": { + "id": 113, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "1266:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1257:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 115, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1281:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1257:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 117, + "nodeType": "ExpressionStatement", + "src": "1257:31:0" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 119, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1318:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1318:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 121, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "1330:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 122, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1342:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 118, + "name": "CustomTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "1303:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 124, + "nodeType": "EmitStatement", + "src": "1298:52:0" + }, + { + "expression": { + "hexValue": "74727565", + "id": 125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1367:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 85, + "id": 126, + "nodeType": "Return", + "src": "1360:11:0" } ] }, - "name": "validator_revert_t_uint256", - "nodeType": "YulFunctionDefinition", - "parameters": [ - { - "name": "value", - "nodeType": "YulTypedName", - "src": "13422:5:4", - "type": "" - } - ], - "src": "13386:122:4" - } - ] - }, - "contents": "{\n\n function abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_t_uint256(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_address(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(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_addresst_uint256(headStart, dataEnd) -> value0, value1, value2 {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 64\n\n value2 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_decode_tuple_t_addresst_uint256(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(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_uint256(add(headStart, offset), dataEnd)\n }\n\n }\n\n function abi_encode_t_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(value))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 34)\n store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 38)\n store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 40)\n store_literal_in_memory_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 37)\n store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 36)\n store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 37)\n store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_t_uint8_to_t_uint8_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint8(value))\n }\n\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_bool_to_t_bool_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8__to_t_string_memory_ptr__fromStack_reversed(headStart ) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function abi_encode_tuple_t_uint8__to_t_uint8__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint8_to_t_uint8_fromStack(value0, add(headStart, 0))\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {\n mstore(pos, length)\n updated_pos := add(pos, 0x20)\n }\n\n function checked_add_t_uint256(x, y) -> sum {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n // overflow, if x > (maxValue - y)\n if gt(x, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, y)) { panic_error_0x11() }\n\n sum := add(x, y)\n }\n\n function checked_sub_t_uint256(x, y) -> diff {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n\n if lt(x, y) { panic_error_0x11() }\n\n diff := sub(x, y)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(value))\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function cleanup_t_uint8(value) -> cleaned {\n cleaned := and(value, 0xff)\n }\n\n function copy_memory_to_memory(src, dst, length) {\n let i := 0\n for { } lt(i, length) { i := add(i, 32) }\n {\n mstore(add(dst, i), mload(add(src, i)))\n }\n if gt(i, length)\n {\n // clear end\n mstore(add(dst, length), 0)\n }\n }\n\n function extract_byte_array_length(data) -> length {\n length := div(data, 2)\n let outOfPlaceEncoding := and(data, 1)\n if iszero(outOfPlaceEncoding) {\n length := and(length, 0x7f)\n }\n\n if eq(outOfPlaceEncoding, lt(length, 32)) {\n panic_error_0x22()\n }\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n\n function panic_error_0x22() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x22)\n revert(0, 0x24)\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function store_literal_in_memory_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer to the zero addr\")\n\n mstore(add(memPtr, 32), \"ess\")\n\n }\n\n function store_literal_in_memory_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: approve to the zero addre\")\n\n mstore(add(memPtr, 32), \"ss\")\n\n }\n\n function store_literal_in_memory_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer amount exceeds b\")\n\n mstore(add(memPtr, 32), \"alance\")\n\n }\n\n function store_literal_in_memory_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer amount exceeds a\")\n\n mstore(add(memPtr, 32), \"llowance\")\n\n }\n\n function store_literal_in_memory_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: transfer from the zero ad\")\n\n mstore(add(memPtr, 32), \"dress\")\n\n }\n\n function store_literal_in_memory_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: approve from the zero add\")\n\n mstore(add(memPtr, 32), \"ress\")\n\n }\n\n function store_literal_in_memory_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20: decreased allowance below\")\n\n mstore(add(memPtr, 32), \" zero\")\n\n }\n\n function validator_revert_t_address(value) {\n if iszero(eq(value, cleanup_t_address(value))) { revert(0, 0) }\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n}\n", - "id": 4, - "language": "Yul", - "name": "#utility.yul" - } - ], - "sourceMap": "124:303:0:-:0;;;181:1;156:26;;;;;;;;;;;;;;;;;;;;221:4;188:37;;236:92;;;;;;;;;;1842:114:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1917:5;1909;:13;;;;;;;;;;;;:::i;:::-;;1942:7;1932;:17;;;;;;;;;;;;:::i;:::-;;1842:114;;288:33:0::1;294:10;306:14;;288:5;;;:33;;:::i;:::-;124:303:::0;;7940:330:1;8042:1;8023:21;;:7;:21;;;;8015:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;8091:49;8120:1;8124:7;8133:6;8091:20;;;:49;;:::i;:::-;8167:6;8151:12;;:22;;;;;;;:::i;:::-;;;;;;;;8205:6;8183:9;:18;8193:7;8183:18;;;;;;;;;;;;;;;;:28;;;;;;;:::i;:::-;;;;;;;;8247:7;8226:37;;8243:1;8226:37;;;8256:6;8226:37;;;;;;:::i;:::-;;;;;;;;7940:330;;:::o;10423:92::-;;;;:::o;124:303:0:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;7:366:4:-;;170:67;234:2;229:3;170:67;:::i;:::-;163:74;;246:93;335:3;246:93;:::i;:::-;364:2;359:3;355:12;348:19;;153:220;;;:::o;379:118::-;466:24;484:5;466:24;:::i;:::-;461:3;454:37;444:53;;:::o;503:419::-;;707:2;696:9;692:18;684:26;;756:9;750:4;746:20;742:1;731:9;727:17;720:47;784:131;910:4;784:131;:::i;:::-;776:139;;674:248;;;:::o;928:222::-;;1059:2;1048:9;1044:18;1036:26;;1072:71;1140:1;1129:9;1125:17;1116:6;1072:71;:::i;:::-;1026:124;;;;:::o;1156:169::-;;1274:6;1269:3;1262:19;1314:4;1309:3;1305:14;1290:29;;1252:73;;;;:::o;1331:305::-;;1390:20;1408:1;1390:20;:::i;:::-;1385:25;;1424:20;1442:1;1424:20;:::i;:::-;1419:25;;1578:1;1510:66;1506:74;1503:1;1500:81;1497:2;;;1584:18;;:::i;:::-;1497:2;1628:1;1625;1621:9;1614:16;;1375:261;;;;:::o;1642:77::-;;1708:5;1697:16;;1687:32;;;:::o;1725:320::-;;1806:1;1800:4;1796:12;1786:22;;1853:1;1847:4;1843:12;1874:18;1864:2;;1930:4;1922:6;1918:17;1908:27;;1864:2;1992;1984:6;1981:14;1961:18;1958:38;1955:2;;;2011:18;;:::i;:::-;1955:2;1776:269;;;;:::o;2051:180::-;2099:77;2096:1;2089:88;2196:4;2193:1;2186:15;2220:4;2217:1;2210:15;2237:180;2285:77;2282:1;2275:88;2382:4;2379:1;2372:15;2406:4;2403:1;2396:15;2423:181;2563:33;2559:1;2551:6;2547:14;2540:57;2529:75;:::o;124:303:0:-;;;;;;;", - "deployedSourceMap": "124:303:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2021:89:1;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4091:166;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3082:106;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4724:414;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;336:89:0;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;5533:212:1;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3246:125;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2223:93;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6232:371;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3574:172;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3804:149;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2021:89;2066:13;2098:5;2091:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2021:89;:::o;4091:166::-;4174:4;4190:39;4199:12;:10;:12::i;:::-;4213:7;4222:6;4190:8;:39::i;:::-;4246:4;4239:11;;4091:166;;;;:::o;3082:106::-;3143:7;3169:12;;3162:19;;3082:106;:::o;4724:414::-;4830:4;4846:36;4856:6;4864:9;4875:6;4846:9;:36::i;:::-;4893:24;4920:11;:19;4932:6;4920:19;;;;;;;;;;;;;;;:33;4940:12;:10;:12::i;:::-;4920:33;;;;;;;;;;;;;;;;4893:60;;4991:6;4971:16;:26;;4963:79;;;;;;;;;;;;:::i;:::-;;;;;;;;;5052:57;5061:6;5069:12;:10;:12::i;:::-;5102:6;5083:16;:25;;;;:::i;:::-;5052:8;:57::i;:::-;5127:4;5120:11;;;4724:414;;;;;:::o;336:89:0:-;386:5;410:8;;;;;;;;;;;403:15;;336:89;:::o;5533:212:1:-;5621:4;5637:80;5646:12;:10;:12::i;:::-;5660:7;5706:10;5669:11;:25;5681:12;:10;:12::i;:::-;5669:25;;;;;;;;;;;;;;;:34;5695:7;5669:34;;;;;;;;;;;;;;;;:47;;;;:::i;:::-;5637:8;:80::i;:::-;5734:4;5727:11;;5533:212;;;;:::o;3246:125::-;3320:7;3346:9;:18;3356:7;3346:18;;;;;;;;;;;;;;;;3339:25;;3246:125;;;:::o;2223:93::-;2270:13;2302:7;2295:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2223:93;:::o;6232:371::-;6325:4;6341:24;6368:11;:25;6380:12;:10;:12::i;:::-;6368:25;;;;;;;;;;;;;;;:34;6394:7;6368:34;;;;;;;;;;;;;;;;6341:61;;6440:15;6420:16;:35;;6412:85;;;;;;;;;;;;:::i;:::-;;;;;;;;;6507:67;6516:12;:10;:12::i;:::-;6530:7;6558:15;6539:16;:34;;;;:::i;:::-;6507:8;:67::i;:::-;6592:4;6585:11;;;6232:371;;;;:::o;3574:172::-;3660:4;3676:42;3686:12;:10;:12::i;:::-;3700:9;3711:6;3676:9;:42::i;:::-;3735:4;3728:11;;3574:172;;;;:::o;3804:149::-;3893:7;3919:11;:18;3931:5;3919:18;;;;;;;;;;;;;;;:27;3938:7;3919:27;;;;;;;;;;;;;;;;3912:34;;3804:149;;;;:::o;586:96:3:-;639:7;665:10;658:17;;586:96;:::o;9496:340:1:-;9614:1;9597:19;;:5;:19;;;;9589:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;9694:1;9675:21;;:7;:21;;;;9667:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;9776:6;9746:11;:18;9758:5;9746:18;;;;;;;;;;;;;;;:27;9765:7;9746:27;;;;;;;;;;;;;;;:36;;;;9813:7;9797:32;;9806:5;9797:32;;;9822:6;9797:32;;;;;;:::i;:::-;;;;;;;;9496:340;;;:::o;7077:592::-;7200:1;7182:20;;:6;:20;;;;7174:70;;;;;;;;;;;;:::i;:::-;;;;;;;;;7283:1;7262:23;;:9;:23;;;;7254:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;7336:47;7357:6;7365:9;7376:6;7336:20;:47::i;:::-;7394:21;7418:9;:17;7428:6;7418:17;;;;;;;;;;;;;;;;7394:41;;7470:6;7453:13;:23;;7445:74;;;;;;;;;;;;:::i;:::-;;;;;;;;;7565:6;7549:13;:22;;;;:::i;:::-;7529:9;:17;7539:6;7529:17;;;;;;;;;;;;;;;:42;;;;7605:6;7581:9;:20;7591:9;7581:20;;;;;;;;;;;;;;;;:30;;;;;;;:::i;:::-;;;;;;;;7644:9;7627:35;;7636:6;7627:35;;;7655:6;7627:35;;;;;;:::i;:::-;;;;;;;;7077:592;;;;:::o;10423:92::-;;;;:::o;7:139:4:-;;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:139::-;;236:6;223:20;214:29;;252:33;279:5;252:33;:::i;:::-;204:87;;;;:::o;297:262::-;;405:2;393:9;384:7;380:23;376:32;373:2;;;421:1;418;411:12;373:2;464:1;489:53;534:7;525:6;514:9;510:22;489:53;:::i;:::-;479:63;;435:117;363:196;;;;:::o;565:407::-;;;690:2;678:9;669:7;665:23;661:32;658:2;;;706:1;703;696:12;658:2;749:1;774:53;819:7;810:6;799:9;795:22;774:53;:::i;:::-;764:63;;720:117;876:2;902:53;947:7;938:6;927:9;923:22;902:53;:::i;:::-;892:63;;847:118;648:324;;;;;:::o;978:552::-;;;;1120:2;1108:9;1099:7;1095:23;1091:32;1088:2;;;1136:1;1133;1126:12;1088:2;1179:1;1204:53;1249:7;1240:6;1229:9;1225:22;1204:53;:::i;:::-;1194:63;;1150:117;1306:2;1332:53;1377:7;1368:6;1357:9;1353:22;1332:53;:::i;:::-;1322:63;;1277:118;1434:2;1460:53;1505:7;1496:6;1485:9;1481:22;1460:53;:::i;:::-;1450:63;;1405:118;1078:452;;;;;:::o;1536:407::-;;;1661:2;1649:9;1640:7;1636:23;1632:32;1629:2;;;1677:1;1674;1667:12;1629:2;1720:1;1745:53;1790:7;1781:6;1770:9;1766:22;1745:53;:::i;:::-;1735:63;;1691:117;1847:2;1873:53;1918:7;1909:6;1898:9;1894:22;1873:53;:::i;:::-;1863:63;;1818:118;1619:324;;;;;:::o;1949:109::-;2030:21;2045:5;2030:21;:::i;:::-;2025:3;2018:34;2008:50;;:::o;2064:364::-;;2180:39;2213:5;2180:39;:::i;:::-;2235:71;2299:6;2294:3;2235:71;:::i;:::-;2228:78;;2315:52;2360:6;2355:3;2348:4;2341:5;2337:16;2315:52;:::i;:::-;2392:29;2414:6;2392:29;:::i;:::-;2387:3;2383:39;2376:46;;2156:272;;;;;:::o;2434:366::-;;2597:67;2661:2;2656:3;2597:67;:::i;:::-;2590:74;;2673:93;2762:3;2673:93;:::i;:::-;2791:2;2786:3;2782:12;2775:19;;2580:220;;;:::o;2806:366::-;;2969:67;3033:2;3028:3;2969:67;:::i;:::-;2962:74;;3045:93;3134:3;3045:93;:::i;:::-;3163:2;3158:3;3154:12;3147:19;;2952:220;;;:::o;3178:366::-;;3341:67;3405:2;3400:3;3341:67;:::i;:::-;3334:74;;3417:93;3506:3;3417:93;:::i;:::-;3535:2;3530:3;3526:12;3519:19;;3324:220;;;:::o;3550:366::-;;3713:67;3777:2;3772:3;3713:67;:::i;:::-;3706:74;;3789:93;3878:3;3789:93;:::i;:::-;3907:2;3902:3;3898:12;3891:19;;3696:220;;;:::o;3922:366::-;;4085:67;4149:2;4144:3;4085:67;:::i;:::-;4078:74;;4161:93;4250:3;4161:93;:::i;:::-;4279:2;4274:3;4270:12;4263:19;;4068:220;;;:::o;4294:366::-;;4457:67;4521:2;4516:3;4457:67;:::i;:::-;4450:74;;4533:93;4622:3;4533:93;:::i;:::-;4651:2;4646:3;4642:12;4635:19;;4440:220;;;:::o;4666:366::-;;4829:67;4893:2;4888:3;4829:67;:::i;:::-;4822:74;;4905:93;4994:3;4905:93;:::i;:::-;5023:2;5018:3;5014:12;5007:19;;4812:220;;;:::o;5038:118::-;5125:24;5143:5;5125:24;:::i;:::-;5120:3;5113:37;5103:53;;:::o;5162:112::-;5245:22;5261:5;5245:22;:::i;:::-;5240:3;5233:35;5223:51;;:::o;5280:210::-;;5405:2;5394:9;5390:18;5382:26;;5418:65;5480:1;5469:9;5465:17;5456:6;5418:65;:::i;:::-;5372:118;;;;:::o;5496:313::-;;5647:2;5636:9;5632:18;5624:26;;5696:9;5690:4;5686:20;5682:1;5671:9;5667:17;5660:47;5724:78;5797:4;5788:6;5724:78;:::i;:::-;5716:86;;5614:195;;;;:::o;5815:419::-;;6019:2;6008:9;6004:18;5996:26;;6068:9;6062:4;6058:20;6054:1;6043:9;6039:17;6032:47;6096:131;6222:4;6096:131;:::i;:::-;6088:139;;5986:248;;;:::o;6240:419::-;;6444:2;6433:9;6429:18;6421:26;;6493:9;6487:4;6483:20;6479:1;6468:9;6464:17;6457:47;6521:131;6647:4;6521:131;:::i;:::-;6513:139;;6411:248;;;:::o;6665:419::-;;6869:2;6858:9;6854:18;6846:26;;6918:9;6912:4;6908:20;6904:1;6893:9;6889:17;6882:47;6946:131;7072:4;6946:131;:::i;:::-;6938:139;;6836:248;;;:::o;7090:419::-;;7294:2;7283:9;7279:18;7271:26;;7343:9;7337:4;7333:20;7329:1;7318:9;7314:17;7307:47;7371:131;7497:4;7371:131;:::i;:::-;7363:139;;7261:248;;;:::o;7515:419::-;;7719:2;7708:9;7704:18;7696:26;;7768:9;7762:4;7758:20;7754:1;7743:9;7739:17;7732:47;7796:131;7922:4;7796:131;:::i;:::-;7788:139;;7686:248;;;:::o;7940:419::-;;8144:2;8133:9;8129:18;8121:26;;8193:9;8187:4;8183:20;8179:1;8168:9;8164:17;8157:47;8221:131;8347:4;8221:131;:::i;:::-;8213:139;;8111:248;;;:::o;8365:419::-;;8569:2;8558:9;8554:18;8546:26;;8618:9;8612:4;8608:20;8604:1;8593:9;8589:17;8582:47;8646:131;8772:4;8646:131;:::i;:::-;8638:139;;8536:248;;;:::o;8790:222::-;;8921:2;8910:9;8906:18;8898:26;;8934:71;9002:1;8991:9;8987:17;8978:6;8934:71;:::i;:::-;8888:124;;;;:::o;9018:214::-;;9145:2;9134:9;9130:18;9122:26;;9158:67;9222:1;9211:9;9207:17;9198:6;9158:67;:::i;:::-;9112:120;;;;:::o;9238:99::-;;9324:5;9318:12;9308:22;;9297:40;;;:::o;9343:169::-;;9461:6;9456:3;9449:19;9501:4;9496:3;9492:14;9477:29;;9439:73;;;;:::o;9518:305::-;;9577:20;9595:1;9577:20;:::i;:::-;9572:25;;9611:20;9629:1;9611:20;:::i;:::-;9606:25;;9765:1;9697:66;9693:74;9690:1;9687:81;9684:2;;;9771:18;;:::i;:::-;9684:2;9815:1;9812;9808:9;9801:16;;9562:261;;;;:::o;9829:191::-;;9889:20;9907:1;9889:20;:::i;:::-;9884:25;;9923:20;9941:1;9923:20;:::i;:::-;9918:25;;9962:1;9959;9956:8;9953:2;;;9967:18;;:::i;:::-;9953:2;10012:1;10009;10005:9;9997:17;;9874:146;;;;:::o;10026:96::-;;10092:24;10110:5;10092:24;:::i;:::-;10081:35;;10071:51;;;:::o;10128:90::-;;10205:5;10198:13;10191:21;10180:32;;10170:48;;;:::o;10224:126::-;;10301:42;10294:5;10290:54;10279:65;;10269:81;;;:::o;10356:77::-;;10422:5;10411:16;;10401:32;;;:::o;10439:86::-;;10514:4;10507:5;10503:16;10492:27;;10482:43;;;:::o;10531:307::-;10599:1;10609:113;10623:6;10620:1;10617:13;10609:113;;;10708:1;10703:3;10699:11;10693:18;10689:1;10684:3;10680:11;10673:39;10645:2;10642:1;10638:10;10633:15;;10609:113;;;10740:6;10737:1;10734:13;10731:2;;;10820:1;10811:6;10806:3;10802:16;10795:27;10731:2;10580:258;;;;:::o;10844:320::-;;10925:1;10919:4;10915:12;10905:22;;10972:1;10966:4;10962:12;10993:18;10983:2;;11049:4;11041:6;11037:17;11027:27;;10983:2;11111;11103:6;11100:14;11080:18;11077:38;11074:2;;;11130:18;;:::i;:::-;11074:2;10895:269;;;;:::o;11170:180::-;11218:77;11215:1;11208:88;11315:4;11312:1;11305:15;11339:4;11336:1;11329:15;11356:180;11404:77;11401:1;11394:88;11501:4;11498:1;11491:15;11525:4;11522:1;11515:15;11542:102;;11634:2;11630:7;11625:2;11618:5;11614:14;11610:28;11600:38;;11590:54;;;:::o;11650:222::-;11790:34;11786:1;11778:6;11774:14;11767:58;11859:5;11854:2;11846:6;11842:15;11835:30;11756:116;:::o;11878:221::-;12018:34;12014:1;12006:6;12002:14;11995:58;12087:4;12082:2;12074:6;12070:15;12063:29;11984:115;:::o;12105:225::-;12245:34;12241:1;12233:6;12229:14;12222:58;12314:8;12309:2;12301:6;12297:15;12290:33;12211:119;:::o;12336:227::-;12476:34;12472:1;12464:6;12460:14;12453:58;12545:10;12540:2;12532:6;12528:15;12521:35;12442:121;:::o;12569:224::-;12709:34;12705:1;12697:6;12693:14;12686:58;12778:7;12773:2;12765:6;12761:15;12754:32;12675:118;:::o;12799:223::-;12939:34;12935:1;12927:6;12923:14;12916:58;13008:6;13003:2;12995:6;12991:15;12984:31;12905:117;:::o;13028:224::-;13168:34;13164:1;13156:6;13152:14;13145:58;13237:7;13232:2;13224:6;13220:15;13213:32;13134:118;:::o;13258:122::-;13331:24;13349:5;13331:24;:::i;:::-;13324:5;13321:35;13311:2;;13370:1;13367;13360:12;13311:2;13301:79;:::o;13386:122::-;13459:24;13477:5;13459:24;:::i;:::-;13452:5;13449:35;13439:2;;13498:1;13495;13488:12;13439:2;13429:79;:::o", - "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.4.22 <0.9.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\n\ncontract MyToken is ERC20 {\n uint8 private _decimal = 5;\n uint256 private allocate_token = 1000;\n \n constructor() ERC20 (\"DavidToken\", \"DTN\") {\n _mint(msg.sender, allocate_token);\n } \n function decimals() override public view returns (uint8) {\n return _decimal;\n }\n}", - "sourcePath": "/Users/mac/codes/token_wallets/contracts/MyToken.sol", - "ast": { - "absolutePath": "/Users/mac/codes/token_wallets/contracts/MyToken.sol", - "exportedSymbols": { - "Context": [ - 636 - ], - "ERC20": [ - 535 - ], - "IERC20": [ - 613 - ], - "MyToken": [ - 34 - ] - }, - "id": 35, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.4", - ".22", - "<", - "0.9", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "32:32:0" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "id": 2, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 35, - "sourceUnit": 536, - "src": "66:55:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 3, - "name": "ERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 535, - "src": "144:5:0" - }, - "id": 4, - "nodeType": "InheritanceSpecifier", - "src": "144:5:0" - } - ], - "contractDependencies": [ - 535, - 613, - 636 - ], - "contractKind": "contract", - "fullyImplemented": true, - "id": 34, - "linearizedBaseContracts": [ - 34, - 535, - 613, - 636 - ], - "name": "MyToken", - "nameLocation": "133:7:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "_decimal", - "nameLocation": "170:8:0", - "nodeType": "VariableDeclaration", - "scope": 34, - "src": "156:26:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 5, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "156:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "hexValue": "35", - "id": 6, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "181:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "allocate_token", - "nameLocation": "204:14:0", - "nodeType": "VariableDeclaration", - "scope": 34, - "src": "188:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "functionSelector": "a9059cbb", + "id": 128, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "989:8:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 82, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1042:8:0" }, - "typeName": { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "188:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "parameters": { + "id": 81, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 78, + "mutability": "mutable", + "name": "_recipient", + "nameLocation": "1006:10:0", + "nodeType": "VariableDeclaration", + "scope": 128, + "src": "998:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 77, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "998:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 80, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "1026:7:0", + "nodeType": "VariableDeclaration", + "scope": 128, + "src": "1018:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 79, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "997:37:0" }, - "value": { - "hexValue": "31303030", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "221:4:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - }, - "value": "1000" + "returnParameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "success", + "nameLocation": "1065:7:0", + "nodeType": "VariableDeclaration", + "scope": 128, + "src": "1060:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 83, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1060:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1059:14:0" }, - "visibility": "private" + "scope": 229, + "src": "980:398:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" }, { + "baseFunctions": [ + 429 + ], "body": { - "id": 23, + "id": 198, "nodeType": "Block", - "src": "278:50:0", + "src": "1498:462:0", "statements": [ { "expression": { "arguments": [ { - "expression": { - "id": 18, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "294:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "294:10:0", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 141, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1516:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 143, + "indexExpression": { + "id": 142, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1525:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1516:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 144, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1538:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1516:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 140, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1508:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1508:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "1508:38:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 149, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1564:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1586:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1578:7:0", + "typeDescriptions": {} + } + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1578:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1564:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4572726f723a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1590:37:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + }, + "value": "Error: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + } + ], + "id": 148, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1556:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1556:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "ExpressionStatement", + "src": "1556:72:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 159, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1699:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "baseExpression": { + "baseExpression": { + "id": 160, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "1710:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 162, + "indexExpression": { + "id": 161, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1721:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1710:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 165, + "indexExpression": { + "expression": { + "id": 163, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1730:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1730:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1710:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1699:42:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1691:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1691:51:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 168, + "nodeType": "ExpressionStatement", + "src": "1691:51:0" + }, + { + "expression": { + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 169, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1752:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 171, + "indexExpression": { + "id": 170, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1761:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1752:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 172, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1773:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1752:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 174, + "nodeType": "ExpressionStatement", + "src": "1752:28:0" + }, + { + "expression": { + "id": 179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 175, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1790:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 177, + "indexExpression": { + "id": 176, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1799:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1790:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 178, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1790:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 180, + "nodeType": "ExpressionStatement", + "src": "1790:31:0" + }, + { + "expression": { + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 181, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "1831:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 185, + "indexExpression": { + "id": 182, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1842:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1831:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 186, + "indexExpression": { + "expression": { + "id": 183, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1851:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1851:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1831:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 187, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1866:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1831:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "1831:42:0" + }, + { + "eventCall": { + "arguments": [ + { + "id": 191, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 192, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1912:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 193, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 190, + "name": "CustomTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "1888:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1888:44:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 195, + "nodeType": "EmitStatement", + "src": "1883:49:0" + }, + { + "expression": { + "hexValue": "74727565", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1949:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 139, + "id": 197, + "nodeType": "Return", + "src": "1942:11:0" + } + ] + }, + "functionSelector": "23b872dd", + "id": 199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "1392:12:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 136, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1466:8:0" + }, + "parameters": { + "id": 135, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "mutability": "mutable", + "name": "_sender", + "nameLocation": "1413:7:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1405:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1405:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "mutability": "mutable", + "name": "_recipient", + "nameLocation": "1430:10:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1422:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 131, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1422:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "1450:7:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1442:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1442:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1404:54:0" + }, + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 138, + "mutability": "mutable", + "name": "success", + "nameLocation": "1489:7:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1484:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 137, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1484:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1483:14:0" + }, + "scope": 229, + "src": "1383:577:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 382 + ], + "body": { + "id": 227, + "nodeType": "Block", + "src": "2055:138:0", + "statements": [ + { + "expression": { + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 209, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "2065:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 213, + "indexExpression": { + "expression": { + "id": 210, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2076:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2076:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2065:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 214, + "indexExpression": { + "id": 212, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 201, + "src": "2088:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2065:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 215, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "2100:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2065:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2065:42:0" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 219, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2137:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2137:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 221, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 201, + "src": "2148:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 222, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "2157:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 218, + "name": "CustomApproval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 34, + "src": "2122:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2122:43:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 224, + "nodeType": "EmitStatement", + "src": "2117:48:0" + }, + { + "expression": { + "hexValue": "74727565", + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2182:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 208, + "id": 226, + "nodeType": "Return", + "src": "2175:11:0" + } + ] + }, + "functionSelector": "095ea7b3", + "id": 228, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "1974:7:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 205, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2024:8:0" + }, + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 201, + "mutability": "mutable", + "name": "_spender", + "nameLocation": "1990:8:0", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "1982:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 200, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1982:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "2008:7:0", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "2000:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2000:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1981:35:0" + }, + "returnParameters": { + "id": 208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 207, + "mutability": "mutable", + "name": "success", + "nameLocation": "2047:7:0", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "2042:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 206, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2042:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2041:14:0" + }, + "scope": 229, + "src": "1965:228:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 230, + "src": "182:2014:0" + } + ], + "src": "32:2164:0" + }, + "legacyAST": { + "absolutePath": "/Users/mac/codes/token_wallets/contracts/MyToken.sol", + "exportedSymbols": { + "Context": [ + 831 + ], + "ERC20": [ + 730 + ], + "IERC20": [ + 808 + ], + "MyToken": [ + 229 + ] + }, + "id": 230, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.4", + ".22", + "<", + "0.9", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:32:0" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "id": 2, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 731, + "src": "66:55:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 230, + "sourceUnit": 809, + "src": "122:56:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4, + "name": "ERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 730, + "src": "202:5:0" + }, + "id": 5, + "nodeType": "InheritanceSpecifier", + "src": "202:5:0" + } + ], + "contractDependencies": [ + 730, + 808, + 831 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 229, + "linearizedBaseContracts": [ + 229, + 730, + 808, + 831 + ], + "name": "MyToken", + "nameLocation": "191:7:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 8, + "mutability": "mutable", + "name": "_decimal", + "nameLocation": "228:8:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "214:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "214:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": { + "hexValue": "35", + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "239:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "c4f390dc", + "id": 18, + "mutability": "mutable", + "name": "allocate_token", + "nameLocation": "261:14:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "246:65:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "246:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "31303030303030303030", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "278:10:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000_by_1", + "typeString": "int_const 1000000000" + }, + "value": "1000000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "291:2:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "arguments": [ + { + "id": 14, + "name": "_decimal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "302:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "297:4:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 12, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "297:4:0", + "typeDescriptions": {} + } + }, + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "297:14:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "291:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "278:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "id": 26, + "name": "CustomTransfer", + "nameLocation": "324:14:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 25, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 20, + "indexed": true, + "mutability": "mutable", + "name": "_from", + "nameLocation": "365:5:0", + "nodeType": "VariableDeclaration", + "scope": 26, + "src": "349:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 19, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "349:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 22, + "indexed": true, + "mutability": "mutable", + "name": "_to", + "nameLocation": "396:3:0", + "nodeType": "VariableDeclaration", + "scope": 26, + "src": "380:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 21, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 24, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "417:7:0", + "nodeType": "VariableDeclaration", + "scope": 26, + "src": "409:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 23, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "409:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "339:91:0" + }, + "src": "318:113:0" + }, + { + "anonymous": false, + "id": 34, + "name": "CustomApproval", + "nameLocation": "443:14:0", + "nodeType": "EventDefinition", + "parameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 28, + "indexed": true, + "mutability": "mutable", + "name": "_owner", + "nameLocation": "483:6:0", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "467:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "467:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 30, + "indexed": true, + "mutability": "mutable", + "name": "_spender", + "nameLocation": "515:8:0", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "499:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "499:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 32, + "indexed": false, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "541:7:0", + "nodeType": "VariableDeclaration", + "scope": 34, + "src": "533:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 31, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "533:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "457:97:0" + }, + "src": "437:118:0" + }, + { + "constant": false, + "functionSelector": "27e235e3", + "id": 38, + "mutability": "mutable", + "name": "balances", + "nameLocation": "596:8:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "560:44:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 37, + "keyType": { + "id": 35, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "568:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "560:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 36, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "579:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "55b6ed5c", + "id": 44, + "mutability": "mutable", + "name": "allowances", + "nameLocation": "666:10:0", + "nodeType": "VariableDeclaration", + "scope": 229, + "src": "610:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 43, + "keyType": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "618:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "610:47:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 42, + "keyType": { + "id": 40, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "637:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "629:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 41, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "648:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "visibility": "public" + }, + { + "body": { + "id": 57, + "nodeType": "Block", + "src": "725:50:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 52, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "741:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "741:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 54, + "name": "allocate_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "753:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 51, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 611, + "src": "735:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "735:33:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 56, + "nodeType": "ExpressionStatement", + "src": "735:33:0" + } + ] + }, + "id": 58, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "hexValue": "4461766964546f6b656e", + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "704:12:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d8e1c984adfcdd8f7acf742370a24786ed2598abc9f6eebe53ae5a629842b46c", + "typeString": "literal_string \"DavidToken\"" + }, + "value": "DavidToken" + }, + { + "hexValue": "44544e", + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "718:5:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2bd632785d9f1390e0bf7134c274246c4157a33314fce7063450ad83048a973d", + "typeString": "literal_string \"DTN\"" + }, + "value": "DTN" + } + ], + "id": 49, + "modifierName": { + "id": 46, + "name": "ERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 730, + "src": "697:5:0" + }, + "nodeType": "ModifierInvocation", + "src": "697:27:0" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 45, + "nodeType": "ParameterList", + "parameters": [], + "src": "694:2:0" + }, + "returnParameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "725:0:0" + }, + "scope": 229, + "src": "683:92:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 298 + ], + "body": { + "id": 66, + "nodeType": "Block", + "src": "839:32:0", + "statements": [ + { + "expression": { + "id": 64, + "name": "_decimal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "856:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 63, + "id": 65, + "nodeType": "Return", + "src": "849:15:0" + } + ] + }, + "functionSelector": "313ce567", + "id": 67, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nameLocation": "791:8:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 60, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "802:8:0" + }, + "parameters": { + "id": 59, + "nodeType": "ParameterList", + "parameters": [], + "src": "799:2:0" + }, + "returnParameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 62, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "832:5:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 61, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "832:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "831:7:0" + }, + "scope": 229, + "src": "782:89:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 308 + ], + "body": { + "id": 75, + "nodeType": "Block", + "src": "936:38:0", + "statements": [ + { + "expression": { + "id": 73, + "name": "allocate_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "953:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 72, + "id": 74, + "nodeType": "Return", + "src": "946:21:0" + } + ] + }, + "functionSelector": "18160ddd", + "id": 76, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nameLocation": "886:11:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 69, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "900:8:0" + }, + "parameters": { + "id": 68, + "nodeType": "ParameterList", + "parameters": [], + "src": "897:2:0" + }, + "returnParameters": { + "id": 72, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 71, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "930:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 70, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "930:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "929:6:0" + }, + "scope": 229, + "src": "877:97:0", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 343 + ], + "body": { + "id": 127, + "nodeType": "Block", + "src": "1074:304:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 92, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 87, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1092:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 90, + "indexExpression": { + "expression": { + "id": 88, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1101:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1101:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1092:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 91, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1092:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 86, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1084:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 93, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1084:40:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 94, + "nodeType": "ExpressionStatement", + "src": "1084:40:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 96, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "1142:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1164:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 98, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1156:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1156:7:0", + "typeDescriptions": {} + } + }, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1156:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1142:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4572726f723a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1168:37:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + }, + "value": "Error: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + } + ], + "id": 95, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1134:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1134:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 104, + "nodeType": "ExpressionStatement", + "src": "1134:72:0" + }, + { + "expression": { + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 105, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1216:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 108, + "indexExpression": { + "expression": { + "id": 106, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1225:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1225:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1216:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 109, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1240:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1216:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 111, + "nodeType": "ExpressionStatement", + "src": "1216:31:0" + }, + { + "expression": { + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 112, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 114, + "indexExpression": { + "id": 113, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "1266:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1257:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 115, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1281:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1257:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 117, + "nodeType": "ExpressionStatement", + "src": "1257:31:0" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 119, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1318:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1318:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 121, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "1330:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 122, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "1342:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 118, + "name": "CustomTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26, + "src": "1303:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:47:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 124, + "nodeType": "EmitStatement", + "src": "1298:52:0" + }, + { + "expression": { + "hexValue": "74727565", + "id": 125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1367:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 85, + "id": 126, + "nodeType": "Return", + "src": "1360:11:0" + } + ] + }, + "functionSelector": "a9059cbb", + "id": 128, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nameLocation": "989:8:0", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 82, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1042:8:0" + }, + "parameters": { + "id": 81, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 78, + "mutability": "mutable", + "name": "_recipient", + "nameLocation": "1006:10:0", + "nodeType": "VariableDeclaration", + "scope": 128, + "src": "998:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 77, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "998:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 80, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "1026:7:0", + "nodeType": "VariableDeclaration", + "scope": 128, + "src": "1018:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 79, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "997:37:0" + }, + "returnParameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 84, + "mutability": "mutable", + "name": "success", + "nameLocation": "1065:7:0", + "nodeType": "VariableDeclaration", + "scope": 128, + "src": "1060:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 83, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1060:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1059:14:0" + }, + "scope": 229, + "src": "980:398:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 429 + ], + "body": { + "id": 198, + "nodeType": "Block", + "src": "1498:462:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 141, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1516:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 143, + "indexExpression": { + "id": 142, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1525:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1516:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 144, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1538:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1516:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 140, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1508:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1508:38:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "1508:38:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 149, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1564:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1586:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1578:7:0", + "typeDescriptions": {} + } + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1578:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1564:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4572726f723a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1590:37:0", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + }, + "value": "Error: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12f1872f3f0426fd1d91da8e76196412087864a2d0ba7424adbd9567a1fc6cc1", + "typeString": "literal_string \"Error: transfer to the zero address\"" + } + ], + "id": 148, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1556:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1556:72:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "ExpressionStatement", + "src": "1556:72:0" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 159, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1699:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "baseExpression": { + "baseExpression": { + "id": 160, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "1710:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 162, + "indexExpression": { + "id": 161, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1721:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1710:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 165, + "indexExpression": { + "expression": { + "id": 163, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1730:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1730:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1710:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1699:42:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1691:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1691:51:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 168, + "nodeType": "ExpressionStatement", + "src": "1691:51:0" + }, + { + "expression": { + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 169, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1752:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 171, + "indexExpression": { + "id": 170, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1761:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1752:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 172, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1773:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1752:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 174, + "nodeType": "ExpressionStatement", + "src": "1752:28:0" + }, + { + "expression": { + "id": 179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 175, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "1790:8:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 177, + "indexExpression": { + "id": 176, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1799:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1790:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 178, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1790:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 180, + "nodeType": "ExpressionStatement", + "src": "1790:31:0" + }, + { + "expression": { + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 181, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "1831:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 185, + "indexExpression": { + "id": 182, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1842:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1831:19:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 186, + "indexExpression": { + "expression": { + "id": 183, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "1851:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1851:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1831:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 187, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1866:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1831:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "1831:42:0" + }, + { + "eventCall": { + "arguments": [ + { + "id": 191, + "name": "_sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 192, + "name": "_recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1912:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 20, - "name": "allocate_token", + "id": 193, + "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "306:14:0", + "referencedDeclaration": 134, + "src": "1924:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8179,6 +13598,10 @@ ], "expression": { "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, { "typeIdentifier": "t_address", "typeString": "address" @@ -8188,18 +13611,18 @@ "typeString": "uint256" } ], - "id": 17, - "name": "_mint", + "id": 190, + "name": "CustomTransfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "288:5:0", + "referencedDeclaration": 26, + "src": "1888:14:0", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" } }, - "id": 21, + "id": 194, "isConstant": false, "isLValue": false, "isPure": false, @@ -8207,395 +13630,349 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "288:33:0", + "src": "1888:44:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "288:33:0" - } - ] - }, - "id": 24, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "hexValue": "4461766964546f6b656e", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "257:12:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8e1c984adfcdd8f7acf742370a24786ed2598abc9f6eebe53ae5a629842b46c", - "typeString": "literal_string \"DavidToken\"" - }, - "value": "DavidToken" - }, - { - "hexValue": "44544e", - "id": 14, + "id": 195, + "nodeType": "EmitStatement", + "src": "1883:49:0" + }, + { + "expression": { + "hexValue": "74727565", + "id": 196, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "string", + "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "271:5:0", + "src": "1949:4:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bd632785d9f1390e0bf7134c274246c4157a33314fce7063450ad83048a973d", - "typeString": "literal_string \"DTN\"" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "value": "DTN" - } - ], - "id": 15, - "modifierName": { - "id": 12, - "name": "ERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 535, - "src": "250:5:0" - }, - "nodeType": "ModifierInvocation", - "src": "250:27:0" - } - ], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "247:2:0" - }, - "returnParameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [], - "src": "278:0:0" - }, - "scope": 34, - "src": "236:92:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 103 - ], - "body": { - "id": 32, - "nodeType": "Block", - "src": "393:32:0", - "statements": [ - { - "expression": { - "id": 30, - "name": "_decimal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "410:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "value": "true" }, - "functionReturnParameters": 29, - "id": 31, + "functionReturnParameters": 139, + "id": 197, "nodeType": "Return", - "src": "403:15:0" + "src": "1942:11:0" } ] }, - "functionSelector": "313ce567", - "id": 33, + "functionSelector": "23b872dd", + "id": 199, "implemented": true, "kind": "function", "modifiers": [], - "name": "decimals", - "nameLocation": "345:8:0", + "name": "transferFrom", + "nameLocation": "1392:12:0", "nodeType": "FunctionDefinition", "overrides": { - "id": 26, + "id": 136, "nodeType": "OverrideSpecifier", "overrides": [], - "src": "356:8:0" + "src": "1466:8:0" }, "parameters": { - "id": 25, - "nodeType": "ParameterList", - "parameters": [], - "src": "353:2:0" - }, - "returnParameters": { - "id": 29, + "id": 135, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28, + "id": 130, "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", + "name": "_sender", + "nameLocation": "1413:7:0", "nodeType": "VariableDeclaration", - "scope": 33, - "src": "386:5:0", + "scope": 199, + "src": "1405:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_address", + "typeString": "address" }, "typeName": { - "id": 27, - "name": "uint8", + "id": 129, + "name": "address", "nodeType": "ElementaryTypeName", - "src": "386:5:0", + "src": "1405:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_address", + "typeString": "address" } }, "visibility": "internal" - } - ], - "src": "385:7:0" - }, - "scope": 34, - "src": "336:89:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 35, - "src": "124:303:0" - } - ], - "src": "32:395:0" - }, - "legacyAST": { - "absolutePath": "/Users/mac/codes/token_wallets/contracts/MyToken.sol", - "exportedSymbols": { - "Context": [ - 636 - ], - "ERC20": [ - 535 - ], - "IERC20": [ - 613 - ], - "MyToken": [ - 34 - ] - }, - "id": 35, - "license": "MIT", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.4", - ".22", - "<", - "0.9", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "32:32:0" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", - "id": 2, - "nameLocation": "-1:-1:-1", - "nodeType": "ImportDirective", - "scope": 35, - "sourceUnit": 536, - "src": "66:55:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 3, - "name": "ERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 535, - "src": "144:5:0" - }, - "id": 4, - "nodeType": "InheritanceSpecifier", - "src": "144:5:0" - } - ], - "contractDependencies": [ - 535, - 613, - 636 - ], - "contractKind": "contract", - "fullyImplemented": true, - "id": 34, - "linearizedBaseContracts": [ - 34, - 535, - 613, - 636 - ], - "name": "MyToken", - "nameLocation": "133:7:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "_decimal", - "nameLocation": "170:8:0", - "nodeType": "VariableDeclaration", - "scope": 34, - "src": "156:26:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 5, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "156:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": { - "hexValue": "35", - "id": 6, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "181:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - }, - "visibility": "private" - }, - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "allocate_token", - "nameLocation": "204:14:0", - "nodeType": "VariableDeclaration", - "scope": 34, - "src": "188:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "188:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + }, + { + "constant": false, + "id": 132, + "mutability": "mutable", + "name": "_recipient", + "nameLocation": "1430:10:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1422:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 131, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1422:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "1450:7:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1442:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 133, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1442:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1404:54:0" }, - "value": { - "hexValue": "31303030", - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "221:4:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_1000_by_1", - "typeString": "int_const 1000" - }, - "value": "1000" + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 138, + "mutability": "mutable", + "name": "success", + "nameLocation": "1489:7:0", + "nodeType": "VariableDeclaration", + "scope": 199, + "src": "1484:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 137, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1484:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1483:14:0" }, - "visibility": "private" + "scope": 229, + "src": "1383:577:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" }, { + "baseFunctions": [ + 382 + ], "body": { - "id": 23, + "id": 227, "nodeType": "Block", - "src": "278:50:0", + "src": "2055:138:0", "statements": [ { "expression": { + "id": 216, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 209, + "name": "allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 44, + "src": "2065:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 213, + "indexExpression": { + "expression": { + "id": 210, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967281, + "src": "2076:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "2076:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2065:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 214, + "indexExpression": { + "id": 212, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 201, + "src": "2088:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2065:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 215, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "2100:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2065:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 217, + "nodeType": "ExpressionStatement", + "src": "2065:42:0" + }, + { + "eventCall": { "arguments": [ { "expression": { - "id": 18, + "id": 219, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4294967281, - "src": "294:3:0", + "src": "2137:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 19, + "id": 220, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", - "src": "294:10:0", + "src": "2137:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { - "id": 20, - "name": "allocate_token", + "id": 221, + "name": "_spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 201, + "src": "2148:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 222, + "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "306:14:0", + "referencedDeclaration": 203, + "src": "2157:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8604,6 +13981,10 @@ ], "expression": { "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, { "typeIdentifier": "t_address", "typeString": "address" @@ -8613,18 +13994,18 @@ "typeString": "uint256" } ], - "id": 17, - "name": "_mint", + "id": 218, + "name": "CustomApproval", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "288:5:0", + "referencedDeclaration": 34, + "src": "2122:14:0", "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" } }, - "id": 21, + "id": 223, "isConstant": false, "isLValue": false, "isPure": false, @@ -8632,192 +14013,276 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "288:33:0", + "src": "2122:43:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "288:33:0" - } - ] - }, - "id": 24, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "hexValue": "4461766964546f6b656e", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "257:12:0", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d8e1c984adfcdd8f7acf742370a24786ed2598abc9f6eebe53ae5a629842b46c", - "typeString": "literal_string \"DavidToken\"" - }, - "value": "DavidToken" - }, - { - "hexValue": "44544e", - "id": 14, + "id": 224, + "nodeType": "EmitStatement", + "src": "2117:48:0" + }, + { + "expression": { + "hexValue": "74727565", + "id": 225, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "string", + "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "271:5:0", + "src": "2182:4:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2bd632785d9f1390e0bf7134c274246c4157a33314fce7063450ad83048a973d", - "typeString": "literal_string \"DTN\"" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "value": "DTN" - } - ], - "id": 15, - "modifierName": { - "id": 12, - "name": "ERC20", - "nodeType": "IdentifierPath", - "referencedDeclaration": 535, - "src": "250:5:0" - }, - "nodeType": "ModifierInvocation", - "src": "250:27:0" - } - ], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "247:2:0" - }, - "returnParameters": { - "id": 16, - "nodeType": "ParameterList", - "parameters": [], - "src": "278:0:0" - }, - "scope": 34, - "src": "236:92:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 103 - ], - "body": { - "id": 32, - "nodeType": "Block", - "src": "393:32:0", - "statements": [ - { - "expression": { - "id": 30, - "name": "_decimal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "410:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } + "value": "true" }, - "functionReturnParameters": 29, - "id": 31, + "functionReturnParameters": 208, + "id": 226, "nodeType": "Return", - "src": "403:15:0" + "src": "2175:11:0" } ] }, - "functionSelector": "313ce567", - "id": 33, + "functionSelector": "095ea7b3", + "id": 228, "implemented": true, "kind": "function", "modifiers": [], - "name": "decimals", - "nameLocation": "345:8:0", + "name": "approve", + "nameLocation": "1974:7:0", "nodeType": "FunctionDefinition", "overrides": { - "id": 26, + "id": 205, "nodeType": "OverrideSpecifier", "overrides": [], - "src": "356:8:0" + "src": "2024:8:0" }, "parameters": { - "id": 25, + "id": 204, "nodeType": "ParameterList", - "parameters": [], - "src": "353:2:0" + "parameters": [ + { + "constant": false, + "id": 201, + "mutability": "mutable", + "name": "_spender", + "nameLocation": "1990:8:0", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "1982:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 200, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1982:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "_amount", + "nameLocation": "2008:7:0", + "nodeType": "VariableDeclaration", + "scope": 228, + "src": "2000:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 202, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2000:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1981:35:0" }, "returnParameters": { - "id": 29, + "id": 208, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 28, + "id": 207, "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", + "name": "success", + "nameLocation": "2047:7:0", "nodeType": "VariableDeclaration", - "scope": 33, - "src": "386:5:0", + "scope": 228, + "src": "2042:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bool", + "typeString": "bool" }, "typeName": { - "id": 27, - "name": "uint8", + "id": 206, + "name": "bool", "nodeType": "ElementaryTypeName", - "src": "386:5:0", + "src": "2042:4:0", "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, "visibility": "internal" } ], - "src": "385:7:0" + "src": "2041:14:0" }, - "scope": 34, - "src": "336:89:0", - "stateMutability": "view", + "scope": 229, + "src": "1965:228:0", + "stateMutability": "nonpayable", "virtual": false, "visibility": "public" } ], - "scope": 35, - "src": "124:303:0" + "scope": 230, + "src": "182:2014:0" } ], - "src": "32:395:0" + "src": "32:2164:0" }, "compiler": { "name": "solc", "version": "0.8.2+commit.661d1103.Emscripten.clang" }, "networks": { + "5777": { + "events": { + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + "0xa5b63270bc30dbece5a3561130b09ca66d4c9a98b85da30bb24181c102ee584d": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "CustomApproval", + "type": "event" + }, + "0xe5e0aab7feb98b539542ebe6f8ae203f58e3ca9648e12808e9298825debc15be": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "CustomTransfer", + "type": "event" + }, + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + }, + "links": {}, + "address": "0x2967C0c69814775338ed424d0dD6A31b5DB61730", + "transactionHash": "0x3ea8fa5d94d7f66ced9a83f0d40675e210e95c1229cce375e98c71f8e4acf6b0" + }, "1617704049410": { "events": {}, "links": {}, @@ -8829,10 +14294,16 @@ "links": {}, "address": "0x6C0cC05B1299D52dA05e4b9032AED173b19daAaA", "transactionHash": "0x3f2c0c4ddebf933c93974197931500f61c277438964ae8058f61a2064db3c30f" + }, + "1618780535164": { + "events": {}, + "links": {}, + "address": "0xa817889D39aa935F18C8A9d0bDC2F2B28B4B1ab4", + "transactionHash": "0xe85e4e18925c9e54144dc9c6c06ffba110aa9648c359b84e0f0ed97b76a6828a" } }, "schemaVersion": "3.3.4", - "updatedAt": "2021-04-06T12:02:18.513Z", + "updatedAt": "2021-05-19T00:16:34.012Z", "networkType": "ethereum", "devdoc": { "kind": "dev", @@ -8840,9 +14311,6 @@ "allowance(address,address)": { "details": "See {IERC20-allowance}." }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." - }, "balanceOf(address)": { "details": "See {IERC20-balanceOf}." }, @@ -8863,12 +14331,6 @@ }, "totalSupply()": { "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." } }, "version": 1 diff --git a/contracts/MyToken.sol b/contracts/MyToken.sol index a10c460..2114e40 100644 --- a/contracts/MyToken.sol +++ b/contracts/MyToken.sol @@ -2,16 +2,70 @@ pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + contract MyToken is ERC20 { uint8 private _decimal = 5; - uint256 private allocate_token = 1000; - + uint256 public allocate_token = 1000000000 * 10 ** uint(_decimal); + + event CustomTransfer ( + address indexed _from, + address indexed _to, + uint256 _amount + ); + + event CustomApproval( + address indexed _owner, + address indexed _spender, + uint256 _amount + ); + mapping(address => uint256) public balances; + mapping(address => mapping(address => uint256)) public allowances; + constructor() ERC20 ("DavidToken", "DTN") { - _mint(msg.sender, allocate_token); - } + balances[msg.sender] += allocate_token; + } + + function decimals() override public view returns (uint8) { return _decimal; } + + function totalSupply() override public view returns (uint) { + return allocate_token; + } + + function returnOwnerBalance() public view returns (uint256) { + return balances[msg.sender]; + } + + function transfer(address _recipient, uint256 _amount) public override returns (bool success) { + require(_recipient != address(0), "Error: transfer to the zero address"); + require(balances[msg.sender] >= _amount, 'Error Insufficient balance in the recepient wallet'); + balances[msg.sender] -= _amount; + balances[_recipient] += _amount; + emit CustomTransfer(msg.sender, _recipient, _amount); + return true; + } + function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool success) { + require(balances[_sender] >= _amount); + require(_recipient != address(0), "Error: transfer to the zero address"); + require(_amount <= allowances[_sender][msg.sender]); + balances[_sender] -= _amount; + balances[_recipient] += _amount; + allowances[_sender][msg.sender] -= _amount; + emit CustomTransfer(_sender, _recipient, _amount); + return true; + } + function approve(address _spender, uint256 _amount) public override returns (bool success){ + allowances[msg.sender][_spender] = _amount; + emit CustomApproval(msg.sender,_spender,_amount); + return true; + } + function balanceOf( address account) override public view returns (uint256) { + return balances[account]; + } + } \ No newline at end of file diff --git a/helper.js b/helper.js new file mode 100644 index 0000000..c1a3b59 --- /dev/null +++ b/helper.js @@ -0,0 +1,3 @@ +module.exports = (count) => { + return count * 10 ** 5 +} diff --git a/package-lock.json b/package-lock.json index 210e344..c69d142 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2838,11 +2838,109 @@ "fastq": "^1.6.0" } }, + "@openzeppelin/contract-loader": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.2.tgz", + "integrity": "sha512-/P8v8ZFVwK+Z7rHQH2N3hqzEmTzLFjhMtvNK4FeIak6DEeONZ92vdFaFb10CCCQtp390Rp/Y57Rtfrm50bUdMQ==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, "@openzeppelin/contracts": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.0.0.tgz", "integrity": "sha512-UcIJl/vUVjTr3H1yYXZi7Sr2PlXzBEHVUJKOUlVyzyy0FI8oQCCy0Wx+BuK/fojdnmLeMvUk4KUvhKUybP+C7Q==" }, + "@openzeppelin/test-helpers": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.11.tgz", + "integrity": "sha512-HkFpCjtTD8dk+wdYhsT07YbMGCE+Z4Wp5sBKXvPDF3Lynoc0H2KqZgCWV+qr2YZ0WW1oX/sXkKFrrKJ0caBTjw==", + "dev": true, + "requires": { + "@openzeppelin/contract-loader": "^0.6.2", + "@truffle/contract": "^4.0.35", + "ansi-colors": "^3.2.3", + "chai": "^4.2.0", + "chai-bn": "^0.2.1", + "ethjs-abi": "^0.2.1", + "lodash.flatten": "^4.4.0", + "semver": "^5.6.0", + "web3": "^1.2.5", + "web3-utils": "^1.2.5" + }, + "dependencies": { + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + } + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -3008,6 +3106,12 @@ "fast-check": "^2.12.1" } }, + "@truffle/blockchain-utils": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.0.30.tgz", + "integrity": "sha512-3hkHSHxVavoALcxpBqD4YwHuCmkBrvjq6PAGw93i6WCB+pnejBD5sFjVCiZZKCogh4kGObxxcwu53+3dyT/6IQ==", + "dev": true + }, "@truffle/code-utils": { "version": "1.2.25", "resolved": "https://registry.npmjs.org/@truffle/code-utils/-/code-utils-1.2.25.tgz", @@ -3065,6 +3169,438 @@ "original-require": "^1.0.1" } }, + "@truffle/contract": { + "version": "4.3.16", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.3.16.tgz", + "integrity": "sha512-/GhDFu8pu1TMVev5WTxQj87Vo8Di5Uo0LXvdV7ESdUbEIzMlm9pjfkf2uWg8Jx2aSBGgfCeLXw8GVScBk9OjlA==", + "dev": true, + "requires": { + "@truffle/blockchain-utils": "^0.0.30", + "@truffle/contract-schema": "^3.4.1", + "@truffle/debug-utils": "^5.0.16", + "@truffle/error": "^0.0.14", + "@truffle/interface-adapter": "^0.4.23", + "bignumber.js": "^7.2.1", + "ethereum-ens": "^0.8.0", + "ethers": "^4.0.32", + "web3": "1.3.5", + "web3-core-helpers": "1.3.5", + "web3-core-promievent": "1.3.5", + "web3-eth-abi": "1.3.5", + "web3-utils": "1.3.5" + }, + "dependencies": { + "@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "dev": true, + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "@truffle/error": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.14.tgz", + "integrity": "sha512-utJx+SZYoMqk8wldQG4gCVKhV8GwMJbWY7sLXFT/D8wWZTnE2peX7URFJh/cxkjTRCO328z1s2qewkhyVsu2HA==", + "dev": true + }, + "@truffle/interface-adapter": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.4.23.tgz", + "integrity": "sha512-mfpwY25Apx36WHHNJMNHWyDQVFZoZYNQ43rOwr/n+5gAMxke7+D7+IR9UW4kuO/Jp0+2848UxMdRV+oqm017kQ==", + "dev": true, + "requires": { + "bn.js": "^5.1.3", + "ethers": "^4.0.32", + "web3": "1.3.5" + } + }, + "@types/node": { + "version": "12.20.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.13.tgz", + "integrity": "sha512-1x8W5OpxPq+T85OUsHRP6BqXeosKmeXRtjoF39STcdf/UWLqUsoehstZKOi0CunhVqHG17AyZgpj20eRVooK6A==", + "dev": true + }, + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "dev": true + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true + }, + "oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "dev": true, + "requires": { + "http-https": "^1.0.0" + } + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "web3": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.3.5.tgz", + "integrity": "sha512-UyQW/MT5EIGBrXPCh/FDIaD7RtJTn5/rJUNw2FOglp0qoXnCQHNKvntiR1ylztk05fYxIF6UgsC76IrazlKJjw==", + "dev": true, + "requires": { + "web3-bzz": "1.3.5", + "web3-core": "1.3.5", + "web3-eth": "1.3.5", + "web3-eth-personal": "1.3.5", + "web3-net": "1.3.5", + "web3-shh": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-bzz": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.3.5.tgz", + "integrity": "sha512-XiEUAbB1uKm/agqfwBsCW8fbw+sma85TfwuDpdcy591vinVk0S9TfWgLxro6v1KJ6nSELySIbKGbAJbh2GSyxw==", + "dev": true, + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40", + "underscore": "1.9.1" + } + }, + "web3-core": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.3.5.tgz", + "integrity": "sha512-VQjTvnGTqJwDwjKEHSApea3RmgtFGLDSJ6bqrOyHROYNyTyKYjFQ/drG9zs3rjDkND9mgh8foI1ty37Qua3QCQ==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.3.5", + "web3-core-method": "1.3.5", + "web3-core-requestmanager": "1.3.5", + "web3-utils": "1.3.5" + }, + "dependencies": { + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true + } + } + }, + "web3-core-helpers": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.3.5.tgz", + "integrity": "sha512-HYh3ix5FjysgT0jyzD8s/X5ym0b4BGU7I2QtuBiydMnE0mQEWy7GcT9XKpTySA8FTOHHIAQYvQS07DN/ky3UzA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-core-method": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.3.5.tgz", + "integrity": "sha512-hCbmgQ+At6OTuaNGAdjXMsCr4eUCmp9yGKSuaB5HdkNVDpqFso4HHjVxcjNrTyJp3OZnyjKBzQzK1ZWLpLl84Q==", + "dev": true, + "requires": { + "@ethersproject/transactions": "^5.0.0-beta.135", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.5", + "web3-core-promievent": "1.3.5", + "web3-core-subscriptions": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-core-promievent": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.3.5.tgz", + "integrity": "sha512-K0j8x3ZJr0eAyNvyUCxOUsSTd4hco0/9nxxlyOuijcsa6YV8l9NL6eqhniWbSyxCJT8ka5Mb7yAiUZe69EDLBQ==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4" + } + }, + "web3-core-requestmanager": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.3.5.tgz", + "integrity": "sha512-9l294U3Ga8qmvv8E37BqjQREfMs+kFnkU3PY28g9DZGYzKvl3V1dgDYqxyrOBdCFhc7rNSpHdgC4PrVHjouspg==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "util": "^0.12.0", + "web3-core-helpers": "1.3.5", + "web3-providers-http": "1.3.5", + "web3-providers-ipc": "1.3.5", + "web3-providers-ws": "1.3.5" + } + }, + "web3-core-subscriptions": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.3.5.tgz", + "integrity": "sha512-6mtXdaEB1V1zKLqYBq7RF2W75AK5ZJNGpW6QYC7Zvbku7zq1ZlgaUkJo88JKMWJ7etfaHaYqQ/7VveHk5sQynA==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.5" + } + }, + "web3-eth": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.3.5.tgz", + "integrity": "sha512-5qqDPMMD+D0xRqOV2ePU2G7/uQmhn0FgCEhFzKDMHrssDQJyQLW/VgfA0NLn64lWnuUrGnQStGvNxrWf7MgsfA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.3.5", + "web3-core-helpers": "1.3.5", + "web3-core-method": "1.3.5", + "web3-core-subscriptions": "1.3.5", + "web3-eth-abi": "1.3.5", + "web3-eth-accounts": "1.3.5", + "web3-eth-contract": "1.3.5", + "web3-eth-ens": "1.3.5", + "web3-eth-iban": "1.3.5", + "web3-eth-personal": "1.3.5", + "web3-net": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-eth-abi": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.5.tgz", + "integrity": "sha512-bkbG2v/mOW5DH6rF/SEgqunusjYoEi2IBw+fkmD3rzWDaEY7+/i1xY94AeO257d06QMgld75GtV/N+aEs7A6vQ==", + "dev": true, + "requires": { + "@ethersproject/abi": "5.0.7", + "underscore": "1.9.1", + "web3-utils": "1.3.5" + } + }, + "web3-eth-accounts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.3.5.tgz", + "integrity": "sha512-r3WOR21rgm6Cd6OFnifr3Tizdm5K+g2TsSOPySwX4FrgLrYDL6ck4zr5VXUPz+llpSExb/JztpE8pqEHr3U2NA==", + "dev": true, + "requires": { + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "scrypt-js": "^3.0.1", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.3.5", + "web3-core-helpers": "1.3.5", + "web3-core-method": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-eth-contract": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.3.5.tgz", + "integrity": "sha512-WfGVeQquN3D7Qm+KEIN9EI7yrm/fL2V9Y4+YhDWiKA/ns1pX1LYcEWojTOnBXCnPF3tcvoKKL+KBxXg1iKm38A==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.5", + "underscore": "1.9.1", + "web3-core": "1.3.5", + "web3-core-helpers": "1.3.5", + "web3-core-method": "1.3.5", + "web3-core-promievent": "1.3.5", + "web3-core-subscriptions": "1.3.5", + "web3-eth-abi": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-eth-ens": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.3.5.tgz", + "integrity": "sha512-5bkpFTXV18CvaVP8kCbLZZm2r1TWUv9AsXH+80yz8bTZulUGvXsBMRfK6e5nfEr2Yv59xlIXCFoalmmySI9EJw==", + "dev": true, + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.3.5", + "web3-core-helpers": "1.3.5", + "web3-core-promievent": "1.3.5", + "web3-eth-abi": "1.3.5", + "web3-eth-contract": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-eth-iban": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.3.5.tgz", + "integrity": "sha512-x+BI/d2Vt0J1cKK8eFd4W0f1TDjgEOYCwiViTb28lLE+tqrgyPqWDA+l6UlKYLF/yMFX3Dym4ofcCOtgcn4q4g==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "web3-utils": "1.3.5" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "web3-eth-personal": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.3.5.tgz", + "integrity": "sha512-xELQHNZ8p3VoO1582ghCaq+Bx7pSkOOalc6/ACOCGtHDMelqgVejrmSIZGScYl+k0HzngmQAzURZWQocaoGM1g==", + "dev": true, + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.3.5", + "web3-core-helpers": "1.3.5", + "web3-core-method": "1.3.5", + "web3-net": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-net": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.3.5.tgz", + "integrity": "sha512-usbFbuUpKK8s7jPLGoUzi/WpNnefGFPTj948aJv8BZ04UQA4L/XS5NNkkhk358zNMmhGfEFW8wrWy+0Oy0njtA==", + "dev": true, + "requires": { + "web3-core": "1.3.5", + "web3-core-method": "1.3.5", + "web3-utils": "1.3.5" + } + }, + "web3-providers-http": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.3.5.tgz", + "integrity": "sha512-ZQOmceFjcajEZdiuqciXjijwIYWNmEJ1oxMtbrwB2eGxHRCMXEH2xGRUZuhOFNF88yQC/VXVi14yvYg5ZlFJlA==", + "dev": true, + "requires": { + "web3-core-helpers": "1.3.5", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.3.5.tgz", + "integrity": "sha512-cbZOeb/sALiHjzMolJjIyHla/J5wdL2JKUtRO66Nh/uLALBCpU8JUgzNvpAdJ1ae3+A33+EdFStdzuDYHKtQew==", + "dev": true, + "requires": { + "oboe": "2.1.5", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.5" + } + }, + "web3-providers-ws": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.3.5.tgz", + "integrity": "sha512-zeZ4LMvKhYaJBDCqA//Bzgp4r/T0tNq5U/xvN0axA4YflzF7yqlsbzGwCkcZYDbrUaK3Ltl2uOmvwjbWALOZ1A==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.3.5", + "websocket": "^1.0.32" + } + }, + "web3-shh": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.3.5.tgz", + "integrity": "sha512-aRwzCduXvuGVslLL/Y15VcOHa70Qr2kxZI7UwOzQVhaaOdxuRRvo3AK/cmyln1Tsd54/n93Yk8I3qg5I2+6alw==", + "dev": true, + "requires": { + "web3-core": "1.3.5", + "web3-core-method": "1.3.5", + "web3-core-subscriptions": "1.3.5", + "web3-net": "1.3.5" + } + }, + "web3-utils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", + "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + } + } + }, + "@truffle/contract-schema": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.1.tgz", + "integrity": "sha512-2gvu6gxJtbbI67H2Bwh2rBuej+1uCV3z4zKFzQZP00hjNoL+QfybrmBcOVB88PflBeEB+oUXuwQfDoKX3TXlnQ==", + "dev": true, + "requires": { + "ajv": "^6.10.0", + "crypto-js": "^3.1.9-1", + "debug": "^4.3.1" + } + }, "@truffle/db": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.6.tgz", @@ -3093,6 +3629,94 @@ "web3-utils": "1.2.9" } }, + "@truffle/debug-utils": { + "version": "5.0.16", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-5.0.16.tgz", + "integrity": "sha512-1I6DYs/eGeeTPXi+S3720HCzb9bsG5X6Oxjh2K/tlV0GeDnsmr+PN+ODFpbpa/ZtY0W07+5vBUUo+wzNlbOZrA==", + "dev": true, + "requires": { + "@truffle/codec": "^0.10.6", + "@trufflesuite/chromafi": "^2.2.2", + "bn.js": "^5.1.3", + "chalk": "^2.4.2", + "debug": "^4.3.1", + "highlight.js": "^10.4.0", + "highlightjs-solidity": "^1.0.22" + }, + "dependencies": { + "@truffle/codec": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.10.6.tgz", + "integrity": "sha512-laKk5iL2Y9W0ndNnFAy2f3tuhwYV4PlQf1aZO3mlxk0QgCVkhS1G+p/b2xsJp75CI1PVVvEfGwjshQk8qL04wA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "bn.js": "^5.1.3", + "cbor": "^5.1.0", + "debug": "^4.3.1", + "lodash.clonedeep": "^4.5.0", + "lodash.escaperegexp": "^4.1.2", + "lodash.partition": "^4.6.0", + "lodash.sum": "^4.0.2", + "semver": "^7.3.4", + "utf8": "^3.0.0", + "web3-utils": "1.3.5" + } + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "web3-utils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", + "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + } + } + }, "@truffle/debugger": { "version": "8.0.20", "resolved": "https://registry.npmjs.org/@truffle/debugger/-/debugger-8.0.20.tgz", @@ -3187,6 +3811,57 @@ "web3-utils": "1.2.9" } }, + "@trufflesuite/chromafi": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-2.2.2.tgz", + "integrity": "sha512-mItQwVBsb8qP/vaYHQ1kDt2vJLhjoEXJptT6y6fJGvFophMFhOI/NsTVUa0nJL1nyMeFiS6hSYuNVdpQZzB1gA==", + "dev": true, + "requires": { + "ansi-mark": "^1.0.0", + "ansi-regex": "^3.0.0", + "array-uniq": "^1.0.3", + "camelcase": "^4.1.0", + "chalk": "^2.3.2", + "cheerio": "^1.0.0-rc.2", + "detect-indent": "^5.0.0", + "he": "^1.1.1", + "highlight.js": "^10.4.1", + "lodash.merge": "^4.6.2", + "min-indent": "^1.0.0", + "strip-ansi": "^4.0.0", + "strip-indent": "^2.0.0", + "super-split": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "@types/accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", @@ -3561,8 +4236,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", - "dev": true, - "optional": true + "dev": true }, "ajv": { "version": "6.12.6", @@ -3582,6 +4256,36 @@ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, + "ansi-mark": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ansi-mark/-/ansi-mark-1.0.4.tgz", + "integrity": "sha1-HNS6jVfxXxCdaq9uycqXhsik7mw=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "array-uniq": "^1.0.3", + "chalk": "^2.3.2", + "strip-ansi": "^4.0.0", + "super-split": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", @@ -4026,6 +4730,12 @@ "dev": true, "optional": true }, + "array-filter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", + "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", + "dev": true + }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -4039,6 +4749,12 @@ "dev": true, "optional": true }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", @@ -4101,6 +4817,12 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", @@ -4137,6 +4859,15 @@ "dev": true, "optional": true }, + "available-typed-arrays": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", + "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", + "dev": true, + "requires": { + "array-filter": "^1.0.0" + } + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -4777,12 +5508,31 @@ "nofilter": "^1.0.4" } }, + "chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chai-bn": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.1.tgz", + "integrity": "sha512-01jt2gSXAw7UYFPT5K8d7HYjdXj2vyeIuE+0T/34FWzlNcVbs1JkPxRu7rYMfQnJhrHT8Nr6qjSf5ZwwLU2EYg==", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "optional": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -4815,6 +5565,12 @@ "upper-case-first": "^1.1.0" } }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, "cheerio": { "version": "1.0.0-rc.2", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", @@ -5301,6 +6057,12 @@ "randomfill": "^1.0.3" } }, + "crypto-js": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", + "dev": true + }, "crypto-random-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", @@ -5458,6 +6220,15 @@ "mimic-response": "^1.0.0" } }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -6200,6 +6971,20 @@ } } }, + "ethereum-ens": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", + "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", + "dev": true, + "requires": { + "bluebird": "^3.4.7", + "eth-ens-namehash": "^2.0.0", + "js-sha3": "^0.5.7", + "pako": "^1.0.4", + "underscore": "^1.8.3", + "web3": "^1.0.0-beta.34" + } + }, "ethereumjs-common": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", @@ -6244,7 +7029,6 @@ "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", "dev": true, - "optional": true, "requires": { "aes-js": "3.0.0", "bn.js": "^4.4.0", @@ -6261,8 +7045,32 @@ "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true, - "optional": true + "dev": true + } + } + }, + "ethjs-abi": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", + "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "js-sha3": "0.5.5", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, + "js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=", + "dev": true } } }, @@ -7675,6 +8483,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, "get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", @@ -8102,8 +8916,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "optional": true + "dev": true }, "has-symbol-support-x": { "version": "1.4.2", @@ -8178,6 +8991,18 @@ "upper-case": "^1.1.3" } }, + "highlight.js": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.2.tgz", + "integrity": "sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg==", + "dev": true + }, + "highlightjs-solidity": { + "version": "1.0.22", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-1.0.22.tgz", + "integrity": "sha512-Ha1TDrtOwCDCSa+D99CMCdm2fOlpMqcEzC45rpwyr6SOPvor69tqhecolUA7TjnfHU8zJswH3lnxI1ti0tLmFw==", + "dev": true + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -8595,6 +9420,12 @@ "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", "dev": true }, + "is-generator-function": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", + "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==", + "dev": true + }, "is-glob": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", @@ -8731,6 +9562,19 @@ "has-symbols": "^1.0.1" } }, + "is-typed-array": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", + "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.0-next.2", + "foreach": "^2.0.5", + "has-symbols": "^1.0.1" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -9816,6 +10660,12 @@ "dom-walk": "^0.1.0" } }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -10940,6 +11790,12 @@ "dev": true, "optional": true }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -11097,6 +11953,12 @@ } } }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, "pbkdf2": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", @@ -12829,8 +13691,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true, - "optional": true + "dev": true }, "secp256k1": { "version": "4.0.2", @@ -12847,8 +13708,7 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "optional": true + "dev": true }, "send": { "version": "0.17.1", @@ -12950,8 +13810,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", - "dev": true, - "optional": true + "dev": true }, "setprototypeof": { "version": "1.1.1", @@ -13327,6 +14186,12 @@ "is-hex-prefixed": "1.0.0" } }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -13412,12 +14277,17 @@ } } }, + "super-split": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/super-split/-/super-split-1.1.0.tgz", + "integrity": "sha512-I4bA5mgcb6Fw5UJ+EkpzqXfiuvVGS/7MuND+oBxNFmxu3ugLNrdIatzBLfhFRMVMLxgSsRy+TjIktgkF9RFSNQ==", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "optional": true, "requires": { "has-flag": "^3.0.0" } @@ -13802,6 +14672,12 @@ "prelude-ls": "~1.1.2" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -14017,6 +14893,20 @@ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", "dev": true }, + "util": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", + "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14047,8 +14937,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", - "dev": true, - "optional": true + "dev": true }, "vali-date": { "version": "1.0.0", @@ -14645,6 +15534,21 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "which-typed-array": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", + "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", + "foreach": "^2.0.5", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.1", + "is-typed-array": "^1.1.3" + } + }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", @@ -14815,8 +15719,7 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", - "dev": true, - "optional": true + "dev": true }, "xss": { "version": "1.0.8", diff --git a/package.json b/package.json index 498cd10..a705172 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,14 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "start:ganache": "npx ganache-cli -p 8545 && npx truffle migrate -network development" + "test": "npx truffle test --network development", + "test:ganache": "npx ganache-cli -p 8545", + "start:ganache": "npx ganache-cli -p 8545 && npx truffle migrate -network development" }, "author": "", "license": "ISC", "devDependencies": { + "@openzeppelin/test-helpers": "^0.5.11", "ganache-cli": "^6.12.2", "truffle": "^5.2.6" }, diff --git a/test/testToken.js b/test/testToken.js new file mode 100644 index 0000000..bfa62b9 --- /dev/null +++ b/test/testToken.js @@ -0,0 +1,80 @@ +const MyToken = artifacts.require('MyToken'); +const toWei = require('../helper.js'); +const { expectRevert, constants } = require('@openzeppelin/test-helpers') + +contract("myToken", async account => { + let contractInstance; + const token = 'DTN'; + const globalname= 'DavidToken'; + const allocate_token= 1000000000; + const deployer = account[0]; + const reciever = account[1]; + const nilAddress = account[7]; + beforeEach( async () => { + contractInstance = await MyToken.deployed(); + }) + it("it return the appropraite name ", async () => { + const name = await contractInstance.name(); + assert.equal(name, globalname); + }); + it("should return the tokenName", async () => { + const tokenSymbol = await contractInstance.symbol(); + assert.equal(tokenSymbol, token); + }); + it("should return decimal", async () => { + const returnDecimal = await contractInstance.decimals(); + assert.equal(returnDecimal.toString(), 5); + }); + it("should have appropriate totalSupply", async () => { + const totalSupply = await contractInstance.totalSupply(); + assert.equal( totalSupply.toString(), toWei(allocate_token)); + }); + it("allocates the initial supply to minter deployment", async () => { + const deployerBalance = await contractInstance.returnOwnerBalance(); + const totalSupply = await contractInstance.totalSupply(); + assert.equal(deployerBalance.toString(), totalSupply.toString()); + }); + it("test revert for transfer higher than sender balance", async () => { + await expectRevert.unspecified(contractInstance.transfer(account[1], 4452453656354631, {from:account[0]})); + }); + it("test revert for transfer higher than sender balance", async () => { + await expectRevert.unspecified( + contractInstance.transfer(constants.ZERO_ADDRESS, 456345, { from: account[0] }) + ); + }); + it("returns a zero balance for accont that has no transefer to it", async () => { + const balance = await contractInstance.balanceOf(nilAddress); + assert.equal(balance.toString(),0) + }); + it("returns of createor", async () => { + const balance = await contractInstance.returnOwnerBalance(); + assert.equal(balance.toString(), toWei(allocate_token)) + }); + it("returns token amount transfer to it", async () => { + const amount = toWei(500); + await contractInstance.transfer(reciever, amount); + const balance = await contractInstance.balanceOf(reciever); + assert.equal(balance.toString(), amount) + }); + it("returns should not allow me to send token to myself", async () => { + const amount = toWei(500); + await expectRevert.unspecified(contractInstance.transferFrom(deployer, deployer, amount)); + }); + it("returns should not allow sending token users dont have", async () => { + const recieved = toWei(10); + const sent = toWei(30) + await contractInstance.transfer(reciever, recieved); + await expectRevert.unspecified(contractInstance.transferFrom(reciever, deployer, sent)); + }); + + it('it should emit a Transfer Event', async () => { + const amount = toWei(10); + const { logs } = await contractInstance.transfer(reciever, amount , {from:deployer}); + assert.equal(logs.length, 1, 'No Transfer Event emitted'); + assert.equal(logs[0].event, 'CustomTransfer'); + assert.equal(logs[0].args._from, deployer); + assert.equal(logs[0].args._to, reciever); + assert.equal(logs[0].args._amount, amount); + }); + +}) \ No newline at end of file