diff --git a/build/contracts/BETokenMall.json b/build/contracts/BETokenMall.json new file mode 100644 index 0000000..1f0bb28 --- /dev/null +++ b/build/contracts/BETokenMall.json @@ -0,0 +1,16610 @@ +{ + "contractName": "BETokenMall", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_seller", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "AddERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "BuyTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "RemoveERC20Suppout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "seller", + "type": "address" + } + ], + "name": "SellerUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "TokenAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "pricePre", + "type": "uint256" + } + ], + "name": "UpdateTokenPrice", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "addERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "erc20Supported", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "executor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "prices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "name": "removeERC20Support", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "seller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_feeToAddress", + "type": "address" + } + ], + "name": "setFeeToAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "updateExecutor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "updateTokenAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_seller", + "type": "address" + } + ], + "name": "updateSeller", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "updateTokenPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "currency", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "buyToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"AddERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BuyTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"RemoveERC20Suppout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"seller\",\"type\":\"address\"}],\"name\":\"SellerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pricePre\",\"type\":\"uint256\"}],\"name\":\"UpdateTokenPrice\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"addERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"buyToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"erc20Supported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"prices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"erc20\",\"type\":\"address\"}],\"name\":\"removeERC20Support\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"seller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_feeToAddress\",\"type\":\"address\"}],\"name\":\"setFeeToAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"updateExecutor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"updateSeller\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"}],\"name\":\"updateTokenAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"updateTokenPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"buyToken(address,uint256)\":{\"details\":\"Buy token\"},\"constructor\":{\"details\":\"Constructor\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateExecutor(address)\":{\"details\":\"update executor\"},\"updateSeller(address)\":{\"details\":\"Update seller address\"},\"updateTokenAddress(address)\":{\"details\":\"Update token address\"},\"updateTokenPrice(address,uint256)\":{\"details\":\"Update token price\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/market/BETokenMall.sol\":\"BETokenMall\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://41319e7f621f2dc3733511332c4fd032f8e32ad2aa7fd6f665c19741d9941a34\",\"dweb:/ipfs/QmcYR3bd862GD1Bc7jwrU9bGxrhUu5na1oP964bDCu2id1\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5\",\"dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc5b5dc12fbc4002f282eaa7a5f06d8310ed62c1c77c5770f6283e058454c39a\",\"dweb:/ipfs/Qme9rE2wS3yBuyJq9GgbmzbsBQsW2M2sVFqYYLw7bosGrv\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://656cda26512ddd7373c2d5551c8fae759fc30f05b10f0fc2e738e9274199dbd4\",\"dweb:/ipfs/QmTSArSzQRFbQmHgq7U1PZXnsDFhvDZhKVu9CzMG4yo6Lx\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931\",\"dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"project:/contracts/market/BETokenMall.sol\":{\"keccak256\":\"0xad7cdcaf9659e5e4c7af8596154cd2de28e0fdc53495ed5dcf5b7899d05dc6b0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6432d9c3f00bc344e2be5e355a72ee93259fa72976ac5013d4a87405a41c7a66\",\"dweb:/ipfs/QmRtwet7QoCg8yEk5aGDTw2eUZCgRLNZTYvJ9C2EiFom1M\"]},\"project:/contracts/market/MallBase.sol\":{\"keccak256\":\"0x21e5909f6a86d62b20ebbc92171e8f87638f1c34e35ec88768181b7c4271de65\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c487dd4637521c4e8c11697f5a9acb5188770dc89334b1ea72e2ce5058f605ab\",\"dweb:/ipfs/QmSakyzDfsYCX6VHsVfGrzuwXHWhq8PNxuMkafS1yjREhq\"]},\"project:/contracts/utils/UInt.sol\":{\"keccak256\":\"0xabf10d6f1fd47ffe04ab44b8b2f6638eece2276c3a8ba170d0c660e8212a7a8c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2b1d61926fb315a771d8fd0d5d9a85ea58a154cd976a7500e12a1e2b3e14083\",\"dweb:/ipfs/QmbJkytTjjABgWbYLJBHv3uoLEAcbF7pWig71sd2rjGG2M\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620026c7380380620026c783398181016040528101906200003791906200021f565b620000576200004b620000e960201b60201c565b620000f160201b60201c565b600160048190555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505062000266565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001e782620001ba565b9050919050565b620001f981620001da565b81146200020557600080fd5b50565b6000815190506200021981620001ee565b92915050565b60008060408385031215620002395762000238620001b5565b5b6000620002498582860162000208565b92505060206200025c8582860162000208565b9150509250929050565b61245180620002766000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80639017f79e116100a2578063cfed246b11610071578063cfed246b1461026c578063d4ee651b1461029c578063dbbdae63146102b8578063f2fde38b146102d4578063fdf397ee146102f05761010b565b80639017f79e146101e45780639d76ea5814610214578063b9d2df6114610232578063c34c08e51461024e5761010b565b806368f8fc10116100de57806368f8fc1014610184578063715018a6146101a057806374936c16146101aa5780638da5cb5b146101c65761010b565b8063083d80f91461011057806308551a531461012e578063580bb9a51461014c5780636691461a14610168575b600080fd5b61011861030c565b60405161012591906115aa565b60405180910390f35b610136610332565b60405161014391906115aa565b60405180910390f35b610166600480360381019061016191906115f6565b610358565b005b610182600480360381019061017d91906115f6565b610414565b005b61019e60048036038101906101999190611659565b610497565b005b6101a8610bae565b005b6101c460048036038101906101bf91906115f6565b610bc2565b005b6101ce610c7e565b6040516101db91906115aa565b60405180910390f35b6101fe60048036038101906101f991906115f6565b610ca7565b60405161020b91906116b4565b60405180910390f35b61021c610cc7565b60405161022991906115aa565b60405180910390f35b61024c600480360381019061024791906115f6565b610ced565b005b610256610df7565b60405161026391906115aa565b60405180910390f35b610286600480360381019061028191906115f6565b610e1d565b60405161029391906116de565b60405180910390f35b6102b660048036038101906102b19190611659565b610e35565b005b6102d260048036038101906102cd91906115f6565b610f05565b005b6102ee60048036038101906102e991906115f6565b610f88565b005b61030a600480360381019061030591906115f6565b61100c565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103606110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c79061177c565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61041c6110a6565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2f0c7f17be551d1f4566672cd67adbe50173e96632f56ff80d80acc4ac00f3288160405161048c91906115aa565b60405180910390a150565b61049f611124565b600081116104e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d9906117e8565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661056e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105659061187a565b60405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054116105f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e7906118e6565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561063d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610661919061191b565b90506000620f42408260126106769190611977565b600a6106829190611ade565b84600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106cd9190611b29565b6106d79190611b29565b6106e19190611bb2565b905060006106ed611174565b905081600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161076d91906115aa565b602060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061191b565b10156107ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e690611c55565b60405180910390fd5b81600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff1660e01b815260040161086f929190611c75565b602060405180830381865afa15801561088c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b0919061191b565b10156108f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e890611d36565b60405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b815260040161092b91906115aa565b602060405180830381865afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c919061191b565b10156109ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a490611dc8565b60405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e83306040518363ffffffff1660e01b81526004016109e9929190611c75565b602060405180830381865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a919061191b565b1015610a6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6290611e5a565b60405180910390fd5b610aba81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868873ffffffffffffffffffffffffffffffffffffffff1661117c909392919063ffffffff16565b610b2b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168284600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661117c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fbfd6473e0f65781db0f0a6e4007ea9de65ab2147cfa7f7d21571b09d9909f488600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168787604051610b9793929190611e7a565b60405180910390a2505050610baa611205565b5050565b610bb66110a6565b610bc0600061120f565b565b610bca6110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190611efd565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60036020528060005260406000206000915054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610cf56110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c90611f69565b60405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9781604051610dec91906115aa565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60076020528060005260406000206000915090505481565b610e3d6110a6565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f6ef4f75898b1bc6ecd3c31efb5dd41fa825f83ee3ca1161450111af12115f7cc838383604051610ef893929190611f89565b60405180910390a1505050565b610f0d6110a6565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f23f2097b71161a90dbfd59b7b5b640faa141a92879c92b730aceb986a583886581604051610f7d91906115aa565b60405180910390a150565b610f906110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff790612032565b60405180910390fd5b6110098161120f565b50565b6110146110a6565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a8160405161109b91906115aa565b60405180910390a150565b6110ae611174565b73ffffffffffffffffffffffffffffffffffffffff166110cc610c7e565b73ffffffffffffffffffffffffffffffffffffffff1614611122576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111199061209e565b60405180910390fd5b565b6002600454141561116a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111619061210a565b60405180910390fd5b6002600481905550565b600033905090565b6111ff846323b872dd60e01b85858560405160240161119d93929190611e7a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506112d3565b50505050565b6001600481905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000611335826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661139b9092919063ffffffff16565b90506000815114806113575750808060200190518101906113569190612156565b5b611396576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138d906121f5565b60405180910390fd5b505050565b60606113aa84846000856113b3565b90509392505050565b6060824710156113f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ef90612287565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114219190612321565b60006040518083038185875af1925050503d806000811461145e576040519150601f19603f3d011682016040523d82523d6000602084013e611463565b606091505b509150915061147487838387611480565b92505050949350505050565b606083156114e3576000835114156114db5761149b856114f6565b6114da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d190612384565b60405180910390fd5b5b8290506114ee565b6114ed8383611519565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561152c5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156091906123f9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061159482611569565b9050919050565b6115a481611589565b82525050565b60006020820190506115bf600083018461159b565b92915050565b600080fd5b6115d381611589565b81146115de57600080fd5b50565b6000813590506115f0816115ca565b92915050565b60006020828403121561160c5761160b6115c5565b5b600061161a848285016115e1565b91505092915050565b6000819050919050565b61163681611623565b811461164157600080fd5b50565b6000813590506116538161162d565b92915050565b600080604083850312156116705761166f6115c5565b5b600061167e858286016115e1565b925050602061168f85828601611644565b9150509250929050565b60008115159050919050565b6116ae81611699565b82525050565b60006020820190506116c960008301846116a5565b92915050565b6116d881611623565b82525050565b60006020820190506116f360008301846116cf565b92915050565b600082825260208201905092915050565b7f66656520726563656976656420616464726573732063616e206e6f742062652060008201527f7a65726f00000000000000000000000000000000000000000000000000000000602082015250565b60006117666024836116f9565b91506117718261170a565b604082019050919050565b6000602082019050818103600083015261179581611759565b9050919050565b7f4245546f6b656e4d616c6c3a20696e76616c696420616d6f756e740000000000600082015250565b60006117d2601b836116f9565b91506117dd8261179c565b602082019050919050565b60006020820190508181036000830152611801816117c5565b9050919050565b7f4245546f6b656e4d616c6c3a20696e76616c6964207061796d656e74206d657460008201527f686f640000000000000000000000000000000000000000000000000000000000602082015250565b60006118646023836116f9565b915061186f82611808565b604082019050919050565b6000602082019050818103600083015261189381611857565b9050919050565b7f4245546f6b656e4d616c6c3a20696e76616c696420746f6b656e207072696365600082015250565b60006118d06020836116f9565b91506118db8261189a565b602082019050919050565b600060208201905081810360008301526118ff816118c3565b9050919050565b6000815190506119158161162d565b92915050565b600060208284031215611931576119306115c5565b5b600061193f84828501611906565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061198282611623565b915061198d83611623565b9250828210156119a05761199f611948565b5b828203905092915050565b60008160011c9050919050565b6000808291508390505b6001851115611a02578086048111156119de576119dd611948565b5b60018516156119ed5780820291505b80810290506119fb856119ab565b94506119c2565b94509492505050565b600082611a1b5760019050611ad7565b81611a295760009050611ad7565b8160018114611a3f5760028114611a4957611a78565b6001915050611ad7565b60ff841115611a5b57611a5a611948565b5b8360020a915084821115611a7257611a71611948565b5b50611ad7565b5060208310610133831016604e8410600b8410161715611aad5782820a905083811115611aa857611aa7611948565b5b611ad7565b611aba84848460016119b8565b92509050818404811115611ad157611ad0611948565b5b81810290505b9392505050565b6000611ae982611623565b9150611af483611623565b9250611b217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611a0b565b905092915050565b6000611b3482611623565b9150611b3f83611623565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b7857611b77611948565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611bbd82611623565b9150611bc883611623565b925082611bd857611bd7611b83565b5b828204905092915050565b7f4245546f6b656e4d616c6c3a2073656c6c657220646f65736e2774206861766560008201527f20656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d00602082015250565b6000611c3f603f836116f9565b9150611c4a82611be3565b604082019050919050565b60006020820190508181036000830152611c6e81611c32565b9050919050565b6000604082019050611c8a600083018561159b565b611c97602083018461159b565b9392505050565b7f4245546f6b656e4d616c6c3a2073656c6c657220646f65736e2774206170707260008201527f6f766520656e6f75676820746f6b656e20746f2073656c6c207468697320697460208201527f656d000000000000000000000000000000000000000000000000000000000000604082015250565b6000611d206042836116f9565b9150611d2b82611c9e565b606082019050919050565b60006020820190508181036000830152611d4f81611d13565b9050919050565b7f4245546f6b656e4d616c6c3a20627579657220646f65736e277420686176652060008201527f656e6f75676820746f6b656e20746f206275792074686973206974656d000000602082015250565b6000611db2603d836116f9565b9150611dbd82611d56565b604082019050919050565b60006020820190508181036000830152611de181611da5565b9050919050565b7f4245546f6b656e4d616c6c3a20627579657220646f65736e277420617070726f60008201527f766520656e6f75676820746f6b656e20746f206275792074686973206974656d602082015250565b6000611e446040836116f9565b9150611e4f82611de8565b604082019050919050565b60006020820190508181036000830152611e7381611e37565b9050919050565b6000606082019050611e8f600083018661159b565b611e9c602083018561159b565b611ea960408301846116cf565b949350505050565b7f616464726573732063616e206e6f74206265207a65726f000000000000000000600082015250565b6000611ee76017836116f9565b9150611ef282611eb1565b602082019050919050565b60006020820190508181036000830152611f1681611eda565b9050919050565b7f45524332302061646472657373206973207a65726f0000000000000000000000600082015250565b6000611f536015836116f9565b9150611f5e82611f1d565b602082019050919050565b60006020820190508181036000830152611f8281611f46565b9050919050565b6000606082019050611f9e600083018661159b565b611fab60208301856116cf565b611fb860408301846116cf565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061201c6026836116f9565b915061202782611fc0565b604082019050919050565b6000602082019050818103600083015261204b8161200f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006120886020836116f9565b915061209382612052565b602082019050919050565b600060208201905081810360008301526120b78161207b565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006120f4601f836116f9565b91506120ff826120be565b602082019050919050565b60006020820190508181036000830152612123816120e7565b9050919050565b61213381611699565b811461213e57600080fd5b50565b6000815190506121508161212a565b92915050565b60006020828403121561216c5761216b6115c5565b5b600061217a84828501612141565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006121df602a836116f9565b91506121ea82612183565b604082019050919050565b6000602082019050818103600083015261220e816121d2565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006122716026836116f9565b915061227c82612215565b604082019050919050565b600060208201905081810360008301526122a081612264565b9050919050565b600081519050919050565b600081905092915050565b60005b838110156122db5780820151818401526020810190506122c0565b838111156122ea576000848401525b50505050565b60006122fb826122a7565b61230581856122b2565b93506123158185602086016122bd565b80840191505092915050565b600061232d82846122f0565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061236e601d836116f9565b915061237982612338565b602082019050919050565b6000602082019050818103600083015261239d81612361565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b60006123cb826123a4565b6123d581856116f9565b93506123e58185602086016122bd565b6123ee816123af565b840191505092915050565b6000602082019050818103600083015261241381846123c0565b90509291505056fea2646970667358221220c8dded236e3de65f61d4423d7832becf7e5ff6afa6130ada646eec7841ab98cd64736f6c634300080a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80639017f79e116100a2578063cfed246b11610071578063cfed246b1461026c578063d4ee651b1461029c578063dbbdae63146102b8578063f2fde38b146102d4578063fdf397ee146102f05761010b565b80639017f79e146101e45780639d76ea5814610214578063b9d2df6114610232578063c34c08e51461024e5761010b565b806368f8fc10116100de57806368f8fc1014610184578063715018a6146101a057806374936c16146101aa5780638da5cb5b146101c65761010b565b8063083d80f91461011057806308551a531461012e578063580bb9a51461014c5780636691461a14610168575b600080fd5b61011861030c565b60405161012591906115aa565b60405180910390f35b610136610332565b60405161014391906115aa565b60405180910390f35b610166600480360381019061016191906115f6565b610358565b005b610182600480360381019061017d91906115f6565b610414565b005b61019e60048036038101906101999190611659565b610497565b005b6101a8610bae565b005b6101c460048036038101906101bf91906115f6565b610bc2565b005b6101ce610c7e565b6040516101db91906115aa565b60405180910390f35b6101fe60048036038101906101f991906115f6565b610ca7565b60405161020b91906116b4565b60405180910390f35b61021c610cc7565b60405161022991906115aa565b60405180910390f35b61024c600480360381019061024791906115f6565b610ced565b005b610256610df7565b60405161026391906115aa565b60405180910390f35b610286600480360381019061028191906115f6565b610e1d565b60405161029391906116de565b60405180910390f35b6102b660048036038101906102b19190611659565b610e35565b005b6102d260048036038101906102cd91906115f6565b610f05565b005b6102ee60048036038101906102e991906115f6565b610f88565b005b61030a600480360381019061030591906115f6565b61100c565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103606110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c79061177c565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61041c6110a6565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f2f0c7f17be551d1f4566672cd67adbe50173e96632f56ff80d80acc4ac00f3288160405161048c91906115aa565b60405180910390a150565b61049f611124565b600081116104e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d9906117e8565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661056e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105659061187a565b60405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054116105f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e7906118e6565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561063d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610661919061191b565b90506000620f42408260126106769190611977565b600a6106829190611ade565b84600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106cd9190611b29565b6106d79190611b29565b6106e19190611bb2565b905060006106ed611174565b905081600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161076d91906115aa565b602060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061191b565b10156107ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e690611c55565b60405180910390fd5b81600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff1660e01b815260040161086f929190611c75565b602060405180830381865afa15801561088c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b0919061191b565b10156108f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e890611d36565b60405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b815260040161092b91906115aa565b602060405180830381865afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c919061191b565b10156109ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a490611dc8565b60405180910390fd5b838573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e83306040518363ffffffff1660e01b81526004016109e9929190611c75565b602060405180830381865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a919061191b565b1015610a6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6290611e5a565b60405180910390fd5b610aba81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868873ffffffffffffffffffffffffffffffffffffffff1661117c909392919063ffffffff16565b610b2b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168284600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661117c909392919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fbfd6473e0f65781db0f0a6e4007ea9de65ab2147cfa7f7d21571b09d9909f488600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168787604051610b9793929190611e7a565b60405180910390a2505050610baa611205565b5050565b610bb66110a6565b610bc0600061120f565b565b610bca6110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190611efd565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60036020528060005260406000206000915054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610cf56110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c90611f69565b60405180910390fd5b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f636dc55442e1c73ff1acc6b88f4522b3b047cd6b5b53076466fe6efc132b7d9781604051610dec91906115aa565b60405180910390a150565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60076020528060005260406000206000915090505481565b610e3d6110a6565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f6ef4f75898b1bc6ecd3c31efb5dd41fa825f83ee3ca1161450111af12115f7cc838383604051610ef893929190611f89565b60405180910390a1505050565b610f0d6110a6565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f23f2097b71161a90dbfd59b7b5b640faa141a92879c92b730aceb986a583886581604051610f7d91906115aa565b60405180910390a150565b610f906110a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff790612032565b60405180910390fd5b6110098161120f565b50565b6110146110a6565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f3f9e7e7de58452376347303ed83ad0a3680a82bcb8bfe7541fb27efba64adf6a8160405161109b91906115aa565b60405180910390a150565b6110ae611174565b73ffffffffffffffffffffffffffffffffffffffff166110cc610c7e565b73ffffffffffffffffffffffffffffffffffffffff1614611122576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111199061209e565b60405180910390fd5b565b6002600454141561116a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111619061210a565b60405180910390fd5b6002600481905550565b600033905090565b6111ff846323b872dd60e01b85858560405160240161119d93929190611e7a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506112d3565b50505050565b6001600481905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000611335826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661139b9092919063ffffffff16565b90506000815114806113575750808060200190518101906113569190612156565b5b611396576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138d906121f5565b60405180910390fd5b505050565b60606113aa84846000856113b3565b90509392505050565b6060824710156113f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ef90612287565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114219190612321565b60006040518083038185875af1925050503d806000811461145e576040519150601f19603f3d011682016040523d82523d6000602084013e611463565b606091505b509150915061147487838387611480565b92505050949350505050565b606083156114e3576000835114156114db5761149b856114f6565b6114da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d190612384565b60405180910390fd5b5b8290506114ee565b6114ed8383611519565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561152c5781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156091906123f9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061159482611569565b9050919050565b6115a481611589565b82525050565b60006020820190506115bf600083018461159b565b92915050565b600080fd5b6115d381611589565b81146115de57600080fd5b50565b6000813590506115f0816115ca565b92915050565b60006020828403121561160c5761160b6115c5565b5b600061161a848285016115e1565b91505092915050565b6000819050919050565b61163681611623565b811461164157600080fd5b50565b6000813590506116538161162d565b92915050565b600080604083850312156116705761166f6115c5565b5b600061167e858286016115e1565b925050602061168f85828601611644565b9150509250929050565b60008115159050919050565b6116ae81611699565b82525050565b60006020820190506116c960008301846116a5565b92915050565b6116d881611623565b82525050565b60006020820190506116f360008301846116cf565b92915050565b600082825260208201905092915050565b7f66656520726563656976656420616464726573732063616e206e6f742062652060008201527f7a65726f00000000000000000000000000000000000000000000000000000000602082015250565b60006117666024836116f9565b91506117718261170a565b604082019050919050565b6000602082019050818103600083015261179581611759565b9050919050565b7f4245546f6b656e4d616c6c3a20696e76616c696420616d6f756e740000000000600082015250565b60006117d2601b836116f9565b91506117dd8261179c565b602082019050919050565b60006020820190508181036000830152611801816117c5565b9050919050565b7f4245546f6b656e4d616c6c3a20696e76616c6964207061796d656e74206d657460008201527f686f640000000000000000000000000000000000000000000000000000000000602082015250565b60006118646023836116f9565b915061186f82611808565b604082019050919050565b6000602082019050818103600083015261189381611857565b9050919050565b7f4245546f6b656e4d616c6c3a20696e76616c696420746f6b656e207072696365600082015250565b60006118d06020836116f9565b91506118db8261189a565b602082019050919050565b600060208201905081810360008301526118ff816118c3565b9050919050565b6000815190506119158161162d565b92915050565b600060208284031215611931576119306115c5565b5b600061193f84828501611906565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061198282611623565b915061198d83611623565b9250828210156119a05761199f611948565b5b828203905092915050565b60008160011c9050919050565b6000808291508390505b6001851115611a02578086048111156119de576119dd611948565b5b60018516156119ed5780820291505b80810290506119fb856119ab565b94506119c2565b94509492505050565b600082611a1b5760019050611ad7565b81611a295760009050611ad7565b8160018114611a3f5760028114611a4957611a78565b6001915050611ad7565b60ff841115611a5b57611a5a611948565b5b8360020a915084821115611a7257611a71611948565b5b50611ad7565b5060208310610133831016604e8410600b8410161715611aad5782820a905083811115611aa857611aa7611948565b5b611ad7565b611aba84848460016119b8565b92509050818404811115611ad157611ad0611948565b5b81810290505b9392505050565b6000611ae982611623565b9150611af483611623565b9250611b217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484611a0b565b905092915050565b6000611b3482611623565b9150611b3f83611623565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b7857611b77611948565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611bbd82611623565b9150611bc883611623565b925082611bd857611bd7611b83565b5b828204905092915050565b7f4245546f6b656e4d616c6c3a2073656c6c657220646f65736e2774206861766560008201527f20656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d00602082015250565b6000611c3f603f836116f9565b9150611c4a82611be3565b604082019050919050565b60006020820190508181036000830152611c6e81611c32565b9050919050565b6000604082019050611c8a600083018561159b565b611c97602083018461159b565b9392505050565b7f4245546f6b656e4d616c6c3a2073656c6c657220646f65736e2774206170707260008201527f6f766520656e6f75676820746f6b656e20746f2073656c6c207468697320697460208201527f656d000000000000000000000000000000000000000000000000000000000000604082015250565b6000611d206042836116f9565b9150611d2b82611c9e565b606082019050919050565b60006020820190508181036000830152611d4f81611d13565b9050919050565b7f4245546f6b656e4d616c6c3a20627579657220646f65736e277420686176652060008201527f656e6f75676820746f6b656e20746f206275792074686973206974656d000000602082015250565b6000611db2603d836116f9565b9150611dbd82611d56565b604082019050919050565b60006020820190508181036000830152611de181611da5565b9050919050565b7f4245546f6b656e4d616c6c3a20627579657220646f65736e277420617070726f60008201527f766520656e6f75676820746f6b656e20746f206275792074686973206974656d602082015250565b6000611e446040836116f9565b9150611e4f82611de8565b604082019050919050565b60006020820190508181036000830152611e7381611e37565b9050919050565b6000606082019050611e8f600083018661159b565b611e9c602083018561159b565b611ea960408301846116cf565b949350505050565b7f616464726573732063616e206e6f74206265207a65726f000000000000000000600082015250565b6000611ee76017836116f9565b9150611ef282611eb1565b602082019050919050565b60006020820190508181036000830152611f1681611eda565b9050919050565b7f45524332302061646472657373206973207a65726f0000000000000000000000600082015250565b6000611f536015836116f9565b9150611f5e82611f1d565b602082019050919050565b60006020820190508181036000830152611f8281611f46565b9050919050565b6000606082019050611f9e600083018661159b565b611fab60208301856116cf565b611fb860408301846116cf565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061201c6026836116f9565b915061202782611fc0565b604082019050919050565b6000602082019050818103600083015261204b8161200f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006120886020836116f9565b915061209382612052565b602082019050919050565b600060208201905081810360008301526120b78161207b565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006120f4601f836116f9565b91506120ff826120be565b602082019050919050565b60006020820190508181036000830152612123816120e7565b9050919050565b61213381611699565b811461213e57600080fd5b50565b6000815190506121508161212a565b92915050565b60006020828403121561216c5761216b6115c5565b5b600061217a84828501612141565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006121df602a836116f9565b91506121ea82612183565b604082019050919050565b6000602082019050818103600083015261220e816121d2565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006122716026836116f9565b915061227c82612215565b604082019050919050565b600060208201905081810360008301526122a081612264565b9050919050565b600081519050919050565b600081905092915050565b60005b838110156122db5780820151818401526020810190506122c0565b838111156122ea576000848401525b50505050565b60006122fb826122a7565b61230581856122b2565b93506123158185602086016122bd565b80840191505092915050565b600061232d82846122f0565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061236e601d836116f9565b915061237982612338565b602082019050919050565b6000602082019050818103600083015261239d81612361565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b60006123cb826123a4565b6123d581856116f9565b93506123e58185602086016122bd565b6123ee816123af565b840191505092915050565b6000602082019050818103600083015261241381846123c0565b90509291505056fea2646970667358221220c8dded236e3de65f61d4423d7832becf7e5ff6afa6130ada646eec7841ab98cd64736f6c634300080a0033", + "immutableReferences": {}, + "generatedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:1355:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "47:35:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "57:19:10", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "73:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "67:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "67:9:10" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "57:6:10" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "40:6:10", + "type": "" + } + ], + "src": "7:75:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "177:28:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "194:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "197:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "187:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "187:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "187:12:10" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "88:117:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "300:28:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "317:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "320:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "310:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "310:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "310:12:10" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "211:117:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "379:81:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "389:65:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "404:5:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "411:42:10", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "400:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "400:54:10" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "389:7:10" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "361:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "371:7:10", + "type": "" + } + ], + "src": "334:126:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "511:51:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "521:35:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "550:5:10" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "532:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "532:24:10" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "521:7:10" + } + ] + } + ] + }, + "name": "cleanup_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "493:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "503:7:10", + "type": "" + } + ], + "src": "466:96:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "611:79:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "668:16:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "677:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "680:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "670:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "670:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "670:12:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "634:5:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "659:5:10" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "641:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "641:24:10" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "631:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "631:35:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "624:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "624:43:10" + }, + "nodeType": "YulIf", + "src": "621:63:10" + } + ] + }, + "name": "validator_revert_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "604:5:10", + "type": "" + } + ], + "src": "568:122:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "759:80:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "769:22:10", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "784:6:10" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "778:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "778:13:10" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "769:5:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "827:5:10" + } + ], + "functionName": { + "name": "validator_revert_t_address", + "nodeType": "YulIdentifier", + "src": "800:26:10" + }, + "nodeType": "YulFunctionCall", + "src": "800:33:10" + }, + "nodeType": "YulExpressionStatement", + "src": "800:33:10" + } + ] + }, + "name": "abi_decode_t_address_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "737:6:10", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "745:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "753:5:10", + "type": "" + } + ], + "src": "696:143:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "939:413:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "985:83:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "987:77:10" + }, + "nodeType": "YulFunctionCall", + "src": "987:79:10" + }, + "nodeType": "YulExpressionStatement", + "src": "987:79:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "960:7:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "969:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "956:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "956:23:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "981:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "952:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "952:32:10" + }, + "nodeType": "YulIf", + "src": "949:119:10" + }, + { + "nodeType": "YulBlock", + "src": "1078:128:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1093:15:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1107:1:10", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1097:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1122:74:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1168:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1179:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1164:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1164:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1188:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_address_fromMemory", + "nodeType": "YulIdentifier", + "src": "1132:31:10" + }, + "nodeType": "YulFunctionCall", + "src": "1132:64:10" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1122:6:10" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "1216:129:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1231:16:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1245:2:10", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1235:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1261:74:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1307:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1318:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1303:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1303:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1327:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_address_fromMemory", + "nodeType": "YulIdentifier", + "src": "1271:31:10" + }, + "nodeType": "YulFunctionCall", + "src": "1271:64:10" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "1261:6:10" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_address_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "901:9:10", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "912:7:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "924:6:10", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "932:6:10", + "type": "" + } + ], + "src": "845:507:10" + } + ] + }, + "contents": "{\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\n }\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\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 abi_decode_t_address_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_addresst_address_fromMemory(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n {\n\n let offset := 32\n\n value1 := abi_decode_t_address_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n}\n", + "id": 10, + "language": "Yul", + "name": "#utility.yul" + } + ], + "deployedGeneratedSources": [ + { + "ast": { + "nodeType": "YulBlock", + "src": "0:27501:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "52:81:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "62:65:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "77:5:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "84:42:10", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "73:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "73:54:10" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "62:7:10" + } + ] + } + ] + }, + "name": "cleanup_t_uint160", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "34:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "44:7:10", + "type": "" + } + ], + "src": "7:126:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "184:51:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "194:35:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "223:5:10" + } + ], + "functionName": { + "name": "cleanup_t_uint160", + "nodeType": "YulIdentifier", + "src": "205:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "205:24:10" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "194:7:10" + } + ] + } + ] + }, + "name": "cleanup_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "166:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "176:7:10", + "type": "" + } + ], + "src": "139:96:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "306:53:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "323:3:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "346:5:10" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "328:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "328:24:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "316:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "316:37:10" + }, + "nodeType": "YulExpressionStatement", + "src": "316:37:10" + } + ] + }, + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "294:5:10", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "301:3:10", + "type": "" + } + ], + "src": "241:118:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "463:124:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "473:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "485:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "496:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "481:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "481:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "473:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "553:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "566:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "577:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "562:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "562:17:10" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "509:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "509:71:10" + }, + "nodeType": "YulExpressionStatement", + "src": "509:71:10" + } + ] + }, + "name": "abi_encode_tuple_t_address__to_t_address__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "435:9:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "447:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "458:4:10", + "type": "" + } + ], + "src": "365:222:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "633:35:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "643:19:10", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "659:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "653:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "653:9:10" + }, + "variableNames": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "643:6:10" + } + ] + } + ] + }, + "name": "allocate_unbounded", + "nodeType": "YulFunctionDefinition", + "returnVariables": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "626:6:10", + "type": "" + } + ], + "src": "593:75:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "763:28:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "780:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "783:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "773:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "773:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "773:12:10" + } + ] + }, + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulFunctionDefinition", + "src": "674:117:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "886:28:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "903:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "906:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "896:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "896:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "896:12:10" + } + ] + }, + "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", + "nodeType": "YulFunctionDefinition", + "src": "797:117:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "963:79:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1020:16:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1029:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1032:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1022:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "1022:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "1022:12:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "986:5:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1011:5:10" + } + ], + "functionName": { + "name": "cleanup_t_address", + "nodeType": "YulIdentifier", + "src": "993:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "993:24:10" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "983:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "983:35:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "976:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "976:43:10" + }, + "nodeType": "YulIf", + "src": "973:63:10" + } + ] + }, + "name": "validator_revert_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "956:5:10", + "type": "" + } + ], + "src": "920:122:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1100:87:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1110:29:10", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1132:6:10" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "1119:12:10" + }, + "nodeType": "YulFunctionCall", + "src": "1119:20:10" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1110:5:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1175:5:10" + } + ], + "functionName": { + "name": "validator_revert_t_address", + "nodeType": "YulIdentifier", + "src": "1148:26:10" + }, + "nodeType": "YulFunctionCall", + "src": "1148:33:10" + }, + "nodeType": "YulExpressionStatement", + "src": "1148:33:10" + } + ] + }, + "name": "abi_decode_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1078:6:10", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1086:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1094:5:10", + "type": "" + } + ], + "src": "1048:139:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1259:263:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1305:83:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "1307:77:10" + }, + "nodeType": "YulFunctionCall", + "src": "1307:79:10" + }, + "nodeType": "YulExpressionStatement", + "src": "1307:79:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1280:7:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1289:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1276:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1276:23:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1301:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "1272:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1272:32:10" + }, + "nodeType": "YulIf", + "src": "1269:119:10" + }, + { + "nodeType": "YulBlock", + "src": "1398:117:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1413:15:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1427:1:10", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1417:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1442:63:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1477:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1488:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1473:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1473:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1497:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "1452:20:10" + }, + "nodeType": "YulFunctionCall", + "src": "1452:53:10" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "1442:6:10" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_address", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1229:9:10", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "1240:7:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1252:6:10", + "type": "" + } + ], + "src": "1193:329:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1573:32:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1583:16:10", + "value": { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1594:5:10" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "1583:7:10" + } + ] + } + ] + }, + "name": "cleanup_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1555:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "1565:7:10", + "type": "" + } + ], + "src": "1528:77:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1654:79:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1711:16:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1720:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1723:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "1713:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "1713:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "1713:12:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1677:5:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1702:5:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "1684:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "1684:24:10" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "1674:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "1674:35:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1667:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "1667:43:10" + }, + "nodeType": "YulIf", + "src": "1664:63:10" + } + ] + }, + "name": "validator_revert_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1647:5:10", + "type": "" + } + ], + "src": "1611:122:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1791:87:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1801:29:10", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "1823:6:10" + } + ], + "functionName": { + "name": "calldataload", + "nodeType": "YulIdentifier", + "src": "1810:12:10" + }, + "nodeType": "YulFunctionCall", + "src": "1810:20:10" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1801:5:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1866:5:10" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "1839:26:10" + }, + "nodeType": "YulFunctionCall", + "src": "1839:33:10" + }, + "nodeType": "YulExpressionStatement", + "src": "1839:33:10" + } + ] + }, + "name": "abi_decode_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "1769:6:10", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "1777:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "1785:5:10", + "type": "" + } + ], + "src": "1739:139:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1967:391:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2013:83:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "2015:77:10" + }, + "nodeType": "YulFunctionCall", + "src": "2015:79:10" + }, + "nodeType": "YulExpressionStatement", + "src": "2015:79:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "1988:7:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "1997:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "1984:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1984:23:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2009:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "1980:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "1980:32:10" + }, + "nodeType": "YulIf", + "src": "1977:119:10" + }, + { + "nodeType": "YulBlock", + "src": "2106:117:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "2121:15:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2135:1:10", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "2125:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2150:63:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2185:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "2196:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2181:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "2181:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "2205:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_address", + "nodeType": "YulIdentifier", + "src": "2160:20:10" + }, + "nodeType": "YulFunctionCall", + "src": "2160:53:10" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2150:6:10" + } + ] + } + ] + }, + { + "nodeType": "YulBlock", + "src": "2233:118:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "2248:16:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2262:2:10", + "type": "", + "value": "32" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "2252:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2278:63:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2313:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "2324:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2309:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "2309:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "2333:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_uint256", + "nodeType": "YulIdentifier", + "src": "2288:20:10" + }, + "nodeType": "YulFunctionCall", + "src": "2288:53:10" + }, + "variableNames": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "2278:6:10" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_addresst_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "1929:9:10", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "1940:7:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "1952:6:10", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "1960:6:10", + "type": "" + } + ], + "src": "1884:474:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2406:48:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2416:32:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2441:5:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "2434:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "2434:13:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "2427:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "2427:21:10" + }, + "variableNames": [ + { + "name": "cleaned", + "nodeType": "YulIdentifier", + "src": "2416:7:10" + } + ] + } + ] + }, + "name": "cleanup_t_bool", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2388:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "cleaned", + "nodeType": "YulTypedName", + "src": "2398:7:10", + "type": "" + } + ], + "src": "2364:90:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2519:50:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2536:3:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2556:5:10" + } + ], + "functionName": { + "name": "cleanup_t_bool", + "nodeType": "YulIdentifier", + "src": "2541:14:10" + }, + "nodeType": "YulFunctionCall", + "src": "2541:21:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2529:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "2529:34:10" + }, + "nodeType": "YulExpressionStatement", + "src": "2529:34:10" + } + ] + }, + "name": "abi_encode_t_bool_to_t_bool_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2507:5:10", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2514:3:10", + "type": "" + } + ], + "src": "2460:109:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2667:118:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2677:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2689:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2700:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2685:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "2685:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "2677:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "2751:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "2764:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2775:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2760:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "2760:17:10" + } + ], + "functionName": { + "name": "abi_encode_t_bool_to_t_bool_fromStack", + "nodeType": "YulIdentifier", + "src": "2713:37:10" + }, + "nodeType": "YulFunctionCall", + "src": "2713:65:10" + }, + "nodeType": "YulExpressionStatement", + "src": "2713:65:10" + } + ] + }, + "name": "abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2639:9:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "2651:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "2662:4:10", + "type": "" + } + ], + "src": "2575:210:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2856:53:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "2873:3:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "2896:5:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "2878:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "2878:24:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "2866:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "2866:37:10" + }, + "nodeType": "YulExpressionStatement", + "src": "2866:37:10" + } + ] + }, + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "2844:5:10", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "2851:3:10", + "type": "" + } + ], + "src": "2791:118:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3013:124:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3023:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3035:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3046:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3031:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "3031:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "3023:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "3103:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "3116:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3127:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3112:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "3112:17:10" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "3059:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "3059:71:10" + }, + "nodeType": "YulExpressionStatement", + "src": "3059:71:10" + } + ] + }, + "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "2985:9:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "2997:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "3008:4:10", + "type": "" + } + ], + "src": "2915:222:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3239:73:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3256:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "3261:6:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3249:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "3249:19:10" + }, + "nodeType": "YulExpressionStatement", + "src": "3249:19:10" + }, + { + "nodeType": "YulAssignment", + "src": "3277:29:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3296:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3301:4:10", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3292:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "3292:14:10" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "3277:11:10" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "3211:3:10", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "3216:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "3227:11:10", + "type": "" + } + ], + "src": "3143:169:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3424:117:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "3446:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3454:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3442:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "3442:14:10" + }, + { + "hexValue": "66656520726563656976656420616464726573732063616e206e6f7420626520", + "kind": "string", + "nodeType": "YulLiteral", + "src": "3458:34:10", + "type": "", + "value": "fee received address can not be " + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3435:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "3435:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "3435:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "3514:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3522:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3510:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "3510:15:10" + }, + { + "hexValue": "7a65726f", + "kind": "string", + "nodeType": "YulLiteral", + "src": "3527:6:10", + "type": "", + "value": "zero" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "3503:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "3503:31:10" + }, + "nodeType": "YulExpressionStatement", + "src": "3503:31:10" + } + ] + }, + "name": "store_literal_in_memory_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "3416:6:10", + "type": "" + } + ], + "src": "3318:223:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3693:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3703:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3769:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3774:2:10", + "type": "", + "value": "36" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "3710:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "3710:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3703:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3875:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924", + "nodeType": "YulIdentifier", + "src": "3786:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "3786:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "3786:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "3888:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "3899:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3904:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "3895:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "3895:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "3888:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "3681:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "3689:3:10", + "type": "" + } + ], + "src": "3547:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4090:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4100:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4112:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4123:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4108:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "4108:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4100:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4147:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4158:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4143:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "4143:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4166:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "4172:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "4162:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "4162:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4136:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "4136:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "4136:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "4192:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4326:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "4200:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "4200:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "4192:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "4070:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "4085:4:10", + "type": "" + } + ], + "src": "3919:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4450:71:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "4472:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4480:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4468:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "4468:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c696420616d6f756e74", + "kind": "string", + "nodeType": "YulLiteral", + "src": "4484:29:10", + "type": "", + "value": "BETokenMall: invalid amount" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "4461:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "4461:53:10" + }, + "nodeType": "YulExpressionStatement", + "src": "4461:53:10" + } + ] + }, + "name": "store_literal_in_memory_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "4442:6:10", + "type": "" + } + ], + "src": "4344:177:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4673:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4683:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4749:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4754:2:10", + "type": "", + "value": "27" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "4690:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "4690:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4683:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4855:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be", + "nodeType": "YulIdentifier", + "src": "4766:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "4766:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "4766:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "4868:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "4879:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4884:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "4875:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "4875:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "4868:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "4661:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "4669:3:10", + "type": "" + } + ], + "src": "4527:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5070:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5080:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5092:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5103:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5088:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "5088:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5080:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5127:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5138:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5123:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "5123:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5146:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "5152:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "5142:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "5142:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5116:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "5116:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "5116:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "5172:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5306:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "5180:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "5180:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "5172:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "5050:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "5065:4:10", + "type": "" + } + ], + "src": "4899:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5430:116:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "5452:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5460:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5448:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "5448:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c6964207061796d656e74206d6574", + "kind": "string", + "nodeType": "YulLiteral", + "src": "5464:34:10", + "type": "", + "value": "BETokenMall: invalid payment met" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5441:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "5441:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "5441:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "5520:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5528:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5516:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "5516:15:10" + }, + { + "hexValue": "686f64", + "kind": "string", + "nodeType": "YulLiteral", + "src": "5533:5:10", + "type": "", + "value": "hod" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "5509:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "5509:30:10" + }, + "nodeType": "YulExpressionStatement", + "src": "5509:30:10" + } + ] + }, + "name": "store_literal_in_memory_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "5422:6:10", + "type": "" + } + ], + "src": "5324:222:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5698:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5708:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5774:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5779:2:10", + "type": "", + "value": "35" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "5715:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "5715:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5708:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5880:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa", + "nodeType": "YulIdentifier", + "src": "5791:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "5791:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "5791:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "5893:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "5904:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5909:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5900:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "5900:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "5893:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "5686:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "5694:3:10", + "type": "" + } + ], + "src": "5552:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6095:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6105:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6117:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6128:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6113:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "6113:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "6105:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6152:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6163:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6148:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "6148:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "6171:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "6177:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "6167:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "6167:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "6141:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "6141:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "6141:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "6197:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "6331:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "6205:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "6205:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "6197:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "6075:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "6090:4:10", + "type": "" + } + ], + "src": "5924:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6455:76:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "6477:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6485:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6473:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "6473:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c696420746f6b656e207072696365", + "kind": "string", + "nodeType": "YulLiteral", + "src": "6489:34:10", + "type": "", + "value": "BETokenMall: invalid token price" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "6466:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "6466:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "6466:58:10" + } + ] + }, + "name": "store_literal_in_memory_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "6447:6:10", + "type": "" + } + ], + "src": "6349:182:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6683:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6693:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "6759:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6764:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "6700:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "6700:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "6693:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "6865:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd", + "nodeType": "YulIdentifier", + "src": "6776:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "6776:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "6776:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "6878:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "6889:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6894:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "6885:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "6885:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "6878:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "6671:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "6679:3:10", + "type": "" + } + ], + "src": "6537:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7080:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7090:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7102:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7113:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7098:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "7098:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "7090:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7137:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7148:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7133:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "7133:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "7156:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7162:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "7152:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "7152:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "7126:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "7126:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "7126:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "7182:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "7316:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "7190:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "7190:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "7182:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "7060:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "7075:4:10", + "type": "" + } + ], + "src": "6909:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7397:80:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7407:22:10", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "7422:6:10" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "7416:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "7416:13:10" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "7407:5:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "7465:5:10" + } + ], + "functionName": { + "name": "validator_revert_t_uint256", + "nodeType": "YulIdentifier", + "src": "7438:26:10" + }, + "nodeType": "YulFunctionCall", + "src": "7438:33:10" + }, + "nodeType": "YulExpressionStatement", + "src": "7438:33:10" + } + ] + }, + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "7375:6:10", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "7383:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "7391:5:10", + "type": "" + } + ], + "src": "7334:143:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7560:274:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7606:83:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "7608:77:10" + }, + "nodeType": "YulFunctionCall", + "src": "7608:79:10" + }, + "nodeType": "YulExpressionStatement", + "src": "7608:79:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "7581:7:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7590:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "7577:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "7577:23:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7602:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "7573:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "7573:32:10" + }, + "nodeType": "YulIf", + "src": "7570:119:10" + }, + { + "nodeType": "YulBlock", + "src": "7699:128:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "7714:15:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7728:1:10", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "7718:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "7743:74:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "7789:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "7800:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "7785:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "7785:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "7809:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_uint256_fromMemory", + "nodeType": "YulIdentifier", + "src": "7753:31:10" + }, + "nodeType": "YulFunctionCall", + "src": "7753:64:10" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "7743:6:10" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_uint256_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "7530:9:10", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "7541:7:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "7553:6:10", + "type": "" + } + ], + "src": "7483:351:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7868:152:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7885:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7888:77:10", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "7878:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "7878:88:10" + }, + "nodeType": "YulExpressionStatement", + "src": "7878:88:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7982:1:10", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7985:4:10", + "type": "", + "value": "0x11" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "7975:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "7975:15:10" + }, + "nodeType": "YulExpressionStatement", + "src": "7975:15:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8006:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8009:4:10", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "7999:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "7999:15:10" + }, + "nodeType": "YulExpressionStatement", + "src": "7999:15:10" + } + ] + }, + "name": "panic_error_0x11", + "nodeType": "YulFunctionDefinition", + "src": "7840:180:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8071:146:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8081:25:10", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "8104:1:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "8086:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "8086:20:10" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "8081:1:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "8115:25:10", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "8138:1:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "8120:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "8120:20:10" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "8115:1:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8162:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "8164:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "8164:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "8164:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "8156:1:10" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "8159:1:10" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8153:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "8153:8:10" + }, + "nodeType": "YulIf", + "src": "8150:34:10" + }, + { + "nodeType": "YulAssignment", + "src": "8194:17:10", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "8206:1:10" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "8209:1:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "8202:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "8202:9:10" + }, + "variableNames": [ + { + "name": "diff", + "nodeType": "YulIdentifier", + "src": "8194:4:10" + } + ] + } + ] + }, + "name": "checked_sub_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "8057:1:10", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "8060:1:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "diff", + "nodeType": "YulTypedName", + "src": "8066:4:10", + "type": "" + } + ], + "src": "8026:191:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8274:51:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8284:34:10", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8309:1:10", + "type": "", + "value": "1" + }, + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "8312:5:10" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "8305:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "8305:13:10" + }, + "variableNames": [ + { + "name": "newValue", + "nodeType": "YulIdentifier", + "src": "8284:8:10" + } + ] + } + ] + }, + "name": "shift_right_1_unsigned", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "8255:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "newValue", + "nodeType": "YulTypedName", + "src": "8265:8:10", + "type": "" + } + ], + "src": "8223:102:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8404:775:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8414:15:10", + "value": { + "name": "_power", + "nodeType": "YulIdentifier", + "src": "8423:6:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "8414:5:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "8438:14:10", + "value": { + "name": "_base", + "nodeType": "YulIdentifier", + "src": "8447:5:10" + }, + "variableNames": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "8438:4:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8496:677:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "8584:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "8586:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "8586:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "8586:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "8562:4:10" + }, + { + "arguments": [ + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "8572:3:10" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "8577:4:10" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "8568:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "8568:14:10" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "8559:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "8559:24:10" + }, + "nodeType": "YulIf", + "src": "8556:50:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8651:419:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9031:25:10", + "value": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9044:5:10" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9051:4:10" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "9040:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "9040:16:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9031:5:10" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "8626:8:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8636:1:10", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "8622:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "8622:16:10" + }, + "nodeType": "YulIf", + "src": "8619:451:10" + }, + { + "nodeType": "YulAssignment", + "src": "9083:23:10", + "value": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9095:4:10" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9101:4:10" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "9091:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "9091:15:10" + }, + "variableNames": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9083:4:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "9119:44:10", + "value": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9154:8:10" + } + ], + "functionName": { + "name": "shift_right_1_unsigned", + "nodeType": "YulIdentifier", + "src": "9131:22:10" + }, + "nodeType": "YulFunctionCall", + "src": "9131:32:10" + }, + "variableNames": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9119:8:10" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "8472:8:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8482:1:10", + "type": "", + "value": "1" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "8469:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "8469:15:10" + }, + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "8485:2:10", + "statements": [] + }, + "pre": { + "nodeType": "YulBlock", + "src": "8465:3:10", + "statements": [] + }, + "src": "8461:712:10" + } + ] + }, + "name": "checked_exp_helper", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "_power", + "nodeType": "YulTypedName", + "src": "8359:6:10", + "type": "" + }, + { + "name": "_base", + "nodeType": "YulTypedName", + "src": "8367:5:10", + "type": "" + }, + { + "name": "exponent", + "nodeType": "YulTypedName", + "src": "8374:8:10", + "type": "" + }, + { + "name": "max", + "nodeType": "YulTypedName", + "src": "8384:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "power", + "nodeType": "YulTypedName", + "src": "8392:5:10", + "type": "" + }, + { + "name": "base", + "nodeType": "YulTypedName", + "src": "8399:4:10", + "type": "" + } + ], + "src": "8331:848:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9245:1013:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9440:20:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9442:10:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9451:1:10", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9442:5:10" + } + ] + }, + { + "nodeType": "YulLeave", + "src": "9453:5:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9430:8:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "9423:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "9423:16:10" + }, + "nodeType": "YulIf", + "src": "9420:40:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9485:20:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9487:10:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9496:1:10", + "type": "", + "value": "0" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9487:5:10" + } + ] + }, + { + "nodeType": "YulLeave", + "src": "9498:5:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9479:4:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "9472:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "9472:12:10" + }, + "nodeType": "YulIf", + "src": "9469:36:10" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9615:20:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9617:10:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9626:1:10", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9617:5:10" + } + ] + }, + { + "nodeType": "YulLeave", + "src": "9628:5:10" + } + ] + }, + "nodeType": "YulCase", + "src": "9608:27:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9613:1:10", + "type": "", + "value": "1" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9659:176:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9694:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "9696:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "9696:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "9696:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9679:8:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9689:3:10", + "type": "", + "value": "255" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "9676:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9676:17:10" + }, + "nodeType": "YulIf", + "src": "9673:43:10" + }, + { + "nodeType": "YulAssignment", + "src": "9729:25:10", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9742:1:10", + "type": "", + "value": "2" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9745:8:10" + } + ], + "functionName": { + "name": "exp", + "nodeType": "YulIdentifier", + "src": "9738:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "9738:16:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9729:5:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9785:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "9787:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "9787:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "9787:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9773:5:10" + }, + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "9780:3:10" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "9770:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9770:14:10" + }, + "nodeType": "YulIf", + "src": "9767:40:10" + }, + { + "nodeType": "YulLeave", + "src": "9820:5:10" + } + ] + }, + "nodeType": "YulCase", + "src": "9644:191:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9649:1:10", + "type": "", + "value": "2" + } + } + ], + "expression": { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9565:4:10" + }, + "nodeType": "YulSwitch", + "src": "9558:277:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9967:123:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9981:28:10", + "value": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9994:4:10" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "10000:8:10" + } + ], + "functionName": { + "name": "exp", + "nodeType": "YulIdentifier", + "src": "9990:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "9990:19:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "9981:5:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10040:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "10042:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "10042:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "10042:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "10028:5:10" + }, + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "10035:3:10" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "10025:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "10025:14:10" + }, + "nodeType": "YulIf", + "src": "10022:40:10" + }, + { + "nodeType": "YulLeave", + "src": "10075:5:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9870:4:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9876:2:10", + "type": "", + "value": "11" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9867:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9867:12:10" + }, + { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9884:8:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9894:2:10", + "type": "", + "value": "78" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9881:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9881:16:10" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "9863:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "9863:35:10" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "9919:4:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9925:3:10", + "type": "", + "value": "307" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9916:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9916:13:10" + }, + { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "9934:8:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9944:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9931:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9931:16:10" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "9912:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "9912:36:10" + } + ], + "functionName": { + "name": "or", + "nodeType": "YulIdentifier", + "src": "9847:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "9847:111:10" + }, + "nodeType": "YulIf", + "src": "9844:246:10" + }, + { + "nodeType": "YulAssignment", + "src": "10100:57:10", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10134:1:10", + "type": "", + "value": "1" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10137:4:10" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "10143:8:10" + }, + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "10153:3:10" + } + ], + "functionName": { + "name": "checked_exp_helper", + "nodeType": "YulIdentifier", + "src": "10115:18:10" + }, + "nodeType": "YulFunctionCall", + "src": "10115:42:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "10100:5:10" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10107:4:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10196:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "10198:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "10198:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "10198:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "10173:5:10" + }, + { + "arguments": [ + { + "name": "max", + "nodeType": "YulIdentifier", + "src": "10184:3:10" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10189:4:10" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "10180:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "10180:14:10" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "10170:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "10170:25:10" + }, + "nodeType": "YulIf", + "src": "10167:51:10" + }, + { + "nodeType": "YulAssignment", + "src": "10227:25:10", + "value": { + "arguments": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "10240:5:10" + }, + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10247:4:10" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "10236:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "10236:16:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "10227:5:10" + } + ] + } + ] + }, + "name": "checked_exp_unsigned", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "base", + "nodeType": "YulTypedName", + "src": "9215:4:10", + "type": "" + }, + { + "name": "exponent", + "nodeType": "YulTypedName", + "src": "9221:8:10", + "type": "" + }, + { + "name": "max", + "nodeType": "YulTypedName", + "src": "9231:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "power", + "nodeType": "YulTypedName", + "src": "9239:5:10", + "type": "" + } + ], + "src": "9185:1073:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10330:219:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10340:31:10", + "value": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10366:4:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10348:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "10348:23:10" + }, + "variableNames": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10340:4:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "10380:39:10", + "value": { + "arguments": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "10410:8:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10392:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "10392:27:10" + }, + "variableNames": [ + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "10380:8:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "10429:113:10", + "value": { + "arguments": [ + { + "name": "base", + "nodeType": "YulIdentifier", + "src": "10459:4:10" + }, + { + "name": "exponent", + "nodeType": "YulIdentifier", + "src": "10465:8:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10475:66:10", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + ], + "functionName": { + "name": "checked_exp_unsigned", + "nodeType": "YulIdentifier", + "src": "10438:20:10" + }, + "nodeType": "YulFunctionCall", + "src": "10438:104:10" + }, + "variableNames": [ + { + "name": "power", + "nodeType": "YulIdentifier", + "src": "10429:5:10" + } + ] + } + ] + }, + "name": "checked_exp_t_uint256_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "base", + "nodeType": "YulTypedName", + "src": "10305:4:10", + "type": "" + }, + { + "name": "exponent", + "nodeType": "YulTypedName", + "src": "10311:8:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "power", + "nodeType": "YulTypedName", + "src": "10324:5:10", + "type": "" + } + ], + "src": "10264:285:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10603:300:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10613:25:10", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10636:1:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10618:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "10618:20:10" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10613:1:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "10647:25:10", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10670:1:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "10652:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "10652:20:10" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10647:1:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10845:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x11", + "nodeType": "YulIdentifier", + "src": "10847:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "10847:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "10847:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10757:1:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "10750:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "10750:9:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "10743:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "10743:17:10" + }, + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10765:1:10" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10772:66:10", + "type": "", + "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + }, + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10840:1:10" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "10768:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "10768:74:10" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "10762:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "10762:81:10" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "10739:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "10739:105:10" + }, + "nodeType": "YulIf", + "src": "10736:131:10" + }, + { + "nodeType": "YulAssignment", + "src": "10877:20:10", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "10892:1:10" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "10895:1:10" + } + ], + "functionName": { + "name": "mul", + "nodeType": "YulIdentifier", + "src": "10888:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "10888:9:10" + }, + "variableNames": [ + { + "name": "product", + "nodeType": "YulIdentifier", + "src": "10877:7:10" + } + ] + } + ] + }, + "name": "checked_mul_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "10586:1:10", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "10589:1:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "product", + "nodeType": "YulTypedName", + "src": "10595:7:10", + "type": "" + } + ], + "src": "10555:348:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10937:152:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10954:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10957:77:10", + "type": "", + "value": "35408467139433450592217433187231851964531694900788300625387963629091585785856" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "10947:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "10947:88:10" + }, + "nodeType": "YulExpressionStatement", + "src": "10947:88:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11051:1:10", + "type": "", + "value": "4" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11054:4:10", + "type": "", + "value": "0x12" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "11044:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "11044:15:10" + }, + "nodeType": "YulExpressionStatement", + "src": "11044:15:10" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11075:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11078:4:10", + "type": "", + "value": "0x24" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "11068:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "11068:15:10" + }, + "nodeType": "YulExpressionStatement", + "src": "11068:15:10" + } + ] + }, + "name": "panic_error_0x12", + "nodeType": "YulFunctionDefinition", + "src": "10909:180:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11137:143:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11147:25:10", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "11170:1:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "11152:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "11152:20:10" + }, + "variableNames": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "11147:1:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "11181:25:10", + "value": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "11204:1:10" + } + ], + "functionName": { + "name": "cleanup_t_uint256", + "nodeType": "YulIdentifier", + "src": "11186:17:10" + }, + "nodeType": "YulFunctionCall", + "src": "11186:20:10" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "11181:1:10" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11228:22:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "panic_error_0x12", + "nodeType": "YulIdentifier", + "src": "11230:16:10" + }, + "nodeType": "YulFunctionCall", + "src": "11230:18:10" + }, + "nodeType": "YulExpressionStatement", + "src": "11230:18:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "11225:1:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "11218:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "11218:9:10" + }, + "nodeType": "YulIf", + "src": "11215:35:10" + }, + { + "nodeType": "YulAssignment", + "src": "11260:14:10", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "11269:1:10" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "11272:1:10" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "11265:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "11265:9:10" + }, + "variableNames": [ + { + "name": "r", + "nodeType": "YulIdentifier", + "src": "11260:1:10" + } + ] + } + ] + }, + "name": "checked_div_t_uint256", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "x", + "nodeType": "YulTypedName", + "src": "11126:1:10", + "type": "" + }, + { + "name": "y", + "nodeType": "YulTypedName", + "src": "11129:1:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "r", + "nodeType": "YulTypedName", + "src": "11135:1:10", + "type": "" + } + ], + "src": "11095:185:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11392:144:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "11414:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11422:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11410:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "11410:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a2073656c6c657220646f65736e27742068617665", + "kind": "string", + "nodeType": "YulLiteral", + "src": "11426:34:10", + "type": "", + "value": "BETokenMall: seller doesn't have" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "11403:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "11403:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "11403:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "11482:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11490:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11478:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "11478:15:10" + }, + { + "hexValue": "20656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d", + "kind": "string", + "nodeType": "YulLiteral", + "src": "11495:33:10", + "type": "", + "value": " enough token to sell this item" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "11471:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "11471:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "11471:58:10" + } + ] + }, + "name": "store_literal_in_memory_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "11384:6:10", + "type": "" + } + ], + "src": "11286:250:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11688:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11698:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11764:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11769:2:10", + "type": "", + "value": "63" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "11705:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "11705:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11698:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11870:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e", + "nodeType": "YulIdentifier", + "src": "11781:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "11781:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "11781:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "11883:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "11894:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11899:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "11890:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "11890:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "11883:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "11676:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "11684:3:10", + "type": "" + } + ], + "src": "11542:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12085:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12095:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12107:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12118:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12103:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12103:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12095:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12142:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12153:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12138:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12138:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12161:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12167:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "12157:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12157:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12131:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "12131:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "12131:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "12187:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12321:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "12195:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "12195:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12187:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "12065:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "12080:4:10", + "type": "" + } + ], + "src": "11914:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12465:206:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12475:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12487:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12498:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12483:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12483:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "12475:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "12555:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12568:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12579:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12564:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12564:17:10" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "12511:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "12511:71:10" + }, + "nodeType": "YulExpressionStatement", + "src": "12511:71:10" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "12636:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "12649:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12660:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12645:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12645:18:10" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "12592:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "12592:72:10" + }, + "nodeType": "YulExpressionStatement", + "src": "12592:72:10" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "12429:9:10", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "12441:6:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "12449:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "12460:4:10", + "type": "" + } + ], + "src": "12339:332:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12783:184:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "12805:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12813:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12801:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12801:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a2073656c6c657220646f65736e27742061707072", + "kind": "string", + "nodeType": "YulLiteral", + "src": "12817:34:10", + "type": "", + "value": "BETokenMall: seller doesn't appr" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12794:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "12794:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "12794:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "12873:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12881:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12869:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12869:15:10" + }, + { + "hexValue": "6f766520656e6f75676820746f6b656e20746f2073656c6c2074686973206974", + "kind": "string", + "nodeType": "YulLiteral", + "src": "12886:34:10", + "type": "", + "value": "ove enough token to sell this it" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12862:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "12862:59:10" + }, + "nodeType": "YulExpressionStatement", + "src": "12862:59:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "12942:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12950:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "12938:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "12938:15:10" + }, + { + "hexValue": "656d", + "kind": "string", + "nodeType": "YulLiteral", + "src": "12955:4:10", + "type": "", + "value": "em" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "12931:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "12931:29:10" + }, + "nodeType": "YulExpressionStatement", + "src": "12931:29:10" + } + ] + }, + "name": "store_literal_in_memory_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "12775:6:10", + "type": "" + } + ], + "src": "12677:290:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "13119:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "13129:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13195:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13200:2:10", + "type": "", + "value": "66" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "13136:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "13136:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13129:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13301:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116", + "nodeType": "YulIdentifier", + "src": "13212:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "13212:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "13212:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "13314:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "13325:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13330:2:10", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13321:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "13321:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "13314:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "13107:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "13115:3:10", + "type": "" + } + ], + "src": "12973:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "13516:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "13526:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "13538:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13549:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13534:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "13534:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13526:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "13573:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13584:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13569:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "13569:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13592:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "13598:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "13588:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "13588:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "13562:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "13562:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "13562:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "13618:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13752:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "13626:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "13626:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "13618:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "13496:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "13511:4:10", + "type": "" + } + ], + "src": "13345:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "13876:142:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "13898:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13906:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13894:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "13894:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20627579657220646f65736e2774206861766520", + "kind": "string", + "nodeType": "YulLiteral", + "src": "13910:34:10", + "type": "", + "value": "BETokenMall: buyer doesn't have " + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "13887:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "13887:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "13887:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "13966:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "13974:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "13962:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "13962:15:10" + }, + { + "hexValue": "656e6f75676820746f6b656e20746f206275792074686973206974656d", + "kind": "string", + "nodeType": "YulLiteral", + "src": "13979:31:10", + "type": "", + "value": "enough token to buy this item" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "13955:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "13955:56:10" + }, + "nodeType": "YulExpressionStatement", + "src": "13955:56:10" + } + ] + }, + "name": "store_literal_in_memory_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "13868:6:10", + "type": "" + } + ], + "src": "13770:248:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "14170:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "14180:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14246:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14251:2:10", + "type": "", + "value": "61" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "14187:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "14187:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14180:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14352:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7", + "nodeType": "YulIdentifier", + "src": "14263:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "14263:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "14263:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "14365:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "14376:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14381:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14372:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "14372:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "14365:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "14158:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "14166:3:10", + "type": "" + } + ], + "src": "14024:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "14567:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "14577:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "14589:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14600:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14585:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "14585:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14577:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "14624:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14635:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14620:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "14620:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14643:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "14649:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "14639:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "14639:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "14613:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "14613:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "14613:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "14669:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14803:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "14677:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "14677:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "14669:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "14547:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "14562:4:10", + "type": "" + } + ], + "src": "14396:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "14927:145:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "14949:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "14957:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "14945:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "14945:14:10" + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20627579657220646f65736e277420617070726f", + "kind": "string", + "nodeType": "YulLiteral", + "src": "14961:34:10", + "type": "", + "value": "BETokenMall: buyer doesn't appro" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "14938:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "14938:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "14938:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "15017:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15025:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15013:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "15013:15:10" + }, + { + "hexValue": "766520656e6f75676820746f6b656e20746f206275792074686973206974656d", + "kind": "string", + "nodeType": "YulLiteral", + "src": "15030:34:10", + "type": "", + "value": "ve enough token to buy this item" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "15006:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "15006:59:10" + }, + "nodeType": "YulExpressionStatement", + "src": "15006:59:10" + } + ] + }, + "name": "store_literal_in_memory_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "14919:6:10", + "type": "" + } + ], + "src": "14821:251:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "15224:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "15234:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15300:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15305:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "15241:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "15241:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15234:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15406:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9", + "nodeType": "YulIdentifier", + "src": "15317:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "15317:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "15317:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "15419:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "15430:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15435:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15426:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "15426:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "15419:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "15212:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "15220:3:10", + "type": "" + } + ], + "src": "15078:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "15621:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "15631:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "15643:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15654:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15639:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "15639:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15631:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "15678:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "15689:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "15674:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "15674:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15697:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "15703:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "15693:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "15693:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "15667:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "15667:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "15667:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "15723:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15857:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "15731:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "15731:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "15723:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "15601:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "15616:4:10", + "type": "" + } + ], + "src": "15450:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "16029:288:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "16039:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16051:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16062:2:10", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16047:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "16047:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "16039:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "16119:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16132:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16143:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16128:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "16128:17:10" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "16075:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "16075:71:10" + }, + "nodeType": "YulExpressionStatement", + "src": "16075:71:10" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "16200:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16213:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16224:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16209:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "16209:18:10" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "16156:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "16156:72:10" + }, + "nodeType": "YulExpressionStatement", + "src": "16156:72:10" + }, + { + "expression": { + "arguments": [ + { + "name": "value2", + "nodeType": "YulIdentifier", + "src": "16282:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "16295:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16306:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16291:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "16291:18:10" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "16238:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "16238:72:10" + }, + "nodeType": "YulExpressionStatement", + "src": "16238:72:10" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_address_t_uint256__to_t_address_t_address_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "15985:9:10", + "type": "" + }, + { + "name": "value2", + "nodeType": "YulTypedName", + "src": "15997:6:10", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "16005:6:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "16013:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "16024:4:10", + "type": "" + } + ], + "src": "15875:442:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "16429:67:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "16451:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16459:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16447:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "16447:14:10" + }, + { + "hexValue": "616464726573732063616e206e6f74206265207a65726f", + "kind": "string", + "nodeType": "YulLiteral", + "src": "16463:25:10", + "type": "", + "value": "address can not be zero" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "16440:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "16440:49:10" + }, + "nodeType": "YulExpressionStatement", + "src": "16440:49:10" + } + ] + }, + "name": "store_literal_in_memory_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "16421:6:10", + "type": "" + } + ], + "src": "16323:173:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "16648:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "16658:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16724:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16729:2:10", + "type": "", + "value": "23" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "16665:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "16665:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16658:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16830:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c", + "nodeType": "YulIdentifier", + "src": "16741:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "16741:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "16741:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "16843:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "16854:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "16859:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "16850:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "16850:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "16843:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "16636:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "16644:3:10", + "type": "" + } + ], + "src": "16502:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "17045:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "17055:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "17067:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17078:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17063:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "17063:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17055:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "17102:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17113:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17098:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "17098:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17121:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "17127:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "17117:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "17117:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "17091:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "17091:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "17091:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "17147:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17281:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "17155:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "17155:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "17147:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "17025:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "17040:4:10", + "type": "" + } + ], + "src": "16874:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "17405:65:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "17427:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17435:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17423:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "17423:14:10" + }, + { + "hexValue": "45524332302061646472657373206973207a65726f", + "kind": "string", + "nodeType": "YulLiteral", + "src": "17439:23:10", + "type": "", + "value": "ERC20 address is zero" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "17416:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "17416:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "17416:47:10" + } + ] + }, + "name": "store_literal_in_memory_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "17397:6:10", + "type": "" + } + ], + "src": "17299:171:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "17622:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "17632:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17698:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17703:2:10", + "type": "", + "value": "21" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "17639:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "17639:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17632:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17804:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef", + "nodeType": "YulIdentifier", + "src": "17715:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "17715:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "17715:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "17817:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "17828:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "17833:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "17824:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "17824:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "17817:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "17610:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "17618:3:10", + "type": "" + } + ], + "src": "17476:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "18019:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "18029:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18041:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18052:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18037:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18037:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18029:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18076:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18087:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18072:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18072:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18095:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18101:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "18091:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18091:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "18065:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "18065:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "18065:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "18121:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18255:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "18129:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "18129:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18121:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "17999:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "18014:4:10", + "type": "" + } + ], + "src": "17848:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "18427:288:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "18437:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18449:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18460:2:10", + "type": "", + "value": "96" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18445:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18445:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "18437:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "18517:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18530:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18541:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18526:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18526:17:10" + } + ], + "functionName": { + "name": "abi_encode_t_address_to_t_address_fromStack", + "nodeType": "YulIdentifier", + "src": "18473:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "18473:71:10" + }, + "nodeType": "YulExpressionStatement", + "src": "18473:71:10" + }, + { + "expression": { + "arguments": [ + { + "name": "value1", + "nodeType": "YulIdentifier", + "src": "18598:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18611:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18622:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18607:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18607:18:10" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "18554:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "18554:72:10" + }, + "nodeType": "YulExpressionStatement", + "src": "18554:72:10" + }, + { + "expression": { + "arguments": [ + { + "name": "value2", + "nodeType": "YulIdentifier", + "src": "18680:6:10" + }, + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "18693:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18704:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18689:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18689:18:10" + } + ], + "functionName": { + "name": "abi_encode_t_uint256_to_t_uint256_fromStack", + "nodeType": "YulIdentifier", + "src": "18636:43:10" + }, + "nodeType": "YulFunctionCall", + "src": "18636:72:10" + }, + "nodeType": "YulExpressionStatement", + "src": "18636:72:10" + } + ] + }, + "name": "abi_encode_tuple_t_address_t_uint256_t_uint256__to_t_address_t_uint256_t_uint256__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "18383:9:10", + "type": "" + }, + { + "name": "value2", + "nodeType": "YulTypedName", + "src": "18395:6:10", + "type": "" + }, + { + "name": "value1", + "nodeType": "YulTypedName", + "src": "18403:6:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "18411:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "18422:4:10", + "type": "" + } + ], + "src": "18273:442:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "18827:119:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "18849:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18857:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18845:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18845:14:10" + }, + { + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061", + "kind": "string", + "nodeType": "YulLiteral", + "src": "18861:34:10", + "type": "", + "value": "Ownable: new owner is the zero a" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "18838:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "18838:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "18838:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "18917:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "18925:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "18913:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "18913:15:10" + }, + { + "hexValue": "646472657373", + "kind": "string", + "nodeType": "YulLiteral", + "src": "18930:8:10", + "type": "", + "value": "ddress" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "18906:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "18906:33:10" + }, + "nodeType": "YulExpressionStatement", + "src": "18906:33:10" + } + ] + }, + "name": "store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "18819:6:10", + "type": "" + } + ], + "src": "18721:225:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "19098:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "19108:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19174:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19179:2:10", + "type": "", + "value": "38" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "19115:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "19115:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19108:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19280:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "nodeType": "YulIdentifier", + "src": "19191:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "19191:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "19191:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "19293:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "19304:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19309:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19300:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "19300:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "19293:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "19086:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "19094:3:10", + "type": "" + } + ], + "src": "18952:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "19495:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "19505:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "19517:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19528:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19513:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "19513:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19505:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "19552:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19563:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19548:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "19548:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19571:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "19577:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "19567:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "19567:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "19541:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "19541:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "19541:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "19597:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19731:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "19605:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "19605:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "19597:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "19475:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "19490:4:10", + "type": "" + } + ], + "src": "19324:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "19855:76:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "19877:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "19885:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "19873:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "19873:14:10" + }, + { + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "kind": "string", + "nodeType": "YulLiteral", + "src": "19889:34:10", + "type": "", + "value": "Ownable: caller is not the owner" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "19866:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "19866:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "19866:58:10" + } + ] + }, + "name": "store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "19847:6:10", + "type": "" + } + ], + "src": "19749:182:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "20083:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "20093:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20159:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20164:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "20100:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "20100:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20093:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20265:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "nodeType": "YulIdentifier", + "src": "20176:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "20176:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "20176:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "20278:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "20289:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20294:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20285:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "20285:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "20278:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "20071:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "20079:3:10", + "type": "" + } + ], + "src": "19937:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "20480:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "20490:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "20502:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20513:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20498:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "20498:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20490:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "20537:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20548:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20533:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "20533:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20556:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "20562:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "20552:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "20552:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "20526:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "20526:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "20526:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "20582:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20716:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "20590:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "20590:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "20582:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "20460:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "20475:4:10", + "type": "" + } + ], + "src": "20309:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "20840:75:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "20862:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "20870:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "20858:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "20858:14:10" + }, + { + "hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c", + "kind": "string", + "nodeType": "YulLiteral", + "src": "20874:33:10", + "type": "", + "value": "ReentrancyGuard: reentrant call" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "20851:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "20851:57:10" + }, + "nodeType": "YulExpressionStatement", + "src": "20851:57:10" + } + ] + }, + "name": "store_literal_in_memory_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "20832:6:10", + "type": "" + } + ], + "src": "20734:181:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21067:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "21077:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21143:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21148:2:10", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "21084:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "21084:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21077:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21249:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", + "nodeType": "YulIdentifier", + "src": "21160:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "21160:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "21160:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "21262:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "21273:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21278:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21269:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "21269:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "21262:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "21055:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "21063:3:10", + "type": "" + } + ], + "src": "20921:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21464:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "21474:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "21486:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21497:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21482:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "21482:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21474:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "21521:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21532:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "21517:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "21517:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21540:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "21546:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "21536:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "21536:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "21510:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "21510:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "21510:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "21566:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21700:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "21574:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "21574:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "21566:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "21444:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "21459:4:10", + "type": "" + } + ], + "src": "21293:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21758:76:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "21812:16:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21821:1:10", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "21824:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "21814:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "21814:12:10" + }, + "nodeType": "YulExpressionStatement", + "src": "21814:12:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "21781:5:10" + }, + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "21803:5:10" + } + ], + "functionName": { + "name": "cleanup_t_bool", + "nodeType": "YulIdentifier", + "src": "21788:14:10" + }, + "nodeType": "YulFunctionCall", + "src": "21788:21:10" + } + ], + "functionName": { + "name": "eq", + "nodeType": "YulIdentifier", + "src": "21778:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "21778:32:10" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "21771:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "21771:40:10" + }, + "nodeType": "YulIf", + "src": "21768:60:10" + } + ] + }, + "name": "validator_revert_t_bool", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "21751:5:10", + "type": "" + } + ], + "src": "21718:116:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "21900:77:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "21910:22:10", + "value": { + "arguments": [ + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "21925:6:10" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "21919:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "21919:13:10" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "21910:5:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "21965:5:10" + } + ], + "functionName": { + "name": "validator_revert_t_bool", + "nodeType": "YulIdentifier", + "src": "21941:23:10" + }, + "nodeType": "YulFunctionCall", + "src": "21941:30:10" + }, + "nodeType": "YulExpressionStatement", + "src": "21941:30:10" + } + ] + }, + "name": "abi_decode_t_bool_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "21878:6:10", + "type": "" + }, + { + "name": "end", + "nodeType": "YulTypedName", + "src": "21886:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "21894:5:10", + "type": "" + } + ], + "src": "21840:137:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22057:271:10", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "22103:83:10", + "statements": [ + { + "expression": { + "arguments": [], + "functionName": { + "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", + "nodeType": "YulIdentifier", + "src": "22105:77:10" + }, + "nodeType": "YulFunctionCall", + "src": "22105:79:10" + }, + "nodeType": "YulExpressionStatement", + "src": "22105:79:10" + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "22078:7:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "22087:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "22074:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "22074:23:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22099:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "slt", + "nodeType": "YulIdentifier", + "src": "22070:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "22070:32:10" + }, + "nodeType": "YulIf", + "src": "22067:119:10" + }, + { + "nodeType": "YulBlock", + "src": "22196:125:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "22211:15:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22225:1:10", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "offset", + "nodeType": "YulTypedName", + "src": "22215:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "22240:71:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "22283:9:10" + }, + { + "name": "offset", + "nodeType": "YulIdentifier", + "src": "22294:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22279:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "22279:22:10" + }, + { + "name": "dataEnd", + "nodeType": "YulIdentifier", + "src": "22303:7:10" + } + ], + "functionName": { + "name": "abi_decode_t_bool_fromMemory", + "nodeType": "YulIdentifier", + "src": "22250:28:10" + }, + "nodeType": "YulFunctionCall", + "src": "22250:61:10" + }, + "variableNames": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "22240:6:10" + } + ] + } + ] + } + ] + }, + "name": "abi_decode_tuple_t_bool_fromMemory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "22027:9:10", + "type": "" + }, + { + "name": "dataEnd", + "nodeType": "YulTypedName", + "src": "22038:7:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "22050:6:10", + "type": "" + } + ], + "src": "21983:345:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22440:123:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "22462:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22470:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22458:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "22458:14:10" + }, + { + "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e", + "kind": "string", + "nodeType": "YulLiteral", + "src": "22474:34:10", + "type": "", + "value": "SafeERC20: ERC20 operation did n" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "22451:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "22451:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "22451:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "22530:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22538:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22526:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "22526:15:10" + }, + { + "hexValue": "6f742073756363656564", + "kind": "string", + "nodeType": "YulLiteral", + "src": "22543:12:10", + "type": "", + "value": "ot succeed" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "22519:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "22519:37:10" + }, + "nodeType": "YulExpressionStatement", + "src": "22519:37:10" + } + ] + }, + "name": "store_literal_in_memory_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "22432:6:10", + "type": "" + } + ], + "src": "22334:229:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "22715:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "22725:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22791:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22796:2:10", + "type": "", + "value": "42" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "22732:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "22732:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22725:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22897:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", + "nodeType": "YulIdentifier", + "src": "22808:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "22808:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "22808:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "22910:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "22921:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "22926:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "22917:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "22917:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "22910:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "22703:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "22711:3:10", + "type": "" + } + ], + "src": "22569:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "23112:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "23122:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "23134:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23145:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "23130:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "23130:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "23122:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "23169:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23180:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "23165:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "23165:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "23188:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "23194:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "23184:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "23184:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "23158:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "23158:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "23158:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "23214:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "23348:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "23222:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "23222:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "23214:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "23092:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "23107:4:10", + "type": "" + } + ], + "src": "22941:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "23472:119:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "23494:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23502:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "23490:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "23490:14:10" + }, + { + "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f", + "kind": "string", + "nodeType": "YulLiteral", + "src": "23506:34:10", + "type": "", + "value": "Address: insufficient balance fo" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "23483:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "23483:58:10" + }, + "nodeType": "YulExpressionStatement", + "src": "23483:58:10" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "23562:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23570:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "23558:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "23558:15:10" + }, + { + "hexValue": "722063616c6c", + "kind": "string", + "nodeType": "YulLiteral", + "src": "23575:8:10", + "type": "", + "value": "r call" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "23551:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "23551:33:10" + }, + "nodeType": "YulExpressionStatement", + "src": "23551:33:10" + } + ] + }, + "name": "store_literal_in_memory_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "23464:6:10", + "type": "" + } + ], + "src": "23366:225:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "23743:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "23753:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23819:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23824:2:10", + "type": "", + "value": "38" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "23760:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "23760:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23753:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23925:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", + "nodeType": "YulIdentifier", + "src": "23836:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "23836:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "23836:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "23938:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "23949:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "23954:2:10", + "type": "", + "value": "64" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "23945:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "23945:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "23938:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "23731:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "23739:3:10", + "type": "" + } + ], + "src": "23597:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24140:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "24150:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "24162:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24173:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "24158:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24158:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "24150:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "24197:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24208:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "24193:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24193:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "24216:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "24222:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "24212:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24212:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24186:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "24186:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "24186:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "24242:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "24376:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "24250:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "24250:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "24242:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "24120:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "24135:4:10", + "type": "" + } + ], + "src": "23969:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24452:40:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "24463:22:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "24479:5:10" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "24473:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "24473:12:10" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "24463:6:10" + } + ] + } + ] + }, + "name": "array_length_t_bytes_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "24435:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "24445:6:10", + "type": "" + } + ], + "src": "24394:98:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24611:34:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "24621:18:10", + "value": { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "24636:3:10" + }, + "variableNames": [ + { + "name": "updated_pos", + "nodeType": "YulIdentifier", + "src": "24621:11:10" + } + ] + } + ] + }, + "name": "array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "24583:3:10", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "24588:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "updated_pos", + "nodeType": "YulTypedName", + "src": "24599:11:10", + "type": "" + } + ], + "src": "24498:147:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24700:258:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "24710:10:10", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24719:1:10", + "type": "", + "value": "0" + }, + "variables": [ + { + "name": "i", + "nodeType": "YulTypedName", + "src": "24714:1:10", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24779:63:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "24804:3:10" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "24809:1:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "24800:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24800:11:10" + }, + { + "arguments": [ + { + "arguments": [ + { + "name": "src", + "nodeType": "YulIdentifier", + "src": "24823:3:10" + }, + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "24828:1:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "24819:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24819:11:10" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "24813:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "24813:18:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24793:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "24793:39:10" + }, + "nodeType": "YulExpressionStatement", + "src": "24793:39:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "24740:1:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "24743:6:10" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "24737:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "24737:13:10" + }, + "nodeType": "YulForLoop", + "post": { + "nodeType": "YulBlock", + "src": "24751:19:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "24753:15:10", + "value": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "24762:1:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24765:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "24758:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24758:10:10" + }, + "variableNames": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "24753:1:10" + } + ] + } + ] + }, + "pre": { + "nodeType": "YulBlock", + "src": "24733:3:10", + "statements": [] + }, + "src": "24729:113:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "24876:76:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "dst", + "nodeType": "YulIdentifier", + "src": "24926:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "24931:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "24922:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "24922:16:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "24940:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "24915:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "24915:27:10" + }, + "nodeType": "YulExpressionStatement", + "src": "24915:27:10" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "i", + "nodeType": "YulIdentifier", + "src": "24857:1:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "24860:6:10" + } + ], + "functionName": { + "name": "gt", + "nodeType": "YulIdentifier", + "src": "24854:2:10" + }, + "nodeType": "YulFunctionCall", + "src": "24854:13:10" + }, + "nodeType": "YulIf", + "src": "24851:101:10" + } + ] + }, + "name": "copy_memory_to_memory", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "src", + "nodeType": "YulTypedName", + "src": "24682:3:10", + "type": "" + }, + { + "name": "dst", + "nodeType": "YulTypedName", + "src": "24687:3:10", + "type": "" + }, + { + "name": "length", + "nodeType": "YulTypedName", + "src": "24692:6:10", + "type": "" + } + ], + "src": "24651:307:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25072:265:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "25082:52:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "25128:5:10" + } + ], + "functionName": { + "name": "array_length_t_bytes_memory_ptr", + "nodeType": "YulIdentifier", + "src": "25096:31:10" + }, + "nodeType": "YulFunctionCall", + "src": "25096:38:10" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "25086:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "25143:95:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25226:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "25231:6:10" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "25150:75:10" + }, + "nodeType": "YulFunctionCall", + "src": "25150:88:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25143:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "25273:5:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25280:4:10", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25269:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "25269:16:10" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25287:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "25292:6:10" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "25247:21:10" + }, + "nodeType": "YulFunctionCall", + "src": "25247:52:10" + }, + "nodeType": "YulExpressionStatement", + "src": "25247:52:10" + }, + { + "nodeType": "YulAssignment", + "src": "25308:23:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25319:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "25324:6:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25315:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "25315:16:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "25308:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "25053:5:10", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "25060:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "25068:3:10", + "type": "" + } + ], + "src": "24964:373:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25477:137:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "25488:100:10", + "value": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "25575:6:10" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25584:3:10" + } + ], + "functionName": { + "name": "abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack", + "nodeType": "YulIdentifier", + "src": "25495:79:10" + }, + "nodeType": "YulFunctionCall", + "src": "25495:93:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25488:3:10" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "25598:10:10", + "value": { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25605:3:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "25598:3:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "25456:3:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "25462:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "25473:3:10", + "type": "" + } + ], + "src": "25343:271:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25726:73:10", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "memPtr", + "nodeType": "YulIdentifier", + "src": "25748:6:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "25756:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "25744:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "25744:14:10" + }, + { + "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", + "kind": "string", + "nodeType": "YulLiteral", + "src": "25760:31:10", + "type": "", + "value": "Address: call to non-contract" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "25737:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "25737:55:10" + }, + "nodeType": "YulExpressionStatement", + "src": "25737:55:10" + } + ] + }, + "name": "store_literal_in_memory_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "memPtr", + "nodeType": "YulTypedName", + "src": "25718:6:10", + "type": "" + } + ], + "src": "25620:179:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "25951:220:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "25961:74:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "26027:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "26032:2:10", + "type": "", + "value": "29" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "25968:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "25968:67:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "25961:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "26133:3:10" + } + ], + "functionName": { + "name": "store_literal_in_memory_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", + "nodeType": "YulIdentifier", + "src": "26044:88:10" + }, + "nodeType": "YulFunctionCall", + "src": "26044:93:10" + }, + "nodeType": "YulExpressionStatement", + "src": "26044:93:10" + }, + { + "nodeType": "YulAssignment", + "src": "26146:19:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "26157:3:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "26162:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "26153:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26153:12:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "26146:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "25939:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "25947:3:10", + "type": "" + } + ], + "src": "25805:366:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "26348:248:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "26358:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "26370:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "26381:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "26366:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26366:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "26358:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "26405:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "26416:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "26401:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26401:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "26424:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "26430:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "26420:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26420:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "26394:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "26394:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "26394:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "26450:139:10", + "value": { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "26584:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "26458:124:10" + }, + "nodeType": "YulFunctionCall", + "src": "26458:131:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "26450:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "26328:9:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "26343:4:10", + "type": "" + } + ], + "src": "26177:419:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "26661:40:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "26672:22:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "26688:5:10" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "26682:5:10" + }, + "nodeType": "YulFunctionCall", + "src": "26682:12:10" + }, + "variableNames": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "26672:6:10" + } + ] + } + ] + }, + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "26644:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "26654:6:10", + "type": "" + } + ], + "src": "26602:99:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "26755:54:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "26765:38:10", + "value": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "26783:5:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "26790:2:10", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "26779:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26779:14:10" + }, + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "26799:2:10", + "type": "", + "value": "31" + } + ], + "functionName": { + "name": "not", + "nodeType": "YulIdentifier", + "src": "26795:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26795:7:10" + } + ], + "functionName": { + "name": "and", + "nodeType": "YulIdentifier", + "src": "26775:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "26775:28:10" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "26765:6:10" + } + ] + } + ] + }, + "name": "round_up_to_mul_of_32", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "26738:5:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "26748:6:10", + "type": "" + } + ], + "src": "26707:102:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "26907:272:10", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "26917:53:10", + "value": { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "26964:5:10" + } + ], + "functionName": { + "name": "array_length_t_string_memory_ptr", + "nodeType": "YulIdentifier", + "src": "26931:32:10" + }, + "nodeType": "YulFunctionCall", + "src": "26931:39:10" + }, + "variables": [ + { + "name": "length", + "nodeType": "YulTypedName", + "src": "26921:6:10", + "type": "" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "26979:78:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "27045:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "27050:6:10" + } + ], + "functionName": { + "name": "array_storeLengthForEncoding_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "26986:58:10" + }, + "nodeType": "YulFunctionCall", + "src": "26986:71:10" + }, + "variableNames": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "26979:3:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "27092:5:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "27099:4:10", + "type": "", + "value": "0x20" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "27088:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "27088:16:10" + }, + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "27106:3:10" + }, + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "27111:6:10" + } + ], + "functionName": { + "name": "copy_memory_to_memory", + "nodeType": "YulIdentifier", + "src": "27066:21:10" + }, + "nodeType": "YulFunctionCall", + "src": "27066:52:10" + }, + "nodeType": "YulExpressionStatement", + "src": "27066:52:10" + }, + { + "nodeType": "YulAssignment", + "src": "27127:46:10", + "value": { + "arguments": [ + { + "name": "pos", + "nodeType": "YulIdentifier", + "src": "27138:3:10" + }, + { + "arguments": [ + { + "name": "length", + "nodeType": "YulIdentifier", + "src": "27165:6:10" + } + ], + "functionName": { + "name": "round_up_to_mul_of_32", + "nodeType": "YulIdentifier", + "src": "27143:21:10" + }, + "nodeType": "YulFunctionCall", + "src": "27143:29:10" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "27134:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "27134:39:10" + }, + "variableNames": [ + { + "name": "end", + "nodeType": "YulIdentifier", + "src": "27127:3:10" + } + ] + } + ] + }, + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "value", + "nodeType": "YulTypedName", + "src": "26888:5:10", + "type": "" + }, + { + "name": "pos", + "nodeType": "YulTypedName", + "src": "26895:3:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "end", + "nodeType": "YulTypedName", + "src": "26903:3:10", + "type": "" + } + ], + "src": "26815:364:10" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "27303:195:10", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "27313:26:10", + "value": { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "27325:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "27336:2:10", + "type": "", + "value": "32" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "27321:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "27321:18:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "27313:4:10" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "27360:9:10" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "27371:1:10", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "27356:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "27356:17:10" + }, + { + "arguments": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "27379:4:10" + }, + { + "name": "headStart", + "nodeType": "YulIdentifier", + "src": "27385:9:10" + } + ], + "functionName": { + "name": "sub", + "nodeType": "YulIdentifier", + "src": "27375:3:10" + }, + "nodeType": "YulFunctionCall", + "src": "27375:20:10" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "27349:6:10" + }, + "nodeType": "YulFunctionCall", + "src": "27349:47:10" + }, + "nodeType": "YulExpressionStatement", + "src": "27349:47:10" + }, + { + "nodeType": "YulAssignment", + "src": "27405:86:10", + "value": { + "arguments": [ + { + "name": "value0", + "nodeType": "YulIdentifier", + "src": "27477:6:10" + }, + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "27486:4:10" + } + ], + "functionName": { + "name": "abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack", + "nodeType": "YulIdentifier", + "src": "27413:63:10" + }, + "nodeType": "YulFunctionCall", + "src": "27413:78:10" + }, + "variableNames": [ + { + "name": "tail", + "nodeType": "YulIdentifier", + "src": "27405:4:10" + } + ] + } + ] + }, + "name": "abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "headStart", + "nodeType": "YulTypedName", + "src": "27275:9:10", + "type": "" + }, + { + "name": "value0", + "nodeType": "YulTypedName", + "src": "27287:6:10", + "type": "" + } + ], + "returnVariables": [ + { + "name": "tail", + "nodeType": "YulTypedName", + "src": "27298:4:10", + "type": "" + } + ], + "src": "27185:313:10" + } + ] + }, + "contents": "{\n\n function cleanup_t_uint160(value) -> cleaned {\n cleaned := and(value, 0xffffffffffffffffffffffffffffffffffffffff)\n }\n\n function cleanup_t_address(value) -> cleaned {\n cleaned := cleanup_t_uint160(value)\n }\n\n function abi_encode_t_address_to_t_address_fromStack(value, pos) {\n mstore(pos, cleanup_t_address(value))\n }\n\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n }\n\n function allocate_unbounded() -> memPtr {\n memPtr := mload(64)\n }\n\n function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {\n revert(0, 0)\n }\n\n function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {\n revert(0, 0)\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 abi_decode_t_address(offset, end) -> value {\n value := calldataload(offset)\n validator_revert_t_address(value)\n }\n\n function abi_decode_tuple_t_address(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_address(add(headStart, offset), dataEnd)\n }\n\n }\n\n function cleanup_t_uint256(value) -> cleaned {\n cleaned := value\n }\n\n function validator_revert_t_uint256(value) {\n if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }\n }\n\n 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_addresst_uint256(headStart, dataEnd) -> value0, value1 {\n if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\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 cleanup_t_bool(value) -> cleaned {\n cleaned := iszero(iszero(value))\n }\n\n function abi_encode_t_bool_to_t_bool_fromStack(value, pos) {\n mstore(pos, cleanup_t_bool(value))\n }\n\n function abi_encode_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_t_uint256_to_t_uint256_fromStack(value, pos) {\n mstore(pos, cleanup_t_uint256(value))\n }\n\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))\n\n }\n\n function 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 store_literal_in_memory_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924(memPtr) {\n\n mstore(add(memPtr, 0), \"fee received address can not be \")\n\n mstore(add(memPtr, 32), \"zero\")\n\n }\n\n function abi_encode_t_stringliteral_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 36)\n store_literal_in_memory_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924__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_aaa625db430dfb3ad2fa62eaddd511a6cd8de860cee36054f7986cfa0debb924_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: invalid amount\")\n\n }\n\n function abi_encode_t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 27)\n store_literal_in_memory_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be__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_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: invalid payment met\")\n\n mstore(add(memPtr, 32), \"hod\")\n\n }\n\n function abi_encode_t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 35)\n store_literal_in_memory_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa__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_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: invalid token price\")\n\n }\n\n function abi_encode_t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 32)\n store_literal_in_memory_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd__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_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_decode_t_uint256_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_uint256(value)\n }\n\n function abi_decode_tuple_t_uint256_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_uint256_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function panic_error_0x11() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\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 shift_right_1_unsigned(value) -> newValue {\n newValue :=\n\n shr(1, value)\n\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_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_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_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 panic_error_0x12() {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n\n function checked_div_t_uint256(x, y) -> r {\n x := cleanup_t_uint256(x)\n y := cleanup_t_uint256(y)\n if iszero(y) { panic_error_0x12() }\n\n r := div(x, y)\n }\n\n function store_literal_in_memory_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: seller doesn't have\")\n\n mstore(add(memPtr, 32), \" enough token to sell this item\")\n\n }\n\n function abi_encode_t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 63)\n store_literal_in_memory_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e__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_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_address_t_address__to_t_address_t_address__fromStack_reversed(headStart , value1, value0) -> tail {\n tail := add(headStart, 64)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_address_to_t_address_fromStack(value1, add(headStart, 32))\n\n }\n\n function store_literal_in_memory_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: seller doesn't appr\")\n\n mstore(add(memPtr, 32), \"ove enough token to sell this it\")\n\n mstore(add(memPtr, 64), \"em\")\n\n }\n\n function abi_encode_t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 66)\n store_literal_in_memory_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116(pos)\n end := add(pos, 96)\n }\n\n function abi_encode_tuple_t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116__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_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: buyer doesn't have \")\n\n mstore(add(memPtr, 32), \"enough token to buy this item\")\n\n }\n\n function abi_encode_t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 61)\n store_literal_in_memory_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7__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_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9(memPtr) {\n\n mstore(add(memPtr, 0), \"BETokenMall: buyer doesn't appro\")\n\n mstore(add(memPtr, 32), \"ve enough token to buy this item\")\n\n }\n\n function abi_encode_t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 64)\n store_literal_in_memory_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9__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_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_address_t_address_t_uint256__to_t_address_t_address_t_uint256__fromStack_reversed(headStart , value2, value1, value0) -> tail {\n tail := add(headStart, 96)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_address_to_t_address_fromStack(value1, add(headStart, 32))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value2, add(headStart, 64))\n\n }\n\n function store_literal_in_memory_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c(memPtr) {\n\n mstore(add(memPtr, 0), \"address can not be zero\")\n\n }\n\n function abi_encode_t_stringliteral_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 23)\n store_literal_in_memory_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c__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_8acc3ee93e123270baeb206c430cf52b6f082d016072bd6f96b9fec703556e4c_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef(memPtr) {\n\n mstore(add(memPtr, 0), \"ERC20 address is zero\")\n\n }\n\n function abi_encode_t_stringliteral_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 21)\n store_literal_in_memory_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef__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_3d1d4adcc59749b5d042ef099480f6d549cd45fbb220ca097fe0a691a2a937ef_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function abi_encode_tuple_t_address_t_uint256_t_uint256__to_t_address_t_uint256_t_uint256__fromStack_reversed(headStart , value2, value1, value0) -> tail {\n tail := add(headStart, 96)\n\n abi_encode_t_address_to_t_address_fromStack(value0, add(headStart, 0))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value1, add(headStart, 32))\n\n abi_encode_t_uint256_to_t_uint256_fromStack(value2, add(headStart, 64))\n\n }\n\n function store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe(memPtr) {\n\n mstore(add(memPtr, 0), \"Ownable: new owner is the zero a\")\n\n mstore(add(memPtr, 32), \"ddress\")\n\n }\n\n function abi_encode_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 38)\n store_literal_in_memory_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe__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_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe(memPtr) {\n\n mstore(add(memPtr, 0), \"Ownable: caller is not the owner\")\n\n }\n\n function abi_encode_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 32)\n store_literal_in_memory_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe__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_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619(memPtr) {\n\n mstore(add(memPtr, 0), \"ReentrancyGuard: reentrant call\")\n\n }\n\n function abi_encode_t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 31)\n store_literal_in_memory_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619__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_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function validator_revert_t_bool(value) {\n if iszero(eq(value, cleanup_t_bool(value))) { revert(0, 0) }\n }\n\n function abi_decode_t_bool_fromMemory(offset, end) -> value {\n value := mload(offset)\n validator_revert_t_bool(value)\n }\n\n function abi_decode_tuple_t_bool_fromMemory(headStart, dataEnd) -> value0 {\n if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }\n\n {\n\n let offset := 0\n\n value0 := abi_decode_t_bool_fromMemory(add(headStart, offset), dataEnd)\n }\n\n }\n\n function store_literal_in_memory_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd(memPtr) {\n\n mstore(add(memPtr, 0), \"SafeERC20: ERC20 operation did n\")\n\n mstore(add(memPtr, 32), \"ot succeed\")\n\n }\n\n function abi_encode_t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 42)\n store_literal_in_memory_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd__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_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function store_literal_in_memory_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c(memPtr) {\n\n mstore(add(memPtr, 0), \"Address: insufficient balance fo\")\n\n mstore(add(memPtr, 32), \"r call\")\n\n }\n\n function abi_encode_t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 38)\n store_literal_in_memory_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c(pos)\n end := add(pos, 64)\n }\n\n function abi_encode_tuple_t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c__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_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function array_length_t_bytes_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos, length) -> updated_pos {\n updated_pos := pos\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 abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack(value, pos) -> end {\n let length := array_length_t_bytes_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_bytes_memory_ptr_nonPadded_inplace_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, length)\n }\n\n function abi_encode_tuple_packed_t_bytes_memory_ptr__to_t_bytes_memory_ptr__nonPadded_inplace_fromStack_reversed(pos , value0) -> end {\n\n pos := abi_encode_t_bytes_memory_ptr_to_t_bytes_memory_ptr_nonPadded_inplace_fromStack(value0, pos)\n\n end := pos\n }\n\n function store_literal_in_memory_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad(memPtr) {\n\n mstore(add(memPtr, 0), \"Address: call to non-contract\")\n\n }\n\n function abi_encode_t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad_to_t_string_memory_ptr_fromStack(pos) -> end {\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, 29)\n store_literal_in_memory_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad(pos)\n end := add(pos, 32)\n }\n\n function abi_encode_tuple_t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad__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_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad_to_t_string_memory_ptr_fromStack( tail)\n\n }\n\n function array_length_t_string_memory_ptr(value) -> length {\n\n length := mload(value)\n\n }\n\n function round_up_to_mul_of_32(value) -> result {\n result := and(add(value, 31), not(31))\n }\n\n function abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value, pos) -> end {\n let length := array_length_t_string_memory_ptr(value)\n pos := array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length)\n copy_memory_to_memory(add(value, 0x20), pos, length)\n end := add(pos, round_up_to_mul_of_32(length))\n }\n\n function abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack_reversed(headStart , value0) -> tail {\n tail := add(headStart, 32)\n\n mstore(add(headStart, 0), sub(tail, headStart))\n tail := abi_encode_t_string_memory_ptr_to_t_string_memory_ptr_fromStack(value0, tail)\n\n }\n\n}\n", + "id": 10, + "language": "Yul", + "name": "#utility.yul" + } + ], + "sourceMap": "387:2870:7:-:0;;;995:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;936:32:0;955:12;:10;;;:12;;:::i;:::-;936:18;;;:32;;:::i;:::-;1716:1:1;1821:7;:22;;;;1068:13:7;1053:12;;:28;;;;;;;;;;;;;;;;;;1096:7;1087:6;;:16;;;;;;;;;;;;;;;;;;995:113;;387:2870;;640:96:6;693:7;719:10;712:17;;640:96;:::o;2426:187:0:-;2499:16;2518:6;;;;;;;;;;;2499:25;;2543:8;2534:6;;:17;;;;;;;;;;;;;;;;;;2597:8;2566:40;;2587:8;2566:40;;;;;;;;;;;;2489:124;2426:187;:::o;88:117:10:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:143::-;753:5;784:6;778:13;769:22;;800:33;827:5;800:33;:::i;:::-;696:143;;;;:::o;845:507::-;924:6;932;981:2;969:9;960:7;956:23;952:32;949:119;;;987:79;;:::i;:::-;949:119;1107:1;1132:64;1188:7;1179:6;1168:9;1164:22;1132:64;:::i;:::-;1122:74;;1078:128;1245:2;1271:64;1327:7;1318:6;1307:9;1303:22;1271:64;:::i;:::-;1261:74;;1216:129;845:507;;;;;:::o;387:2870:7:-;;;;;;;", + "deployedSourceMap": "387:2870:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;220:27:8;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;564:21:7;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;916:206:8;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1155:154:7;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1776:1479;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1824:101:0;;;:::i;:::-;;760:152:8;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1201:85:0;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;252:46:8;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;533:27:7;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;386:190:8;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;153:23;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;612:41:7;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1520:220;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1357:118;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2074:198:0;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;580:138:8;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;220:27;;;;;;;;;;;;;:::o;564:21:7:-;;;;;;;;;;;;;:::o;916:206:8:-;1094:13:0;:11;:13::i;:::-;1029:1:8::1;1004:27;;:13;:27;;;;989:94;;;;;;;;;;;;:::i;:::-;;;;;;;;;1104:13;1089:12;;:28;;;;;;;;;;;;;;;;;;916:206:::0;:::o;1155:154:7:-;1094:13:0;:11;:13::i;:::-;1246::7::1;1231:12;;:28;;;;;;;;;;;;;;;;;;1270:34;1290:13;1270:34;;;;;;:::i;:::-;;;;;;;;1155:154:::0;:::o;1776:1479::-;2261:21:1;:19;:21::i;:::-;1873:1:7::1;1864:6;:10;1856:50;;;;;;;;;;;;:::i;:::-;;;;;;;;;1920:14;:24;1935:8;1920:24;;;;;;;;;;;;;;;;;;;;;;;;;1912:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;2017:1;1998:6;:16;2005:8;1998:16;;;;;;;;;;;;;;;;:20;1990:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;2089:23;2125:8;2115:28;;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2089:56;;2151:19;522:7;2227:15;2222:2;:20;;;;:::i;:::-;2215:2;:28;;;;:::i;:::-;2199:6;2174;:16;2181:8;2174:16;;;;;;;;;;;;;;;;:31;;;;:::i;:::-;:70;;;;:::i;:::-;2173:80;;;;:::i;:::-;2151:102;;2259:13;2275:12;:10;:12::i;:::-;2259:28;;2350:11;2315:12;;;;;;;;;;;2308:30;;;2339:6;;;;;;;;;;;2308:38;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:53;;2293:147;;;;;;;;;;;;:::i;:::-;;;;;;;;;2518:11;2468:12;;;;;;;;;;;2461:30;;;2492:6;;;;;;;;;;;2508:4;2461:53;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:68;;2446:165;;;;;;;;;;;;:::i;:::-;;;;;;;;;2717:6;2687:8;2680:26;;;2707:5;2680:33;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:43;;2665:135;;;;;;;;;;;;:::i;:::-;;;;;;;;;2873:6;2828:8;2821:26;;;2848:5;2863:4;2821:48;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:58;;2806:153;;;;;;;;;;;;:::i;:::-;;;;;;;;;3000:62;3034:5;3041:12;;;;;;;;;;;3055:6;3007:8;3000:33;;;;:62;;;;;;:::i;:::-;3099:65;3137:6;;;;;;;;;;;3145:5;3152:11;3106:12;;;;;;;;;;;3099:37;;;;:65;;;;;;:::i;:::-;3212:5;3197:53;;;3219:12;;;;;;;;;;;3233:8;3243:6;3197:53;;;;;;;;:::i;:::-;;;;;;;;1850:1405;;;2303:20:1::0;:18;:20::i;:::-;1776:1479:7;;:::o;1824:101:0:-;1094:13;:11;:13::i;:::-;1888:30:::1;1915:1;1888:18;:30::i;:::-;1824:101::o:0;760:152:8:-;1094:13:0;:11;:13::i;:::-;853:1:8::1;834:21;;:7;:21;;;;826:57;;;;;;;;;;;;:::i;:::-;;;;;;;;;900:7;889:8;;:18;;;;;;;;;;;;;;;;;;760:152:::0;:::o;1201:85:0:-;1247:7;1273:6;;;;;;;;;;;1266:13;;1201:85;:::o;252:46:8:-;;;;;;;;;;;;;;;;;;;;;;:::o;533:27:7:-;;;;;;;;;;;;;:::o;386:190:8:-;1094:13:0;:11;:13::i;:::-;476:1:8::1;459:19;;:5;:19;;;;451:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;534:4;510:14;:21;525:5;510:21;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;549:22;565:5;549:22;;;;;;:::i;:::-;;;;;;;;386:190:::0;:::o;153:23::-;;;;;;;;;;;;;:::o;612:41:7:-;;;;;;;;;;;;;;;;;:::o;1520:220::-;1094:13:0;:11;:13::i;:::-;1616:16:7::1;1635:6;:16;1642:8;1635:16;;;;;;;;;;;;;;;;1616:35;;1676:5;1657:6;:16;1664:8;1657:16;;;;;;;;;;;;;;;:24;;;;1692:43;1709:8;1719:5;1726:8;1692:43;;;;;;;;:::i;:::-;;;;;;;;1610:130;1520:220:::0;;:::o;1357:118::-;1094:13:0;:11;:13::i;:::-;1430:7:7::1;1421:6;;:16;;;;;;;;;;;;;;;;;;1448:22;1462:7;1448:22;;;;;;:::i;:::-;;;;;;;;1357:118:::0;:::o;2074:198:0:-;1094:13;:11;:13::i;:::-;2182:1:::1;2162:22;;:8;:22;;;;2154:73;;;;;;;;;;;;:::i;:::-;;;;;;;;;2237:28;2256:8;2237:18;:28::i;:::-;2074:198:::0;:::o;580:138:8:-;1094:13:0;:11;:13::i;:::-;672:5:8::1;648:14;:21;663:5;648:21;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;688:25;707:5;688:25;;;;;;:::i;:::-;;;;;;;;580:138:::0;:::o;1359:130:0:-;1433:12;:10;:12::i;:::-;1422:23;;:7;:5;:7::i;:::-;:23;;;1414:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;1359:130::o;2336:287:1:-;1759:1;2468:7;;:19;;2460:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;1759:1;2598:7;:18;;;;2336:287::o;640:96:6:-;693:7;719:10;712:17;;640:96;:::o;1355:203:4:-;1455:96;1475:5;1505:27;;;1534:4;1540:2;1544:5;1482:68;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1455:19;:96::i;:::-;1355:203;;;;:::o;2629:209:1:-;1716:1;2809:7;:22;;;;2629:209::o;2426:187:0:-;2499:16;2518:6;;;;;;;;;;;2499:25;;2543:8;2534:6;;:17;;;;;;;;;;;;;;;;;;2597:8;2566:40;;2587:8;2566:40;;;;;;;;;;;;2489:124;2426:187;:::o;5173:642:4:-;5592:23;5618:69;5646:4;5618:69;;;;;;;;;;;;;;;;;5626:5;5618:27;;;;:69;;;;;:::i;:::-;5592:95;;5726:1;5705:10;:17;:22;:56;;;;5742:10;5731:30;;;;;;;;;;;;:::i;:::-;5705:56;5697:111;;;;;;;;;;;;:::i;:::-;;;;;;;;;5243:572;5173:642;;:::o;4108:223:5:-;4241:12;4272:52;4294:6;4302:4;4308:1;4311:12;4272:21;:52::i;:::-;4265:59;;4108:223;;;;;:::o;5165:446::-;5330:12;5387:5;5362:21;:30;;5354:81;;;;;;;;;;;;:::i;:::-;;;;;;;;;5446:12;5460:23;5487:6;:11;;5506:5;5513:4;5487:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5445:73;;;;5535:69;5562:6;5570:7;5579:10;5591:12;5535:26;:69::i;:::-;5528:76;;;;5165:446;;;;;;:::o;7671:628::-;7851:12;7879:7;7875:418;;;7927:1;7906:10;:17;:22;7902:286;;;8121:18;8132:6;8121:10;:18::i;:::-;8113:60;;;;;;;;;;;;:::i;:::-;;;;;;;;;7902:286;8208:10;8201:17;;;;7875:418;8249:33;8257:10;8269:12;8249:7;:33::i;:::-;7671:628;;;;;;;:::o;1412:320::-;1472:4;1724:1;1702:7;:19;;;:23;1695:30;;1412:320;;;:::o;8821:540::-;9000:1;8980:10;:17;:21;8976:379;;;9208:10;9202:17;9264:15;9251:10;9247:2;9243:19;9236:44;8976:379;9331:12;9324:20;;;;;;;;;;;:::i;:::-;;;;;;;;7:126:10;44:7;84:42;77:5;73:54;62:65;;7:126;;;:::o;139:96::-;176:7;205:24;223:5;205:24;:::i;:::-;194:35;;139:96;;;:::o;241:118::-;328:24;346:5;328:24;:::i;:::-;323:3;316:37;241:118;;:::o;365:222::-;458:4;496:2;485:9;481:18;473:26;;509:71;577:1;566:9;562:17;553:6;509:71;:::i;:::-;365:222;;;;:::o;674:117::-;783:1;780;773:12;920:122;993:24;1011:5;993:24;:::i;:::-;986:5;983:35;973:63;;1032:1;1029;1022:12;973:63;920:122;:::o;1048:139::-;1094:5;1132:6;1119:20;1110:29;;1148:33;1175:5;1148:33;:::i;:::-;1048:139;;;;:::o;1193:329::-;1252:6;1301:2;1289:9;1280:7;1276:23;1272:32;1269:119;;;1307:79;;:::i;:::-;1269:119;1427:1;1452:53;1497:7;1488:6;1477:9;1473:22;1452:53;:::i;:::-;1442:63;;1398:117;1193:329;;;;:::o;1528:77::-;1565:7;1594:5;1583:16;;1528:77;;;:::o;1611:122::-;1684:24;1702:5;1684:24;:::i;:::-;1677:5;1674:35;1664:63;;1723:1;1720;1713:12;1664:63;1611:122;:::o;1739:139::-;1785:5;1823:6;1810:20;1801:29;;1839:33;1866:5;1839:33;:::i;:::-;1739:139;;;;:::o;1884:474::-;1952:6;1960;2009:2;1997:9;1988:7;1984:23;1980:32;1977:119;;;2015:79;;:::i;:::-;1977:119;2135:1;2160:53;2205:7;2196:6;2185:9;2181:22;2160:53;:::i;:::-;2150:63;;2106:117;2262:2;2288:53;2333:7;2324:6;2313:9;2309:22;2288:53;:::i;:::-;2278:63;;2233:118;1884:474;;;;;:::o;2364:90::-;2398:7;2441:5;2434:13;2427:21;2416:32;;2364:90;;;:::o;2460:109::-;2541:21;2556:5;2541:21;:::i;:::-;2536:3;2529:34;2460:109;;:::o;2575:210::-;2662:4;2700:2;2689:9;2685:18;2677:26;;2713:65;2775:1;2764:9;2760:17;2751:6;2713:65;:::i;:::-;2575:210;;;;:::o;2791:118::-;2878:24;2896:5;2878:24;:::i;:::-;2873:3;2866:37;2791:118;;:::o;2915:222::-;3008:4;3046:2;3035:9;3031:18;3023:26;;3059:71;3127:1;3116:9;3112:17;3103:6;3059:71;:::i;:::-;2915:222;;;;:::o;3143:169::-;3227:11;3261:6;3256:3;3249:19;3301:4;3296:3;3292:14;3277:29;;3143:169;;;;:::o;3318:223::-;3458:34;3454:1;3446:6;3442:14;3435:58;3527:6;3522:2;3514:6;3510:15;3503:31;3318:223;:::o;3547:366::-;3689:3;3710:67;3774:2;3769:3;3710:67;:::i;:::-;3703:74;;3786:93;3875:3;3786:93;:::i;:::-;3904:2;3899:3;3895:12;3888:19;;3547:366;;;:::o;3919:419::-;4085:4;4123:2;4112:9;4108:18;4100:26;;4172:9;4166:4;4162:20;4158:1;4147:9;4143:17;4136:47;4200:131;4326:4;4200:131;:::i;:::-;4192:139;;3919:419;;;:::o;4344:177::-;4484:29;4480:1;4472:6;4468:14;4461:53;4344:177;:::o;4527:366::-;4669:3;4690:67;4754:2;4749:3;4690:67;:::i;:::-;4683:74;;4766:93;4855:3;4766:93;:::i;:::-;4884:2;4879:3;4875:12;4868:19;;4527:366;;;:::o;4899:419::-;5065:4;5103:2;5092:9;5088:18;5080:26;;5152:9;5146:4;5142:20;5138:1;5127:9;5123:17;5116:47;5180:131;5306:4;5180:131;:::i;:::-;5172:139;;4899:419;;;:::o;5324:222::-;5464:34;5460:1;5452:6;5448:14;5441:58;5533:5;5528:2;5520:6;5516:15;5509:30;5324:222;:::o;5552:366::-;5694:3;5715:67;5779:2;5774:3;5715:67;:::i;:::-;5708:74;;5791:93;5880:3;5791:93;:::i;:::-;5909:2;5904:3;5900:12;5893:19;;5552:366;;;:::o;5924:419::-;6090:4;6128:2;6117:9;6113:18;6105:26;;6177:9;6171:4;6167:20;6163:1;6152:9;6148:17;6141:47;6205:131;6331:4;6205:131;:::i;:::-;6197:139;;5924:419;;;:::o;6349:182::-;6489:34;6485:1;6477:6;6473:14;6466:58;6349:182;:::o;6537:366::-;6679:3;6700:67;6764:2;6759:3;6700:67;:::i;:::-;6693:74;;6776:93;6865:3;6776:93;:::i;:::-;6894:2;6889:3;6885:12;6878:19;;6537:366;;;:::o;6909:419::-;7075:4;7113:2;7102:9;7098:18;7090:26;;7162:9;7156:4;7152:20;7148:1;7137:9;7133:17;7126:47;7190:131;7316:4;7190:131;:::i;:::-;7182:139;;6909:419;;;:::o;7334:143::-;7391:5;7422:6;7416:13;7407:22;;7438:33;7465:5;7438:33;:::i;:::-;7334:143;;;;:::o;7483:351::-;7553:6;7602:2;7590:9;7581:7;7577:23;7573:32;7570:119;;;7608:79;;:::i;:::-;7570:119;7728:1;7753:64;7809:7;7800:6;7789:9;7785:22;7753:64;:::i;:::-;7743:74;;7699:128;7483:351;;;;:::o;7840:180::-;7888:77;7885:1;7878:88;7985:4;7982:1;7975:15;8009:4;8006:1;7999:15;8026:191;8066:4;8086:20;8104:1;8086:20;:::i;:::-;8081:25;;8120:20;8138:1;8120:20;:::i;:::-;8115:25;;8159:1;8156;8153:8;8150:34;;;8164:18;;:::i;:::-;8150:34;8209:1;8206;8202:9;8194:17;;8026:191;;;;:::o;8223:102::-;8265:8;8312:5;8309:1;8305:13;8284:34;;8223:102;;;:::o;8331:848::-;8392:5;8399:4;8423:6;8414:15;;8447:5;8438:14;;8461:712;8482:1;8472:8;8469:15;8461:712;;;8577:4;8572:3;8568:14;8562:4;8559:24;8556:50;;;8586:18;;:::i;:::-;8556:50;8636:1;8626:8;8622:16;8619:451;;;9051:4;9044:5;9040:16;9031:25;;8619:451;9101:4;9095;9091:15;9083:23;;9131:32;9154:8;9131:32;:::i;:::-;9119:44;;8461:712;;;8331:848;;;;;;;:::o;9185:1073::-;9239:5;9430:8;9420:40;;9451:1;9442:10;;9453:5;;9420:40;9479:4;9469:36;;9496:1;9487:10;;9498:5;;9469:36;9565:4;9613:1;9608:27;;;;9649:1;9644:191;;;;9558:277;;9608:27;9626:1;9617:10;;9628:5;;;9644:191;9689:3;9679:8;9676:17;9673:43;;;9696:18;;:::i;:::-;9673:43;9745:8;9742:1;9738:16;9729:25;;9780:3;9773:5;9770:14;9767:40;;;9787:18;;:::i;:::-;9767:40;9820:5;;;9558:277;;9944:2;9934:8;9931:16;9925:3;9919:4;9916:13;9912:36;9894:2;9884:8;9881:16;9876:2;9870:4;9867:12;9863:35;9847:111;9844:246;;;10000:8;9994:4;9990:19;9981:28;;10035:3;10028:5;10025:14;10022:40;;;10042:18;;:::i;:::-;10022:40;10075:5;;9844:246;10115:42;10153:3;10143:8;10137:4;10134:1;10115:42;:::i;:::-;10100:57;;;;10189:4;10184:3;10180:14;10173:5;10170:25;10167:51;;;10198:18;;:::i;:::-;10167:51;10247:4;10240:5;10236:16;10227:25;;9185:1073;;;;;;:::o;10264:285::-;10324:5;10348:23;10366:4;10348:23;:::i;:::-;10340:31;;10392:27;10410:8;10392:27;:::i;:::-;10380:39;;10438:104;10475:66;10465:8;10459:4;10438:104;:::i;:::-;10429:113;;10264:285;;;;:::o;10555:348::-;10595:7;10618:20;10636:1;10618:20;:::i;:::-;10613:25;;10652:20;10670:1;10652:20;:::i;:::-;10647:25;;10840:1;10772:66;10768:74;10765:1;10762:81;10757:1;10750:9;10743:17;10739:105;10736:131;;;10847:18;;:::i;:::-;10736:131;10895:1;10892;10888:9;10877:20;;10555:348;;;;:::o;10909:180::-;10957:77;10954:1;10947:88;11054:4;11051:1;11044:15;11078:4;11075:1;11068:15;11095:185;11135:1;11152:20;11170:1;11152:20;:::i;:::-;11147:25;;11186:20;11204:1;11186:20;:::i;:::-;11181:25;;11225:1;11215:35;;11230:18;;:::i;:::-;11215:35;11272:1;11269;11265:9;11260:14;;11095:185;;;;:::o;11286:250::-;11426:34;11422:1;11414:6;11410:14;11403:58;11495:33;11490:2;11482:6;11478:15;11471:58;11286:250;:::o;11542:366::-;11684:3;11705:67;11769:2;11764:3;11705:67;:::i;:::-;11698:74;;11781:93;11870:3;11781:93;:::i;:::-;11899:2;11894:3;11890:12;11883:19;;11542:366;;;:::o;11914:419::-;12080:4;12118:2;12107:9;12103:18;12095:26;;12167:9;12161:4;12157:20;12153:1;12142:9;12138:17;12131:47;12195:131;12321:4;12195:131;:::i;:::-;12187:139;;11914:419;;;:::o;12339:332::-;12460:4;12498:2;12487:9;12483:18;12475:26;;12511:71;12579:1;12568:9;12564:17;12555:6;12511:71;:::i;:::-;12592:72;12660:2;12649:9;12645:18;12636:6;12592:72;:::i;:::-;12339:332;;;;;:::o;12677:290::-;12817:34;12813:1;12805:6;12801:14;12794:58;12886:34;12881:2;12873:6;12869:15;12862:59;12955:4;12950:2;12942:6;12938:15;12931:29;12677:290;:::o;12973:366::-;13115:3;13136:67;13200:2;13195:3;13136:67;:::i;:::-;13129:74;;13212:93;13301:3;13212:93;:::i;:::-;13330:2;13325:3;13321:12;13314:19;;12973:366;;;:::o;13345:419::-;13511:4;13549:2;13538:9;13534:18;13526:26;;13598:9;13592:4;13588:20;13584:1;13573:9;13569:17;13562:47;13626:131;13752:4;13626:131;:::i;:::-;13618:139;;13345:419;;;:::o;13770:248::-;13910:34;13906:1;13898:6;13894:14;13887:58;13979:31;13974:2;13966:6;13962:15;13955:56;13770:248;:::o;14024:366::-;14166:3;14187:67;14251:2;14246:3;14187:67;:::i;:::-;14180:74;;14263:93;14352:3;14263:93;:::i;:::-;14381:2;14376:3;14372:12;14365:19;;14024:366;;;:::o;14396:419::-;14562:4;14600:2;14589:9;14585:18;14577:26;;14649:9;14643:4;14639:20;14635:1;14624:9;14620:17;14613:47;14677:131;14803:4;14677:131;:::i;:::-;14669:139;;14396:419;;;:::o;14821:251::-;14961:34;14957:1;14949:6;14945:14;14938:58;15030:34;15025:2;15017:6;15013:15;15006:59;14821:251;:::o;15078:366::-;15220:3;15241:67;15305:2;15300:3;15241:67;:::i;:::-;15234:74;;15317:93;15406:3;15317:93;:::i;:::-;15435:2;15430:3;15426:12;15419:19;;15078:366;;;:::o;15450:419::-;15616:4;15654:2;15643:9;15639:18;15631:26;;15703:9;15697:4;15693:20;15689:1;15678:9;15674:17;15667:47;15731:131;15857:4;15731:131;:::i;:::-;15723:139;;15450:419;;;:::o;15875:442::-;16024:4;16062:2;16051:9;16047:18;16039:26;;16075:71;16143:1;16132:9;16128:17;16119:6;16075:71;:::i;:::-;16156:72;16224:2;16213:9;16209:18;16200:6;16156:72;:::i;:::-;16238;16306:2;16295:9;16291:18;16282:6;16238:72;:::i;:::-;15875:442;;;;;;:::o;16323:173::-;16463:25;16459:1;16451:6;16447:14;16440:49;16323:173;:::o;16502:366::-;16644:3;16665:67;16729:2;16724:3;16665:67;:::i;:::-;16658:74;;16741:93;16830:3;16741:93;:::i;:::-;16859:2;16854:3;16850:12;16843:19;;16502:366;;;:::o;16874:419::-;17040:4;17078:2;17067:9;17063:18;17055:26;;17127:9;17121:4;17117:20;17113:1;17102:9;17098:17;17091:47;17155:131;17281:4;17155:131;:::i;:::-;17147:139;;16874:419;;;:::o;17299:171::-;17439:23;17435:1;17427:6;17423:14;17416:47;17299:171;:::o;17476:366::-;17618:3;17639:67;17703:2;17698:3;17639:67;:::i;:::-;17632:74;;17715:93;17804:3;17715:93;:::i;:::-;17833:2;17828:3;17824:12;17817:19;;17476:366;;;:::o;17848:419::-;18014:4;18052:2;18041:9;18037:18;18029:26;;18101:9;18095:4;18091:20;18087:1;18076:9;18072:17;18065:47;18129:131;18255:4;18129:131;:::i;:::-;18121:139;;17848:419;;;:::o;18273:442::-;18422:4;18460:2;18449:9;18445:18;18437:26;;18473:71;18541:1;18530:9;18526:17;18517:6;18473:71;:::i;:::-;18554:72;18622:2;18611:9;18607:18;18598:6;18554:72;:::i;:::-;18636;18704:2;18693:9;18689:18;18680:6;18636:72;:::i;:::-;18273:442;;;;;;:::o;18721:225::-;18861:34;18857:1;18849:6;18845:14;18838:58;18930:8;18925:2;18917:6;18913:15;18906:33;18721:225;:::o;18952:366::-;19094:3;19115:67;19179:2;19174:3;19115:67;:::i;:::-;19108:74;;19191:93;19280:3;19191:93;:::i;:::-;19309:2;19304:3;19300:12;19293:19;;18952:366;;;:::o;19324:419::-;19490:4;19528:2;19517:9;19513:18;19505:26;;19577:9;19571:4;19567:20;19563:1;19552:9;19548:17;19541:47;19605:131;19731:4;19605:131;:::i;:::-;19597:139;;19324:419;;;:::o;19749:182::-;19889:34;19885:1;19877:6;19873:14;19866:58;19749:182;:::o;19937:366::-;20079:3;20100:67;20164:2;20159:3;20100:67;:::i;:::-;20093:74;;20176:93;20265:3;20176:93;:::i;:::-;20294:2;20289:3;20285:12;20278:19;;19937:366;;;:::o;20309:419::-;20475:4;20513:2;20502:9;20498:18;20490:26;;20562:9;20556:4;20552:20;20548:1;20537:9;20533:17;20526:47;20590:131;20716:4;20590:131;:::i;:::-;20582:139;;20309:419;;;:::o;20734:181::-;20874:33;20870:1;20862:6;20858:14;20851:57;20734:181;:::o;20921:366::-;21063:3;21084:67;21148:2;21143:3;21084:67;:::i;:::-;21077:74;;21160:93;21249:3;21160:93;:::i;:::-;21278:2;21273:3;21269:12;21262:19;;20921:366;;;:::o;21293:419::-;21459:4;21497:2;21486:9;21482:18;21474:26;;21546:9;21540:4;21536:20;21532:1;21521:9;21517:17;21510:47;21574:131;21700:4;21574:131;:::i;:::-;21566:139;;21293:419;;;:::o;21718:116::-;21788:21;21803:5;21788:21;:::i;:::-;21781:5;21778:32;21768:60;;21824:1;21821;21814:12;21768:60;21718:116;:::o;21840:137::-;21894:5;21925:6;21919:13;21910:22;;21941:30;21965:5;21941:30;:::i;:::-;21840:137;;;;:::o;21983:345::-;22050:6;22099:2;22087:9;22078:7;22074:23;22070:32;22067:119;;;22105:79;;:::i;:::-;22067:119;22225:1;22250:61;22303:7;22294:6;22283:9;22279:22;22250:61;:::i;:::-;22240:71;;22196:125;21983:345;;;;:::o;22334:229::-;22474:34;22470:1;22462:6;22458:14;22451:58;22543:12;22538:2;22530:6;22526:15;22519:37;22334:229;:::o;22569:366::-;22711:3;22732:67;22796:2;22791:3;22732:67;:::i;:::-;22725:74;;22808:93;22897:3;22808:93;:::i;:::-;22926:2;22921:3;22917:12;22910:19;;22569:366;;;:::o;22941:419::-;23107:4;23145:2;23134:9;23130:18;23122:26;;23194:9;23188:4;23184:20;23180:1;23169:9;23165:17;23158:47;23222:131;23348:4;23222:131;:::i;:::-;23214:139;;22941:419;;;:::o;23366:225::-;23506:34;23502:1;23494:6;23490:14;23483:58;23575:8;23570:2;23562:6;23558:15;23551:33;23366:225;:::o;23597:366::-;23739:3;23760:67;23824:2;23819:3;23760:67;:::i;:::-;23753:74;;23836:93;23925:3;23836:93;:::i;:::-;23954:2;23949:3;23945:12;23938:19;;23597:366;;;:::o;23969:419::-;24135:4;24173:2;24162:9;24158:18;24150:26;;24222:9;24216:4;24212:20;24208:1;24197:9;24193:17;24186:47;24250:131;24376:4;24250:131;:::i;:::-;24242:139;;23969:419;;;:::o;24394:98::-;24445:6;24479:5;24473:12;24463:22;;24394:98;;;:::o;24498:147::-;24599:11;24636:3;24621:18;;24498:147;;;;:::o;24651:307::-;24719:1;24729:113;24743:6;24740:1;24737:13;24729:113;;;24828:1;24823:3;24819:11;24813:18;24809:1;24804:3;24800:11;24793:39;24765:2;24762:1;24758:10;24753:15;;24729:113;;;24860:6;24857:1;24854:13;24851:101;;;24940:1;24931:6;24926:3;24922:16;24915:27;24851:101;24700:258;24651:307;;;:::o;24964:373::-;25068:3;25096:38;25128:5;25096:38;:::i;:::-;25150:88;25231:6;25226:3;25150:88;:::i;:::-;25143:95;;25247:52;25292:6;25287:3;25280:4;25273:5;25269:16;25247:52;:::i;:::-;25324:6;25319:3;25315:16;25308:23;;25072:265;24964:373;;;;:::o;25343:271::-;25473:3;25495:93;25584:3;25575:6;25495:93;:::i;:::-;25488:100;;25605:3;25598:10;;25343:271;;;;:::o;25620:179::-;25760:31;25756:1;25748:6;25744:14;25737:55;25620:179;:::o;25805:366::-;25947:3;25968:67;26032:2;26027:3;25968:67;:::i;:::-;25961:74;;26044:93;26133:3;26044:93;:::i;:::-;26162:2;26157:3;26153:12;26146:19;;25805:366;;;:::o;26177:419::-;26343:4;26381:2;26370:9;26366:18;26358:26;;26430:9;26424:4;26420:20;26416:1;26405:9;26401:17;26394:47;26458:131;26584:4;26458:131;:::i;:::-;26450:139;;26177:419;;;:::o;26602:99::-;26654:6;26688:5;26682:12;26672:22;;26602:99;;;:::o;26707:102::-;26748:6;26799:2;26795:7;26790:2;26783:5;26779:14;26775:28;26765:38;;26707:102;;;:::o;26815:364::-;26903:3;26931:39;26964:5;26931:39;:::i;:::-;26986:71;27050:6;27045:3;26986:71;:::i;:::-;26979:78;;27066:52;27111:6;27106:3;27099:4;27092:5;27088:16;27066:52;:::i;:::-;27143:29;27165:6;27143:29;:::i;:::-;27138:3;27134:39;27127:46;;26907:272;26815:364;;;;:::o;27185:313::-;27298:4;27336:2;27325:9;27321:18;27313:26;;27385:9;27379:4;27375:20;27371:1;27360:9;27356:17;27349:47;27413:78;27486:4;27477:6;27413:78;:::i;:::-;27405:86;;27185:313;;;;:::o", + "source": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"../utils/UInt.sol\";\nimport \"./MallBase.sol\";\n\ninterface ICurrency is IERC20 {\n function decimals() external view returns (uint256);\n}\n\ncontract BETokenMall is MallBase, ReentrancyGuard {\n using SafeERC20 for IERC20;\n using UInt for uint256;\n uint256 constant ROUND = 1000000;\n address public tokenAddress;\n address public seller;\n // currency => price\n mapping(address => uint256) public prices;\n\n // Events\n event BuyTransaction(\n address indexed buyer,\n address tokenAddress,\n address currency,\n uint256 amount\n );\n event TokenAddressUpdated(address tokenAddress);\n event SellerUpdated(address seller);\n event UpdateTokenPrice(address currency, uint256 price, uint256 pricePre);\n\n /**\n * @dev Constructor\n */\n constructor(address _tokenAddress, address _seller) {\n tokenAddress = _tokenAddress;\n seller = _seller;\n }\n\n /**\n * @dev Update token address\n */\n function updateTokenAddress(address _tokenAddress) external onlyOwner {\n tokenAddress = _tokenAddress;\n emit TokenAddressUpdated(_tokenAddress);\n }\n\n /**\n * @dev Update seller address\n */\n function updateSeller(address _seller) external onlyOwner {\n seller = _seller;\n emit SellerUpdated(_seller);\n }\n\n /**\n * @dev Update token price\n */\n function updateTokenPrice(\n address currency,\n uint256 price\n ) external onlyOwner {\n uint256 pricePre = prices[currency];\n prices[currency] = price;\n emit UpdateTokenPrice(currency, price, pricePre);\n }\n\n /**\n * @dev Buy token\n */\n function buyToken(address currency, uint256 amount) external nonReentrant {\n require(amount > 0, \"BETokenMall: invalid amount\");\n require(erc20Supported[currency], \"BETokenMall: invalid payment method\");\n require(prices[currency] > 0, \"BETokenMall: invalid token price\");\n // calc currency amount\n uint256 currencyDecimal = ICurrency(currency).decimals();\n uint256 tokenAmount = (prices[currency] *\n amount *\n (10 ** (18 - currencyDecimal))) / ROUND;\n address buyer = _msgSender();\n require(\n IERC20(tokenAddress).balanceOf(seller) >= tokenAmount,\n \"BETokenMall: seller doesn't have enough token to sell this item\"\n );\n require(\n IERC20(tokenAddress).allowance(seller, address(this)) >= tokenAmount,\n \"BETokenMall: seller doesn't approve enough token to sell this item\"\n );\n // Check payment approval and buyer balance\n require(\n IERC20(currency).balanceOf(buyer) >= amount,\n \"BETokenMall: buyer doesn't have enough token to buy this item\"\n );\n require(\n IERC20(currency).allowance(buyer, address(this)) >= amount,\n \"BETokenMall: buyer doesn't approve enough token to buy this item\"\n );\n\n // Transfer payment to seller\n IERC20(currency).safeTransferFrom(buyer, feeToAddress, amount);\n // Transfer token to buyer\n IERC20(tokenAddress).safeTransferFrom(seller, buyer, tokenAmount);\n // emit buy event\n emit BuyTransaction(buyer, tokenAddress, currency, amount);\n }\n}\n", + "sourcePath": "/Users/zhl/Documents/workspace/crypto/becrypto/contracts/market/BETokenMall.sol", + "ast": { + "absolutePath": "project:/contracts/market/BETokenMall.sol", + "exportedSymbols": { + "Address": [ + 997 + ], + "BETokenMall": [ + 1310 + ], + "Context": [ + 1019 + ], + "ICurrency": [ + 1034 + ], + "IERC20": [ + 255 + ], + "IERC20Permit": [ + 291 + ], + "MallBase": [ + 1423 + ], + "Ownable": [ + 112 + ], + "ReentrancyGuard": [ + 177 + ], + "SafeERC20": [ + 667 + ], + "UInt": [ + 1454 + ] + }, + "id": 1311, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1021, + "literals": [ + "solidity", + "0.8", + ".10" + ], + "nodeType": "PragmaDirective", + "src": "32:23:7" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 1022, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 256, + "src": "57:56:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "id": 1023, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 668, + "src": "114:65:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/security/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/security/ReentrancyGuard.sol", + "id": 1024, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 178, + "src": "180:62:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/utils/UInt.sol", + "file": "../utils/UInt.sol", + "id": 1025, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 1455, + "src": "243:27:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/market/MallBase.sol", + "file": "./MallBase.sol", + "id": 1026, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 1424, + "src": "271:24:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1027, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 255, + "src": "320:6:7" + }, + "id": 1028, + "nodeType": "InheritanceSpecifier", + "src": "320:6:7" + } + ], + "canonicalName": "ICurrency", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1034, + "linearizedBaseContracts": [ + 1034, + 255 + ], + "name": "ICurrency", + "nameLocation": "307:9:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "313ce567", + "id": 1033, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nameLocation": "340:8:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1029, + "nodeType": "ParameterList", + "parameters": [], + "src": "348:2:7" + }, + "returnParameters": { + "id": 1032, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1031, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1033, + "src": "374:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1030, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "374:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "373:9:7" + }, + "scope": 1034, + "src": "331:52:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1311, + "src": "297:88:7", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1035, + "name": "MallBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1423, + "src": "411:8:7" + }, + "id": 1036, + "nodeType": "InheritanceSpecifier", + "src": "411:8:7" + }, + { + "baseName": { + "id": 1037, + "name": "ReentrancyGuard", + "nodeType": "IdentifierPath", + "referencedDeclaration": 177, + "src": "421:15:7" + }, + "id": 1038, + "nodeType": "InheritanceSpecifier", + "src": "421:15:7" + } + ], + "canonicalName": "BETokenMall", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1310, + "linearizedBaseContracts": [ + 1310, + 177, + 1423, + 112, + 1019 + ], + "name": "BETokenMall", + "nameLocation": "396:11:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1042, + "libraryName": { + "id": 1039, + "name": "SafeERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 667, + "src": "447:9:7" + }, + "nodeType": "UsingForDirective", + "src": "441:27:7", + "typeName": { + "id": 1041, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1040, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 255, + "src": "461:6:7" + }, + "referencedDeclaration": 255, + "src": "461:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + } + }, + { + "id": 1045, + "libraryName": { + "id": 1043, + "name": "UInt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1454, + "src": "477:4:7" + }, + "nodeType": "UsingForDirective", + "src": "471:23:7", + "typeName": { + "id": 1044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "486:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 1048, + "mutability": "constant", + "name": "ROUND", + "nameLocation": "514:5:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "497:32:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1046, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "497:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "31303030303030", + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "522:7:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "9d76ea58", + "id": 1050, + "mutability": "mutable", + "name": "tokenAddress", + "nameLocation": "548:12:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "533:27:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1049, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "533:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "08551a53", + "id": 1052, + "mutability": "mutable", + "name": "seller", + "nameLocation": "579:6:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "564:21:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "564:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "cfed246b", + "id": 1056, + "mutability": "mutable", + "name": "prices", + "nameLocation": "647:6:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "612:41:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1055, + "keyType": { + "id": 1053, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "620:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "612:27:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "631:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "id": 1066, + "name": "BuyTransaction", + "nameLocation": "676:14:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1058, + "indexed": true, + "mutability": "mutable", + "name": "buyer", + "nameLocation": "712:5:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "696:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1057, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "696:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1060, + "indexed": false, + "mutability": "mutable", + "name": "tokenAddress", + "nameLocation": "731:12:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "723:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "723:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1062, + "indexed": false, + "mutability": "mutable", + "name": "currency", + "nameLocation": "757:8:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "749:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "749:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1064, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "779:6:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "771:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1063, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "690:99:7" + }, + "src": "670:120:7" + }, + { + "anonymous": false, + "id": 1070, + "name": "TokenAddressUpdated", + "nameLocation": "799:19:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1068, + "indexed": false, + "mutability": "mutable", + "name": "tokenAddress", + "nameLocation": "827:12:7", + "nodeType": "VariableDeclaration", + "scope": 1070, + "src": "819:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1067, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "819:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "818:22:7" + }, + "src": "793:48:7" + }, + { + "anonymous": false, + "id": 1074, + "name": "SellerUpdated", + "nameLocation": "850:13:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1072, + "indexed": false, + "mutability": "mutable", + "name": "seller", + "nameLocation": "872:6:7", + "nodeType": "VariableDeclaration", + "scope": 1074, + "src": "864:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "864:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "863:16:7" + }, + "src": "844:36:7" + }, + { + "anonymous": false, + "id": 1082, + "name": "UpdateTokenPrice", + "nameLocation": "889:16:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1081, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1076, + "indexed": false, + "mutability": "mutable", + "name": "currency", + "nameLocation": "914:8:7", + "nodeType": "VariableDeclaration", + "scope": 1082, + "src": "906:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1075, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "906:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1078, + "indexed": false, + "mutability": "mutable", + "name": "price", + "nameLocation": "932:5:7", + "nodeType": "VariableDeclaration", + "scope": 1082, + "src": "924:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1077, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "924:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1080, + "indexed": false, + "mutability": "mutable", + "name": "pricePre", + "nameLocation": "947:8:7", + "nodeType": "VariableDeclaration", + "scope": 1082, + "src": "939:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1079, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "939:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "905:51:7" + }, + "src": "883:74:7" + }, + { + "body": { + "id": 1098, + "nodeType": "Block", + "src": "1047:61:7", + "statements": [ + { + "expression": { + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1090, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "1053:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1091, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "1068:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1053:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1093, + "nodeType": "ExpressionStatement", + "src": "1053:28:7" + }, + { + "expression": { + "id": 1096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1094, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "1087:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1095, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1087, + "src": "1096:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1087:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1097, + "nodeType": "ExpressionStatement", + "src": "1087:16:7" + } + ] + }, + "documentation": { + "id": 1083, + "nodeType": "StructuredDocumentation", + "src": "961:31:7", + "text": " @dev Constructor" + }, + "id": 1099, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1085, + "mutability": "mutable", + "name": "_tokenAddress", + "nameLocation": "1015:13:7", + "nodeType": "VariableDeclaration", + "scope": 1099, + "src": "1007:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1084, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1007:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1087, + "mutability": "mutable", + "name": "_seller", + "nameLocation": "1038:7:7", + "nodeType": "VariableDeclaration", + "scope": 1099, + "src": "1030:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1086, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1030:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1006:40:7" + }, + "returnParameters": { + "id": 1089, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:0:7" + }, + "scope": 1310, + "src": "995:113:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1115, + "nodeType": "Block", + "src": "1225:84:7", + "statements": [ + { + "expression": { + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1107, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "1231:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1108, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "1246:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1231:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1110, + "nodeType": "ExpressionStatement", + "src": "1231:28:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1112, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "1290:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1111, + "name": "TokenAddressUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "1270:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1270:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1114, + "nodeType": "EmitStatement", + "src": "1265:39:7" + } + ] + }, + "documentation": { + "id": 1100, + "nodeType": "StructuredDocumentation", + "src": "1112:40:7", + "text": " @dev Update token address" + }, + "functionSelector": "6691461a", + "id": 1116, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1105, + "kind": "modifierInvocation", + "modifierName": { + "id": 1104, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 31, + "src": "1215:9:7" + }, + "nodeType": "ModifierInvocation", + "src": "1215:9:7" + } + ], + "name": "updateTokenAddress", + "nameLocation": "1164:18:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1102, + "mutability": "mutable", + "name": "_tokenAddress", + "nameLocation": "1191:13:7", + "nodeType": "VariableDeclaration", + "scope": 1116, + "src": "1183:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1183:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1182:23:7" + }, + "returnParameters": { + "id": 1106, + "nodeType": "ParameterList", + "parameters": [], + "src": "1225:0:7" + }, + "scope": 1310, + "src": "1155:154:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1132, + "nodeType": "Block", + "src": "1415:60:7", + "statements": [ + { + "expression": { + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1124, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "1421:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1125, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1430:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1421:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1127, + "nodeType": "ExpressionStatement", + "src": "1421:16:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1129, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1462:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1128, + "name": "SellerUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "1448:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1448:22:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1131, + "nodeType": "EmitStatement", + "src": "1443:27:7" + } + ] + }, + "documentation": { + "id": 1117, + "nodeType": "StructuredDocumentation", + "src": "1313:41:7", + "text": " @dev Update seller address" + }, + "functionSelector": "dbbdae63", + "id": 1133, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1122, + "kind": "modifierInvocation", + "modifierName": { + "id": 1121, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 31, + "src": "1405:9:7" + }, + "nodeType": "ModifierInvocation", + "src": "1405:9:7" + } + ], + "name": "updateSeller", + "nameLocation": "1366:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1119, + "mutability": "mutable", + "name": "_seller", + "nameLocation": "1387:7:7", + "nodeType": "VariableDeclaration", + "scope": 1133, + "src": "1379:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1379:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1378:17:7" + }, + "returnParameters": { + "id": 1123, + "nodeType": "ParameterList", + "parameters": [], + "src": "1415:0:7" + }, + "scope": 1310, + "src": "1357:118:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1161, + "nodeType": "Block", + "src": "1610:130:7", + "statements": [ + { + "assignments": [ + 1144 + ], + "declarations": [ + { + "constant": false, + "id": 1144, + "mutability": "mutable", + "name": "pricePre", + "nameLocation": "1624:8:7", + "nodeType": "VariableDeclaration", + "scope": 1161, + "src": "1616:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1616:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1148, + "initialValue": { + "baseExpression": { + "id": 1145, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1635:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1147, + "indexExpression": { + "id": 1146, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1136, + "src": "1642:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1635:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1616:35:7" + }, + { + "expression": { + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1149, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1657:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1151, + "indexExpression": { + "id": 1150, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1136, + "src": "1664:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1657:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1152, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1138, + "src": "1676:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1657:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1154, + "nodeType": "ExpressionStatement", + "src": "1657:24:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1156, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1136, + "src": "1709:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1157, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1138, + "src": "1719:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1158, + "name": "pricePre", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "1726:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1155, + "name": "UpdateTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1082, + "src": "1692:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1692:43:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1160, + "nodeType": "EmitStatement", + "src": "1687:48:7" + } + ] + }, + "documentation": { + "id": 1134, + "nodeType": "StructuredDocumentation", + "src": "1479:38:7", + "text": " @dev Update token price" + }, + "functionSelector": "d4ee651b", + "id": 1162, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1141, + "kind": "modifierInvocation", + "modifierName": { + "id": 1140, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 31, + "src": "1600:9:7" + }, + "nodeType": "ModifierInvocation", + "src": "1600:9:7" + } + ], + "name": "updateTokenPrice", + "nameLocation": "1529:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1136, + "mutability": "mutable", + "name": "currency", + "nameLocation": "1559:8:7", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "1551:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1551:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1138, + "mutability": "mutable", + "name": "price", + "nameLocation": "1581:5:7", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "1573:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1545:45:7" + }, + "returnParameters": { + "id": 1142, + "nodeType": "ParameterList", + "parameters": [], + "src": "1610:0:7" + }, + "scope": 1310, + "src": "1520:220:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "1850:1405:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1173, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "1864:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1873:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1864:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c696420616d6f756e74", + "id": 1176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1876:29:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be", + "typeString": "literal_string \"BETokenMall: invalid amount\"" + }, + "value": "BETokenMall: invalid amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be", + "typeString": "literal_string \"BETokenMall: invalid amount\"" + } + ], + "id": 1172, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1856:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1856:50:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1178, + "nodeType": "ExpressionStatement", + "src": "1856:50:7" + }, + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 1180, + "name": "erc20Supported", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "1920:14:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1182, + "indexExpression": { + "id": 1181, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "1935:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1920:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c6964207061796d656e74206d6574686f64", + "id": 1183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1946:37:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa", + "typeString": "literal_string \"BETokenMall: invalid payment method\"" + }, + "value": "BETokenMall: invalid payment method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa", + "typeString": "literal_string \"BETokenMall: invalid payment method\"" + } + ], + "id": 1179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1912:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1912:72:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1185, + "nodeType": "ExpressionStatement", + "src": "1912:72:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1187, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1998:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1189, + "indexExpression": { + "id": 1188, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2005:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1998:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2017:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1998:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c696420746f6b656e207072696365", + "id": 1192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2020:34:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd", + "typeString": "literal_string \"BETokenMall: invalid token price\"" + }, + "value": "BETokenMall: invalid token price" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd", + "typeString": "literal_string \"BETokenMall: invalid token price\"" + } + ], + "id": 1186, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1990:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1990:65:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1194, + "nodeType": "ExpressionStatement", + "src": "1990:65:7" + }, + { + "assignments": [ + 1196 + ], + "declarations": [ + { + "constant": false, + "id": 1196, + "mutability": "mutable", + "name": "currencyDecimal", + "nameLocation": "2097:15:7", + "nodeType": "VariableDeclaration", + "scope": 1308, + "src": "2089:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2089:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1202, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 1198, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2125:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1197, + "name": "ICurrency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1034, + "src": "2115:9:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICurrency_$1034_$", + "typeString": "type(contract ICurrency)" + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:19:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICurrency_$1034", + "typeString": "contract ICurrency" + } + }, + "id": 1200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "decimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1033, + "src": "2115:28:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:30:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2089:56:7" + }, + { + "assignments": [ + 1204 + ], + "declarations": [ + { + "constant": false, + "id": 1204, + "mutability": "mutable", + "name": "tokenAmount", + "nameLocation": "2159:11:7", + "nodeType": "VariableDeclaration", + "scope": 1308, + "src": "2151:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2151:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1221, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1205, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "2174:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1207, + "indexExpression": { + "id": 1206, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2181:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2174:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 1208, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "2199:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2174:31:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:2:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3138", + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2222:2:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1212, + "name": "currencyDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1196, + "src": "2227:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2222:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2221:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2215:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1216, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2214:30:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2174:70:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1218, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2173:72:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 1219, + "name": "ROUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "2248:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2173:80:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2151:102:7" + }, + { + "assignments": [ + 1223 + ], + "declarations": [ + { + "constant": false, + "id": 1223, + "mutability": "mutable", + "name": "buyer", + "nameLocation": "2267:5:7", + "nodeType": "VariableDeclaration", + "scope": 1308, + "src": "2259:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2259:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1226, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1224, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "2275:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2275:12:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2259:28:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1232, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "2339:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1229, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "2315:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1228, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2308:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2308:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 212, + "src": "2308:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2308:38:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1234, + "name": "tokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "2350:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2308:53:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a2073656c6c657220646f65736e2774206861766520656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d", + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2369:65:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e", + "typeString": "literal_string \"BETokenMall: seller doesn't have enough token to sell this item\"" + }, + "value": "BETokenMall: seller doesn't have enough token to sell this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e", + "typeString": "literal_string \"BETokenMall: seller doesn't have enough token to sell this item\"" + } + ], + "id": 1227, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2293:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2293:147:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1238, + "nodeType": "ExpressionStatement", + "src": "2293:147:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1244, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "2492:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 1247, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "2508:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + ], + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2500:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1245, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2500:7:7", + "typeDescriptions": {} + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2500:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1241, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "2468:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1240, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2461:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 232, + "src": "2461:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1250, + "name": "tokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "2518:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2461:68:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a2073656c6c657220646f65736e277420617070726f766520656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d", + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2537:68:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116", + "typeString": "literal_string \"BETokenMall: seller doesn't approve enough token to sell this item\"" + }, + "value": "BETokenMall: seller doesn't approve enough token to sell this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116", + "typeString": "literal_string \"BETokenMall: seller doesn't approve enough token to sell this item\"" + } + ], + "id": 1239, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2446:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2446:165:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1254, + "nodeType": "ExpressionStatement", + "src": "2446:165:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1260, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "2707:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1257, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2687:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1256, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2680:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2680:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 212, + "src": "2680:26:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2680:33:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1262, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "2717:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2680:43:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20627579657220646f65736e2774206861766520656e6f75676820746f6b656e20746f206275792074686973206974656d", + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2731:63:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7", + "typeString": "literal_string \"BETokenMall: buyer doesn't have enough token to buy this item\"" + }, + "value": "BETokenMall: buyer doesn't have enough token to buy this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7", + "typeString": "literal_string \"BETokenMall: buyer doesn't have enough token to buy this item\"" + } + ], + "id": 1255, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2665:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2665:135:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1266, + "nodeType": "ExpressionStatement", + "src": "2665:135:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1272, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "2848:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 1275, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "2863:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + ], + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2855:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1273, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2855:7:7", + "typeDescriptions": {} + } + }, + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2855:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1269, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2828:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1268, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2821:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2821:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 232, + "src": "2821:26:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2821:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1278, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "2873:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2821:58:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20627579657220646f65736e277420617070726f766520656e6f75676820746f6b656e20746f206275792074686973206974656d", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2887:66:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9", + "typeString": "literal_string \"BETokenMall: buyer doesn't approve enough token to buy this item\"" + }, + "value": "BETokenMall: buyer doesn't approve enough token to buy this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9", + "typeString": "literal_string \"BETokenMall: buyer doesn't approve enough token to buy this item\"" + } + ], + "id": 1267, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2806:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2806:153:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1282, + "nodeType": "ExpressionStatement", + "src": "2806:153:7" + }, + { + "expression": { + "arguments": [ + { + "id": 1287, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "3034:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1288, + "name": "feeToAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "3041:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1289, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "3055:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1284, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "3007:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1283, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3000:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3000:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 351, + "src": "3000:33:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$255_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$255_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3000:62:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1291, + "nodeType": "ExpressionStatement", + "src": "3000:62:7" + }, + { + "expression": { + "arguments": [ + { + "id": 1296, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "3137:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1297, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "3145:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1298, + "name": "tokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "3152:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1293, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "3106:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1292, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3099:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3099:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 351, + "src": "3099:37:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$255_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$255_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3099:65:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1300, + "nodeType": "ExpressionStatement", + "src": "3099:65:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1302, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "3212:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1303, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "3219:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1304, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "3233:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1305, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "3243:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1301, + "name": "BuyTransaction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "3197:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256)" + } + }, + "id": 1306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3197:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1307, + "nodeType": "EmitStatement", + "src": "3192:58:7" + } + ] + }, + "documentation": { + "id": 1163, + "nodeType": "StructuredDocumentation", + "src": "1744:29:7", + "text": " @dev Buy token" + }, + "functionSelector": "68f8fc10", + "id": 1309, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1170, + "kind": "modifierInvocation", + "modifierName": { + "id": 1169, + "name": "nonReentrant", + "nodeType": "IdentifierPath", + "referencedDeclaration": 142, + "src": "1837:12:7" + }, + "nodeType": "ModifierInvocation", + "src": "1837:12:7" + } + ], + "name": "buyToken", + "nameLocation": "1785:8:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1165, + "mutability": "mutable", + "name": "currency", + "nameLocation": "1802:8:7", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "1794:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1794:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1167, + "mutability": "mutable", + "name": "amount", + "nameLocation": "1820:6:7", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "1812:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1793:34:7" + }, + "returnParameters": { + "id": 1171, + "nodeType": "ParameterList", + "parameters": [], + "src": "1850:0:7" + }, + "scope": 1310, + "src": "1776:1479:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1311, + "src": "387:2870:7", + "usedErrors": [] + } + ], + "src": "32:3226:7" + }, + "compiler": { + "name": "solc", + "version": "0.8.10+commit.fc410830.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.11", + "updatedAt": "2023-07-27T08:09:28.495Z", + "devdoc": { + "kind": "dev", + "methods": { + "buyToken(address,uint256)": { + "details": "Buy token" + }, + "constructor": { + "details": "Constructor" + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateExecutor(address)": { + "details": "update executor" + }, + "updateSeller(address)": { + "details": "Update seller address" + }, + "updateTokenAddress(address)": { + "details": "Update token address" + }, + "updateTokenPrice(address,uint256)": { + "details": "Update token price" + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/build/contracts/ICurrency.json b/build/contracts/ICurrency.json new file mode 100644 index 0000000..bc897ac --- /dev/null +++ b/build/contracts/ICurrency.json @@ -0,0 +1,4080 @@ +{ + "contractName": "ICurrency", + "abi": [ + { + "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": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"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\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/market/BETokenMall.sol\":\"ICurrency\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://41319e7f621f2dc3733511332c4fd032f8e32ad2aa7fd6f665c19741d9941a34\",\"dweb:/ipfs/QmcYR3bd862GD1Bc7jwrU9bGxrhUu5na1oP964bDCu2id1\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5\",\"dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc5b5dc12fbc4002f282eaa7a5f06d8310ed62c1c77c5770f6283e058454c39a\",\"dweb:/ipfs/Qme9rE2wS3yBuyJq9GgbmzbsBQsW2M2sVFqYYLw7bosGrv\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x909d608c2db6eb165ca178c81289a07ed2e118e444d0025b2a85c97d0b44a4fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://656cda26512ddd7373c2d5551c8fae759fc30f05b10f0fc2e738e9274199dbd4\",\"dweb:/ipfs/QmTSArSzQRFbQmHgq7U1PZXnsDFhvDZhKVu9CzMG4yo6Lx\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931\",\"dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"project:/contracts/market/BETokenMall.sol\":{\"keccak256\":\"0xad7cdcaf9659e5e4c7af8596154cd2de28e0fdc53495ed5dcf5b7899d05dc6b0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6432d9c3f00bc344e2be5e355a72ee93259fa72976ac5013d4a87405a41c7a66\",\"dweb:/ipfs/QmRtwet7QoCg8yEk5aGDTw2eUZCgRLNZTYvJ9C2EiFom1M\"]},\"project:/contracts/market/MallBase.sol\":{\"keccak256\":\"0x21e5909f6a86d62b20ebbc92171e8f87638f1c34e35ec88768181b7c4271de65\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c487dd4637521c4e8c11697f5a9acb5188770dc89334b1ea72e2ce5058f605ab\",\"dweb:/ipfs/QmSakyzDfsYCX6VHsVfGrzuwXHWhq8PNxuMkafS1yjREhq\"]},\"project:/contracts/utils/UInt.sol\":{\"keccak256\":\"0xabf10d6f1fd47ffe04ab44b8b2f6638eece2276c3a8ba170d0c660e8212a7a8c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2b1d61926fb315a771d8fd0d5d9a85ea58a154cd976a7500e12a1e2b3e14083\",\"dweb:/ipfs/QmbJkytTjjABgWbYLJBHv3uoLEAcbF7pWig71sd2rjGG2M\"]}},\"version\":1}", + "bytecode": "0x", + "deployedBytecode": "0x", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "", + "deployedSourceMap": "", + "source": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"../utils/UInt.sol\";\nimport \"./MallBase.sol\";\n\ninterface ICurrency is IERC20 {\n function decimals() external view returns (uint256);\n}\n\ncontract BETokenMall is MallBase, ReentrancyGuard {\n using SafeERC20 for IERC20;\n using UInt for uint256;\n uint256 constant ROUND = 1000000;\n address public tokenAddress;\n address public seller;\n // currency => price\n mapping(address => uint256) public prices;\n\n // Events\n event BuyTransaction(\n address indexed buyer,\n address tokenAddress,\n address currency,\n uint256 amount\n );\n event TokenAddressUpdated(address tokenAddress);\n event SellerUpdated(address seller);\n event UpdateTokenPrice(address currency, uint256 price, uint256 pricePre);\n\n /**\n * @dev Constructor\n */\n constructor(address _tokenAddress, address _seller) {\n tokenAddress = _tokenAddress;\n seller = _seller;\n }\n\n /**\n * @dev Update token address\n */\n function updateTokenAddress(address _tokenAddress) external onlyOwner {\n tokenAddress = _tokenAddress;\n emit TokenAddressUpdated(_tokenAddress);\n }\n\n /**\n * @dev Update seller address\n */\n function updateSeller(address _seller) external onlyOwner {\n seller = _seller;\n emit SellerUpdated(_seller);\n }\n\n /**\n * @dev Update token price\n */\n function updateTokenPrice(\n address currency,\n uint256 price\n ) external onlyOwner {\n uint256 pricePre = prices[currency];\n prices[currency] = price;\n emit UpdateTokenPrice(currency, price, pricePre);\n }\n\n /**\n * @dev Buy token\n */\n function buyToken(address currency, uint256 amount) external nonReentrant {\n require(amount > 0, \"BETokenMall: invalid amount\");\n require(erc20Supported[currency], \"BETokenMall: invalid payment method\");\n require(prices[currency] > 0, \"BETokenMall: invalid token price\");\n // calc currency amount\n uint256 currencyDecimal = ICurrency(currency).decimals();\n uint256 tokenAmount = (prices[currency] *\n amount *\n (10 ** (18 - currencyDecimal))) / ROUND;\n address buyer = _msgSender();\n require(\n IERC20(tokenAddress).balanceOf(seller) >= tokenAmount,\n \"BETokenMall: seller doesn't have enough token to sell this item\"\n );\n require(\n IERC20(tokenAddress).allowance(seller, address(this)) >= tokenAmount,\n \"BETokenMall: seller doesn't approve enough token to sell this item\"\n );\n // Check payment approval and buyer balance\n require(\n IERC20(currency).balanceOf(buyer) >= amount,\n \"BETokenMall: buyer doesn't have enough token to buy this item\"\n );\n require(\n IERC20(currency).allowance(buyer, address(this)) >= amount,\n \"BETokenMall: buyer doesn't approve enough token to buy this item\"\n );\n\n // Transfer payment to seller\n IERC20(currency).safeTransferFrom(buyer, feeToAddress, amount);\n // Transfer token to buyer\n IERC20(tokenAddress).safeTransferFrom(seller, buyer, tokenAmount);\n // emit buy event\n emit BuyTransaction(buyer, tokenAddress, currency, amount);\n }\n}\n", + "sourcePath": "/Users/zhl/Documents/workspace/crypto/becrypto/contracts/market/BETokenMall.sol", + "ast": { + "absolutePath": "project:/contracts/market/BETokenMall.sol", + "exportedSymbols": { + "Address": [ + 997 + ], + "BETokenMall": [ + 1310 + ], + "Context": [ + 1019 + ], + "ICurrency": [ + 1034 + ], + "IERC20": [ + 255 + ], + "IERC20Permit": [ + 291 + ], + "MallBase": [ + 1423 + ], + "Ownable": [ + 112 + ], + "ReentrancyGuard": [ + 177 + ], + "SafeERC20": [ + 667 + ], + "UInt": [ + 1454 + ] + }, + "id": 1311, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1021, + "literals": [ + "solidity", + "0.8", + ".10" + ], + "nodeType": "PragmaDirective", + "src": "32:23:7" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 1022, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 256, + "src": "57:56:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol", + "id": 1023, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 668, + "src": "114:65:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/security/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/security/ReentrancyGuard.sol", + "id": 1024, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 178, + "src": "180:62:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/utils/UInt.sol", + "file": "../utils/UInt.sol", + "id": 1025, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 1455, + "src": "243:27:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "project:/contracts/market/MallBase.sol", + "file": "./MallBase.sol", + "id": 1026, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1311, + "sourceUnit": 1424, + "src": "271:24:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1027, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 255, + "src": "320:6:7" + }, + "id": 1028, + "nodeType": "InheritanceSpecifier", + "src": "320:6:7" + } + ], + "canonicalName": "ICurrency", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 1034, + "linearizedBaseContracts": [ + 1034, + 255 + ], + "name": "ICurrency", + "nameLocation": "307:9:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "313ce567", + "id": 1033, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nameLocation": "340:8:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1029, + "nodeType": "ParameterList", + "parameters": [], + "src": "348:2:7" + }, + "returnParameters": { + "id": 1032, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1031, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1033, + "src": "374:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1030, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "374:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "373:9:7" + }, + "scope": 1034, + "src": "331:52:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1311, + "src": "297:88:7", + "usedErrors": [] + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 1035, + "name": "MallBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1423, + "src": "411:8:7" + }, + "id": 1036, + "nodeType": "InheritanceSpecifier", + "src": "411:8:7" + }, + { + "baseName": { + "id": 1037, + "name": "ReentrancyGuard", + "nodeType": "IdentifierPath", + "referencedDeclaration": 177, + "src": "421:15:7" + }, + "id": 1038, + "nodeType": "InheritanceSpecifier", + "src": "421:15:7" + } + ], + "canonicalName": "BETokenMall", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1310, + "linearizedBaseContracts": [ + 1310, + 177, + 1423, + 112, + 1019 + ], + "name": "BETokenMall", + "nameLocation": "396:11:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1042, + "libraryName": { + "id": 1039, + "name": "SafeERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 667, + "src": "447:9:7" + }, + "nodeType": "UsingForDirective", + "src": "441:27:7", + "typeName": { + "id": 1041, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1040, + "name": "IERC20", + "nodeType": "IdentifierPath", + "referencedDeclaration": 255, + "src": "461:6:7" + }, + "referencedDeclaration": 255, + "src": "461:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + } + }, + { + "id": 1045, + "libraryName": { + "id": 1043, + "name": "UInt", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1454, + "src": "477:4:7" + }, + "nodeType": "UsingForDirective", + "src": "471:23:7", + "typeName": { + "id": 1044, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "486:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 1048, + "mutability": "constant", + "name": "ROUND", + "nameLocation": "514:5:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "497:32:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1046, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "497:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "hexValue": "31303030303030", + "id": 1047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "522:7:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "visibility": "internal" + }, + { + "constant": false, + "functionSelector": "9d76ea58", + "id": 1050, + "mutability": "mutable", + "name": "tokenAddress", + "nameLocation": "548:12:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "533:27:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1049, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "533:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "08551a53", + "id": 1052, + "mutability": "mutable", + "name": "seller", + "nameLocation": "579:6:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "564:21:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1051, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "564:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "cfed246b", + "id": 1056, + "mutability": "mutable", + "name": "prices", + "nameLocation": "647:6:7", + "nodeType": "VariableDeclaration", + "scope": 1310, + "src": "612:41:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1055, + "keyType": { + "id": 1053, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "620:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "612:27:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1054, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "631:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "public" + }, + { + "anonymous": false, + "id": 1066, + "name": "BuyTransaction", + "nameLocation": "676:14:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1065, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1058, + "indexed": true, + "mutability": "mutable", + "name": "buyer", + "nameLocation": "712:5:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "696:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1057, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "696:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1060, + "indexed": false, + "mutability": "mutable", + "name": "tokenAddress", + "nameLocation": "731:12:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "723:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "723:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1062, + "indexed": false, + "mutability": "mutable", + "name": "currency", + "nameLocation": "757:8:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "749:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "749:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1064, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nameLocation": "779:6:7", + "nodeType": "VariableDeclaration", + "scope": 1066, + "src": "771:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1063, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "690:99:7" + }, + "src": "670:120:7" + }, + { + "anonymous": false, + "id": 1070, + "name": "TokenAddressUpdated", + "nameLocation": "799:19:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1068, + "indexed": false, + "mutability": "mutable", + "name": "tokenAddress", + "nameLocation": "827:12:7", + "nodeType": "VariableDeclaration", + "scope": 1070, + "src": "819:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1067, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "819:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "818:22:7" + }, + "src": "793:48:7" + }, + { + "anonymous": false, + "id": 1074, + "name": "SellerUpdated", + "nameLocation": "850:13:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1073, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1072, + "indexed": false, + "mutability": "mutable", + "name": "seller", + "nameLocation": "872:6:7", + "nodeType": "VariableDeclaration", + "scope": 1074, + "src": "864:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "864:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "863:16:7" + }, + "src": "844:36:7" + }, + { + "anonymous": false, + "id": 1082, + "name": "UpdateTokenPrice", + "nameLocation": "889:16:7", + "nodeType": "EventDefinition", + "parameters": { + "id": 1081, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1076, + "indexed": false, + "mutability": "mutable", + "name": "currency", + "nameLocation": "914:8:7", + "nodeType": "VariableDeclaration", + "scope": 1082, + "src": "906:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1075, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "906:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1078, + "indexed": false, + "mutability": "mutable", + "name": "price", + "nameLocation": "932:5:7", + "nodeType": "VariableDeclaration", + "scope": 1082, + "src": "924:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1077, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "924:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1080, + "indexed": false, + "mutability": "mutable", + "name": "pricePre", + "nameLocation": "947:8:7", + "nodeType": "VariableDeclaration", + "scope": 1082, + "src": "939:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1079, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "939:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "905:51:7" + }, + "src": "883:74:7" + }, + { + "body": { + "id": 1098, + "nodeType": "Block", + "src": "1047:61:7", + "statements": [ + { + "expression": { + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1090, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "1053:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1091, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1085, + "src": "1068:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1053:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1093, + "nodeType": "ExpressionStatement", + "src": "1053:28:7" + }, + { + "expression": { + "id": 1096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1094, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "1087:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1095, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1087, + "src": "1096:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1087:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1097, + "nodeType": "ExpressionStatement", + "src": "1087:16:7" + } + ] + }, + "documentation": { + "id": 1083, + "nodeType": "StructuredDocumentation", + "src": "961:31:7", + "text": " @dev Constructor" + }, + "id": 1099, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1085, + "mutability": "mutable", + "name": "_tokenAddress", + "nameLocation": "1015:13:7", + "nodeType": "VariableDeclaration", + "scope": 1099, + "src": "1007:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1084, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1007:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1087, + "mutability": "mutable", + "name": "_seller", + "nameLocation": "1038:7:7", + "nodeType": "VariableDeclaration", + "scope": 1099, + "src": "1030:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1086, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1030:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1006:40:7" + }, + "returnParameters": { + "id": 1089, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:0:7" + }, + "scope": 1310, + "src": "995:113:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1115, + "nodeType": "Block", + "src": "1225:84:7", + "statements": [ + { + "expression": { + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1107, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "1231:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1108, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "1246:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1231:28:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1110, + "nodeType": "ExpressionStatement", + "src": "1231:28:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1112, + "name": "_tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "1290:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1111, + "name": "TokenAddressUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1070, + "src": "1270:19:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1270:34:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1114, + "nodeType": "EmitStatement", + "src": "1265:39:7" + } + ] + }, + "documentation": { + "id": 1100, + "nodeType": "StructuredDocumentation", + "src": "1112:40:7", + "text": " @dev Update token address" + }, + "functionSelector": "6691461a", + "id": 1116, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1105, + "kind": "modifierInvocation", + "modifierName": { + "id": 1104, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 31, + "src": "1215:9:7" + }, + "nodeType": "ModifierInvocation", + "src": "1215:9:7" + } + ], + "name": "updateTokenAddress", + "nameLocation": "1164:18:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1103, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1102, + "mutability": "mutable", + "name": "_tokenAddress", + "nameLocation": "1191:13:7", + "nodeType": "VariableDeclaration", + "scope": 1116, + "src": "1183:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1183:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1182:23:7" + }, + "returnParameters": { + "id": 1106, + "nodeType": "ParameterList", + "parameters": [], + "src": "1225:0:7" + }, + "scope": 1310, + "src": "1155:154:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1132, + "nodeType": "Block", + "src": "1415:60:7", + "statements": [ + { + "expression": { + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1124, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "1421:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1125, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1430:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1421:16:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1127, + "nodeType": "ExpressionStatement", + "src": "1421:16:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1129, + "name": "_seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "1462:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1128, + "name": "SellerUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "1448:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 1130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1448:22:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1131, + "nodeType": "EmitStatement", + "src": "1443:27:7" + } + ] + }, + "documentation": { + "id": 1117, + "nodeType": "StructuredDocumentation", + "src": "1313:41:7", + "text": " @dev Update seller address" + }, + "functionSelector": "dbbdae63", + "id": 1133, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1122, + "kind": "modifierInvocation", + "modifierName": { + "id": 1121, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 31, + "src": "1405:9:7" + }, + "nodeType": "ModifierInvocation", + "src": "1405:9:7" + } + ], + "name": "updateSeller", + "nameLocation": "1366:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1119, + "mutability": "mutable", + "name": "_seller", + "nameLocation": "1387:7:7", + "nodeType": "VariableDeclaration", + "scope": 1133, + "src": "1379:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1379:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1378:17:7" + }, + "returnParameters": { + "id": 1123, + "nodeType": "ParameterList", + "parameters": [], + "src": "1415:0:7" + }, + "scope": 1310, + "src": "1357:118:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1161, + "nodeType": "Block", + "src": "1610:130:7", + "statements": [ + { + "assignments": [ + 1144 + ], + "declarations": [ + { + "constant": false, + "id": 1144, + "mutability": "mutable", + "name": "pricePre", + "nameLocation": "1624:8:7", + "nodeType": "VariableDeclaration", + "scope": 1161, + "src": "1616:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1143, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1616:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1148, + "initialValue": { + "baseExpression": { + "id": 1145, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1635:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1147, + "indexExpression": { + "id": 1146, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1136, + "src": "1642:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1635:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1616:35:7" + }, + { + "expression": { + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 1149, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1657:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1151, + "indexExpression": { + "id": 1150, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1136, + "src": "1664:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1657:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1152, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1138, + "src": "1676:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1657:24:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1154, + "nodeType": "ExpressionStatement", + "src": "1657:24:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1156, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1136, + "src": "1709:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1157, + "name": "price", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1138, + "src": "1719:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1158, + "name": "pricePre", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "1726:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1155, + "name": "UpdateTokenPrice", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1082, + "src": "1692:16:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1692:43:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1160, + "nodeType": "EmitStatement", + "src": "1687:48:7" + } + ] + }, + "documentation": { + "id": 1134, + "nodeType": "StructuredDocumentation", + "src": "1479:38:7", + "text": " @dev Update token price" + }, + "functionSelector": "d4ee651b", + "id": 1162, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1141, + "kind": "modifierInvocation", + "modifierName": { + "id": 1140, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 31, + "src": "1600:9:7" + }, + "nodeType": "ModifierInvocation", + "src": "1600:9:7" + } + ], + "name": "updateTokenPrice", + "nameLocation": "1529:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1139, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1136, + "mutability": "mutable", + "name": "currency", + "nameLocation": "1559:8:7", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "1551:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1551:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1138, + "mutability": "mutable", + "name": "price", + "nameLocation": "1581:5:7", + "nodeType": "VariableDeclaration", + "scope": 1162, + "src": "1573:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1137, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1573:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1545:45:7" + }, + "returnParameters": { + "id": 1142, + "nodeType": "ParameterList", + "parameters": [], + "src": "1610:0:7" + }, + "scope": 1310, + "src": "1520:220:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "1850:1405:7", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1173, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "1864:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1873:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1864:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c696420616d6f756e74", + "id": 1176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1876:29:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be", + "typeString": "literal_string \"BETokenMall: invalid amount\"" + }, + "value": "BETokenMall: invalid amount" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a2d21523123f6a5636f1f4f57c897909bc3f74962b6955ed8c6676563580d5be", + "typeString": "literal_string \"BETokenMall: invalid amount\"" + } + ], + "id": 1172, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1856:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1856:50:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1178, + "nodeType": "ExpressionStatement", + "src": "1856:50:7" + }, + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 1180, + "name": "erc20Supported", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1323, + "src": "1920:14:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1182, + "indexExpression": { + "id": 1181, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "1935:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1920:24:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c6964207061796d656e74206d6574686f64", + "id": 1183, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1946:37:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa", + "typeString": "literal_string \"BETokenMall: invalid payment method\"" + }, + "value": "BETokenMall: invalid payment method" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ce49507a01a15df79dff2538e31e6b4b37d348783463e336d10e68082f4288fa", + "typeString": "literal_string \"BETokenMall: invalid payment method\"" + } + ], + "id": 1179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1912:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1912:72:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1185, + "nodeType": "ExpressionStatement", + "src": "1912:72:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1187, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1998:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1189, + "indexExpression": { + "id": 1188, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2005:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1998:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2017:1:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1998:20:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20696e76616c696420746f6b656e207072696365", + "id": 1192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2020:34:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd", + "typeString": "literal_string \"BETokenMall: invalid token price\"" + }, + "value": "BETokenMall: invalid token price" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_de0baa7be4f17d52c3048a4dab4dba816280e3b0920fda3f994482639c9555cd", + "typeString": "literal_string \"BETokenMall: invalid token price\"" + } + ], + "id": 1186, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "1990:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1990:65:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1194, + "nodeType": "ExpressionStatement", + "src": "1990:65:7" + }, + { + "assignments": [ + 1196 + ], + "declarations": [ + { + "constant": false, + "id": 1196, + "mutability": "mutable", + "name": "currencyDecimal", + "nameLocation": "2097:15:7", + "nodeType": "VariableDeclaration", + "scope": 1308, + "src": "2089:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2089:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1202, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "arguments": [ + { + "id": 1198, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2125:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1197, + "name": "ICurrency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1034, + "src": "2115:9:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICurrency_$1034_$", + "typeString": "type(contract ICurrency)" + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:19:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICurrency_$1034", + "typeString": "contract ICurrency" + } + }, + "id": 1200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "decimals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1033, + "src": "2115:28:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:30:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2089:56:7" + }, + { + "assignments": [ + 1204 + ], + "declarations": [ + { + "constant": false, + "id": 1204, + "mutability": "mutable", + "name": "tokenAmount", + "nameLocation": "2159:11:7", + "nodeType": "VariableDeclaration", + "scope": 1308, + "src": "2151:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2151:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1221, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 1205, + "name": "prices", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "2174:6:7", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1207, + "indexExpression": { + "id": 1206, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2181:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2174:16:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "id": 1208, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "2199:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2174:31:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3130", + "id": 1210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2215:2:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1213, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3138", + "id": 1211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2222:2:7", + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 1212, + "name": "currencyDecimal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1196, + "src": "2227:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2222:20:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1214, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2221:22:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2215:28:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1216, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2214:30:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2174:70:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1218, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2173:72:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "id": 1219, + "name": "ROUND", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "2248:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2173:80:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2151:102:7" + }, + { + "assignments": [ + 1223 + ], + "declarations": [ + { + "constant": false, + "id": 1223, + "mutability": "mutable", + "name": "buyer", + "nameLocation": "2267:5:7", + "nodeType": "VariableDeclaration", + "scope": 1308, + "src": "2259:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1222, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2259:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1226, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1224, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1009, + "src": "2275:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2275:12:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2259:28:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1232, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "2339:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1229, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "2315:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1228, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2308:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2308:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 212, + "src": "2308:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2308:38:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1234, + "name": "tokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "2350:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2308:53:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a2073656c6c657220646f65736e2774206861766520656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d", + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2369:65:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e", + "typeString": "literal_string \"BETokenMall: seller doesn't have enough token to sell this item\"" + }, + "value": "BETokenMall: seller doesn't have enough token to sell this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_73f0bd8e523cff2e504592c44e9195f4613827bfc123cfd9764579cdf471a09e", + "typeString": "literal_string \"BETokenMall: seller doesn't have enough token to sell this item\"" + } + ], + "id": 1227, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2293:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2293:147:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1238, + "nodeType": "ExpressionStatement", + "src": "2293:147:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1244, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "2492:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 1247, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "2508:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + ], + "id": 1246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2500:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1245, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2500:7:7", + "typeDescriptions": {} + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2500:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1241, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "2468:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1240, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2461:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 232, + "src": "2461:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2461:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1250, + "name": "tokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "2518:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2461:68:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a2073656c6c657220646f65736e277420617070726f766520656e6f75676820746f6b656e20746f2073656c6c2074686973206974656d", + "id": 1252, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2537:68:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116", + "typeString": "literal_string \"BETokenMall: seller doesn't approve enough token to sell this item\"" + }, + "value": "BETokenMall: seller doesn't approve enough token to sell this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b12657b3b75653fe46056178646066dddbc146c37547191bc3f6947332d91116", + "typeString": "literal_string \"BETokenMall: seller doesn't approve enough token to sell this item\"" + } + ], + "id": 1239, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2446:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2446:165:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1254, + "nodeType": "ExpressionStatement", + "src": "2446:165:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1260, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "2707:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1257, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2687:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1256, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2680:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2680:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 212, + "src": "2680:26:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 1261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2680:33:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1262, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "2717:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2680:43:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20627579657220646f65736e2774206861766520656e6f75676820746f6b656e20746f206275792074686973206974656d", + "id": 1264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2731:63:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7", + "typeString": "literal_string \"BETokenMall: buyer doesn't have enough token to buy this item\"" + }, + "value": "BETokenMall: buyer doesn't have enough token to buy this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_980c03874b76c6d251144dea5acdce60498a10f246b9b561224499303c2b93f7", + "typeString": "literal_string \"BETokenMall: buyer doesn't have enough token to buy this item\"" + } + ], + "id": 1255, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2665:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2665:135:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1266, + "nodeType": "ExpressionStatement", + "src": "2665:135:7" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1272, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "2848:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 1275, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4294967268, + "src": "2863:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_BETokenMall_$1310", + "typeString": "contract BETokenMall" + } + ], + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2855:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1273, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2855:7:7", + "typeDescriptions": {} + } + }, + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2855:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "id": 1269, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "2828:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1268, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "2821:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2821:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 232, + "src": "2821:26:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2821:48:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 1278, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "2873:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2821:58:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "4245546f6b656e4d616c6c3a20627579657220646f65736e277420617070726f766520656e6f75676820746f6b656e20746f206275792074686973206974656d", + "id": 1280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2887:66:7", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9", + "typeString": "literal_string \"BETokenMall: buyer doesn't approve enough token to buy this item\"" + }, + "value": "BETokenMall: buyer doesn't approve enough token to buy this item" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_157fc5858d6b0d54de2cbea831cc967ea7927dd4aaad4520576b575909c099a9", + "typeString": "literal_string \"BETokenMall: buyer doesn't approve enough token to buy this item\"" + } + ], + "id": 1267, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4294967278, + 4294967278 + ], + "referencedDeclaration": 4294967278, + "src": "2806:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2806:153:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1282, + "nodeType": "ExpressionStatement", + "src": "2806:153:7" + }, + { + "expression": { + "arguments": [ + { + "id": 1287, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "3034:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1288, + "name": "feeToAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1319, + "src": "3041:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1289, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "3055:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1284, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "3007:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1283, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3000:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3000:16:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 351, + "src": "3000:33:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$255_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$255_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 1290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3000:62:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1291, + "nodeType": "ExpressionStatement", + "src": "3000:62:7" + }, + { + "expression": { + "arguments": [ + { + "id": 1296, + "name": "seller", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "3137:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1297, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "3145:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1298, + "name": "tokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1204, + "src": "3152:11:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [ + { + "id": 1293, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "3106:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1292, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "3099:6:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$255_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3099:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$255", + "typeString": "contract IERC20" + } + }, + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 351, + "src": "3099:37:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$255_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$255_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3099:65:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1300, + "nodeType": "ExpressionStatement", + "src": "3099:65:7" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1302, + "name": "buyer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1223, + "src": "3212:5:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1303, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "3219:12:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1304, + "name": "currency", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1165, + "src": "3233:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1305, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1167, + "src": "3243:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1301, + "name": "BuyTransaction", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1066, + "src": "3197:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,address,uint256)" + } + }, + "id": 1306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3197:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1307, + "nodeType": "EmitStatement", + "src": "3192:58:7" + } + ] + }, + "documentation": { + "id": 1163, + "nodeType": "StructuredDocumentation", + "src": "1744:29:7", + "text": " @dev Buy token" + }, + "functionSelector": "68f8fc10", + "id": 1309, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 1170, + "kind": "modifierInvocation", + "modifierName": { + "id": 1169, + "name": "nonReentrant", + "nodeType": "IdentifierPath", + "referencedDeclaration": 142, + "src": "1837:12:7" + }, + "nodeType": "ModifierInvocation", + "src": "1837:12:7" + } + ], + "name": "buyToken", + "nameLocation": "1785:8:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1165, + "mutability": "mutable", + "name": "currency", + "nameLocation": "1802:8:7", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "1794:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1164, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1794:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1167, + "mutability": "mutable", + "name": "amount", + "nameLocation": "1820:6:7", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "1812:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1812:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1793:34:7" + }, + "returnParameters": { + "id": 1171, + "nodeType": "ParameterList", + "parameters": [], + "src": "1850:0:7" + }, + "scope": 1310, + "src": "1776:1479:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1311, + "src": "387:2870:7", + "usedErrors": [] + } + ], + "src": "32:3226:7" + }, + "compiler": { + "name": "solc", + "version": "0.8.10+commit.fc410830.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.4.11", + "updatedAt": "2023-07-27T08:09:28.498Z", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." + }, + "approve(address,uint256)": { + "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event." + }, + "balanceOf(address)": { + "details": "Returns the amount of tokens owned by `account`." + }, + "totalSupply()": { + "details": "Returns the amount of tokens in existence." + }, + "transfer(address,uint256)": { + "details": "Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." + }, + "transferFrom(address,address,uint256)": { + "details": "Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/contracts/market/BETokenMall.sol b/contracts/market/BETokenMall.sol new file mode 100644 index 0000000..691f3da --- /dev/null +++ b/contracts/market/BETokenMall.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.10; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; +import "../utils/UInt.sol"; +import "./MallBase.sol"; + +interface ICurrency is IERC20 { + function decimals() external view returns (uint256); +} + +contract BETokenMall is MallBase, ReentrancyGuard { + using SafeERC20 for IERC20; + using UInt for uint256; + uint256 constant ROUND = 1000000; + address public tokenAddress; + address public seller; + // currency => price + mapping(address => uint256) public prices; + + // Events + event BuyTransaction( + address indexed buyer, + address tokenAddress, + address currency, + uint256 amount + ); + event TokenAddressUpdated(address tokenAddress); + event SellerUpdated(address seller); + event UpdateTokenPrice(address currency, uint256 price, uint256 pricePre); + + /** + * @dev Constructor + */ + constructor(address _tokenAddress, address _seller) { + tokenAddress = _tokenAddress; + seller = _seller; + } + + /** + * @dev Update token address + */ + function updateTokenAddress(address _tokenAddress) external onlyOwner { + tokenAddress = _tokenAddress; + emit TokenAddressUpdated(_tokenAddress); + } + + /** + * @dev Update seller address + */ + function updateSeller(address _seller) external onlyOwner { + seller = _seller; + emit SellerUpdated(_seller); + } + + /** + * @dev Update token price + */ + function updateTokenPrice( + address currency, + uint256 price + ) external onlyOwner { + uint256 pricePre = prices[currency]; + prices[currency] = price; + emit UpdateTokenPrice(currency, price, pricePre); + } + + /** + * @dev Buy token + */ + function buyToken(address currency, uint256 amount) external nonReentrant { + require(amount > 0, "BETokenMall: invalid amount"); + require(erc20Supported[currency], "BETokenMall: invalid payment method"); + require(prices[currency] > 0, "BETokenMall: invalid token price"); + // calc currency amount + uint256 currencyDecimal = ICurrency(currency).decimals(); + uint256 tokenAmount = (prices[currency] * + amount * + (10 ** (18 - currencyDecimal))) / ROUND; + address buyer = _msgSender(); + require( + IERC20(tokenAddress).balanceOf(seller) >= tokenAmount, + "BETokenMall: seller doesn't have enough token to sell this item" + ); + require( + IERC20(tokenAddress).allowance(seller, address(this)) >= tokenAmount, + "BETokenMall: seller doesn't approve enough token to sell this item" + ); + // Check payment approval and buyer balance + require( + IERC20(currency).balanceOf(buyer) >= amount, + "BETokenMall: buyer doesn't have enough token to buy this item" + ); + require( + IERC20(currency).allowance(buyer, address(this)) >= amount, + "BETokenMall: buyer doesn't approve enough token to buy this item" + ); + + // Transfer payment to seller + IERC20(currency).safeTransferFrom(buyer, feeToAddress, amount); + // Transfer token to buyer + IERC20(tokenAddress).safeTransferFrom(seller, buyer, tokenAmount); + // emit buy event + emit BuyTransaction(buyer, tokenAddress, currency, amount); + } +} diff --git a/migrations/7_deploy_market.js b/migrations/7_deploy_market.js index 8d5f5c0..fbd0227 100644 --- a/migrations/7_deploy_market.js +++ b/migrations/7_deploy_market.js @@ -2,6 +2,9 @@ const BENftMarket = artifacts.require("market/BENftMarket"); const BENftMall = artifacts.require("market/BENftMall"); const GameItemMarket = artifacts.require("market/GameItemMarket"); const GameItemMall = artifacts.require("market/GameItemMall"); +const FT = artifacts.require("tokens/erc20/FT"); +const BETokenMall = artifacts.require("market/BETokenMall"); +const config = require("../config/config"); const base = require("../scripts/base"); module.exports = async function (deployer, network, accounts) { @@ -18,16 +21,40 @@ module.exports = async function (deployer, network, accounts) { // network, // }); - await deployer.deploy(BENftMall); - const nftMallInstance = await BENftMall.deployed(); - if (nftMallInstance) { - console.log("BENftMall successfully deployed."); + // await deployer.deploy(BENftMall); + // const nftMallInstance = await BENftMall.deployed(); + // if (nftMallInstance) { + // console.log("BENftMall successfully deployed."); + // } + // base.updateArray({ + // name: "BENftMall", + // type: "logic", + // json: "assets/contracts/BENftMall.json", + // address: nftMallInstance.address, + // network, + // }); + let cfgs = base.loadData({ network }); + const cegInstance = await FT.at(cfgs.find((c) => c.name === "CEG").address); + await deployer.deploy( + BETokenMall, + cegInstance.address, + config.market.feeToAddress + ); + const tokenMallInstance = await BETokenMall.deployed(); + if (tokenMallInstance) { + console.log("BETokenMall successfully deployed."); } + await tokenMallInstance.setFeeToAddress(config.market.feeToAddress); + const usdcInstance = await FT.at( + cfgs.find((c) => c.name === "BEUSDC").address + ); + await tokenMallInstance.addERC20Support(usdcInstance.address); + await tokenMallInstance.updateTokenPrice(usdcInstance.address, "10000000"); base.updateArray({ - name: "BENftMall", + name: "BETokenMall", type: "logic", - json: "assets/contracts/BENftMall.json", - address: nftMallInstance.address, + json: "assets/contracts/BETokenMall.json", + address: tokenMallInstance.address, network, }); diff --git a/out_arbitrum_testnet_dev.json b/out_arbitrum_testnet_dev.json index d079493..e1e4514 100644 --- a/out_arbitrum_testnet_dev.json +++ b/out_arbitrum_testnet_dev.json @@ -99,7 +99,7 @@ "name": "BEMultiSigWallet", "type": "logic", "json": "assets/contracts/BEMultiSigWallet.json", - "address": "0xE68F149daF2F314d9960c08496D8701BC7671850" + "address": "0x2419c58F3542E69c3f10dfe6C1Bb1fBd4D54Db5A" }, { "name": "TestBadge", @@ -118,5 +118,11 @@ "type": "erc20", "json": "assets/contracts/FT.json", "address": "0x944D0A8463B2c955F90F7252bBb99A3395087155" + }, + { + "name": "BETokenMall", + "type": "logic", + "json": "assets/contracts/BETokenMall.json", + "address": "0x9110Bc91942E559eebBF19B91cdAf67eEee3F93D" } ]