UNPKG

@verified-network/verified-sdk

Version:

An SDK to develop applications on the Verified Network

476 lines (475 loc) 1.33 MB
{ "contractName": "VerifiedMarkets", "abi": [ { "inputs": [ { "internalType": "address", "name": "comet_", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "borrower", "type": "address" }, { "indexed": true, "internalType": "address", "name": "base", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Borrowed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "issuer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": false, "internalType": "address", "name": "bond", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "apy", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "issuingDocs", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "faceValue", "type": "uint256" } ], "name": "NewRWA", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "issuer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "asset", "type": "address" }, { "indexed": false, "internalType": "address", "name": "collateral", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "PostedCollateral", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "borrower", "type": "address" }, { "indexed": true, "internalType": "address", "name": "base", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Repaid", "type": "event" }, { "inputs": [], "name": "comet", "outputs": [ { "internalType": "contract Comet", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "address", "name": "bond", "type": "address" }, { "internalType": "uint256", "name": "apy", "type": "uint256" }, { "internalType": "string", "name": "issuingDocs", "type": "string" }, { "internalType": "uint256", "name": "faceValue", "type": "uint256" } ], "name": "submitNewRWA", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "address", "name": "collateral", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "postCollateral", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "borrowBase", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "asset", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "repayBase", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"comet_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"base\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Borrowed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"bond\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"apy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"issuingDocs\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"faceValue\",\"type\":\"uint256\"}],\"name\":\"NewRWA\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"PostedCollateral\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"base\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Repaid\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"borrowBase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"comet\",\"outputs\":[{\"internalType\":\"contract Comet\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"collateral\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"postCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"repayBase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"bond\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"apy\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"issuingDocs\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"faceValue\",\"type\":\"uint256\"}],\"name\":\"submitNewRWA\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Kallol Borah\",\"kind\":\"dev\",\"methods\":{\"borrowBase(address,uint256)\":{\"params\":{\"amount\":\"amount of base asset borrowed*\",\"asset\":\"RWA for which base asset is borrowed\"}},\"constructor\":{\"params\":{\"comet_\":\"The Comet contract.*\"}},\"postCollateral(address,address,uint256)\":{\"params\":{\"amount\":\"amount of collateral posted*\",\"asset\":\"RWA for which collateral is posted\",\"collateral\":\"collateral used to buy bond issued by RWA issuer(must not be baseToken and must be accepted by comet)\"}},\"repayBase(address,uint256)\":{\"params\":{\"amount\":\"amount of base asset paid back*\",\"asset\":\"RWA for which base asset is paid back\"}},\"submitNewRWA(address,address,uint256,string,uint256)\":{\"params\":{\"apy\":\"interest rate paid on bond\",\"asset\":\"RWA for which bond is issued\",\"bond\":\"bond token that is issued\",\"faceValue\":\"par value of bond after discounting it with interest rate*\",\"issuingDocs\":\"ipfs reference for RWA docs\"}}},\"title\":\"Verified Markets\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"borrowBase(address,uint256)\":{\"notice\":\"Called by RWA issuer to to borrow base asset from Compound\"},\"comet()\":{\"notice\":\"The Comet contract\"},\"constructor\":{\"notice\":\"Construct a new operator.\"},\"postCollateral(address,address,uint256)\":{\"notice\":\"Used by RWA issuer to post collateral used to buy bonds issued by it to borrow from Compound\"},\"repayBase(address,uint256)\":{\"notice\":\"Called by RWA issuer to repay base asset to Compound and withdraw collateral posted earlier\"},\"submitNewRWA(address,address,uint256,string,uint256)\":{\"notice\":\"RWA issuer submits asset details and bond issued that can be purchased to provide collateral to the RWA issuer\"}},\"notice\":\"A Compound III operator to enable staking of collateral for real world assets to Compound.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/VerifiedMarkets.sol\":\"VerifiedMarkets\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/VerifiedMarkets.sol\":{\"keccak256\":\"0x62c1eb8a738dddf64db5b2730531b79c77281a92d6778f9f0e0f7f49059945f6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://05babd15e27d7ebcb84257358282bfb734d678c74bebfe65ced1c605fadcdd1b\",\"dweb:/ipfs/QmcUcembELX3Zou1aCzoQETcRauNjnyf2tQ8aTpqwVXE8f\"]},\"project:/contracts/interfaces/Bond.sol\":{\"keccak256\":\"0x6167b8680d8ee3280a6a2c64e4510dcdcba9aa7725c00e129c2c35a13b06f3cb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0f846c51351b3fb890ae59d6f8253aa4c3fca9d7d86e335e96ea88412b536015\",\"dweb:/ipfs/QmRgGGCdmoWER1rSJ9pUj8oYXTu94JpeCAARveCqPV8iKN\"]},\"project:/contracts/interfaces/CometInterface.sol\":{\"keccak256\":\"0x60cfc062dc465fbcbcb7369d81415b05f5967ba0b27c407dec91804c7b03bc58\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://6d6b7b7e05010d5df7dcc9a76be6ed8d6e0af7f75810a933c10a068976b984be\",\"dweb:/ipfs/QmURqGK7LSvprsHV7zDH8m8CodfBnERochbnHx7UMc1qX4\"]},\"project:/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x2741fde0a32608044b0359d2f763bda7e9a477bbb379deea4cc80bb5f14a54c6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12f2355edddb83ecfbafe10b2802174c7450dfaf45cae2b1b25bcc546558938f\",\"dweb:/ipfs/QmfEHxiP7nppK4mVSP431DzGPqLfqNUf5krHVgWEJXamPu\"]},\"project:/contracts/interfaces/VerifiedMarketsInterface.sol\":{\"keccak256\":\"0x99bddc19a48dbe612bbbe626063b600de72993efc523d13918d2c5c9d29923b6\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://ede56288c75954d9260fb1f406d96bd44670081eab0fd5e765a9db82069857a6\",\"dweb:/ipfs/QmSzVA6WxzcDDsHB9XzRE1SqrroMYoDCYtCWEUMwMutx8A\"]}},\"version\":1}", "bytecode": "0x60a060405234801561001057600080fd5b506040516117bd3803806117bd83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516116e66100d76000396000818160af0152818161050d015281816105a70152818161067201528181610717015281816108400152818161096e01528181610a4101528181610adb01528181610cdd01528181610dc60152610f3601526116e66000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063100bf6eb1461005c5780632511e8a01461007157806359a8ab5814610084578063a4bcec5914610097578063ba3e9c12146100aa575b600080fd5b61006f61006a366004611082565b6100ed565b005b61006f61007f36600461114e565b610432565b61006f61009236600461114e565b610959565b61006f6100a536600461117a565b610bca565b6100d17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6001600160a01b0385161580159061010d57506001600160a01b03841615155b801561012b5750846001600160a01b0316846001600160a01b031614155b80156101375750600083115b80156101435750600081115b6101945760405162461bcd60e51b815260206004820181905260248201527f525741207375626d697373696f6e203a20496e76616c6964207265717565737460448201526064015b60405180910390fd5b336001600160a01b0316846001600160a01b031663525564216040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020091906111cb565b6001600160a01b0316146102565760405162461bcd60e51b815260206004820152601f60248201527f525741207375626d697373696f6e203a20496e76616c69642069737375657200604482015260640161018b565b336000908152602081815260408083206001600160a01b0389811685529252909120541661030757604080516080810182526001600160a01b0386811682526020808301878152838501878152606085018790523360009081528084528681208c8616825290935294909120835181546001600160a01b031916931692909217825551600182015591519091829160028201906102f39082611278565b5060608201518160030155905050506103da565b336000908152602081815260408083206001600160a01b03898116855292529091205481169085161461037c5760405162461bcd60e51b815260206004820152601d60248201527f525741207375626d697373696f6e203a20496e76616c696420626f6e64000000604482015260640161018b565b336000908152602081815260408083206001600160a01b03891684529091529020600181018490556002016103b18382611278565b50336000908152602081815260408083206001600160a01b038916845290915290206003018190555b846001600160a01b0316336001600160a01b03167f7c0346ec0308e754879b9eb61355f12e6d4469883179fb5774ad1c3d9a7313d086868686604051610423949392919061135c565b60405180910390a35050505050565b6001600160a01b0382161580159061044a5750600081115b6104965760405162461bcd60e51b815260206004820152601760248201527f5265706179696e672062617365203a20496e76616c6964000000000000000000604482015260640161018b565b3360009081526001602090815260408083206001600160a01b03868116855292529091205416806105095760405162461bcd60e51b815260206004820152601d60248201527f5265706179696e672062617365203a20496e76616c6964206173736574000000604482015260640161018b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c55dae636040518163ffffffff1660e01b8152600401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d91906111cb565b604051639032317760e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906390323177906105e29033908190869089906004016113ad565b600060405180830381600087803b1580156105fc57600080fd5b505af1158015610610573d6000803e3d6000fd5b50503360009081526001602090815260408083206001600160a01b038a1684529091528120600201805487945090925061064b9084906113ed565b9091555050604051631d9df61760e11b81526001600160a01b0383811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690633b3bec2e9060240161010060405180830381865afa1580156106bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e0919061144f565b90506000670de0b6b3a764000085836080015167ffffffffffffffff166107079190611519565b6107119190611538565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166344c1e5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610773573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610797919061155a565b905060008590506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108029190611573565b905060008361081283600a611672565b61081c9087611519565b6108269190611538565b6040516304c8826360e31b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063264413189061087b90339081908d9087906004016113ad565b600060405180830381600087803b15801561089557600080fd5b505af11580156108a9573d6000803e3d6000fd5b505050508060016000336001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020600101600082825461090891906113ed565b90915550506040518981526001600160a01b0388169033907f0a3fbbea70e93f2daafa3102f5c9a1b8315e6d7a1e43e4bc020bc1162327470a9060200160405180910390a350505050505050505050565b6001600160a01b038216158015906109f157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663300e6beb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ee919061155a565b81115b610a3d5760405162461bcd60e51b815260206004820152601860248201527f426f72726f77696e672062617365203a20496e76616c69640000000000000000604482015260640161018b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c55dae636040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac191906111cb565b6040516304c8826360e31b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632644131890610b169033908190869088906004016113ad565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50503360009081526001602090815260408083206001600160a01b038916845290915281206002018054869450909250610b7f908490611681565b90915550506040518281526001600160a01b0382169033907f3fc499aeb0bb1cb58b6de8b02b3f86f4e7394e9690bef0110e32ced8a5631045906020015b60405180910390a3505050565b6001600160a01b03831615801590610bea57506001600160a01b03821615155b8015610c085750826001600160a01b0316826001600160a01b031614155b8015610c145750600081115b610c605760405162461bcd60e51b815260206004820152601b60248201527f506f7374696e6720436f6c6c61746572616c3a20496e76616c69640000000000604482015260640161018b565b3360009081526001602090815260408083206001600160a01b03878116855292529091205416610e9c576040516001600160a01b038316602482015260009060440160408051601f198184030181529181526020820180516001600160e01b0316631d9df61760e11b179052519091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690610d09908490611694565b600060405180830381855afa9150503d8060008114610d44576040519150601f19603f3d011682016040523d82523d6000602084013e610d49565b606091505b5050905080610daf5760405162461bcd60e51b815260206004820152602c60248201527f506f7374696e6720436f6c6c61746572616c3a20496e76616c696420636f6c6c60448201526b185d195c985b0818d85b1b1b60a21b606482015260840161018b565b604051639032317760e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639032317790610e019033908190899089906004016113ad565b600060405180830381600087803b158015610e1b57600080fd5b505af1158015610e2f573d6000803e3d6000fd5b5050604080516060810182526001600160a01b0388811682526020808301898152600084860181815233825260018085528783208f87168452909452959020935184546001600160a01b0319169316929092178355905190820155905160029091015550610fde92505050565b3360009081526001602090815260408083206001600160a01b038781168552925290912054811690831614610f1f5760405162461bcd60e51b815260206004820152602360248201527f506f737420436f6c6c61746572616c3a20496e76616c696420636f6c6c6174656044820152621c985b60ea1b606482015260840161018b565b604051639032317760e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639032317790610f719033908190879087906004016113ad565b600060405180830381600087803b158015610f8b57600080fd5b505af1158015610f9f573d6000803e3d6000fd5b50503360009081526001602081815260408084206001600160a01b038a1685529091528220018054859450909250610fd8908490611681565b90915550505b604080516001600160a01b0384811682526020820184905285169133917f6d9c01d2a1bfe391d97dad0c8485ad9eb8603cf2404ea70f733fe47b186a0f519101610bbd565b6001600160a01b038116811461103857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561107a5761107a61103b565b604052919050565b600080600080600060a0868803121561109a57600080fd5b85356110a581611023565b94506020868101356110b681611023565b945060408701359350606087013567ffffffffffffffff808211156110da57600080fd5b818901915089601f8301126110ee57600080fd5b8135818111156111005761110061103b565b611112601f8201601f19168501611051565b91508082528a8482850101111561112857600080fd5b808484018584013760009082019093019290925250949793965091946080013592915050565b6000806040838503121561116157600080fd5b823561116c81611023565b946020939093013593505050565b60008060006060848603121561118f57600080fd5b833561119a81611023565b925060208401356111aa81611023565b929592945050506040919091013590565b80516111c681611023565b919050565b6000602082840312156111dd57600080fd5b81516111e881611023565b9392505050565b600181811c9082168061120357607f821691505b60208210810361122357634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561127357600081815260208120601f850160051c810160208610156112505750805b601f850160051c820191505b8181101561126f5782815560010161125c565b5050505b505050565b815167ffffffffffffffff8111156112925761129261103b565b6112a6816112a084546111ef565b84611229565b602080601f8311600181146112db57600084156112c35750858301515b600019600386901b1c1916600185901b17855561126f565b600085815260208120601f198616915b8281101561130a578886015182559484019460019091019084016112eb565b50858210156113285787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60005b8381101561135357818101518382015260200161133b565b50506000910152565b60018060a01b0385168152836020820152608060408201526000835180608084015261138f8160a0850160208801611338565b606083019390935250601f91909101601f19160160a0019392505050565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611400576114006113d7565b92915050565b805160ff811681146111c657600080fd5b805167ffffffffffffffff811681146111c657600080fd5b80516fffffffffffffffffffffffffffffffff811681146111c657600080fd5b600061010080838503121561146357600080fd5b6040519081019067ffffffffffffffff821181831017156114865761148661103b565b8160405261149384611406565b8152602084015191506114a582611023565b8160208201526114b7604085016111bb565b60408201526114c860608501611417565b60608201526114d960808501611417565b60808201526114ea60a08501611417565b60a08201526114fb60c08501611417565b60c082015261150c60e0850161142f565b60e0820152949350505050565b6000816000190483118215151615611533576115336113d7565b500290565b60008261155557634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561156c57600080fd5b5051919050565b60006020828403121561158557600080fd5b6111e882611406565b600181815b808511156115c95781600019048211156115af576115af6113d7565b808516156115bc57918102915b93841c9390800290611593565b509250929050565b6000826115e057506001611400565b816115ed57506000611400565b8160018114611603576002811461160d57611629565b6001915050611400565b60ff84111561161e5761161e6113d7565b50506001821b611400565b5060208310610133831016604e8410600b841016171561164c575081810a611400565b611656838361158e565b806000190482111561166a5761166a6113d7565b029392505050565b60006111e860ff8416836115d1565b80820180821115611400576114006113d7565b600082516116a6818460208701611338565b919091019291505056fea26469706673582212207a14fc968a6c80d62d28c25712dd992ff63d7b1bdc6f988e5061161521812d0264736f6c63430008100033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063100bf6eb1461005c5780632511e8a01461007157806359a8ab5814610084578063a4bcec5914610097578063ba3e9c12146100aa575b600080fd5b61006f61006a366004611082565b6100ed565b005b61006f61007f36600461114e565b610432565b61006f61009236600461114e565b610959565b61006f6100a536600461117a565b610bca565b6100d17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6001600160a01b0385161580159061010d57506001600160a01b03841615155b801561012b5750846001600160a01b0316846001600160a01b031614155b80156101375750600083115b80156101435750600081115b6101945760405162461bcd60e51b815260206004820181905260248201527f525741207375626d697373696f6e203a20496e76616c6964207265717565737460448201526064015b60405180910390fd5b336001600160a01b0316846001600160a01b031663525564216040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020091906111cb565b6001600160a01b0316146102565760405162461bcd60e51b815260206004820152601f60248201527f525741207375626d697373696f6e203a20496e76616c69642069737375657200604482015260640161018b565b336000908152602081815260408083206001600160a01b0389811685529252909120541661030757604080516080810182526001600160a01b0386811682526020808301878152838501878152606085018790523360009081528084528681208c8616825290935294909120835181546001600160a01b031916931692909217825551600182015591519091829160028201906102f39082611278565b5060608201518160030155905050506103da565b336000908152602081815260408083206001600160a01b03898116855292529091205481169085161461037c5760405162461bcd60e51b815260206004820152601d60248201527f525741207375626d697373696f6e203a20496e76616c696420626f6e64000000604482015260640161018b565b336000908152602081815260408083206001600160a01b03891684529091529020600181018490556002016103b18382611278565b50336000908152602081815260408083206001600160a01b038916845290915290206003018190555b846001600160a01b0316336001600160a01b03167f7c0346ec0308e754879b9eb61355f12e6d4469883179fb5774ad1c3d9a7313d086868686604051610423949392919061135c565b60405180910390a35050505050565b6001600160a01b0382161580159061044a5750600081115b6104965760405162461bcd60e51b815260206004820152601760248201527f5265706179696e672062617365203a20496e76616c6964000000000000000000604482015260640161018b565b3360009081526001602090815260408083206001600160a01b03868116855292529091205416806105095760405162461bcd60e51b815260206004820152601d60248201527f5265706179696e672062617365203a20496e76616c6964206173736574000000604482015260640161018b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c55dae636040518163ffffffff1660e01b8152600401602060405180830381865afa158015610569573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058d91906111cb565b604051639032317760e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906390323177906105e29033908190869089906004016113ad565b600060405180830381600087803b1580156105fc57600080fd5b505af1158015610610573d6000803e3d6000fd5b50503360009081526001602090815260408083206001600160a01b038a1684529091528120600201805487945090925061064b9084906113ed565b9091555050604051631d9df61760e11b81526001600160a01b0383811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690633b3bec2e9060240161010060405180830381865afa1580156106bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e0919061144f565b90506000670de0b6b3a764000085836080015167ffffffffffffffff166107079190611519565b6107119190611538565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166344c1e5eb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610773573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610797919061155a565b905060008590506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108029190611573565b905060008361081283600a611672565b61081c9087611519565b6108269190611538565b6040516304c8826360e31b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063264413189061087b90339081908d9087906004016113ad565b600060405180830381600087803b15801561089557600080fd5b505af11580156108a9573d6000803e3d6000fd5b505050508060016000336001600160a01b03166001600160a01b0316815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020600101600082825461090891906113ed565b90915550506040518981526001600160a01b0388169033907f0a3fbbea70e93f2daafa3102f5c9a1b8315e6d7a1e43e4bc020bc1162327470a9060200160405180910390a350505050505050505050565b6001600160a01b038216158015906109f157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663300e6beb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ee919061155a565b81115b610a3d5760405162461bcd60e51b815260206004820152601860248201527f426f72726f77696e672062617365203a20496e76616c69640000000000000000604482015260640161018b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c55dae636040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac191906111cb565b6040516304c8826360e31b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632644131890610b169033908190869088906004016113ad565b600060405180830381600087803b158015610b3057600080fd5b505af1158015610b44573d6000803e3d6000fd5b50503360009081526001602090815260408083206001600160a01b038916845290915281206002018054869450909250610b7f908490611681565b90915550506040518281526001600160a01b0382169033907f3fc499aeb0bb1cb58b6de8b02b3f86f4e7394e9690bef0110e32ced8a5631045906020015b60405180910390a3505050565b6001600160a01b03831615801590610bea57506001600160a01b03821615155b8015610c085750826001600160a01b0316826001600160a01b031614155b8015610c145750600081115b610c605760405162461bcd60e51b815260206004820152601b60248201527f506f7374696e6720436f6c6c61746572616c3a20496e76616c69640000000000604482015260640161018b565b3360009081526001602090815260408083206001600160a01b03878116855292529091205416610e9c576040516001600160a01b038316602482015260009060440160408051601f198184030181529181526020820180516001600160e01b0316631d9df61760e11b179052519091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690610d09908490611694565b600060405180830381855afa9150503d8060008114610d44576040519150601f19603f3d011682016040523d82523d6000602084013e610d49565b606091505b5050905080610daf5760405162461bcd60e51b815260206004820152602c60248201527f506f7374696e6720436f6c6c61746572616c3a20496e76616c696420636f6c6c60448201526b185d195c985b0818d85b1b1b60a21b606482015260840161018b565b604051639032317760e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639032317790610e019033908190899089906004016113ad565b600060405180830381600087803b158015610e1b57600080fd5b505af1158015610e2f573d6000803e3d6000fd5b5050604080516060810182526001600160a01b0388811682526020808301898152600084860181815233825260018085528783208f87168452909452959020935184546001600160a01b0319169316929092178355905190820155905160029091015550610fde92505050565b3360009081526001602090815260408083206001600160a01b038781168552925290912054811690831614610f1f5760405162461bcd60e51b815260206004820152602360248201527f506f737420436f6c6c61746572616c3a20496e76616c696420636f6c6c6174656044820152621c985b60ea1b606482015260840161018b565b604051639032317760e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639032317790610f719033908190879087906004016113ad565b600060405180830381600087803b158015610f8b57600080fd5b505af1158015610f9f573d6000803e3d6000fd5b50503360009081526001602081815260408084206001600160a01b038a1685529091528220018054859450909250610fd8908490611681565b90915550505b604080516001600160a01b0384811682526020820184905285169133917f6d9c01d2a1bfe391d97dad0c8485ad9eb8603cf2404ea70f733fe47b186a0f519101610bbd565b6001600160a01b038116811461103857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561107a5761107a61103b565b604052919050565b600080600080600060a0868803121561109a57600080fd5b85356110a581611023565b94506020868101356110b681611023565b945060408701359350606087013567ffffffffffffffff808211156110da57600080fd5b818901915089601f8301126110ee57600080fd5b8135818111156111005761110061103b565b611112601f8201601f19168501611051565b91508082528a8482850101111561112857600080fd5b808484018584013760009082019093019290925250949793965091946080013592915050565b6000806040838503121561116157600080fd5b823561116c81611023565b946020939093013593505050565b60008060006060848603121561118f57600080fd5b833561119a81611023565b925060208401356111aa81611023565b929592945050506040919091013590565b80516111c681611023565b919050565b6000602082840312156111dd57600080fd5b81516111e881611023565b9392505050565b600181811c9082168061120357607f821691505b60208210810361122357634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561127357600081815260208120601f850160051c810160208610156112505750805b601f850160051c820191505b8181101561126f5782815560010161125c565b5050505b505050565b815167ffffffffffffffff8111156112925761129261103b565b6112a6816112a084546111ef565b84611229565b602080601f8311600181146112db57600084156112c35750858301515b600019600386901b1c1916600185901b17855561126f565b600085815260208120601f198616915b8281101561130a578886015182559484019460019091019084016112eb565b50858210156113285787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60005b8381101561135357818101518382015260200161133b565b50506000910152565b60018060a01b0385168152836020820152608060408201526000835180608084015261138f8160a0850160208801611338565b606083019390935250601f91909101601f19160160a0019392505050565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611400576114006113d7565b92915050565b805160ff811681146111c657600080fd5b805167ffffffffffffffff811681146111c657600080fd5b80516fffffffffffffffffffffffffffffffff811681146111c657600080fd5b600061010080838503121561146357600080fd5b6040519081019067ffffffffffffffff821181831017156114865761148661103b565b8160405261149384611406565b8152602084015191506114a582611023565b8160208201526114b7604085016111bb565b60408201526114c860608501611417565b60608201526114d960808501611417565b60808201526114ea60a08501611417565b60a08201526114fb60c08501611417565b60c082015261150c60e0850161142f565b60e0820152949350505050565b6000816000190483118215151615611533576115336113d7565b500290565b60008261155557634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561156c57600080fd5b5051919050565b60006020828403121561158557600080fd5b6111e882611406565b600181815b808511156115c95781600019048211156115af576115af6113d7565b808516156115bc57918102915b93841c9390800290611593565b509250929050565b6000826115e057506001611400565b816115ed57506000611400565b8160018114611603576002811461160d57611629565b6001915050611400565b60ff84111561161e5761161e6113d7565b50506001821b611400565b5060208310610133831016604e8410600b841016171561164c575081810a611400565b611656838361158e565b806000190482111561166a5761166a6113d7565b029392505050565b60006111e860ff8416836115d1565b80820180821115611400576114006113d7565b600082516116a6818460208701611338565b919091019291505056fea26469706673582212207a14fc968a6c80d62d28c25712dd992ff63d7b1bdc6f988e5061161521812d0264736f6c63430008100033", "immutableReferences": { "10": [ { "length": 32, "start": 175 }, { "length": 32, "start": 1293 }, { "length": 32, "start": 1447 }, { "length": 32, "start": 1650 }, { "length": 32, "start": 1815 }, { "length": 32, "start": 2112 }, { "length": 32, "start": 2414 }, { "length": 32, "start": 2625 }, { "length": 32, "start": 2779 }, { "length": 32, "start": 3293 }, { "length": 32, "start": 3526 }, { "length": 32, "start": 3894 } ] }, "generatedSources": [ { "ast": { "nodeType": "YulBlock", "src": "0:306:5", "statements": [ { "nodeType": "YulBlock", "src": "6:3:5", "statements": [] }, { "body": { "nodeType": "YulBlock", "src": "95:209:5", "statements": [ { "body": { "nodeType": "YulBlock", "src": "141:16:5", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "150:1:5", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "153:1:5", "type": "", "value": "0" } ], "functionName": { "name": "revert", "nodeType": "YulIdentifier", "src": "143:6:5" }, "nodeType": "YulFunctionCall", "src": "143:12:5" }, "nodeType": "YulExpressionStatement", "src": "143:12:5" } ] }, "condition": { "arguments": [ { "arguments": [ { "name": "dataEnd", "nodeType": "YulIdentifier", "src": "116:7:5" }, { "name": "headStart", "nodeType": "YulIdentifier", "src": "125:9:5" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "112:3:5" }, "nodeType": "YulFunctionCall", "src": "112:23:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "137:2:5", "type": "", "value": "32" } ], "functionName": { "name": "slt", "nodeType": "YulIdentifier", "src": "108:3:5" }, "nodeType": "YulFunctionCall", "src": "108:32:5" }, "nodeType": "YulIf", "src": "105:52:5" }, { "nodeType": "YulVariableDeclaration", "src": "166:29:5", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "185:9:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "179:5:5" }, "nodeType": "YulFunctionCall", "src": "179:16:5" }, "variables": [ { "name": "value", "nodeType": "YulTypedName", "src": "170:5:5", "type": "" } ] }, { "body": { "nodeType": "YulBlock", "src": "258:16:5", "statements": [ { "expression": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "267:1:5", "type": "", "value": "0" }, { "kind": "number", "nodeType": "YulLiteral", "src": "270:1:5", "type": "", "value": "0" } ], "functionName": { "name": "revert", "nodeType": "YulIdentifier", "src": "260:6:5" }, "nodeType": "YulFunctionCall", "src": "260:12:5" }, "nodeType": "YulExpressionStatement", "src": "260:12:5" } ] }, "condition": { "arguments": [ { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "217:5:5" }, { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "228:5:5" }, { "arguments": [