[ { "inputs": [], "name": "InvalidLength", "type": "error" }, { "inputs": [], "name": "InvalidOwner", "type": "error" }, { "inputs": [], "name": "InvalidToken", "type": "error" }, { "inputs": [], "name": "InvalidWeight", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "approved", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_fromTokenId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_toTokenId", "type": "uint256" } ], "name": "BatchMetadataUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "bts", "type": "address" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "ContributedToBTS", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_tokenId", "type": "uint256" } ], "name": "MetadataUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "bts", "type": "address" }, { "indexed": false, "internalType": "address[]", "name": "tokens", "type": "address[]" }, { "indexed": false, "internalType": "uint256[]", "name": "oldWeights", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "newWeights", "type": "uint256[]" } ], "name": "RebalanceBTS", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "_autoRebalanceEnabled", "type": "bool" } ], "name": "UpdatedAutoRebalanceEnabled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "lowerLimit", "type": "uint256" } ], "name": "UpdatedLowerLimit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "upperLimit", "type": "uint256" } ], "name": "UpdatedUpperLimit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "bts", "type": "address" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "WithdrawnETHFromBTS", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "bts", "type": "address" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "address[]", "name": "tokens", "type": "address[]" }, { "indexed": false, "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" } ], "name": "WithdrawnFromBTS", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "approve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "autoRebalanceEnabled", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "btsPair", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_slippage", "type": "uint256" } ], "name": "contribute", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_newTokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "_newWeights", "type": "uint256[]" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" } ], "name": "emergencyStable", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getApproved", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_index", "type": "uint256" } ], "name": "getTokenDetails", "outputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "weight", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "_name", "type": "string" }, { "internalType": "string", "name": "_symbol", "type": "string" }, { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "address", "name": "_factory", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "_weights", "type": "uint256[]" }, { "internalType": "address", "name": "_btsPair", "type": "address" }, { "internalType": "string", "name": "_tokenURI", "type": "string" }, { "internalType": "bool", "name": "_enableAutoRebalance", "type": "bool" }, { "internalType": "string", "name": "_description", "type": "string" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lowerLimit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "_newTokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "_newWeights", "type": "uint256[]" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" } ], "name": "rebalance", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "tokenURI", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalTokens", "outputs": [ { "internalType": "uint256", "name": "tokenLength", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "_autoRebalanceEnabled", "type": "bool" } ], "name": "updateAutoRebalanceEnabled", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_lowerLimit", "type": "uint256" } ], "name": "updateLowerLimit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_upperLimit", "type": "uint256" } ], "name": "updateUpperLimit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "upperLimit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_liquidity", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_liquidity", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" } ], "name": "withdrawWETH", "outputs": [ { "internalType": "uint256", "name": "swappedAmount", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" } ]
608060405234801561001057600080fd5b50613bfa806100206000396000f3fe6080604052600436106101cd5760003560e01c806383c11707116100f7578063b88d4fde11610095578063c1e0372811610064578063c1e03728146104e7578063c45a015514610526578063c87b56dd14610546578063e985e9c51461056657600080fd5b8063b88d4fde14610474578063b892c4b314610494578063baa888b3146104b4578063c1cbbca7146104d457600080fd5b80639731d9f6116100d15780639731d9f61461040a578063a22cb46514610420578063a5ac4dd114610440578063b15179321461046157600080fd5b806383c11707146103b55780638da5cb5b146103d557806395d89b41146103f557600080fd5b80632e1a7d4d1161016f5780635c1bb9ff1161013e5780635c1bb9ff1461034d5780636352211e1461036057806370a08231146103805780637e1c0c09146103a057600080fd5b80632e1a7d4d146102d65780633288b83d146102f657806338392c401461030957806342842e0e1461032d57600080fd5b806306fdde03116101ab57806306fdde031461023c578063081812fc1461025e578063095ea7b31461029657806323b872dd146102b657600080fd5b806301dfd072146101d257806301ffc9a7146101e757806306fd38661461021c575b600080fd5b6101e56101e0366004613144565b6105af565b005b3480156101f357600080fd5b506102076102023660046131c7565b610629565b60405190151581526020015b60405180910390f35b34801561022857600080fd5b506101e5610237366004613275565b610654565b34801561024857600080fd5b50610251610865565b6040516102139190613408565b34801561026a57600080fd5b5061027e61027936600461341b565b6108f7565b6040516001600160a01b039091168152602001610213565b3480156102a257600080fd5b506101e56102b1366004613434565b61091e565b3480156102c257600080fd5b506101e56102d1366004613460565b610a2f565b3480156102e257600080fd5b506101e56102f136600461341b565b610a60565b6101e561030436600461341b565b610ab5565b34801561031557600080fd5b5061031f60cd5481565b604051908152602001610213565b34801561033957600080fd5b506101e5610348366004613460565b610b1a565b6101e561035b36600461341b565b610b35565b34801561036c57600080fd5b5061027e61037b36600461341b565b610b9a565b34801561038c57600080fd5b5061031f61039b3660046134a1565b610bfa565b3480156103ac57600080fd5b5060d15461031f565b3480156103c157600080fd5b5061031f6103d03660046134be565b610c80565b3480156103e157600080fd5b5060cb5461027e906001600160a01b031681565b34801561040157600080fd5b50610251610d9a565b34801561041657600080fd5b5061031f60ce5481565b34801561042c57600080fd5b506101e561043b3660046134e0565b610da9565b34801561044c57600080fd5b5060cc5461020790600160a01b900460ff1681565b6101e561046f366004613144565b610db8565b34801561048057600080fd5b506101e561048f366004613519565b610e24565b3480156104a057600080fd5b506101e56104af366004613599565b610e5c565b3480156104c057600080fd5b5060ca5461027e906001600160a01b031681565b6101e56104e236600461341b565b610ee6565b3480156104f357600080fd5b5061050761050236600461341b565b61113c565b604080516001600160a01b039093168352602083019190915201610213565b34801561053257600080fd5b5060cc5461027e906001600160a01b031681565b34801561055257600080fd5b5061025161056136600461341b565b611195565b34801561057257600080fd5b506102076105813660046135b6565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b336105ba6000610b9a565b6001600160a01b0316146105e1576040516349e27cff60e01b815260040160405180910390fd5b6000811180156105f2575061138881105b6106175760405162461bcd60e51b815260040161060e906135e4565b60405180910390fd5b61062483838360006112a6565b505050565b60006001600160e01b03198216632483248360e11b148061064e575061064e826116a8565b92915050565b855185518082146106785760405163251f56a160e21b815260040160405180910390fd5b600054610100900460ff16158080156106985750600054600160ff909116105b806106b25750303b1580156106b2575060005460ff166001145b6107155760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161060e565b6000805460ff191660011790558015610738576000805461ff0019166101001790555b6107428d8d6116f8565b60cb80546001600160a01b03808e166001600160a01b03199283161790925560cc8054928d169290911691909117905561077c8989611729565b60ca80546001600160a01b0319166001600160a01b03891617905588516107aa9060d19060208c0190612ec1565b5087516107be9060d29060208b0190612f22565b5060cc805460ff60a01b1916600160a01b871515021790554260c95583516107ed9060cf906020870190612f5d565b5061290460cd5561251c60ce556108058b6000611a1c565b610810600087611ba7565b8015610856576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b6060606580546108749061361b565b80601f01602080910402602001604051908101604052809291908181526020018280546108a09061361b565b80156108ed5780601f106108c2576101008083540402835291602001916108ed565b820191906000526020600020905b8154815290600101906020018083116108d057829003601f168201915b5050505050905090565b600061090282611c79565b506000908152606960205260409020546001600160a01b031690565b600061092982610b9a565b9050806001600160a01b0316836001600160a01b031614156109975760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161060e565b336001600160a01b03821614806109b357506109b38133610581565b610a255760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161060e565b6106248383611cd8565b610a393382611d46565b610a555760405162461bcd60e51b815260040161060e90613656565b610624838383611dc4565b7fa5adb08498508ba672168a2404308bf2b0c19a2e91b553309ac80f47a222fdd6303360d1610a8f8583611f28565b604051610a9f949392919061371c565b60405180910390a1610ab2611194612040565b50565b33610ac06000610b9a565b6001600160a01b031614610ae7576040516349e27cff60e01b815260040160405180910390fd5b60ce81905560405181907fb126c9ec522693b1455d58f5fb96de100b9dffec36a53b16028d0517f404561890600090a250565b61062483838360405180602001604052806000815250610e24565b33610b406000610b9a565b6001600160a01b031614610b67576040516349e27cff60e01b815260040160405180910390fd5b60cd81905560405181907ff1bb5aa1c2d1d9514c4b1d9a5355be81fa99f3bef1c10068fd0f8d9e78aa928b90600090a250565b6000818152606760205260408120546001600160a01b03168061064e5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161060e565b60006001600160a01b038216610c645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161060e565b506001600160a01b031660009081526068602052604090205490565b60008082118015610c92575061138882105b610cae5760405162461bcd60e51b815260040161060e906135e4565b6000610cba8430611f28565b905060005b8151811015610d4957610d3560d16000018281548110610ce157610ce161375a565b9060005260206000200160009054906101000a90046001600160a01b0316737b79995e5f793a07bc00c21412e50ecae098e7f9848481518110610d2657610d2661375a565b60200260200101513388612139565b610d3f9084613786565b9250600101610cbf565b50610d5383612040565b604080513081523360208201529081018390527fc12ef08928e6f622169f25057ed91bf3461f4e675260bd1e51944f5d08dd611d9060600160405180910390a15092915050565b6060606680546108749061361b565b610db4338383612327565b5050565b33610dc36000610b9a565b6001600160a01b031614610dea576040516349e27cff60e01b815260040160405180910390fd5b600081118015610dfb575061138881105b610e175760405162461bcd60e51b815260040161060e906135e4565b61062483838360016112a6565b610e2e3383611d46565b610e4a5760405162461bcd60e51b815260040161060e90613656565b610e56848484846123f6565b50505050565b33610e676000610b9a565b6001600160a01b031614610e8e576040516349e27cff60e01b815260040160405180910390fd5b60cc8054821515600160a01b0260ff60a01b199091161790556040517fcf3b04e0fba81c5bdf76da3629b876710216158c4eb13807918ad2f44d4fa12990610edb90831515815260200190565b60405180910390a150565b600081118015610ef7575061138881105b610f135760405162461bcd60e51b815260040161060e906135e4565b60005b60d15481101561109657600061271060d16001018381548110610f3b57610f3b61375a565b906000526020600020015434610f51919061379e565b610f5b91906137bd565b90506000612710610f6c85826137df565b610fbd84610fb8737b79995e5f793a07bc00c21412e50ecae098e7f960d16000018981548110610f9e57610f9e61375a565b6000918252602090912001546001600160a01b0316612429565b6124b6565b610fc7919061379e565b610fd191906137bd565b905073c532a74256d3db42d0bf7a0400fefdbad76940086001600160a01b031663b6f9de958383611026737b79995e5f793a07bc00c21412e50ecae098e7f960d16000018981548110610f9e57610f9e61375a565b60ca546040516001600160e01b031960e087901b1681526110579392916001600160a01b031690429060040161382f565b6000604051808303818588803b15801561107057600080fd5b505af1158015611084573d6000803e3d6000fd5b50505050508260010192505050610f16565b5060ca546040516335313c2160e11b81523360048201526001600160a01b0390911690636a62784290602401600060405180830381600087803b1580156110dc57600080fd5b505af11580156110f0573d6000803e3d6000fd5b505050506110fd81612040565b6040805130815233602082015234918101919091527fb5e4876510a0189f92792685c610d37d563cd514d5789982152f48f0cef4645190606001610edb565b60008060d160000183815481106111555761115561375a565b60009182526020909120015460d280546001600160a01b03909216935090849081106111835761118361375a565b90600052602060002001549050915091565b60606111a082611c79565b600082815260976020526040812080546111b99061361b565b80601f01602080910402602001604051908101604052809291908181526020018280546111e59061361b565b80156112325780601f1061120757610100808354040283529160200191611232565b820191906000526020600020905b81548152906001019060200180831161121557829003601f168201915b50505050509050600061125060408051602081019091526000815290565b9050805160001415611263575092915050565b81511561129557808260405160200161127d929190613864565b60405160208183030381529060405292505050919050565b61129e84612568565b949350505050565b835183518082146112ca5760405163251f56a160e21b815260040160405180910390fd5b60005b60d15481101561133957600060d0600060d160000184815481106112f3576112f361375a565b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff19169115159190911790558061133181613893565b9150506112cd565b5082156113cb578551600114801561136c5750612710856000815181106113625761136261375a565b6020026020010151145b6113c65760405162461bcd60e51b815260206004820152602560248201527f4572726f723a20496e76616c696420776569676874206f72206172726179206c6044820152640cadccee8d60db1b606482015260840161060e565b6113d5565b6113d58686611729565b60ca60009054906101000a90046001600160a01b03166001600160a01b0316637d7c2a1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561142557600080fd5b505af1158015611439573d6000803e3d6000fd5b5060009250829150505b60d1548110156115485761153460d160000182815481106114665761146661375a565b60009182526020909120015460d180546001600160a01b0390921691737b79995e5f793a07bc00c21412e50ecae098e7f99190859081106114a9576114a961375a565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156114f557600080fd5b505afa158015611509573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152d91906138ae565b308a612139565b61153e9083613786565b9150600101611443565b5060005b86518110156115d4576115cb737b79995e5f793a07bc00c21412e50ecae098e7f989838151811061157f5761157f61375a565b60200260200101516127108a858151811061159c5761159c61375a565b6020026020010151866115af919061379e565b6115b991906137bd565b60ca546001600160a01b03168a612139565b5060010161154c565b506040517feaba4bf86590167154a3b347264daf7b045eeaaba356f0f9efa5c27de65d585d9061160d90309060d19060d2908b906138c7565b60405180910390a160ca546040516337905a4760e21b81526001600160a01b039091169063de41691c90611645908a90600401613944565b600060405180830381600087803b15801561165f57600080fd5b505af1158015611673573d6000803e3d6000fd5b5050885161168a925060d1915060208a0190612ec1565b50855161169e9060d2906020890190612f22565b5050505050505050565b60006001600160e01b031982166380ac58cd60e01b14806116d957506001600160e01b03198216635b5e139f60e01b145b8061064e57506301ffc9a760e01b6001600160e01b031983161461064e565b600054610100900460ff1661171f5760405162461bcd60e51b815260040161060e90613957565b610db482826125db565b600080805b84518110156119ee5760d0600086838151811061174d5761174d61375a565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615801561179b575083818151811061178e5761178e61375a565b6020026020010151600014155b156119cd5760cc60009054906101000a90046001600160a01b03166001600160a01b031663b28775cd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117ee57600080fd5b505afa158015611802573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182691906139a2565b6001600160a01b03168582815181106118415761184161375a565b60200260200101516001600160a01b0316141561194a576001915060cc60009054906101000a90046001600160a01b03166001600160a01b03166301c4aebe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118aa57600080fd5b505afa1580156118be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e291906138ae565b8482815181106118f4576118f461375a565b6020026020010151101561194a5760405162461bcd60e51b815260206004820152601a60248201527f414c5641204d757374204265204d696e696d756d204f66203525000000000000604482015260640161060e565b600160d060008784815181106119625761196261375a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508381815181106119b3576119b361375a565b6020026020010151836119c69190613786565b92506119e6565b60405163c1ab6dc160e01b815260040160405180910390fd5b60010161172e565b508015806119fe57506127108214155b15610e565760405163585b926360e01b815260040160405180910390fd5b6001600160a01b038216611a725760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161060e565b6000818152606760205260409020546001600160a01b031615611ad75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161060e565b6000818152606760205260409020546001600160a01b031615611b3c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161060e565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000828152606760205260409020546001600160a01b0316611c225760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b606482015260840161060e565b60008281526097602090815260409091208251611c4192840190612f5d565b506040518281527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15050565b6000818152606760205260409020546001600160a01b0316610ab25760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161060e565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d0d82610b9a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d5283610b9a565b9050806001600160a01b0316846001600160a01b03161480611d9957506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b8061129e5750836001600160a01b0316611db2846108f7565b6001600160a01b031614949350505050565b826001600160a01b0316611dd782610b9a565b6001600160a01b031614611dfd5760405162461bcd60e51b815260040161060e906139bf565b6001600160a01b038216611e5f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161060e565b826001600160a01b0316611e7282610b9a565b6001600160a01b031614611e985760405162461bcd60e51b815260040161060e906139bf565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60ca546040516323b872dd60e01b81523360048201526001600160a01b0390911660248201819052604482018490526060916323b872dd90606401602060405180830381600087803b158015611f7d57600080fd5b505af1158015611f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb59190613a04565b5060ca5460405163226bf2d160e21b81526001600160a01b038481166004830152909116906389afcb4490602401600060405180830381600087803b158015611ffd57600080fd5b505af1158015612011573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120399190810190613a21565b9392505050565b60cc54600160a01b900460ff168015612068575060c9546120649062278d00613786565b4210155b15610ab257612075612629565b156121325761213260d16000018054806020026020016040519081016040528092919081815260200182805480156120d657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116120b8575b505060d28054604080516020808402820181019092528281529550919350915083018282801561212557602002820191906000526020600020905b815481526020019060010190808311612111575b50505050508360006112a6565b4260c95550565b60006121636001600160a01b03871673c532a74256d3db42d0bf7a0400fefdbad7694008866127f5565b600061216f8787612429565b9050600061271061218085826137df565b61218a88856124b6565b612194919061379e565b61219e91906137bd565b6040516370a0823160e01b81526001600160a01b0387811660048301529192506000918916906370a082319060240160206040518083038186803b1580156121e557600080fd5b505afa1580156121f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061221d91906138ae565b604051635c11d79560e01b815290915073c532a74256d3db42d0bf7a0400fefdbad769400890635c11d7959061225f908a90869088908c904290600401613aa7565b600060405180830381600087803b15801561227957600080fd5b505af115801561228d573d6000803e3d6000fd5b50506040516370a0823160e01b81526001600160a01b038981166004830152600093508b1691506370a082319060240160206040518083038186803b1580156122d557600080fd5b505afa1580156122e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230d91906138ae565b905061231982826137df565b9a9950505050505050505050565b816001600160a01b0316836001600160a01b031614156123895760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161060e565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612401848484611dc4565b61240d8484848461293b565b610e565760405162461bcd60e51b815260040161060e90613ae3565b6040805160028082526060808301845292600092919060208301908036833701905050905083816000815181106124625761246261375a565b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106124965761249661375a565b6001600160a01b0390921660209283029190910190910152905092915050565b60405163d06ca61f60e01b815260009073c532a74256d3db42d0bf7a0400fefdbad76940089063d06ca61f906124f29086908690600401613b35565b60006040518083038186803b15801561250a57600080fd5b505afa15801561251e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125469190810190613a21565b6001815181106125585761255861375a565b6020026020010151905092915050565b606061257382611c79565b600061258a60408051602081019091526000815290565b905060008151116125aa5760405180602001604052806000815250612039565b806125b484612a48565b6040516020016125c5929190613864565b6040516020818303038152906040529392505050565b600054610100900460ff166126025760405162461bcd60e51b815260040161060e90613957565b8151612615906065906020850190612f5d565b508051610624906066906020840190612f5d565b600080612634612ae5565b9050600061271060cd54670de0b6b3a7640000612651919061379e565b61265b91906137bd565b9050600061271060ce54670de0b6b3a7640000612678919061379e565b61268291906137bd565b905060005b60d2548110156127ee57600061271060d160010183815481106126ac576126ac61375a565b9060005260206000200154866126c2919061379e565b6126cc91906137bd565b9050600061270282610fb8737b79995e5f793a07bc00c21412e50ecae098e7f960d16000018781548110610f9e57610f9e61375a565b9050600060d1600001848154811061271c5761271c61375a565b60009182526020909120015460ca546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a082319060240160206040518083038186803b15801561276c57600080fd5b505afa158015612780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a491906138ae565b6127b683670de0b6b3a764000061379e565b6127c091906137bd565b9050858111806127cf57508481105b156127e057600197505050506127ee565b836001019350505050612687565b5050505090565b80158061287e5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561284457600080fd5b505afa158015612858573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061287c91906138ae565b155b6128e95760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161060e565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610624908490612bf4565b60006001600160a01b0384163b15612a3d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061297f903390899088908890600401613b4e565b602060405180830381600087803b15801561299957600080fd5b505af19250505080156129c9575060408051601f3d908101601f191682019092526129c691810190613b8b565b60015b612a23573d8080156129f7576040519150601f19603f3d011682016040523d82523d6000602084013e6129fc565b606091505b508051612a1b5760405162461bcd60e51b815260040161060e90613ae3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061129e565b506001949350505050565b60606000612a5583612cc9565b600101905060008167ffffffffffffffff811115612a7557612a75612fe5565b6040519080825280601f01601f191660200182016040528015612a9f576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612ad857612add565b612aa9565b509392505050565b6000805b60d154811015612bf057612bdc60d16000018281548110612b0c57612b0c61375a565b60009182526020909120015460ca546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a082319060240160206040518083038186803b158015612b5c57600080fd5b505afa158015612b70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9491906138ae565b610fb860d16000018481548110612bad57612bad61375a565b6000918252602090912001546001600160a01b0316737b79995e5f793a07bc00c21412e50ecae098e7f9612429565b612be69083613786565b9150600101612ae9565b5090565b6000612c49826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612da19092919063ffffffff16565b9050805160001480612c6a575080806020019051810190612c6a9190613a04565b6106245760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161060e565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612d085772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612d34576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612d5257662386f26fc10000830492506010015b6305f5e1008310612d6a576305f5e100830492506008015b6127108310612d7e57612710830492506004015b60648310612d90576064830492506002015b600a831061064e5760010192915050565b606061129e848460008585600080866001600160a01b03168587604051612dc89190613ba8565b60006040518083038185875af1925050503d8060008114612e05576040519150601f19603f3d011682016040523d82523d6000602084013e612e0a565b606091505b5091509150612e1b87838387612e26565b979650505050505050565b60608315612e92578251612e8b576001600160a01b0385163b612e8b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161060e565b508161129e565b61129e8383815115612ea75781518083602001fd5b8060405162461bcd60e51b815260040161060e9190613408565b828054828255906000526020600020908101928215612f16579160200282015b82811115612f1657825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612ee1565b50612bf0929150612fd0565b828054828255906000526020600020908101928215612f16579160200282015b82811115612f16578251825591602001919060010190612f42565b828054612f699061361b565b90600052602060002090601f016020900481019282612f8b5760008555612f16565b82601f10612fa457805160ff1916838001178555612f16565b82800160010185558215612f165791820182811115612f16578251825591602001919060010190612f42565b5b80821115612bf05760008155600101612fd1565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561302457613024612fe5565b604052919050565b600067ffffffffffffffff82111561304657613046612fe5565b5060051b60200190565b6001600160a01b0381168114610ab257600080fd5b803561307081613050565b919050565b600082601f83011261308657600080fd5b8135602061309b6130968361302c565b612ffb565b82815260059290921b840181019181810190868411156130ba57600080fd5b8286015b848110156130de5780356130d181613050565b83529183019183016130be565b509695505050505050565b600082601f8301126130fa57600080fd5b8135602061310a6130968361302c565b82815260059290921b8401810191818101908684111561312957600080fd5b8286015b848110156130de578035835291830191830161312d565b60008060006060848603121561315957600080fd5b833567ffffffffffffffff8082111561317157600080fd5b61317d87838801613075565b9450602086013591508082111561319357600080fd5b506131a0868287016130e9565b925050604084013590509250925092565b6001600160e01b031981168114610ab257600080fd5b6000602082840312156131d957600080fd5b8135612039816131b1565b600067ffffffffffffffff8311156131fe576131fe612fe5565b613211601f8401601f1916602001612ffb565b905082815283838301111561322557600080fd5b828260208301376000602084830101529392505050565b600082601f83011261324d57600080fd5b612039838335602085016131e4565b8015158114610ab257600080fd5b80356130708161325c565b6000806000806000806000806000806101408b8d03121561329557600080fd5b8a3567ffffffffffffffff808211156132ad57600080fd5b6132b98e838f0161323c565b9b5060208d01359150808211156132cf57600080fd5b6132db8e838f0161323c565b9a506132e960408e01613065565b99506132f760608e01613065565b985060808d013591508082111561330d57600080fd5b6133198e838f01613075565b975060a08d013591508082111561332f57600080fd5b61333b8e838f016130e9565b965061334960c08e01613065565b955060e08d013591508082111561335f57600080fd5b61336b8e838f0161323c565b945061337a6101008e0161326a565b93506101208d013591508082111561339157600080fd5b5061339e8d828e0161323c565b9150509295989b9194979a5092959850565b60005b838110156133cb5781810151838201526020016133b3565b83811115610e565750506000910152565b600081518084526133f48160208601602086016133b0565b601f01601f19169290920160200192915050565b60208152600061203960208301846133dc565b60006020828403121561342d57600080fd5b5035919050565b6000806040838503121561344757600080fd5b823561345281613050565b946020939093013593505050565b60008060006060848603121561347557600080fd5b833561348081613050565b9250602084013561349081613050565b929592945050506040919091013590565b6000602082840312156134b357600080fd5b813561203981613050565b600080604083850312156134d157600080fd5b50508035926020909101359150565b600080604083850312156134f357600080fd5b82356134fe81613050565b9150602083013561350e8161325c565b809150509250929050565b6000806000806080858703121561352f57600080fd5b843561353a81613050565b9350602085013561354a81613050565b925060408501359150606085013567ffffffffffffffff81111561356d57600080fd5b8501601f8101871361357e57600080fd5b61358d878235602084016131e4565b91505092959194509250565b6000602082840312156135ab57600080fd5b81356120398161325c565b600080604083850312156135c957600080fd5b82356135d481613050565b9150602083013561350e81613050565b6020808252601b908201527f4572726f723a20436865636b20536c6970706167652056616c75650000000000604082015260600190565b600181811c9082168061362f57607f821691505b6020821081141561365057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6000815480845260208085019450836000528060002060005b838110156136e15781546001600160a01b0316875295820195600191820191016136bc565b509495945050505050565b600081518084526020808501945080840160005b838110156136e157815187529582019590820190600101613700565b6001600160a01b03858116825284166020820152608060408201819052600090613748908301856136a3565b8281036060840152612e1b81856136ec565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561379957613799613770565b500190565b60008160001904831182151516156137b8576137b8613770565b500290565b6000826137da57634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156137f1576137f1613770565b500390565b600081518084526020808501945080840160005b838110156136e15781516001600160a01b03168752958201959082019060010161380a565b84815260806020820152600061384860808301866137f6565b6001600160a01b03949094166040830152506060015292915050565b600083516138768184602088016133b0565b83519083019061388a8183602088016133b0565b01949350505050565b60006000198214156138a7576138a7613770565b5060010190565b6000602082840312156138c057600080fd5b5051919050565b6001600160a01b0385168152608060208083018290526000916138ec908401876136a3565b83810360408501528554808252600087815283812092840191905b8181101561392357835483526001938401939285019201613907565b5050848103606086015261393781876136ec565b9998505050505050505050565b60208152600061203960208301846137f6565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156139b457600080fd5b815161203981613050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b600060208284031215613a1657600080fd5b81516120398161325c565b60006020808385031215613a3457600080fd5b825167ffffffffffffffff811115613a4b57600080fd5b8301601f81018513613a5c57600080fd5b8051613a6a6130968261302c565b81815260059190911b82018301908381019087831115613a8957600080fd5b928401925b82841015612e1b57835182529284019290840190613a8e565b85815284602082015260a060408201526000613ac660a08301866137f6565b6001600160a01b0394909416606083015250608001529392505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b82815260406020820152600061129e60408301846137f6565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b81908301846133dc565b9695505050505050565b600060208284031215613b9d57600080fd5b8151612039816131b1565b60008251613bba8184602087016133b0565b919091019291505056fea2646970667358221220e488e1f4b6cfcd4b1dbd9b8dc67c0d01b042c50013fac3efdf88f49ec88aa64364736f6c63430008090033