From b117e035469e6a99dcec43aa22e04f8e32bc0f7a Mon Sep 17 00:00:00 2001 From: HaoyangLiu Date: Wed, 17 Jun 2020 14:46:48 +0800 Subject: [PATCH] R4R: split tokenhub (#24) * add onlyInit to public write method * tokenhub payable and rename event * move all library to lib * split tokenhub into two contract * change sync to syn * transfer relayFee to tokenHUb * add case for payload header Co-authored-by: fudongbai <296179868@qq.com> --- .soliumignore | 2 +- abi/README.md | 2 + abi/tokenhub.abi | 440 +++++------ abi/tokenmanager.abi | 712 ++++++++++++++++++ contracts/BSCValidatorSet.sol | 14 +- contracts/BSCValidatorSet.template | 14 +- contracts/CrossChain.sol | 8 +- contracts/CrossChain.template | 8 +- contracts/GovHub.sol | 10 +- contracts/MerkleProof.sol | 2 +- contracts/RelayerHub.sol | 4 +- contracts/RelayerIncentivize.sol | 4 +- contracts/RelayerIncentivize.template | 4 +- contracts/SlashIndicator.sol | 8 +- contracts/System.sol | 6 + contracts/System.template | 10 +- contracts/SystemReward.sol | 16 +- contracts/SystemReward.template | 23 +- contracts/TendermintLightClient.sol | 4 +- contracts/TendermintLightClient.template | 4 +- contracts/TokenHub.sol | 365 +++------ contracts/TokenHub.template | 370 +++------ contracts/TokenManager.sol | 230 ++++++ contracts/interface/IApplication.sol | 2 +- contracts/interface/ITokenHub.sol | 8 + contracts/{Seriality => lib}/BytesLib.sol | 0 contracts/{Seriality => lib}/BytesToTypes.sol | 0 contracts/{rlp => lib}/CmnPkg.sol | 0 contracts/{Seriality => lib}/Memory.sol | 0 contracts/{rlp => lib}/RLPDecode.sol | 0 contracts/{rlp => lib}/RLPEncode.sol | 0 contracts/{Seriality => lib}/SizeOf.sol | 0 contracts/{Seriality => lib}/TypesToBytes.sol | 0 contracts/mock/MockTokenHub.sol | 12 + contracts/tool/BSCValidatorSetTool.sol | 40 +- generate-genesis.js | 5 + genesis-template.json | 4 + genesis.json | 22 +- migrations/2_deploy_contracts.js | 31 +- package.json | 2 +- test/SystemReward.js | 6 +- test/TestTokenHub.js | 101 +-- test/ToolTest.js | 10 + 43 files changed, 1588 insertions(+), 915 deletions(-) create mode 100644 abi/tokenmanager.abi create mode 100644 contracts/TokenManager.sol rename contracts/{Seriality => lib}/BytesLib.sol (100%) rename contracts/{Seriality => lib}/BytesToTypes.sol (100%) rename contracts/{rlp => lib}/CmnPkg.sol (100%) rename contracts/{Seriality => lib}/Memory.sol (100%) rename contracts/{rlp => lib}/RLPDecode.sol (100%) rename contracts/{rlp => lib}/RLPEncode.sol (100%) rename contracts/{Seriality => lib}/SizeOf.sol (100%) rename contracts/{Seriality => lib}/TypesToBytes.sol (100%) diff --git a/.soliumignore b/.soliumignore index adcfc6f9..9894f8e2 100644 --- a/.soliumignore +++ b/.soliumignore @@ -2,7 +2,7 @@ node_modules contracts/Migrations.sol contracts/Seriality contracts/tool -contracts/rlp +contracts/flattened contracts/interface contracts/mock contracts/test diff --git a/abi/README.md b/abi/README.md index ec5d1226..e41b9d7d 100644 --- a/abi/README.md +++ b/abi/README.md @@ -9,4 +9,6 @@ | TokenHub |0x0000000000000000000000000000000000001004 | [tokenhub](tokenhub.abi) | | RelayerIncentivize |0x0000000000000000000000000000000000001005 | [relayerincentivize](relayerincentivize.abi) | | RelayerHub |0x0000000000000000000000000000000000001006 | [relayerhub](relayerhub.abi) | +| GovHub |0x0000000000000000000000000000000000001007 | [govhub](govhub.abi) | +| TokenManager |0x0000000000000000000000000000000000001008 | [tokenmanager](tokenmanager.abi) | | CrossChain |0x0000000000000000000000000000000000002000 | [crosschain](crosschain.abi) | \ No newline at end of file diff --git a/abi/tokenhub.abi b/abi/tokenhub.abi index bc0635b6..72ae7d22 100644 --- a/abi/tokenhub.abi +++ b/abi/tokenhub.abi @@ -24,6 +24,25 @@ "name": "paramChange", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "receiveDeposit", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -44,6 +63,12 @@ "internalType": "uint256", "name": "amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "status", + "type": "uint32" } ], "name": "refundFailure", @@ -69,6 +94,12 @@ "internalType": "uint256", "name": "amount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "status", + "type": "uint32" } ], "name": "refundSuccess", @@ -162,6 +193,11 @@ "name": "unexpectedPackage", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": true, "inputs": [], @@ -207,111 +243,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "BIND_CHANNEL_ID", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BIND_PACKAGE", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BIND_STATUS_INCORRECT_PARAMETERS", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BIND_STATUS_REJECTED", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BIND_STATUS_SUCCESS", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BIND_STATUS_TIMEOUT", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BIND_STATUS_UNKNOWN_PACKAGE_TYPE", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -492,21 +423,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "REFUND_CHANNEL_ID", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -570,7 +486,7 @@ { "constant": true, "inputs": [], - "name": "SYSTEM_REWARD_ADDR", + "name": "SYSTEM_ADDRESS", "outputs": [ { "internalType": "address", @@ -585,7 +501,7 @@ { "constant": true, "inputs": [], - "name": "TOKEN_HUB_ADDR", + "name": "SYSTEM_REWARD_ADDR", "outputs": [ { "internalType": "address", @@ -600,12 +516,12 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_CHANNELID", + "name": "TOKEN_HUB_ADDR", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], "payable": false, @@ -615,12 +531,12 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_CHANNEL_ID", + "name": "TOKEN_MANAGER_ADDR", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], "payable": false, @@ -630,7 +546,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_FAILURE_INSUFFICIENT_BALANCE", + "name": "TRANSFER_IN_CHANNELID", "outputs": [ { "internalType": "uint8", @@ -645,7 +561,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_FAILURE_NON_PAYABLE_RECIPIENT", + "name": "TRANSFER_IN_FAILURE_INSUFFICIENT_BALANCE", "outputs": [ { "internalType": "uint8", @@ -660,7 +576,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_FAILURE_TIMEOUT", + "name": "TRANSFER_IN_FAILURE_NON_PAYABLE_RECIPIENT", "outputs": [ { "internalType": "uint8", @@ -675,7 +591,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_FAILURE_UNBOUND_TOKEN", + "name": "TRANSFER_IN_FAILURE_TIMEOUT", "outputs": [ { "internalType": "uint8", @@ -690,7 +606,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_FAILURE_UNKNOWN", + "name": "TRANSFER_IN_FAILURE_UNBOUND_TOKEN", "outputs": [ { "internalType": "uint8", @@ -705,7 +621,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_IN_SUCCESS", + "name": "TRANSFER_IN_FAILURE_UNKNOWN", "outputs": [ { "internalType": "uint8", @@ -720,7 +636,7 @@ { "constant": true, "inputs": [], - "name": "TRANSFER_OUT_CHANNELID", + "name": "TRANSFER_IN_SUCCESS", "outputs": [ { "internalType": "uint8", @@ -735,7 +651,7 @@ { "constant": true, "inputs": [], - "name": "UNBIND_PACKAGE", + "name": "TRANSFER_OUT_CHANNELID", "outputs": [ { "internalType": "uint8", @@ -777,32 +693,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "contractAddr", - "type": "address" - }, - { - "internalType": "string", - "name": "bep2Symbol", - "type": "string" - } - ], - "name": "approveBind", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -860,57 +750,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "bindPackageRecord", - "outputs": [ - { - "internalType": "uint8", - "name": "packageType", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "bep2TokenSymbol", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "contractAddr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "peggyAmount", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "bep2eDecimals", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "expireTime", - "type": "uint64" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -956,21 +795,21 @@ "constant": false, "inputs": [ { - "internalType": "string", - "name": "bep2Symbol", - "type": "string" + "internalType": "address", + "name": "contractAddr", + "type": "address" } ], - "name": "expireBind", + "name": "getBep2SymbolByContractAddr", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], - "payable": true, - "stateMutability": "payable", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { @@ -1015,6 +854,27 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "bep2Symbol", + "type": "bytes32" + } + ], + "name": "getContractAddrByBEP2Symbol", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [], @@ -1088,7 +948,7 @@ "outputs": [ { "internalType": "bytes", - "name": "responsePayload", + "name": "", "type": "bytes" } ], @@ -1105,45 +965,59 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "relayFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ + { + "internalType": "bytes32", + "name": "bep2Symbol", + "type": "bytes32" + }, { "internalType": "address", "name": "contractAddr", "type": "address" - }, - { - "internalType": "string", - "name": "bep2Symbol", - "type": "string" } ], - "name": "rejectBind", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": true, - "stateMutability": "payable", + "name": "setBindMapping", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "relayFee", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "contractAddr", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "decimals", "type": "uint256" } ], + "name": "setContractAddrDecimals", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -1182,6 +1056,86 @@ "stateMutability": "payable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "bep2Symbol", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "contractAddr", + "type": "address" + } + ], + "name": "unsetBindMapping", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "valAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "slashAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "lightAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHubAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "incentivizeAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "relayerHubAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "govHub", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenManagerAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "crossChain", + "type": "address" + } + ], + "name": "updateContractAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ diff --git a/abi/tokenmanager.abi b/abi/tokenmanager.abi new file mode 100644 index 00000000..965084a5 --- /dev/null +++ b/abi/tokenmanager.abi @@ -0,0 +1,712 @@ +[ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "channelId", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "msgBytes", + "type": "bytes" + } + ], + "name": "unexpectedPackage", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "BIND_CHANNELID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BIND_PACKAGE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BIND_STATUS_INCORRECT_PARAMETERS", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BIND_STATUS_REJECTED", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BIND_STATUS_SUCCESS", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "BIND_STATUS_TIMEOUT", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CODE_OK", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CROSS_CHAIN_CONTRACT_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "ERROR_FAIL_DECODE", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "GOV_CHANNELID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "GOV_HUB_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INCENTIVIZE_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "LIGHT_CLIENT_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAXIMUM_BEP2E_SYMBOL_LEN", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MINIMUM_BEP2E_SYMBOL_LEN", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "RELAYERHUB_CONTRACT_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SLASH_CHANNELID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SLASH_CONTRACT_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "STAKING_CHANNELID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SYSTEM_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SYSTEM_REWARD_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_HUB_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_MANAGER_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TRANSFER_IN_CHANNELID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TRANSFER_OUT_CHANNELID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "UNBIND_PACKAGE", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "VALIDATOR_CONTRACT_ADDR", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "alreadyInit", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "contractAddr", + "type": "address" + }, + { + "internalType": "string", + "name": "bep2Symbol", + "type": "string" + } + ], + "name": "approveBind", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "bindPackageRecord", + "outputs": [ + { + "internalType": "uint8", + "name": "packageType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "bep2TokenSymbol", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "contractAddr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "peggyAmount", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "bep2eDecimals", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "expireTime", + "type": "uint64" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "bscChainID", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "string", + "name": "bep2Symbol", + "type": "string" + } + ], + "name": "expireBind", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint8", + "name": "channelId", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "msgBytes", + "type": "bytes" + } + ], + "name": "handleAckPackage", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint8", + "name": "channelId", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "msgBytes", + "type": "bytes" + } + ], + "name": "handleFailAckPackage", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint8", + "name": "channelId", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "msgBytes", + "type": "bytes" + } + ], + "name": "handleSynPackage", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "contractAddr", + "type": "address" + }, + { + "internalType": "string", + "name": "bep2Symbol", + "type": "string" + } + ], + "name": "rejectBind", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "valAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "slashAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "lightAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHubAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "incentivizeAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "relayerHubAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "govHub", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenManagerAddr", + "type": "address" + }, + { + "internalType": "address", + "name": "crossChain", + "type": "address" + } + ], + "name": "updateContractAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/contracts/BSCValidatorSet.sol b/contracts/BSCValidatorSet.sol index b4d328e9..9fb7bef5 100644 --- a/contracts/BSCValidatorSet.sol +++ b/contracts/BSCValidatorSet.sol @@ -1,8 +1,8 @@ pragma solidity 0.6.4; import "./System.sol"; -import "./Seriality/BytesToTypes.sol"; -import "./Seriality/Memory.sol"; +import "./lib/BytesToTypes.sol"; +import "./lib/Memory.sol"; import "./interface/ILightClient.sol"; import "./interface/ISlashIndicator.sol"; import "./interface/ITokenHub.sol"; @@ -11,8 +11,8 @@ import "./interface/IParamSubscriber.sol"; import "./interface/IBSCValidatorSet.sol"; import "./interface/IApplication.sol"; import "./lib/SafeMath.sol"; -import "./rlp/RLPDecode.sol"; -import "./rlp/CmnPkg.sol"; +import "./lib/RLPDecode.sol"; +import "./lib/CmnPkg.sol"; contract BSCValidatorSet is IBSCValidatorSet, System, IParamSubscriber, IApplication { @@ -91,7 +91,7 @@ contract BSCValidatorSet is IBSCValidatorSet, System, IParamSubscriber, IApplica /*********************** init **************************/ function init() external onlyNotInit{ - (IbcValidatorSetPackage memory validatorSetPkg, bool valid)= decodeValidatorSetSyncPackage(INIT_VALIDATORSET_BYTES); + (IbcValidatorSetPackage memory validatorSetPkg, bool valid)= decodeValidatorSetSynPackage(INIT_VALIDATORSET_BYTES); require(valid, "failed to parse init validatorSet"); for(uint i = 0;i0){ - emit ReceiveDeposit(msg.sender, msg.value); + emit receiveDeposit(msg.sender, msg.value); } } @@ -46,9 +44,9 @@ contract SystemReward is System, ISystemReward{ } if(actualAmount>0){ to.transfer(actualAmount); - emit RewardTo(to, actualAmount); + emit rewardTo(to, actualAmount); }else{ - emit RewardEmpty(); + emit rewardEmpty(); } return actualAmount; } diff --git a/contracts/SystemReward.template b/contracts/SystemReward.template index 89996131..cbdd930c 100644 --- a/contracts/SystemReward.template +++ b/contracts/SystemReward.template @@ -24,17 +24,18 @@ contract SystemReward is System, ISystemReward{ require(operators[msg.sender],"only operator is available to call the method"); _; } - - event NewOperator(address indexed operator); - event DeleteOperator(address indexed operator); - event RewardTo(address indexed to, uint256 amount); - event RewardEmpty(); - event ReceiveDeposit(address indexed from, uint256 amount); + {% if mock %} + event newOperator(address indexed operator); + event deleteOperator(address indexed operator); + {% endif %} + event rewardTo(address indexed to, uint256 amount); + event rewardEmpty(); + event receiveDeposit(address indexed from, uint256 amount); receive() external payable{ if (msg.value>0){ - emit ReceiveDeposit(msg.sender, msg.value); + emit receiveDeposit(msg.sender, msg.value); } } @@ -52,13 +53,13 @@ contract SystemReward is System, ISystemReward{ function addOperator(address operator) external doInit onlyOperatorNotExist(operator){ operators[operator] = true; numOperator ++; - emit NewOperator(operator); + emit newOperator(operator); } function removeOperator(address operator) external doInit onlyOperatorExist(operator){ delete operators[operator]; numOperator --; - emit DeleteOperator(operator); + emit deleteOperator(operator); } {% endif %} function claimRewards(address payable to, uint256 amount) external override(ISystemReward) doInit onlyOperator returns(uint256) { @@ -68,9 +69,9 @@ contract SystemReward is System, ISystemReward{ } if(actualAmount>0){ to.transfer(actualAmount); - emit RewardTo(to, actualAmount); + emit rewardTo(to, actualAmount); }else{ - emit RewardEmpty(); + emit rewardEmpty(); } return actualAmount; } diff --git a/contracts/TendermintLightClient.sol b/contracts/TendermintLightClient.sol index 3bf3267c..cf1b6d6c 100644 --- a/contracts/TendermintLightClient.sol +++ b/contracts/TendermintLightClient.sol @@ -1,7 +1,7 @@ pragma solidity 0.6.4; -import "./Seriality/Memory.sol"; -import "./Seriality/BytesToTypes.sol"; +import "./lib/Memory.sol"; +import "./lib/BytesToTypes.sol"; import "./interface/ILightClient.sol"; import "./interface/ISystemReward.sol"; import "./interface/IParamSubscriber.sol"; diff --git a/contracts/TendermintLightClient.template b/contracts/TendermintLightClient.template index 59623d92..fcb9c407 100644 --- a/contracts/TendermintLightClient.template +++ b/contracts/TendermintLightClient.template @@ -1,7 +1,7 @@ pragma solidity 0.6.4; -import "./Seriality/Memory.sol"; -import "./Seriality/BytesToTypes.sol"; +import "./lib/Memory.sol"; +import "./lib/BytesToTypes.sol"; import "./interface/ILightClient.sol"; import "./interface/ISystemReward.sol"; import "./interface/IParamSubscriber.sol"; diff --git a/contracts/TokenHub.sol b/contracts/TokenHub.sol index ccd05370..e8be2486 100644 --- a/contracts/TokenHub.sol +++ b/contracts/TokenHub.sol @@ -7,8 +7,8 @@ import "./interface/IApplication.sol"; import "./interface/ICrossChain.sol"; import "./interface/ISystemReward.sol"; import "./lib/SafeMath.sol"; -import "./rlp/RLPEncode.sol"; -import "./rlp/RLPDecode.sol"; +import "./lib/RLPEncode.sol"; +import "./lib/RLPDecode.sol"; import "./System.sol"; contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemReward { @@ -21,25 +21,8 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR using RLPDecode for RLPDecode.RLPItem; using RLPDecode for RLPDecode.Iterator; - // BC to BSC - struct BindSyncPackage { - uint8 packageType; - bytes32 bep2TokenSymbol; - address contractAddr; - uint256 totalSupply; - uint256 peggyAmount; - uint8 bep2eDecimals; - uint64 expireTime; - } - - // BSC to BC - struct ApproveBindSyncPackage { - uint32 status; - bytes32 bep2TokenSymbol; - } - // BSC to BC - struct TransferOutSyncPackage { + struct TransferOutSynPackage { bytes32 bep2TokenSymbol; address contractAddr; uint256[] amounts; @@ -57,7 +40,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } // BC to BSC - struct TransferInSyncPackage { + struct TransferInSynPackage { bytes32 bep2TokenSymbol; address contractAddr; uint256 amount; @@ -74,16 +57,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR uint32 status; } - uint8 constant public BIND_PACKAGE = 0; - uint8 constant public UNBIND_PACKAGE = 1; - - // bind status - uint8 constant public BIND_STATUS_SUCCESS = 0; - uint8 constant public BIND_STATUS_TIMEOUT = 1; - uint8 constant public BIND_STATUS_INCORRECT_PARAMETERS = 2; - uint8 constant public BIND_STATUS_REJECTED = 3; - uint8 constant public BIND_STATUS_UNKNOWN_PACKAGE_TYPE = 4; - // transfer in channel uint8 constant public TRANSFER_IN_SUCCESS = 0; uint8 constant public TRANSFER_IN_FAILURE_TIMEOUT = 1; @@ -92,10 +65,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR uint8 constant public TRANSFER_IN_FAILURE_NON_PAYABLE_RECIPIENT = 4; uint8 constant public TRANSFER_IN_FAILURE_UNKNOWN = 5; - uint8 constant public BIND_CHANNEL_ID = 0x01; - uint8 constant public TRANSFER_IN_CHANNEL_ID = 0x02; - uint8 constant public REFUND_CHANNEL_ID=0x03; - uint256 constant public MAX_BEP2_TOTAL_SUPPLY = 9000000000000000000; uint8 constant public MINIMUM_BEP2E_SYMBOL_LEN = 3; uint8 constant public MAXIMUM_BEP2E_SYMBOL_LEN = 8; @@ -107,7 +76,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR uint256 public relayFee; - mapping(bytes32 => BindSyncPackage) public bindPackageRecord; mapping(address => uint256) public bep2eContractDecimals; mapping(address => bytes32) private contractAddrToBEP2Symbol; mapping(bytes32 => address) private bep2SymbolToContractAddr; @@ -117,17 +85,22 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR event refundSuccess(address bep2eAddr, address refundAddr, uint256 amount, uint32 status); event refundFailure(address bep2eAddr, address refundAddr, uint256 amount, uint32 status); event rewardTo(address to, uint256 amount); + event receiveDeposit(address from, uint256 amount); event unexpectedPackage(uint8 channelId, bytes msgBytes); - event paramChange(string key, bytes value); constructor() public {} - + function init() onlyNotInit external { relayFee = INIT_MINIMUM_RELAY_FEE; alreadyInit=true; } - + + receive() external payable{ + if (msg.value>0){ + emit receiveDeposit(msg.sender, msg.value); + } + } function claimRewards(address payable to, uint256 amount) onlyInit onlyRelayerIncentivize external override returns(uint256) { uint256 actualAmount = amount < address(this).balance ? amount : address(this).balance; @@ -143,13 +116,12 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } function handleSynPackage(uint8 channelId, bytes calldata msgBytes) onlyInit onlyCrossChainContract external override returns(bytes memory){ - if (channelId == BIND_CHANNELID) { - return handleBindSyncPackage(msgBytes); - } else if (channelId == TRANSFER_IN_CHANNELID) { - return handleTransferInSyncPackage(msgBytes); + if (channelId == TRANSFER_IN_CHANNELID) { + return handleTransferInSynPackage(msgBytes); } else { // should not happen - require(false, "unrecognized sync package"); + require(false, "unrecognized syn package"); + return new bytes(0); } } @@ -169,152 +141,26 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } } - function decodeBindSyncPackage(bytes memory msgBytes) internal pure returns(BindSyncPackage memory, bool) { - BindSyncPackage memory bindSyncPkg; - RLPDecode.Iterator memory iter = msgBytes.toRLPItem().iterator(); - bool success = false; - uint256 idx=0; - while(iter.hasNext()) { - if ( idx == 0 ) bindSyncPkg.packageType = uint8(iter.next().toUint()); - else if ( idx == 1 ) bindSyncPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); - else if ( idx == 2 ) bindSyncPkg.contractAddr = iter.next().toAddress(); - else if ( idx == 3 ) bindSyncPkg.totalSupply = iter.next().toUint(); - else if ( idx == 4 ) bindSyncPkg.peggyAmount = iter.next().toUint(); - else if ( idx == 5 ) bindSyncPkg.bep2eDecimals = uint8(iter.next().toUint()); - else if ( idx == 6 ) { - bindSyncPkg.expireTime = uint64(iter.next().toUint()); - success = true; - } - else break; - idx++; - } - return (bindSyncPkg, success); - } - - function handleBindSyncPackage(bytes memory msgBytes) internal returns(bytes memory) { - (BindSyncPackage memory bindSyncPkg, bool success) = decodeBindSyncPackage(msgBytes); - require(success, "unrecognized transferIn package"); - if (bindSyncPkg.packageType == BIND_PACKAGE) { - bindPackageRecord[bindSyncPkg.bep2TokenSymbol]=bindSyncPkg; - } else if (bindSyncPkg.packageType == UNBIND_PACKAGE) { - address contractAddr = bep2SymbolToContractAddr[bindSyncPkg.bep2TokenSymbol]; - if (contractAddr!=address(0x00)) { - delete contractAddrToBEP2Symbol[contractAddr]; - delete bep2SymbolToContractAddr[bindSyncPkg.bep2TokenSymbol]; - } - } else { - require(false, "unrecognized bind package"); - } - return new bytes(0); - } - - function encodeApproveBindSyncPackage(ApproveBindSyncPackage memory approveBindSyncPackage) internal pure returns (bytes memory) { - bytes[] memory elements = new bytes[](2); - elements[0] = approveBindSyncPackage.status.encodeUint(); - elements[1] = uint256(approveBindSyncPackage.bep2TokenSymbol).encodeUint(); - return elements.encodeList(); - } - - function approveBind(address contractAddr, string memory bep2Symbol) payable public returns (bool) { - bytes32 bep2TokenSymbol = bep2TokenSymbolConvert(bep2Symbol); - BindSyncPackage memory bindSyncPkg = bindPackageRecord[bep2TokenSymbol]; - require(bindSyncPkg.bep2TokenSymbol!=bytes32(0x00), "bind request doesn't exist"); - uint256 lockedAmount = bindSyncPkg.totalSupply.sub(bindSyncPkg.peggyAmount); - require(contractAddr==bindSyncPkg.contractAddr, "contact address doesn't equal to the contract address in bind request"); - require(IBEP2E(contractAddr).getOwner()==msg.sender, "only bep2e owner can approve this bind request"); - require(IBEP2E(contractAddr).allowance(msg.sender, address(this))==lockedAmount, "allowance doesn't equal to (totalSupply - peggyAmount)"); - require(msg.value == relayFee, "msg.value doesn't equal to relayFee"); - - if (bindSyncPkg.expireTime transInSyncPkg.expireTime) { + function doTransferIn(TransferInSynPackage memory transInSynPkg) internal returns (uint32) { + if (transInSynPkg.contractAddr==address(0x0)) { + if (block.timestamp > transInSynPkg.expireTime) { return TRANSFER_IN_FAILURE_TIMEOUT; } - if (address(this).balance < transInSyncPkg.amount) { + if (address(this).balance < transInSynPkg.amount) { return TRANSFER_IN_FAILURE_INSUFFICIENT_BALANCE; } - if (!address(uint160(transInSyncPkg.recipient)).send(transInSyncPkg.amount)) { + if (!address(uint160(transInSynPkg.recipient)).send(transInSynPkg.amount)) { return TRANSFER_IN_FAILURE_NON_PAYABLE_RECIPIENT; } - emit transferInSuccess(transInSyncPkg.contractAddr, transInSyncPkg.recipient, transInSyncPkg.amount); + emit transferInSuccess(transInSynPkg.contractAddr, transInSynPkg.recipient, transInSynPkg.amount); return TRANSFER_IN_SUCCESS; } else { - if (block.timestamp > transInSyncPkg.expireTime) { + if (block.timestamp > transInSynPkg.expireTime) { return TRANSFER_IN_FAILURE_TIMEOUT; } - if (contractAddrToBEP2Symbol[transInSyncPkg.contractAddr]!= transInSyncPkg.bep2TokenSymbol) { + if (contractAddrToBEP2Symbol[transInSynPkg.contractAddr]!= transInSynPkg.bep2TokenSymbol) { return TRANSFER_IN_FAILURE_UNBOUND_TOKEN; } - uint256 actualBalance = IBEP2E(transInSyncPkg.contractAddr).balanceOf{gas: MAX_GAS_FOR_CALLING_BEP2E}(address(this)); - if (actualBalance < transInSyncPkg.amount) { + uint256 actualBalance = IBEP2E(transInSynPkg.contractAddr).balanceOf{gas: MAX_GAS_FOR_CALLING_BEP2E}(address(this)); + if (actualBalance < transInSynPkg.amount) { return TRANSFER_IN_FAILURE_INSUFFICIENT_BALANCE; } - bool success = IBEP2E(transInSyncPkg.contractAddr).transfer{gas: MAX_GAS_FOR_CALLING_BEP2E}(transInSyncPkg.recipient, transInSyncPkg.amount); + bool success = IBEP2E(transInSynPkg.contractAddr).transfer{gas: MAX_GAS_FOR_CALLING_BEP2E}(transInSynPkg.recipient, transInSynPkg.amount); if (success){ - emit transferInSuccess(transInSyncPkg.contractAddr, transInSyncPkg.recipient, transInSyncPkg.amount); + emit transferInSuccess(transInSynPkg.contractAddr, transInSynPkg.recipient, transInSynPkg.amount); return TRANSFER_IN_SUCCESS; } else { return TRANSFER_IN_FAILURE_UNKNOWN; @@ -441,92 +287,92 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } } - function decodeTransferOutSyncPackage(bytes memory msgBytes) internal pure returns (TransferOutSyncPackage memory, bool) { - TransferOutSyncPackage memory transOutSyncPkg; + function decodeTransferOutSynPackage(bytes memory msgBytes) internal pure returns (TransferOutSynPackage memory, bool) { + TransferOutSynPackage memory transOutSynPkg; RLPDecode.Iterator memory iter = msgBytes.toRLPItem().iterator(); bool success = false; uint256 idx=0; while(iter.hasNext()) { if ( idx == 0 ) { - transOutSyncPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); + transOutSynPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); } else if(idx == 1 ) { - transOutSyncPkg.contractAddr = iter.next().toAddress(); + transOutSynPkg.contractAddr = iter.next().toAddress(); } else if(idx == 2 ) { RLPDecode.RLPItem[] memory list = iter.next().toList(); - transOutSyncPkg.amounts = new uint256[](list.length); + transOutSynPkg.amounts = new uint256[](list.length); for(uint256 index=0; index=block.timestamp + 120, "expireTime must be two minutes later"); bytes32 bep2TokenSymbol; uint256 convertedAmount; @@ -549,7 +395,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR require(convertedAmount<=MAX_BEP2_TOTAL_SUPPLY, "amount is too large, exceed maximum bep2 token amount"); require(IBEP2E(contractAddr).transferFrom(msg.sender, address(this), amount)); } - TransferOutSyncPackage memory transOutSyncPkg = TransferOutSyncPackage({ + TransferOutSynPackage memory transOutSynPkg = TransferOutSynPackage({ bep2TokenSymbol: bep2TokenSymbol, contractAddr: contractAddr, amounts: new uint256[](1), @@ -557,15 +403,15 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR refundAddrs: new address[](1), expireTime: expireTime }); - transOutSyncPkg.amounts[0]=convertedAmount; - transOutSyncPkg.recipients[0]=recipient; - transOutSyncPkg.refundAddrs[0]=msg.sender; - ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSyncPackage(transOutSyncPkg), relayFee.div(1e10)); + transOutSynPkg.amounts[0]=convertedAmount; + transOutSynPkg.recipients[0]=recipient; + transOutSynPkg.refundAddrs[0]=msg.sender; + ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSynPackage(transOutSynPkg), relayFee.div(1e10)); emit transferOutSuccess(contractAddr, msg.sender, amount); return true; } - function batchTransferOutBNB(address[] calldata recipientAddrs, uint256[] calldata amounts, address[] calldata refundAddrs, uint64 expireTime) override external payable returns (bool) { + function batchTransferOutBNB(address[] calldata recipientAddrs, uint256[] calldata amounts, address[] calldata refundAddrs, uint64 expireTime) external override onlyInit payable returns (bool) { require(recipientAddrs.length == amounts.length, "Length of recipientAddrs doesn't equal to length of amounts"); require(recipientAddrs.length == refundAddrs.length, "Length of recipientAddrs doesn't equal to length of refundAddrs"); require(expireTime>=block.timestamp + 120, "expireTime must be two minutes later"); @@ -582,7 +428,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } require(msg.value==totalAmount.add(relayFee.mul(batchLength)), "received BNB amount doesn't equal to the sum of transfer amount and relayFee"); - TransferOutSyncPackage memory transOutSyncPkg = TransferOutSyncPackage({ + TransferOutSynPackage memory transOutSynPkg = TransferOutSynPackage({ bep2TokenSymbol: BEP2_TOKEN_SYMBOL_FOR_BNB, contractAddr: address(0x00), amounts: convertedAmounts, @@ -590,7 +436,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR refundAddrs: refundAddrs, expireTime: expireTime }); - ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSyncPackage(transOutSyncPkg), relayFee.mul(batchLength).div(1e10)); + ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSynPackage(transOutSynPkg), relayFee.mul(batchLength).div(1e10)); emit transferOutSuccess(address(0x0), msg.sender, totalAmount); return true; } @@ -616,12 +462,23 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR emit paramChange(key, value); } - function bep2TokenSymbolConvert(string memory symbol) internal pure returns(bytes32) { - bytes32 result; - assembly { - result := mload(add(symbol, 32)) - } - return result; + function getContractAddrByBEP2Symbol(bytes32 bep2Symbol) external override returns(address) { + return bep2SymbolToContractAddr[bep2Symbol]; + } + + function getBep2SymbolByContractAddr(address contractAddr) external override returns(bytes32) { + return contractAddrToBEP2Symbol[contractAddr]; + } + + function bindToken(bytes32 bep2Symbol, address contractAddr, uint256 decimals) external override onlyTokenManager { + bep2SymbolToContractAddr[bep2Symbol] = contractAddr; + contractAddrToBEP2Symbol[contractAddr] = bep2Symbol; + bep2eContractDecimals[contractAddr] = decimals; + } + + function unbindToken(bytes32 bep2Symbol, address contractAddr) external override onlyTokenManager { + delete bep2SymbolToContractAddr[bep2Symbol]; + delete contractAddrToBEP2Symbol[contractAddr]; } function isMiniBEP2Token(bytes32 symbol) internal pure returns(bool) { @@ -649,29 +506,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR return true; } - function checkSymbol(string memory bep2eSymbol, bytes32 bep2TokenSymbol) internal pure returns(bool) { - bytes memory bep2eSymbolBytes = bytes(bep2eSymbol); - if (bep2eSymbolBytes.length > MAXIMUM_BEP2E_SYMBOL_LEN || bep2eSymbolBytes.length < MINIMUM_BEP2E_SYMBOL_LEN) { - return false; - } - - bytes memory bep2TokenSymbolBytes = new bytes(32); - assembly { - mstore(add(bep2TokenSymbolBytes, 32), bep2TokenSymbol) - } - if (bep2TokenSymbolBytes[bep2eSymbolBytes.length] != 0x2d) { // '-' - return false; - } - bool symbolMatch = true; - for(uint256 index=0; index < bep2eSymbolBytes.length; index++) { - if (bep2eSymbolBytes[index] != bep2TokenSymbolBytes[index]) { - symbolMatch = false; - break; - } - } - return symbolMatch; - } - function convertToBep2Amount(uint256 amount, uint256 bep2eTokenDecimals) internal pure returns (uint256) { if (bep2eTokenDecimals > BEP2_TOKEN_DECIMALS) { return amount.div(10**(bep2eTokenDecimals-BEP2_TOKEN_DECIMALS)); @@ -687,7 +521,10 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } function getBoundContract(string memory bep2Symbol) public view returns (address) { - bytes32 bep2TokenSymbol = bep2TokenSymbolConvert(bep2Symbol); + bytes32 bep2TokenSymbol; + assembly { + bep2TokenSymbol := mload(add(bep2Symbol, 32)) + } return bep2SymbolToContractAddr[bep2TokenSymbol]; } diff --git a/contracts/TokenHub.template b/contracts/TokenHub.template index 2115bef6..4f0e6a70 100644 --- a/contracts/TokenHub.template +++ b/contracts/TokenHub.template @@ -7,8 +7,8 @@ import "./interface/IApplication.sol"; import "./interface/ICrossChain.sol"; import "./interface/ISystemReward.sol"; import "./lib/SafeMath.sol"; -import "./rlp/RLPEncode.sol"; -import "./rlp/RLPDecode.sol"; +import "./lib/RLPEncode.sol"; +import "./lib/RLPDecode.sol"; import "./System.sol"; contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemReward { @@ -21,25 +21,8 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR using RLPDecode for RLPDecode.RLPItem; using RLPDecode for RLPDecode.Iterator; - // BC to BSC - struct BindSyncPackage { - uint8 packageType; - bytes32 bep2TokenSymbol; - address contractAddr; - uint256 totalSupply; - uint256 peggyAmount; - uint8 bep2eDecimals; - uint64 expireTime; - } - - // BSC to BC - struct ApproveBindSyncPackage { - uint32 status; - bytes32 bep2TokenSymbol; - } - // BSC to BC - struct TransferOutSyncPackage { + struct TransferOutSynPackage { bytes32 bep2TokenSymbol; address contractAddr; uint256[] amounts; @@ -57,7 +40,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } // BC to BSC - struct TransferInSyncPackage { + struct TransferInSynPackage { bytes32 bep2TokenSymbol; address contractAddr; uint256 amount; @@ -74,16 +57,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR uint32 status; } - uint8 constant public BIND_PACKAGE = 0; - uint8 constant public UNBIND_PACKAGE = 1; - - // bind status - uint8 constant public BIND_STATUS_SUCCESS = 0; - uint8 constant public BIND_STATUS_TIMEOUT = 1; - uint8 constant public BIND_STATUS_INCORRECT_PARAMETERS = 2; - uint8 constant public BIND_STATUS_REJECTED = 3; - uint8 constant public BIND_STATUS_UNKNOWN_PACKAGE_TYPE = 4; - // transfer in channel uint8 constant public TRANSFER_IN_SUCCESS = 0; uint8 constant public TRANSFER_IN_FAILURE_TIMEOUT = 1; @@ -92,10 +65,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR uint8 constant public TRANSFER_IN_FAILURE_NON_PAYABLE_RECIPIENT = 4; uint8 constant public TRANSFER_IN_FAILURE_UNKNOWN = 5; - uint8 constant public BIND_CHANNEL_ID = 0x01; - uint8 constant public TRANSFER_IN_CHANNEL_ID = 0x02; - uint8 constant public REFUND_CHANNEL_ID=0x03; - uint256 constant public MAX_BEP2_TOTAL_SUPPLY = 9000000000000000000; uint8 constant public MINIMUM_BEP2E_SYMBOL_LEN = 3; uint8 constant public MAXIMUM_BEP2E_SYMBOL_LEN = 8; @@ -107,7 +76,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR uint256 public relayFee; - mapping(bytes32 => BindSyncPackage) public bindPackageRecord; mapping(address => uint256) public bep2eContractDecimals; mapping(address => bytes32) private contractAddrToBEP2Symbol; mapping(bytes32 => address) private bep2SymbolToContractAddr; @@ -117,22 +85,22 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR event refundSuccess(address bep2eAddr, address refundAddr, uint256 amount, uint32 status); event refundFailure(address bep2eAddr, address refundAddr, uint256 amount, uint32 status); event rewardTo(address to, uint256 amount); + event receiveDeposit(address from, uint256 amount); event unexpectedPackage(uint8 channelId, bytes msgBytes); - event paramChange(string key, bytes value); constructor() public {} - {% if mock %} - function init() onlyNotInit public payable { - relayFee = INIT_MINIMUM_RELAY_FEE; - alreadyInit=true; - } - {% else %} + function init() onlyNotInit external { relayFee = INIT_MINIMUM_RELAY_FEE; alreadyInit=true; } - {% endif %} + + receive() external payable{ + if (msg.value>0){ + emit receiveDeposit(msg.sender, msg.value); + } + } function claimRewards(address payable to, uint256 amount) onlyInit onlyRelayerIncentivize external override returns(uint256) { uint256 actualAmount = amount < address(this).balance ? amount : address(this).balance; @@ -148,13 +116,12 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } function handleSynPackage(uint8 channelId, bytes calldata msgBytes) onlyInit onlyCrossChainContract external override returns(bytes memory){ - if (channelId == BIND_CHANNELID) { - return handleBindSyncPackage(msgBytes); - } else if (channelId == TRANSFER_IN_CHANNELID) { - return handleTransferInSyncPackage(msgBytes); + if (channelId == TRANSFER_IN_CHANNELID) { + return handleTransferInSynPackage(msgBytes); } else { // should not happen - require(false, "unrecognized sync package"); + require(false, "unrecognized syn package"); + return new bytes(0); } } @@ -174,152 +141,26 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } } - function decodeBindSyncPackage(bytes memory msgBytes) internal pure returns(BindSyncPackage memory, bool) { - BindSyncPackage memory bindSyncPkg; - RLPDecode.Iterator memory iter = msgBytes.toRLPItem().iterator(); - bool success = false; - uint256 idx=0; - while(iter.hasNext()) { - if ( idx == 0 ) bindSyncPkg.packageType = uint8(iter.next().toUint()); - else if ( idx == 1 ) bindSyncPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); - else if ( idx == 2 ) bindSyncPkg.contractAddr = iter.next().toAddress(); - else if ( idx == 3 ) bindSyncPkg.totalSupply = iter.next().toUint(); - else if ( idx == 4 ) bindSyncPkg.peggyAmount = iter.next().toUint(); - else if ( idx == 5 ) bindSyncPkg.bep2eDecimals = uint8(iter.next().toUint()); - else if ( idx == 6 ) { - bindSyncPkg.expireTime = uint64(iter.next().toUint()); - success = true; - } - else break; - idx++; - } - return (bindSyncPkg, success); - } - - function handleBindSyncPackage(bytes memory msgBytes) internal returns(bytes memory) { - (BindSyncPackage memory bindSyncPkg, bool success) = decodeBindSyncPackage(msgBytes); - require(success, "unrecognized transferIn package"); - if (bindSyncPkg.packageType == BIND_PACKAGE) { - bindPackageRecord[bindSyncPkg.bep2TokenSymbol]=bindSyncPkg; - } else if (bindSyncPkg.packageType == UNBIND_PACKAGE) { - address contractAddr = bep2SymbolToContractAddr[bindSyncPkg.bep2TokenSymbol]; - if (contractAddr!=address(0x00)) { - delete contractAddrToBEP2Symbol[contractAddr]; - delete bep2SymbolToContractAddr[bindSyncPkg.bep2TokenSymbol]; - } - } else { - require(false, "unrecognized bind package"); - } - return new bytes(0); - } - - function encodeApproveBindSyncPackage(ApproveBindSyncPackage memory approveBindSyncPackage) internal pure returns (bytes memory) { - bytes[] memory elements = new bytes[](2); - elements[0] = approveBindSyncPackage.status.encodeUint(); - elements[1] = uint256(approveBindSyncPackage.bep2TokenSymbol).encodeUint(); - return elements.encodeList(); - } - - function approveBind(address contractAddr, string memory bep2Symbol) payable public returns (bool) { - bytes32 bep2TokenSymbol = bep2TokenSymbolConvert(bep2Symbol); - BindSyncPackage memory bindSyncPkg = bindPackageRecord[bep2TokenSymbol]; - require(bindSyncPkg.bep2TokenSymbol!=bytes32(0x00), "bind request doesn't exist"); - uint256 lockedAmount = bindSyncPkg.totalSupply.sub(bindSyncPkg.peggyAmount); - require(contractAddr==bindSyncPkg.contractAddr, "contact address doesn't equal to the contract address in bind request"); - require(IBEP2E(contractAddr).getOwner()==msg.sender, "only bep2e owner can approve this bind request"); - require(IBEP2E(contractAddr).allowance(msg.sender, address(this))==lockedAmount, "allowance doesn't equal to (totalSupply - peggyAmount)"); - require(msg.value == relayFee, "msg.value doesn't equal to relayFee"); - - if (bindSyncPkg.expireTime transInSyncPkg.expireTime) { + function doTransferIn(TransferInSynPackage memory transInSynPkg) internal returns (uint32) { + if (transInSynPkg.contractAddr==address(0x0)) { + if (block.timestamp > transInSynPkg.expireTime) { return TRANSFER_IN_FAILURE_TIMEOUT; } - if (address(this).balance < transInSyncPkg.amount) { + if (address(this).balance < transInSynPkg.amount) { return TRANSFER_IN_FAILURE_INSUFFICIENT_BALANCE; } - if (!address(uint160(transInSyncPkg.recipient)).send(transInSyncPkg.amount)) { + if (!address(uint160(transInSynPkg.recipient)).send(transInSynPkg.amount)) { return TRANSFER_IN_FAILURE_NON_PAYABLE_RECIPIENT; } - emit transferInSuccess(transInSyncPkg.contractAddr, transInSyncPkg.recipient, transInSyncPkg.amount); + emit transferInSuccess(transInSynPkg.contractAddr, transInSynPkg.recipient, transInSynPkg.amount); return TRANSFER_IN_SUCCESS; } else { - if (block.timestamp > transInSyncPkg.expireTime) { + if (block.timestamp > transInSynPkg.expireTime) { return TRANSFER_IN_FAILURE_TIMEOUT; } - if (contractAddrToBEP2Symbol[transInSyncPkg.contractAddr]!= transInSyncPkg.bep2TokenSymbol) { + if (contractAddrToBEP2Symbol[transInSynPkg.contractAddr]!= transInSynPkg.bep2TokenSymbol) { return TRANSFER_IN_FAILURE_UNBOUND_TOKEN; } - uint256 actualBalance = IBEP2E(transInSyncPkg.contractAddr).balanceOf{gas: MAX_GAS_FOR_CALLING_BEP2E}(address(this)); - if (actualBalance < transInSyncPkg.amount) { + uint256 actualBalance = IBEP2E(transInSynPkg.contractAddr).balanceOf{gas: MAX_GAS_FOR_CALLING_BEP2E}(address(this)); + if (actualBalance < transInSynPkg.amount) { return TRANSFER_IN_FAILURE_INSUFFICIENT_BALANCE; } - bool success = IBEP2E(transInSyncPkg.contractAddr).transfer{gas: MAX_GAS_FOR_CALLING_BEP2E}(transInSyncPkg.recipient, transInSyncPkg.amount); + bool success = IBEP2E(transInSynPkg.contractAddr).transfer{gas: MAX_GAS_FOR_CALLING_BEP2E}(transInSynPkg.recipient, transInSynPkg.amount); if (success){ - emit transferInSuccess(transInSyncPkg.contractAddr, transInSyncPkg.recipient, transInSyncPkg.amount); + emit transferInSuccess(transInSynPkg.contractAddr, transInSynPkg.recipient, transInSynPkg.amount); return TRANSFER_IN_SUCCESS; } else { return TRANSFER_IN_FAILURE_UNKNOWN; @@ -446,92 +287,92 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } } - function decodeTransferOutSyncPackage(bytes memory msgBytes) internal pure returns (TransferOutSyncPackage memory, bool) { - TransferOutSyncPackage memory transOutSyncPkg; + function decodeTransferOutSynPackage(bytes memory msgBytes) internal pure returns (TransferOutSynPackage memory, bool) { + TransferOutSynPackage memory transOutSynPkg; RLPDecode.Iterator memory iter = msgBytes.toRLPItem().iterator(); bool success = false; uint256 idx=0; while(iter.hasNext()) { if ( idx == 0 ) { - transOutSyncPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); + transOutSynPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); } else if(idx == 1 ) { - transOutSyncPkg.contractAddr = iter.next().toAddress(); + transOutSynPkg.contractAddr = iter.next().toAddress(); } else if(idx == 2 ) { RLPDecode.RLPItem[] memory list = iter.next().toList(); - transOutSyncPkg.amounts = new uint256[](list.length); + transOutSynPkg.amounts = new uint256[](list.length); for(uint256 index=0; index=block.timestamp + 120, "expireTime must be two minutes later"); bytes32 bep2TokenSymbol; uint256 convertedAmount; @@ -554,7 +395,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR require(convertedAmount<=MAX_BEP2_TOTAL_SUPPLY, "amount is too large, exceed maximum bep2 token amount"); require(IBEP2E(contractAddr).transferFrom(msg.sender, address(this), amount)); } - TransferOutSyncPackage memory transOutSyncPkg = TransferOutSyncPackage({ + TransferOutSynPackage memory transOutSynPkg = TransferOutSynPackage({ bep2TokenSymbol: bep2TokenSymbol, contractAddr: contractAddr, amounts: new uint256[](1), @@ -562,15 +403,15 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR refundAddrs: new address[](1), expireTime: expireTime }); - transOutSyncPkg.amounts[0]=convertedAmount; - transOutSyncPkg.recipients[0]=recipient; - transOutSyncPkg.refundAddrs[0]=msg.sender; - ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSyncPackage(transOutSyncPkg), relayFee.div(1e10)); + transOutSynPkg.amounts[0]=convertedAmount; + transOutSynPkg.recipients[0]=recipient; + transOutSynPkg.refundAddrs[0]=msg.sender; + ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSynPackage(transOutSynPkg), relayFee.div(1e10)); emit transferOutSuccess(contractAddr, msg.sender, amount); return true; } - function batchTransferOutBNB(address[] calldata recipientAddrs, uint256[] calldata amounts, address[] calldata refundAddrs, uint64 expireTime) override external payable returns (bool) { + function batchTransferOutBNB(address[] calldata recipientAddrs, uint256[] calldata amounts, address[] calldata refundAddrs, uint64 expireTime) external override onlyInit payable returns (bool) { require(recipientAddrs.length == amounts.length, "Length of recipientAddrs doesn't equal to length of amounts"); require(recipientAddrs.length == refundAddrs.length, "Length of recipientAddrs doesn't equal to length of refundAddrs"); require(expireTime>=block.timestamp + 120, "expireTime must be two minutes later"); @@ -587,7 +428,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } require(msg.value==totalAmount.add(relayFee.mul(batchLength)), "received BNB amount doesn't equal to the sum of transfer amount and relayFee"); - TransferOutSyncPackage memory transOutSyncPkg = TransferOutSyncPackage({ + TransferOutSynPackage memory transOutSynPkg = TransferOutSynPackage({ bep2TokenSymbol: BEP2_TOKEN_SYMBOL_FOR_BNB, contractAddr: address(0x00), amounts: convertedAmounts, @@ -595,7 +436,7 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR refundAddrs: refundAddrs, expireTime: expireTime }); - ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSyncPackage(transOutSyncPkg), relayFee.mul(batchLength).div(1e10)); + ICrossChain(CROSS_CHAIN_CONTRACT_ADDR).sendSynPackage(TRANSFER_OUT_CHANNELID, encodeTransferOutSynPackage(transOutSynPkg), relayFee.mul(batchLength).div(1e10)); emit transferOutSuccess(address(0x0), msg.sender, totalAmount); return true; } @@ -621,12 +462,23 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR emit paramChange(key, value); } - function bep2TokenSymbolConvert(string memory symbol) internal pure returns(bytes32) { - bytes32 result; - assembly { - result := mload(add(symbol, 32)) - } - return result; + function getContractAddrByBEP2Symbol(bytes32 bep2Symbol) external override returns(address) { + return bep2SymbolToContractAddr[bep2Symbol]; + } + + function getBep2SymbolByContractAddr(address contractAddr) external override returns(bytes32) { + return contractAddrToBEP2Symbol[contractAddr]; + } + + function bindToken(bytes32 bep2Symbol, address contractAddr, uint256 decimals) external override onlyTokenManager { + bep2SymbolToContractAddr[bep2Symbol] = contractAddr; + contractAddrToBEP2Symbol[contractAddr] = bep2Symbol; + bep2eContractDecimals[contractAddr] = decimals; + } + + function unbindToken(bytes32 bep2Symbol, address contractAddr) external override onlyTokenManager { + delete bep2SymbolToContractAddr[bep2Symbol]; + delete contractAddrToBEP2Symbol[contractAddr]; } function isMiniBEP2Token(bytes32 symbol) internal pure returns(bool) { @@ -654,29 +506,6 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR return true; } - function checkSymbol(string memory bep2eSymbol, bytes32 bep2TokenSymbol) internal pure returns(bool) { - bytes memory bep2eSymbolBytes = bytes(bep2eSymbol); - if (bep2eSymbolBytes.length > MAXIMUM_BEP2E_SYMBOL_LEN || bep2eSymbolBytes.length < MINIMUM_BEP2E_SYMBOL_LEN) { - return false; - } - - bytes memory bep2TokenSymbolBytes = new bytes(32); - assembly { - mstore(add(bep2TokenSymbolBytes, 32), bep2TokenSymbol) - } - if (bep2TokenSymbolBytes[bep2eSymbolBytes.length] != 0x2d) { // '-' - return false; - } - bool symbolMatch = true; - for(uint256 index=0; index < bep2eSymbolBytes.length; index++) { - if (bep2eSymbolBytes[index] != bep2TokenSymbolBytes[index]) { - symbolMatch = false; - break; - } - } - return symbolMatch; - } - function convertToBep2Amount(uint256 amount, uint256 bep2eTokenDecimals) internal pure returns (uint256) { if (bep2eTokenDecimals > BEP2_TOKEN_DECIMALS) { return amount.div(10**(bep2eTokenDecimals-BEP2_TOKEN_DECIMALS)); @@ -692,7 +521,10 @@ contract TokenHub is ITokenHub, System, IParamSubscriber, IApplication, ISystemR } function getBoundContract(string memory bep2Symbol) public view returns (address) { - bytes32 bep2TokenSymbol = bep2TokenSymbolConvert(bep2Symbol); + bytes32 bep2TokenSymbol; + assembly { + bep2TokenSymbol := mload(add(bep2Symbol, 32)) + } return bep2SymbolToContractAddr[bep2TokenSymbol]; } diff --git a/contracts/TokenManager.sol b/contracts/TokenManager.sol new file mode 100644 index 00000000..68a426a2 --- /dev/null +++ b/contracts/TokenManager.sol @@ -0,0 +1,230 @@ +pragma solidity 0.6.4; + +import "./interface/IBEP2E.sol"; +import "./interface/ITokenHub.sol"; +import "./interface/IApplication.sol"; +import "./interface/ICrossChain.sol"; +import "./lib/SafeMath.sol"; +import "./lib/RLPEncode.sol"; +import "./lib/RLPDecode.sol"; +import "./System.sol"; + +contract TokenManager is System, IApplication { + + using SafeMath for uint256; + + using RLPEncode for *; + using RLPDecode for *; + + using RLPDecode for RLPDecode.RLPItem; + using RLPDecode for RLPDecode.Iterator; + + // BC to BSC + struct BindSynPackage { + uint8 packageType; + bytes32 bep2TokenSymbol; + address contractAddr; + uint256 totalSupply; + uint256 peggyAmount; + uint8 bep2eDecimals; + uint64 expireTime; + } + + // BSC to BC + struct ApproveBindSynPackage { + uint32 status; + bytes32 bep2TokenSymbol; + } + + uint8 constant public BIND_PACKAGE = 0; + uint8 constant public UNBIND_PACKAGE = 1; + + // bind status + uint8 constant public BIND_STATUS_SUCCESS = 0; + uint8 constant public BIND_STATUS_TIMEOUT = 1; + uint8 constant public BIND_STATUS_INCORRECT_PARAMETERS = 2; + uint8 constant public BIND_STATUS_REJECTED = 3; + + uint8 constant public MINIMUM_BEP2E_SYMBOL_LEN = 3; + uint8 constant public MAXIMUM_BEP2E_SYMBOL_LEN = 8; + + mapping(bytes32 => BindSynPackage) public bindPackageRecord; + + event unexpectedPackage(uint8 channelId, bytes msgBytes); + + constructor() public {} + + function handleSynPackage(uint8 /* channelId */, bytes calldata msgBytes) onlyCrossChainContract external override returns(bytes memory){ + return handleBindSynPackage(msgBytes); + } + + function handleAckPackage(uint8 channelId, bytes calldata msgBytes) onlyCrossChainContract external override { + emit unexpectedPackage(channelId, msgBytes); + } + + function handleFailAckPackage(uint8 channelId, bytes calldata msgBytes) onlyCrossChainContract external override { + emit unexpectedPackage(channelId, msgBytes); + } + + function decodeBindSynPackage(bytes memory msgBytes) internal pure returns(BindSynPackage memory, bool) { + BindSynPackage memory bindSynPkg; + RLPDecode.Iterator memory iter = msgBytes.toRLPItem().iterator(); + bool success = false; + uint256 idx=0; + while(iter.hasNext()) { + if ( idx == 0 ) bindSynPkg.packageType = uint8(iter.next().toUint()); + else if ( idx == 1 ) bindSynPkg.bep2TokenSymbol = bytes32(iter.next().toUint()); + else if ( idx == 2 ) bindSynPkg.contractAddr = iter.next().toAddress(); + else if ( idx == 3 ) bindSynPkg.totalSupply = iter.next().toUint(); + else if ( idx == 4 ) bindSynPkg.peggyAmount = iter.next().toUint(); + else if ( idx == 5 ) bindSynPkg.bep2eDecimals = uint8(iter.next().toUint()); + else if ( idx == 6 ) { + bindSynPkg.expireTime = uint64(iter.next().toUint()); + success = true; + } + else break; + idx++; + } + return (bindSynPkg, success); + } + + function handleBindSynPackage(bytes memory msgBytes) internal returns(bytes memory) { + (BindSynPackage memory bindSynPkg, bool success) = decodeBindSynPackage(msgBytes); + require(success, "unrecognized transferIn package"); + if (bindSynPkg.packageType == BIND_PACKAGE) { + bindPackageRecord[bindSynPkg.bep2TokenSymbol]=bindSynPkg; + } else if (bindSynPkg.packageType == UNBIND_PACKAGE) { + address contractAddr = ITokenHub(TOKEN_HUB_ADDR).getContractAddrByBEP2Symbol(bindSynPkg.bep2TokenSymbol); + if (contractAddr!=address(0x00)) { + ITokenHub(TOKEN_HUB_ADDR).unbindToken(bindSynPkg.bep2TokenSymbol, contractAddr); + } + } else { + require(false, "unrecognized bind package"); + } + return new bytes(0); + } + + function encodeApproveBindSynPackage(ApproveBindSynPackage memory approveBindSynPackage) internal pure returns (bytes memory) { + bytes[] memory elements = new bytes[](2); + elements[0] = approveBindSynPackage.status.encodeUint(); + elements[1] = uint256(approveBindSynPackage.bep2TokenSymbol).encodeUint(); + return elements.encodeList(); + } + + function approveBind(address contractAddr, string memory bep2Symbol) payable public returns (bool) { + bytes32 bep2TokenSymbol = bep2TokenSymbolConvert(bep2Symbol); + BindSynPackage memory bindSynPkg = bindPackageRecord[bep2TokenSymbol]; + require(bindSynPkg.bep2TokenSymbol!=bytes32(0x00), "bind request doesn't exist"); + uint256 lockedAmount = bindSynPkg.totalSupply.sub(bindSynPkg.peggyAmount); + require(contractAddr==bindSynPkg.contractAddr, "contact address doesn't equal to the contract address in bind request"); + require(IBEP2E(contractAddr).getOwner()==msg.sender, "only bep2e owner can approve this bind request"); + require(IBEP2E(contractAddr).allowance(msg.sender, address(this))==lockedAmount, "allowance doesn't equal to (totalSupply - peggyAmount)"); + uint256 relayFee = ITokenHub(TOKEN_HUB_ADDR).getRelayFee(); + require(msg.value == relayFee, "msg.value doesn't equal to relayFee"); + + if (bindSynPkg.expireTime MAXIMUM_BEP2E_SYMBOL_LEN || bep2eSymbolBytes.length < MINIMUM_BEP2E_SYMBOL_LEN) { + return false; + } + + bytes memory bep2TokenSymbolBytes = new bytes(32); + assembly { + mstore(add(bep2TokenSymbolBytes, 32), bep2TokenSymbol) + } + if (bep2TokenSymbolBytes[bep2eSymbolBytes.length] != 0x2d) { // '-' + return false; + } + bool symbolMatch = true; + for(uint256 index=0; index < bep2eSymbolBytes.length; index++) { + if (bep2eSymbolBytes[index] != bep2TokenSymbolBytes[index]) { + symbolMatch = false; + break; + } + } + return symbolMatch; + } +} diff --git a/contracts/interface/IApplication.sol b/contracts/interface/IApplication.sol index e06e06f4..49deed20 100644 --- a/contracts/interface/IApplication.sol +++ b/contracts/interface/IApplication.sol @@ -2,7 +2,7 @@ pragma solidity 0.6.4; interface IApplication { /** - * @dev Handle sync package + * @dev Handle syn package */ function handleSynPackage(uint8 channelId, bytes calldata msgBytes) external returns(bytes memory responsePayload); diff --git a/contracts/interface/ITokenHub.sol b/contracts/interface/ITokenHub.sol index 94f823ba..24e02913 100644 --- a/contracts/interface/ITokenHub.sol +++ b/contracts/interface/ITokenHub.sol @@ -4,6 +4,14 @@ interface ITokenHub { function getRelayFee() external returns(uint256); + function getContractAddrByBEP2Symbol(bytes32 bep2Symbol) external returns(address); + + function getBep2SymbolByContractAddr(address contractAddr) external returns(bytes32); + + function bindToken(bytes32 bep2Symbol, address contractAddr, uint256 decimals) external; + + function unbindToken(bytes32 bep2Symbol, address contractAddr) external; + function transferOut(address contractAddr, address recipient, uint256 amount, uint64 expireTime) external payable returns (bool); diff --git a/contracts/Seriality/BytesLib.sol b/contracts/lib/BytesLib.sol similarity index 100% rename from contracts/Seriality/BytesLib.sol rename to contracts/lib/BytesLib.sol diff --git a/contracts/Seriality/BytesToTypes.sol b/contracts/lib/BytesToTypes.sol similarity index 100% rename from contracts/Seriality/BytesToTypes.sol rename to contracts/lib/BytesToTypes.sol diff --git a/contracts/rlp/CmnPkg.sol b/contracts/lib/CmnPkg.sol similarity index 100% rename from contracts/rlp/CmnPkg.sol rename to contracts/lib/CmnPkg.sol diff --git a/contracts/Seriality/Memory.sol b/contracts/lib/Memory.sol similarity index 100% rename from contracts/Seriality/Memory.sol rename to contracts/lib/Memory.sol diff --git a/contracts/rlp/RLPDecode.sol b/contracts/lib/RLPDecode.sol similarity index 100% rename from contracts/rlp/RLPDecode.sol rename to contracts/lib/RLPDecode.sol diff --git a/contracts/rlp/RLPEncode.sol b/contracts/lib/RLPEncode.sol similarity index 100% rename from contracts/rlp/RLPEncode.sol rename to contracts/lib/RLPEncode.sol diff --git a/contracts/Seriality/SizeOf.sol b/contracts/lib/SizeOf.sol similarity index 100% rename from contracts/Seriality/SizeOf.sol rename to contracts/lib/SizeOf.sol diff --git a/contracts/Seriality/TypesToBytes.sol b/contracts/lib/TypesToBytes.sol similarity index 100% rename from contracts/Seriality/TypesToBytes.sol rename to contracts/lib/TypesToBytes.sol diff --git a/contracts/mock/MockTokenHub.sol b/contracts/mock/MockTokenHub.sol index 340e25bf..0069aa50 100644 --- a/contracts/mock/MockTokenHub.sol +++ b/contracts/mock/MockTokenHub.sol @@ -10,6 +10,18 @@ contract MockTokenHub is ITokenHub { return (1e16); } + function getContractAddrByBEP2Symbol(bytes32 bep2Symbol) external override(ITokenHub) returns(address){ + return address(0x0); + } + + function getBep2SymbolByContractAddr(address contractAddr) external override(ITokenHub) returns(bytes32){ + return bytes32(0x0); + } + + function bindToken(bytes32 bep2Symbol, address contractAddr, uint256 decimals) external override(ITokenHub){} + + function unbindToken(bytes32 bep2Symbol, address contractAddr) external override(ITokenHub){} + function transferOut(address, address, uint256, uint64) external override(ITokenHub) payable returns (bool) { return true; diff --git a/contracts/tool/BSCValidatorSetTool.sol b/contracts/tool/BSCValidatorSetTool.sol index 7514d9fb..6f6302b0 100644 --- a/contracts/tool/BSCValidatorSetTool.sol +++ b/contracts/tool/BSCValidatorSetTool.sol @@ -1,7 +1,7 @@ pragma solidity 0.6.4; -import "../rlp/RLPDecode.sol"; - +import "../lib/RLPDecode.sol"; +import "../lib/Memory.sol"; contract BSCValidatorSetTool { @@ -23,11 +23,11 @@ contract BSCValidatorSetTool { } function init() external { - bool valid= decodeValidatorSetSyncPackage(INIT_VALIDATORSET_BYTES); + bool valid= decodeValidatorSetSynPackage(INIT_VALIDATORSET_BYTES); require(valid, "failed to init"); } - function decodeValidatorSetSyncPackage(bytes memory msgBytes) internal pure returns (bool) { + function decodeValidatorSetSynPackage(bytes memory msgBytes) internal pure returns (bool) { IbcValidatorSetPackage memory validatorSetPkg; RLPDecode.Iterator memory iter = msgBytes.toRLPItem().iterator(); @@ -77,4 +77,36 @@ contract BSCValidatorSetTool { } return (validator, success); } + + // | type | relayFee |package | + // | 1 byte | 32 bytes | bytes | + function decodePayloadHeader(bytes memory payload) public pure returns(bool, uint8, uint256, bytes memory) { + if (payload.length < 33) { + return (false, 0, 0, new bytes(0)); + } + + uint256 ptr; + assembly { + ptr := payload + } + + uint8 packageType; + ptr+=1; + assembly { + packageType := mload(ptr) + } + + uint256 relayFee; + ptr+=32; + assembly { + relayFee := mload(ptr) + } + + ptr+=32; + bytes memory msgBytes = new bytes(payload.length-33); + (uint256 dst, ) = Memory.fromBytes(msgBytes); + Memory.copy(ptr, dst, payload.length-33); + + return (true, packageType, relayFee, msgBytes); + } } \ No newline at end of file diff --git a/generate-genesis.js b/generate-genesis.js index 8daa4280..850e11a5 100644 --- a/generate-genesis.js +++ b/generate-genesis.js @@ -107,6 +107,11 @@ Promise.all([ "contracts/GovHub.sol", "GovHub" ), + compileContract( + "tokenManager", + "contracts/TokenManager.sol", + "TokenManager" + ), compileContract( "crossChain", "contracts/CrossChain.sol", diff --git a/genesis-template.json b/genesis-template.json index 6eedc463..cf06bfbe 100644 --- a/genesis-template.json +++ b/genesis-template.json @@ -59,6 +59,10 @@ "balance": "0x0", "code": "0x{{govHub}}" }, + "0x0000000000000000000000000000000000001008": { + "balance": "0x0", + "code": "0x{{tokenManager}}" + }, "0x0000000000000000000000000000000000002000": { "balance": "0x0", "code": "0x{{crossChain}}" diff --git a/genesis.json b/genesis.json index 1c90d215..841d0c3b 100644 --- a/genesis.json +++ b/genesis.json @@ -29,39 +29,43 @@ }, "0x0000000000000000000000000000000000001000": { "balance": "0x0", - "code": "0x60806040526004361061025c5760003560e01c806396713da911610144578063c81b1662116100b6578063eb57e2021161007a578063eb57e202146108e0578063eda5868c14610913578063f340fa0114610928578063f9a2bbc71461094e578063fc3e590814610963578063fd6a6879146109785761025c565b8063c81b16621461088c578063c8509d81146105d3578063d86222d5146108a1578063dc927faf146108b6578063e1c7392a146108cb5761025c565b8063aaf5eb6811610108578063aaf5eb68146106ff578063ab51bb9614610714578063ac43175114610729578063ad3c9da6146107f4578063b7ab4db514610827578063bf9f4995146103fa5761025c565b806396713da9146106825780639dc0926214610697578063a1a11bf5146106ac578063a5422d5c146106c1578063a78abc16146106d65761025c565b8063565c56b3116101dd57806370fd5bad116101a157806370fd5bad146105945780637942fd05146105a957806381650b62146105be578063831d65d1146105d3578063853230aa14610658578063862498821461066d5761025c565b8063565c56b3146104ac5780635667515a146104df5780635d77156c146104f45780636969a25c146105095780636e47b4821461057f5761025c565b80633dffc387116102245780633dffc387146103fa57806343756e5c14610425578063493279b1146104565780634bf6c8821461048257806351e80672146104975761025c565b80630bee7a67146102615780631182b8751461028f5780631ff1806914610389578063219f22d5146103b057806335409f7f146103c5575b600080fd5b34801561026d57600080fd5b5061027661098d565b6040805163ffffffff9092168252519081900360200190f35b34801561029b57600080fd5b50610314600480360360408110156102b257600080fd5b60ff8235169190810190604081016020820135600160201b8111156102d657600080fd5b8201836020820111156102e857600080fd5b803590602001918460018302840111600160201b8311171561030957600080fd5b509092509050610992565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561034e578181015183820152602001610336565b50505050905090810190601f16801561037b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561039557600080fd5b5061039e610b06565b60408051918252519081900360200190f35b3480156103bc57600080fd5b50610276610b0c565b3480156103d157600080fd5b506103f8600480360360208110156103e857600080fd5b50356001600160a01b0316610b11565b005b34801561040657600080fd5b5061040f610e25565b6040805160ff9092168252519081900360200190f35b34801561043157600080fd5b5061043a610e2a565b604080516001600160a01b039092168252519081900360200190f35b34801561046257600080fd5b5061046b610e30565b6040805161ffff9092168252519081900360200190f35b34801561048e57600080fd5b5061040f610e35565b3480156104a357600080fd5b5061043a610e3a565b3480156104b857600080fd5b5061039e600480360360208110156104cf57600080fd5b50356001600160a01b0316610e40565b3480156104eb57600080fd5b5061040f610e92565b34801561050057600080fd5b50610276610e97565b34801561051557600080fd5b506105336004803603602081101561052c57600080fd5b5035610e9c565b604080516001600160a01b039788168152958716602087015293909516848401526001600160401b0390911660608401521515608083015260a082019290925290519081900360c00190f35b34801561058b57600080fd5b5061043a610f00565b3480156105a057600080fd5b5061040f610f06565b3480156105b557600080fd5b5061040f610f0b565b3480156105ca57600080fd5b50610276610f10565b3480156105df57600080fd5b506103f8600480360360408110156105f657600080fd5b60ff8235169190810190604081016020820135600160201b81111561061a57600080fd5b82018360208201111561062c57600080fd5b803590602001918460018302840111600160201b8311171561064d57600080fd5b509092509050610f15565b34801561066457600080fd5b5061039e610fc8565b34801561067957600080fd5b5061039e610fce565b34801561068e57600080fd5b5061040f610fd4565b3480156106a357600080fd5b5061043a610fd9565b3480156106b857600080fd5b5061043a610fdf565b3480156106cd57600080fd5b50610314610fe5565b3480156106e257600080fd5b506106eb611001565b604080519115158252519081900360200190f35b34801561070b57600080fd5b5061039e61100a565b34801561072057600080fd5b50610276610e92565b34801561073557600080fd5b506103f86004803603604081101561074c57600080fd5b810190602081018135600160201b81111561076657600080fd5b82018360208201111561077857600080fd5b803590602001918460018302840111600160201b8311171561079957600080fd5b919390929091602081019035600160201b8111156107b657600080fd5b8201836020820111156107c857600080fd5b803590602001918460018302840111600160201b831117156107e957600080fd5b509092509050611013565b34801561080057600080fd5b5061039e6004803603602081101561081757600080fd5b50356001600160a01b03166112ba565b34801561083357600080fd5b5061083c6112cc565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610878578181015183820152602001610860565b505050509050019250505060405180910390f35b34801561089857600080fd5b5061043a6113f2565b3480156108ad57600080fd5b5061039e6113f8565b3480156108c257600080fd5b5061043a611404565b3480156108d757600080fd5b506103f861140a565b3480156108ec57600080fd5b506103f86004803603602081101561090357600080fd5b50356001600160a01b031661160a565b34801561091f57600080fd5b506102766117d9565b6103f86004803603602081101561093e57600080fd5b50356001600160a01b03166117de565b34801561095a57600080fd5b5061043a6119f4565b34801561096f57600080fd5b5061040f6119fa565b34801561098457600080fd5b5061043a6119ff565b606481565b60005460609060ff166109e8576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3361200014610a285760405162461bcd60e51b815260040180806020018281038252602f815260200180613dd9602f913960400191505060405180910390fd5b610a30613bfd565b6000610a7185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a0592505050565b9150915080610a8d57610a846064611b5e565b92505050610aff565b815160009060ff16610aad57610aa68360200151611bbf565b9050610acb565b825160ff1660011415610ac757610aa683602001516129c2565b5060655b63ffffffff8116610af05750506040805160008152602081019091529150610aff9050565b610af981611b5e565b93505050505b9392505050565b60035481565b606881565b3361100114610b515760405162461bcd60e51b8152600401808060200182810382526029815260200180613e356029913960400191505060405180910390fd5b6001600160a01b03811660009081526004602052604090205480610b755750610e22565b600181039050600060018281548110610b8a57fe5b60009182526020909120600360049092020101546001549091506000190180610bd957600060018481548110610bbc57fe5b906000526020600020906004020160030181905550505050610e22565b6040805183815290516001600160a01b038616917f3b6f9ef90462b512a1293ecec018670bf7b7f1876fb727590a8a6d7643130a70919081900360200190a26001600160a01b038416600090815260046020526040812055600154600019018314610d5b57600180546000198101908110610c5057fe5b906000526020600020906004020160018481548110610c6b57fe5b6000918252602082208354600492830290910180546001600160a01b03199081166001600160a01b0393841617825560018087015481840180548416918616919091179055600280880180549185018054909416919095161780835584546001600160401b03600160a01b91829004160267ffffffffffffffff60a01b1990911617808355935460ff600160e01b918290041615150260ff60e01b199094169390931790556003948501549401939093558254868401939192919087908110610d3057fe5b600091825260208083206004909202909101546001600160a01b031683528201929092526040019020555b6001805480610d6657fe5b60008281526020812060046000199093019283020180546001600160a01b0319908116825560018201805490911690556002810180546001600160e81b03191690556003018190559155818381610db957fe5b0490508015610e1d5760015460005b81811015610e1a578260018281548110610dde57fe5b9060005260206000209060040201600301540160018281548110610dfe57fe5b6000918252602090912060036004909202010155600101610dc8565b50505b505050505b50565b600181565b61100181565b606081565b600881565b61200081565b6001600160a01b03811660009081526004602052604081205480610e68576000915050610e8d565b600180820381548110610e7757fe5b9060005260206000209060040201600301549150505b919050565b600081565b606781565b60018181548110610ea957fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b0392831694509082169291821691600160a01b81046001600160401b031691600160e01b90910460ff169086565b61100581565b600281565b600b81565b606681565b3361200014610f555760405162461bcd60e51b815260040180806020018281038252602f815260200180613dd9602f913960400191505060405180910390fd5b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b6103e881565b60025481565b600981565b61100781565b61100681565b604051806080016040528060478152602001613d716047913981565b60005460ff1681565b6402540be40081565b60005460ff16611066576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146110a65760405162461bcd60e51b815260040180806020018281038252602e815260200180613cfc602e913960400191505060405180910390fd5b61111084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526013815272065787069726554696d655365636f6e6447617606c1b60208201529150612c009050565b156111eb57602081146111545760405162461bcd60e51b8152600401808060200182810382526026815260200180613d4b6026913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161119291858580838501838280828437600092019190915250612ce892505050565b9050606481101580156111a85750620186a08111155b6111e35760405162461bcd60e51b8152600401808060200182810382526027815260200180613cb06027913960400191505060405180910390fd5b600255611228565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60046020526000908152604090205481565b6001546060906000805b8281101561131d57600181815481106112eb57fe5b9060005260206000209060040201600201601c9054906101000a900460ff16611315576001909101905b6001016112d6565b5060608160405190808252806020026020018201604052801561134a578160200160208202803683370190505b50600092509050815b838110156113ea576001818154811061136857fe5b9060005260206000209060040201600201601c9054906101000a900460ff166113e2576001818154811061139857fe5b600091825260209091206004909102015482516001600160a01b03909116908390859081106113c357fe5b6001600160a01b03909216602092830291909101909101526001909201915b600101611353565b509250505090565b61100281565b67016345785d8a000081565b61100381565b60005460ff1615611462576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b61146a613bfd565b600061148d604051806080016040528060478152602001613d7160479139611a05565b91509150806114cd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613db86021913960400191505060405180910390fd5b60005b8260200151518110156115f2576001836020015182815181106114ef57fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782558587015182850180549185169183169190911790556040860151600283018054606089015160808a01511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590981692909516919091179290921694909417161790915560a0909301516003909301929092559186015180519185019391859081106115c557fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016114d0565b50506103e8600255506000805460ff19166001179055565b336110011461164a5760405162461bcd60e51b8152600401808060200182810382526029815260200180613e356029913960400191505060405180910390fd5b6001600160a01b0381166000908152600460205260409020548061166e5750610e22565b60018103905060006001828154811061168357fe5b90600052602060002090600402016003015490506000600183815481106116a657fe5b906000526020600020906004020160030181905550600060018080549050039050836001600160a01b03167f8cd4e147d8af98a9e3b6724021b8bf6aed2e5dac71c38f2dce8161b82585b25d836040518082815260200191505060405180910390a28061171557505050610e22565b600081838161172057fe5b0490508015610e1d5760005b8481101561177e57816001828154811061174257fe5b906000526020600020906004020160030154016001828154811061176257fe5b600091825260209091206003600490920201015560010161172c565b50600180549085015b81811015610e1a57826001828154811061179d57fe5b90600052602060002090600402016003015401600182815481106117bd57fe5b6000918252602090912060036004909202010155600101611787565b606581565b33411461181c5760405162461bcd60e51b815260040180806020018281038252602d815260200180613e08602d913960400191505060405180910390fd5b60005460ff1661186f576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b600034116118bc576040805162461bcd60e51b81526020600482015260156024820152746465706f7369742076616c7565206973207a65726f60581b604482015290519081900360640190fd5b6001600160a01b038116600090815260046020526040902054349080156119af5760006001808303815481106118ee57fe5b9060005260206000209060040201905080600201601c9054906101000a900460ff1615611959576040805184815290516001600160a01b038616917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a26119a9565b600380548401815581018054840190556040805184815290516001600160a01b038616917f93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055919081900360200190a25b506119ef565b6040805183815290516001600160a01b038516917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a25b505050565b61100081565b600381565b61100481565b611a0d613bfd565b6000611a17613bfd565b611a1f613c15565b611a30611a2b86612ced565b612d12565b90506000805b611a3f83612d5c565b15611b505780611a6457611a5a611a5584612d7d565b612dcb565b60ff168452611b48565b8060011415611b43576060611a80611a7b85612d7d565b612e2b565b90508051604051908082528060200260200182016040528015611abd57816020015b611aaa613c35565b815260200190600190039081611aa25790505b50602086015260005b8151811015611b3857611ad7613c35565b6000611af5848481518110611ae857fe5b6020026020010151612efc565b9150915080611b1257876000995099505050505050505050611b59565b8188602001518481518110611b2357fe5b60209081029190910101525050600101611ac6565b506001925050611b48565b611b50565b600101611a36565b50919350909150505b915091565b604080516001808252818301909252606091829190816020015b6060815260200190600190039081611b78579050509050611b9e8363ffffffff16612fd9565b81600081518110611bab57fe5b6020026020010181905250610aff81612fec565b6000806060611bcd84613076565b9150915081611c7a577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b83811015611c35578181015183820152602001611c1d565b50505050905090810190601f168015611c625780820380516001836020036101000a031916815260200191505b509250505060405180910390a1606692505050610e8d565b600080805b600154811015611cf75767016345785d8a000060018281548110611c9f57fe5b90600052602060002090600402016003015410611cc157600190920191611cef565b600060018281548110611cd057fe5b9060005260206000209060040201600301541115611cef576001909101905b600101611c7f565b50606082604051908082528060200260200182016040528015611d24578160200160208202803683370190505b509050606083604051908082528060200260200182016040528015611d53578160200160208202803683370190505b509050606084604051908082528060200260200182016040528015611d82578160200160208202803683370190505b509050606085604051908082528060200260200182016040528015611db1578160200160208202803683370190505b5090506000606086604051908082528060200260200182016040528015611de2578160200160208202803683370190505b509050606087604051908082528060200260200182016040528015611e11578160200160208202803683370190505b509050600098506000975060608d905060006110046001600160a01b0316635170639c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611e6057600080fd5b505af1158015611e74573d6000803e3d6000fd5b505050506040513d6020811015611e8a57600080fd5b5051905067016345785d8a0000811115611eff577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2604051808060200182810382526021815260200180613d2a6021913960400191505060405180910390a160689d5050505050505050505050505050610e8d565b60005b6001548110156121725767016345785d8a000060018281548110611f2257fe5b906000526020600020906004020160030154106120a85760018181548110611f4657fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b03168a8d81518110611f7757fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006402540be40060018381548110611fac57fe5b90600052602060002090600402016003015481611fc557fe5b0660018381548110611fd357fe5b906000526020600020906004020160030154039050611ffb838261312990919063ffffffff16565b8a8e8151811061200757fe5b6020026020010181815250506001828154811061202057fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b0316888e8151811061205157fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081898e8151811061207e57fe5b6020908102919091010152612099878263ffffffff61316b16565b6001909d019c965061216a9050565b6000600182815481106120b757fe5b906000526020600020906004020160030154111561216a57600181815481106120dc57fe5b906000526020600020906004020160010160009054906101000a90046001600160a01b0316858c8151811061210d57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506001818154811061213a57fe5b906000526020600020906004020160030154848c8151811061215857fe5b60209081029190910101526001909a01995b600101611f02565b50600085156125b0576110046001600160a01b0316636e056520878c8c8b60025442016040518663ffffffff1660e01b815260040180806020018060200180602001856001600160401b03166001600160401b03168152602001848103845288818151815260200191508051906020019060200280838360005b838110156122045781810151838201526020016121ec565b50505050905001848103835287818151815260200191508051906020019060200280838360005b8381101561224357818101518382015260200161222b565b50505050905001848103825286818151815260200191508051906020019060200280838360005b8381101561228257818101518382015260200161226a565b505050509050019750505050505050506020604051808303818588803b1580156122ab57600080fd5b505af1935050505080156122d157506040513d60208110156122cc57600080fd5b505160015b61250c576040516000815260443d10156122ed57506000612388565b60046000803e60005160e01c6308c379a0811461230e576000915050612388565b60043d036004833e81513d60248201116001600160401b038211171561233957600092505050612388565b80830180516001600160401b0381111561235a576000945050505050612388565b8060208301013d860181111561237857600095505050505050612388565b601f01601f191660405250925050505b806123935750612437565b60019150867fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280826040518080602001828103825283818151815260200191508051906020019080838360005b838110156123f75781810151838201526020016123df565b50505050905090810190601f1680156124245780820380516001836020036101000a031916815260200191505b509250505060405180910390a250612507565b3d808015612461576040519150601f19603f3d011682016040523d82523d6000602084013e612466565b606091505b5060019150867fbfa884552dd8921b6ce90bfe906952ae5b3b29be0cc1a951d4f62697635a3a45826040518080602001828103825283818151815260200191508051906020019080838360005b838110156124cb5781810151838201526020016124b3565b50505050905090810190601f1680156124f85780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6125b0565b801561254a576040805188815290517fa217d08e65f80c73121cd9db834d81652d544bfbf452f6d04922b16c90a37b709181900360200190a16125ae565b604080516020808252601b908201527f6261746368207472616e736665722072657475726e2066616c7365000000000081830152905188917fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280919081900360600190a25b505b80156127665760005b88518110156127645760008982815181106125d057fe5b602002602001015190506000600182815481106125e957fe5b60009182526020909120600160049092020181015481546001600160a01b03909116916108fc918590811061261a57fe5b9060005260206000209060040201600301549081150290604051600060405180830381858888f19350505050905080156126d6576001828154811061265b57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d91859081106126aa57fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a261275a565b600182815481106126e357fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d918590811061273257fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a25b50506001016125b9565b505b8451156128b05760005b85518110156128ae57600086828151811061278757fe5b60200260200101516001600160a01b03166108fc8784815181106127a757fe5b60200260200101519081150290604051600060405180830381858888f193505050509050801561283d578682815181106127dd57fe5b60200260200101516001600160a01b03167f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d87848151811061281b57fe5b60200260200101516040518082815260200191505060405180910390a26128a5565b86828151811061284957fe5b60200260200101516001600160a01b03167f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d87848151811061288757fe5b60200260200101516040518082815260200191505060405180910390a25b50600101612770565b505b4715612919576040805147815290517f6ecc855f9440a9282c90913bbc91619fd44f5ec0b462af28d127b116f130aa4d9181900360200190a1604051611002904780156108fc02916000818181858888f19350505050158015612917573d6000803e3d6000fd5b505b600060035582511561292e5761292e836131c5565b6110016001600160a01b031663fc4333cd6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561296b57600080fd5b505af115801561297f573d6000803e3d6000fd5b50506040517fedd8d7296956dd970ab4de3f2fc03be2b0ffc615d20cd4c72c6e44f928630ebf925060009150a15060009f9e505050505050505050505050505050565b60008151600114612a20577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2604051808060200182810382526025815260200180613cd76025913960400191505060405180910390a1506067610e8d565b612a28613c35565b82600081518110612a3557fe5b60209081029190910181015180516001600160a01b03166000908152600490925260409091205490915080612aa65781516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a2600092505050610e8d565b600154600090815b81811015612b385760018181548110612ac357fe5b9060005260206000209060040201600201601c9054906101000a900460ff16158015612b22575084600001516001600160a01b031660018281548110612b0557fe5b60009182526020909120600490910201546001600160a01b031614155b15612b305760019250612b38565b600101612aae565b5081612b825783516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a26000945050505050610e8d565b6001806001850381548110612b9357fe5b6000918252602082206002600490920201018054921515600160e01b0260ff60e01b199093169290921790915584516040516001600160a01b03909116917ff226e7d8f547ff903d9d419cf5f54e0d7d07efa9584135a53a057c5f1f27f49a91a250600095945050505050565b6000816040516020018082805190602001908083835b60208310612c355780518252601f199092019160209182019101612c16565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612ca35780518252601f199092019160209182019101612c84565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b612cf5613c6a565b506040805180820190915281518152602082810190820152919050565b612d1a613c15565b612d238261368c565b612d2c57600080fd5b6000612d3b83602001516136c6565b60208085015160408051808201909152868152920190820152915050919050565b6000612d66613c6a565b505080518051602091820151919092015191011190565b612d85613c6a565b612d8e82612d5c565b612d9757600080fd5b60208201516000612da782613729565b80830160209586015260408051808201909152908152938401919091525090919050565b805160009015801590612de057508151602110155b612de957600080fd5b6000612df883602001516136c6565b83516020808601518301805193945091849003929190831015612e2257826020036101000a820491505b50949350505050565b6060612e368261368c565b612e3f57600080fd5b6000612e4a836137c2565b9050606081604051908082528060200260200182016040528015612e8857816020015b612e75613c6a565b815260200190600190039081612e6d5790505b5090506000612e9a85602001516136c6565b60208601510190506000805b84811015612ef157612eb783613729565b9150604051806040016040528083815260200184815250848281518110612eda57fe5b602090810291909101015291810191600101612ea6565b509195945050505050565b612f04613c35565b6000612f0e613c35565b612f16613c15565b612f1f85612d12565b90506000805b612f2e83612d5c565b15611b505780612f5957612f49612f4484612d7d565b61381e565b6001600160a01b03168452612fd1565b8060011415612f8157612f6e612f4484612d7d565b6001600160a01b03166020850152612fd1565b8060021415612fa957612f96612f4484612d7d565b6001600160a01b03166040850152612fd1565b8060031415611b4357612fbe611a5584612d7d565b6001600160401b03166060850152600191505b600101612f25565b6060612ce2612fe783613838565b61391e565b606081516000141561300d5750604080516000815260208101909152610e8d565b60608260008151811061301c57fe5b602002602001015190506000600190505b835181101561305d576130538285838151811061304657fe5b6020026020010151613970565b915060010161302d565b50610aff613070825160c060ff166139ed565b82613970565b60006060815b835181101561310f5760005b818110156131065784818151811061309c57fe5b6020026020010151600001516001600160a01b03168583815181106130bd57fe5b6020026020010151600001516001600160a01b031614156130fe5760006040518060600160405280602b8152602001613c85602b9139935093505050611b59565b600101613088565b5060010161307c565b505060408051602081019091526000815260019150915091565b6000610aff83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613ae5565b600082820183811015610aff576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154815160005b828110156132e25760016131df613c35565b600183815481106131ec57fe5b600091825260208083206040805160c08101825260049490940290910180546001600160a01b0390811685526001820154811693850193909352600281015492831691840191909152600160a01b82046001600160401b03166060840152600160e01b90910460ff16151560808301526003015460a082015291505b848110156132b65786818151811061327c57fe5b6020026020010151600001516001600160a01b031682600001516001600160a01b031614156132ae57600092506132b6565b600101613268565b5081156132d85780516001600160a01b03166000908152600460205260408120555b50506001016131cd565b508082111561335757805b8281101561335557600180548061330057fe5b60008281526020812060046000199093019283020180546001600160a01b03199081168255600182810180549092169091556002820180546001600160e81b03191690556003909101919091559155016132ed565b505b60008183106133665781613368565b825b905060005b818110156135625761341a85828151811061338457fe5b60200260200101516001838154811061339957fe5b60009182526020918290206040805160c08101825260049390930290910180546001600160a01b0390811684526001820154811694840194909452600281015493841691830191909152600160a01b83046001600160401b03166060830152600160e01b90920460ff161515608082015260039091015460a0820152613b7c565b61353557806001016004600087848151811061343257fe5b6020026020010151600001516001600160a01b03166001600160a01b031681526020019081526020016000208190555084818151811061346e57fe5b60200260200101516001828154811061348357fe5b6000918252602091829020835160049092020180546001600160a01b039283166001600160a01b0319918216178255928401516001820180549184169185169190911790556040840151600282018054606087015160808801511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b1995909716929097169190911792909216939093171692909217905560a09091015160039091015561355a565b60006001828154811061354457fe5b9060005260206000209060040201600301819055505b60010161336d565b508282111561368657825b82811015610e1d57600185828151811061358357fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782559585015181840180549184169188169190911790556040850151600282018054606088015160808901511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590971692909a169190911792909216939093171695909517905560a0909201516003909301929092558751908401929088908590811061365957fe5b602090810291909101810151516001600160a01b031682528101919091526040016000205560010161356d565b50505050565b805160009061369d57506000610e8d565b6020820151805160001a9060c08210156136bc57600092505050610e8d565b5060019392505050565b8051600090811a60808110156136e0576000915050610e8d565b60b88110806136fb575060c081108015906136fb575060f881105b1561370a576001915050610e8d565b60c081101561371e5760b519019050610e8d565b60f519019050610e8d565b80516000908190811a608081101561374457600191506137bb565b60b881101561375957607e19810191506137bb565b60c08110156137865760b78103600185019450806020036101000a855104600182018101935050506137bb565b60f881101561379b5760be19810191506137bb565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80516000906137d357506000610e8d565b600080905060006137e784602001516136c6565b602085015185519181019250015b808210156138155761380682613729565b600190930192909101906137f5565b50909392505050565b805160009060151461382f57600080fd5b612ce282612dcb565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff19841661387c575060186138a0565b6fffffffffffffffffffffffffffffffff19841661389c575060106138a0565b5060005b60208110156138d6578181815181106138b557fe5b01602001516001600160f81b031916156138ce576138d6565b6001016138a0565b60008160200390506060816040519080825280601f01601f19166020018201604052801561390b576020820181803683370190505b5080830196909652508452509192915050565b6060815160011480156139505750607f60f81b8260008151811061393e57fe5b01602001516001600160f81b03191611155b1561395c575080610e8d565b612ce261396e8351608060ff166139ed565b835b6060806040519050835180825260208201818101602087015b818310156139a1578051835260209283019201613989565b50855184518101855292509050808201602086015b818310156139ce5780518352602092830192016139b6565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310613a3d576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b60408051600180825281830190925260609160208201818036833701905050905060378411613a975782840160f81b81600081518110613a7957fe5b60200101906001600160f81b031916908160001a9053509050612ce2565b6060613aa285613838565b90508381510160370160f81b82600081518110613abb57fe5b60200101906001600160f81b031916908160001a905350613adc8282613970565b95945050505050565b60008184841115613b745760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b39578181015183820152602001613b21565b50505050905090810190601f168015613b665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b805182516000916001600160a01b039182169116148015613bb6575081602001516001600160a01b031683602001516001600160a01b0316145b8015613bdb575081604001516001600160a01b031683604001516001600160a01b0316145b8015610aff5750506060908101519101516001600160401b0390811691161490565b60408051808201909152600081526060602082015290565b6040518060400160405280613c28613c6a565b8152602001600081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180604001604052806000815260200160008152509056fe6475706c696361746520636f6e73656e7375732061646472657373206f662076616c696461746f725365747468652065787069726554696d655365636f6e64476170206973206f7574206f662072616e67656c656e677468206f66206a61696c2076616c696461746f7273206d757374206265206f6e65746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374666565206973206c6172676572207468616e2044555354595f494e434f4d494e476c656e677468206f662065787069726554696d655365636f6e64476170206d69736d61746368f84580f842f840949fb29aac15b9a4b7f17c3385939b007540f4d791949fb29aac15b9a4b7f17c3385939b007540f4d791949fb29aac15b9a4b7f17c3385939b007540f4d791646661696c656420746f20706172736520696e69742076616c696461746f72536574746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572746865206d6573736167652073656e646572206d75737420626520736c61736820636f6e7472616374a2646970667358221220247c1fde0c3daae71b6bf2a9de0a932a8516b6492ead11f83de379c413c4660764736f6c63430006040033" + "code": "0x6080604052600436106102675760003560e01c806396713da911610144578063c81b1662116100b6578063eb57e2021161007a578063eb57e20214610900578063eda5868c14610933578063f340fa0114610948578063f9a2bbc71461096e578063fc3e590814610983578063fd6a68791461099857610267565b8063c81b1662146108ac578063c8509d81146105f3578063d86222d5146108c1578063dc927faf146108d6578063e1c7392a146108eb57610267565b8063aaf5eb6811610108578063aaf5eb681461071f578063ab51bb9614610734578063ac43175114610749578063ad3c9da614610814578063b7ab4db514610847578063bf9f49951461040557610267565b806396713da9146106a25780639dc09262146106b7578063a1a11bf5146106cc578063a5422d5c146106e1578063a78abc16146106f657610267565b80635667515a116101dd57806375d47a0a116101a157806375d47a0a146105b45780637942fd05146105c957806381650b62146105de578063831d65d1146105f3578063853230aa14610678578063862498821461068d57610267565b80635667515a146104ea5780635d77156c146104ff5780636969a25c146105145780636e47b4821461058a57806370fd5bad1461059f57610267565b80633dffc3871161022f5780633dffc3871461040557806343756e5c14610430578063493279b1146104615780634bf6c8821461048d57806351e80672146104a2578063565c56b3146104b757610267565b80630bee7a671461026c5780631182b8751461029a5780631ff1806914610394578063219f22d5146103bb57806335409f7f146103d0575b600080fd5b34801561027857600080fd5b506102816109ad565b6040805163ffffffff9092168252519081900360200190f35b3480156102a657600080fd5b5061031f600480360360408110156102bd57600080fd5b60ff8235169190810190604081016020820135600160201b8111156102e157600080fd5b8201836020820111156102f357600080fd5b803590602001918460018302840111600160201b8311171561031457600080fd5b5090925090506109b2565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610359578181015183820152602001610341565b50505050905090810190601f1680156103865780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103a057600080fd5b506103a9610b26565b60408051918252519081900360200190f35b3480156103c757600080fd5b50610281610b2c565b3480156103dc57600080fd5b50610403600480360360208110156103f357600080fd5b50356001600160a01b0316610b31565b005b34801561041157600080fd5b5061041a610e45565b6040805160ff9092168252519081900360200190f35b34801561043c57600080fd5b50610445610e4a565b604080516001600160a01b039092168252519081900360200190f35b34801561046d57600080fd5b50610476610e50565b6040805161ffff9092168252519081900360200190f35b34801561049957600080fd5b5061041a610e55565b3480156104ae57600080fd5b50610445610e5a565b3480156104c357600080fd5b506103a9600480360360208110156104da57600080fd5b50356001600160a01b0316610e60565b3480156104f657600080fd5b5061041a610eb2565b34801561050b57600080fd5b50610281610eb7565b34801561052057600080fd5b5061053e6004803603602081101561053757600080fd5b5035610ebc565b604080516001600160a01b039788168152958716602087015293909516848401526001600160401b0390911660608401521515608083015260a082019290925290519081900360c00190f35b34801561059657600080fd5b50610445610f20565b3480156105ab57600080fd5b5061041a610f26565b3480156105c057600080fd5b50610445610f2b565b3480156105d557600080fd5b5061041a610f31565b3480156105ea57600080fd5b50610281610f36565b3480156105ff57600080fd5b506104036004803603604081101561061657600080fd5b60ff8235169190810190604081016020820135600160201b81111561063a57600080fd5b82018360208201111561064c57600080fd5b803590602001918460018302840111600160201b8311171561066d57600080fd5b509092509050610f3b565b34801561068457600080fd5b506103a9610fee565b34801561069957600080fd5b506103a9610ff4565b3480156106ae57600080fd5b5061041a610ffa565b3480156106c357600080fd5b50610445610fff565b3480156106d857600080fd5b50610445611005565b3480156106ed57600080fd5b5061031f61100b565b34801561070257600080fd5b5061070b611027565b604080519115158252519081900360200190f35b34801561072b57600080fd5b506103a9611030565b34801561074057600080fd5b50610281610eb2565b34801561075557600080fd5b506104036004803603604081101561076c57600080fd5b810190602081018135600160201b81111561078657600080fd5b82018360208201111561079857600080fd5b803590602001918460018302840111600160201b831117156107b957600080fd5b919390929091602081019035600160201b8111156107d657600080fd5b8201836020820111156107e857600080fd5b803590602001918460018302840111600160201b8311171561080957600080fd5b509092509050611039565b34801561082057600080fd5b506103a96004803603602081101561083757600080fd5b50356001600160a01b03166112e0565b34801561085357600080fd5b5061085c6112f2565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610898578181015183820152602001610880565b505050509050019250505060405180910390f35b3480156108b857600080fd5b50610445611418565b3480156108cd57600080fd5b506103a961141e565b3480156108e257600080fd5b5061044561142a565b3480156108f757600080fd5b50610403611430565b34801561090c57600080fd5b506104036004803603602081101561092357600080fd5b50356001600160a01b0316611630565b34801561093f57600080fd5b506102816117ff565b6104036004803603602081101561095e57600080fd5b50356001600160a01b0316611804565b34801561097a57600080fd5b50610445611a1a565b34801561098f57600080fd5b5061041a611a20565b3480156109a457600080fd5b50610445611a25565b606481565b60005460609060ff16610a08576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3361200014610a485760405162461bcd60e51b815260040180806020018281038252602f815260200180613dff602f913960400191505060405180910390fd5b610a50613c23565b6000610a9185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a2b92505050565b9150915080610aad57610aa46064611b84565b92505050610b1f565b815160009060ff16610acd57610ac68360200151611be5565b9050610aeb565b825160ff1660011415610ae757610ac683602001516129e8565b5060655b63ffffffff8116610b105750506040805160008152602081019091529150610b1f9050565b610b1981611b84565b93505050505b9392505050565b60035481565b606881565b3361100114610b715760405162461bcd60e51b8152600401808060200182810382526029815260200180613e5b6029913960400191505060405180910390fd5b6001600160a01b03811660009081526004602052604090205480610b955750610e42565b600181039050600060018281548110610baa57fe5b60009182526020909120600360049092020101546001549091506000190180610bf957600060018481548110610bdc57fe5b906000526020600020906004020160030181905550505050610e42565b6040805183815290516001600160a01b038616917f3b6f9ef90462b512a1293ecec018670bf7b7f1876fb727590a8a6d7643130a70919081900360200190a26001600160a01b038416600090815260046020526040812055600154600019018314610d7b57600180546000198101908110610c7057fe5b906000526020600020906004020160018481548110610c8b57fe5b6000918252602082208354600492830290910180546001600160a01b03199081166001600160a01b0393841617825560018087015481840180548416918616919091179055600280880180549185018054909416919095161780835584546001600160401b03600160a01b91829004160267ffffffffffffffff60a01b1990911617808355935460ff600160e01b918290041615150260ff60e01b199094169390931790556003948501549401939093558254868401939192919087908110610d5057fe5b600091825260208083206004909202909101546001600160a01b031683528201929092526040019020555b6001805480610d8657fe5b60008281526020812060046000199093019283020180546001600160a01b0319908116825560018201805490911690556002810180546001600160e81b03191690556003018190559155818381610dd957fe5b0490508015610e3d5760015460005b81811015610e3a578260018281548110610dfe57fe5b9060005260206000209060040201600301540160018281548110610e1e57fe5b6000918252602090912060036004909202010155600101610de8565b50505b505050505b50565b600181565b61100181565b606081565b600881565b61200081565b6001600160a01b03811660009081526004602052604081205480610e88576000915050610ead565b600180820381548110610e9757fe5b9060005260206000209060040201600301549150505b919050565b600081565b606781565b60018181548110610ec957fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b0392831694509082169291821691600160a01b81046001600160401b031691600160e01b90910460ff169086565b61100581565b600281565b61100881565b600b81565b606681565b3361200014610f7b5760405162461bcd60e51b815260040180806020018281038252602f815260200180613dff602f913960400191505060405180910390fd5b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b6103e881565b60025481565b600981565b61100781565b61100681565b604051806080016040528060478152602001613d976047913981565b60005460ff1681565b6402540be40081565b60005460ff1661108c576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146110cc5760405162461bcd60e51b815260040180806020018281038252602e815260200180613d22602e913960400191505060405180910390fd5b61113684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526013815272065787069726554696d655365636f6e6447617606c1b60208201529150612c269050565b15611211576020811461117a5760405162461bcd60e51b8152600401808060200182810382526026815260200180613d716026913960400191505060405180910390fd5b604080516020601f84018190048102820181019092528281526000916111b891858580838501838280828437600092019190915250612d0e92505050565b9050606481101580156111ce5750620186a08111155b6112095760405162461bcd60e51b8152600401808060200182810382526027815260200180613cd66027913960400191505060405180910390fd5b60025561124e565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60046020526000908152604090205481565b6001546060906000805b82811015611343576001818154811061131157fe5b9060005260206000209060040201600201601c9054906101000a900460ff1661133b576001909101905b6001016112fc565b50606081604051908082528060200260200182016040528015611370578160200160208202803683370190505b50600092509050815b83811015611410576001818154811061138e57fe5b9060005260206000209060040201600201601c9054906101000a900460ff1661140857600181815481106113be57fe5b600091825260209091206004909102015482516001600160a01b03909116908390859081106113e957fe5b6001600160a01b03909216602092830291909101909101526001909201915b600101611379565b509250505090565b61100281565b67016345785d8a000081565b61100381565b60005460ff1615611488576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b611490613c23565b60006114b3604051806080016040528060478152602001613d9760479139611a2b565b91509150806114f35760405162461bcd60e51b8152600401808060200182810382526021815260200180613dde6021913960400191505060405180910390fd5b60005b8260200151518110156116185760018360200151828151811061151557fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782558587015182850180549185169183169190911790556040860151600283018054606089015160808a01511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590981692909516919091179290921694909417161790915560a0909301516003909301929092559186015180519185019391859081106115eb57fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016114f6565b50506103e8600255506000805460ff19166001179055565b33611001146116705760405162461bcd60e51b8152600401808060200182810382526029815260200180613e5b6029913960400191505060405180910390fd5b6001600160a01b038116600090815260046020526040902054806116945750610e42565b6001810390506000600182815481106116a957fe5b90600052602060002090600402016003015490506000600183815481106116cc57fe5b906000526020600020906004020160030181905550600060018080549050039050836001600160a01b03167f8cd4e147d8af98a9e3b6724021b8bf6aed2e5dac71c38f2dce8161b82585b25d836040518082815260200191505060405180910390a28061173b57505050610e42565b600081838161174657fe5b0490508015610e3d5760005b848110156117a457816001828154811061176857fe5b906000526020600020906004020160030154016001828154811061178857fe5b6000918252602090912060036004909202010155600101611752565b50600180549085015b81811015610e3a5782600182815481106117c357fe5b90600052602060002090600402016003015401600182815481106117e357fe5b60009182526020909120600360049092020101556001016117ad565b606581565b3341146118425760405162461bcd60e51b815260040180806020018281038252602d815260200180613e2e602d913960400191505060405180910390fd5b60005460ff16611895576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b600034116118e2576040805162461bcd60e51b81526020600482015260156024820152746465706f7369742076616c7565206973207a65726f60581b604482015290519081900360640190fd5b6001600160a01b038116600090815260046020526040902054349080156119d557600060018083038154811061191457fe5b9060005260206000209060040201905080600201601c9054906101000a900460ff161561197f576040805184815290516001600160a01b038616917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a26119cf565b600380548401815581018054840190556040805184815290516001600160a01b038616917f93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055919081900360200190a25b50611a15565b6040805183815290516001600160a01b038516917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a25b505050565b61100081565b600381565b61100481565b611a33613c23565b6000611a3d613c23565b611a45613c3b565b611a56611a5186612d13565b612d38565b90506000805b611a6583612d82565b15611b765780611a8a57611a80611a7b84612da3565b612df1565b60ff168452611b6e565b8060011415611b69576060611aa6611aa185612da3565b612e51565b90508051604051908082528060200260200182016040528015611ae357816020015b611ad0613c5b565b815260200190600190039081611ac85790505b50602086015260005b8151811015611b5e57611afd613c5b565b6000611b1b848481518110611b0e57fe5b6020026020010151612f22565b9150915080611b3857876000995099505050505050505050611b7f565b8188602001518481518110611b4957fe5b60209081029190910101525050600101611aec565b506001925050611b6e565b611b76565b600101611a5c565b50919350909150505b915091565b604080516001808252818301909252606091829190816020015b6060815260200190600190039081611b9e579050509050611bc48363ffffffff16612fff565b81600081518110611bd157fe5b6020026020010181905250610b1f81613012565b6000806060611bf38461309c565b9150915081611ca0577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b83811015611c5b578181015183820152602001611c43565b50505050905090810190601f168015611c885780820380516001836020036101000a031916815260200191505b509250505060405180910390a1606692505050610ead565b600080805b600154811015611d1d5767016345785d8a000060018281548110611cc557fe5b90600052602060002090600402016003015410611ce757600190920191611d15565b600060018281548110611cf657fe5b9060005260206000209060040201600301541115611d15576001909101905b600101611ca5565b50606082604051908082528060200260200182016040528015611d4a578160200160208202803683370190505b509050606083604051908082528060200260200182016040528015611d79578160200160208202803683370190505b509050606084604051908082528060200260200182016040528015611da8578160200160208202803683370190505b509050606085604051908082528060200260200182016040528015611dd7578160200160208202803683370190505b5090506000606086604051908082528060200260200182016040528015611e08578160200160208202803683370190505b509050606087604051908082528060200260200182016040528015611e37578160200160208202803683370190505b509050600098506000975060608d905060006110046001600160a01b0316635170639c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611e8657600080fd5b505af1158015611e9a573d6000803e3d6000fd5b505050506040513d6020811015611eb057600080fd5b5051905067016345785d8a0000811115611f25577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2604051808060200182810382526021815260200180613d506021913960400191505060405180910390a160689d5050505050505050505050505050610ead565b60005b6001548110156121985767016345785d8a000060018281548110611f4857fe5b906000526020600020906004020160030154106120ce5760018181548110611f6c57fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b03168a8d81518110611f9d57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006402540be40060018381548110611fd257fe5b90600052602060002090600402016003015481611feb57fe5b0660018381548110611ff957fe5b906000526020600020906004020160030154039050612021838261314f90919063ffffffff16565b8a8e8151811061202d57fe5b6020026020010181815250506001828154811061204657fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b0316888e8151811061207757fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081898e815181106120a457fe5b60209081029190910101526120bf878263ffffffff61319116565b6001909d019c96506121909050565b6000600182815481106120dd57fe5b9060005260206000209060040201600301541115612190576001818154811061210257fe5b906000526020600020906004020160010160009054906101000a90046001600160a01b0316858c8151811061213357fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506001818154811061216057fe5b906000526020600020906004020160030154848c8151811061217e57fe5b60209081029190910101526001909a01995b600101611f28565b50600085156125d6576110046001600160a01b0316636e056520878c8c8b60025442016040518663ffffffff1660e01b815260040180806020018060200180602001856001600160401b03166001600160401b03168152602001848103845288818151815260200191508051906020019060200280838360005b8381101561222a578181015183820152602001612212565b50505050905001848103835287818151815260200191508051906020019060200280838360005b83811015612269578181015183820152602001612251565b50505050905001848103825286818151815260200191508051906020019060200280838360005b838110156122a8578181015183820152602001612290565b505050509050019750505050505050506020604051808303818588803b1580156122d157600080fd5b505af1935050505080156122f757506040513d60208110156122f257600080fd5b505160015b612532576040516000815260443d1015612313575060006123ae565b60046000803e60005160e01c6308c379a081146123345760009150506123ae565b60043d036004833e81513d60248201116001600160401b038211171561235f576000925050506123ae565b80830180516001600160401b038111156123805760009450505050506123ae565b8060208301013d860181111561239e576000955050505050506123ae565b601f01601f191660405250925050505b806123b9575061245d565b60019150867fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561241d578181015183820152602001612405565b50505050905090810190601f16801561244a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061252d565b3d808015612487576040519150601f19603f3d011682016040523d82523d6000602084013e61248c565b606091505b5060019150867fbfa884552dd8921b6ce90bfe906952ae5b3b29be0cc1a951d4f62697635a3a45826040518080602001828103825283818151815260200191508051906020019080838360005b838110156124f15781810151838201526020016124d9565b50505050905090810190601f16801561251e5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6125d6565b8015612570576040805188815290517fa217d08e65f80c73121cd9db834d81652d544bfbf452f6d04922b16c90a37b709181900360200190a16125d4565b604080516020808252601b908201527f6261746368207472616e736665722072657475726e2066616c7365000000000081830152905188917fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280919081900360600190a25b505b801561278c5760005b885181101561278a5760008982815181106125f657fe5b6020026020010151905060006001828154811061260f57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116916108fc918590811061264057fe5b9060005260206000209060040201600301549081150290604051600060405180830381858888f19350505050905080156126fc576001828154811061268157fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d91859081106126d057fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a2612780565b6001828154811061270957fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d918590811061275857fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a25b50506001016125df565b505b8451156128d65760005b85518110156128d45760008682815181106127ad57fe5b60200260200101516001600160a01b03166108fc8784815181106127cd57fe5b60200260200101519081150290604051600060405180830381858888f19350505050905080156128635786828151811061280357fe5b60200260200101516001600160a01b03167f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d87848151811061284157fe5b60200260200101516040518082815260200191505060405180910390a26128cb565b86828151811061286f57fe5b60200260200101516001600160a01b03167f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d8784815181106128ad57fe5b60200260200101516040518082815260200191505060405180910390a25b50600101612796565b505b471561293f576040805147815290517f6ecc855f9440a9282c90913bbc91619fd44f5ec0b462af28d127b116f130aa4d9181900360200190a1604051611002904780156108fc02916000818181858888f1935050505015801561293d573d6000803e3d6000fd5b505b600060035582511561295457612954836131eb565b6110016001600160a01b031663fc4333cd6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561299157600080fd5b505af11580156129a5573d6000803e3d6000fd5b50506040517fedd8d7296956dd970ab4de3f2fc03be2b0ffc615d20cd4c72c6e44f928630ebf925060009150a15060009f9e505050505050505050505050505050565b60008151600114612a46577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2604051808060200182810382526025815260200180613cfd6025913960400191505060405180910390a1506067610ead565b612a4e613c5b565b82600081518110612a5b57fe5b60209081029190910181015180516001600160a01b03166000908152600490925260409091205490915080612acc5781516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a2600092505050610ead565b600154600090815b81811015612b5e5760018181548110612ae957fe5b9060005260206000209060040201600201601c9054906101000a900460ff16158015612b48575084600001516001600160a01b031660018281548110612b2b57fe5b60009182526020909120600490910201546001600160a01b031614155b15612b565760019250612b5e565b600101612ad4565b5081612ba85783516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a26000945050505050610ead565b6001806001850381548110612bb957fe5b6000918252602082206002600490920201018054921515600160e01b0260ff60e01b199093169290921790915584516040516001600160a01b03909116917ff226e7d8f547ff903d9d419cf5f54e0d7d07efa9584135a53a057c5f1f27f49a91a250600095945050505050565b6000816040516020018082805190602001908083835b60208310612c5b5780518252601f199092019160209182019101612c3c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612cc95780518252601f199092019160209182019101612caa565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b612d1b613c90565b506040805180820190915281518152602082810190820152919050565b612d40613c3b565b612d49826136b2565b612d5257600080fd5b6000612d6183602001516136ec565b60208085015160408051808201909152868152920190820152915050919050565b6000612d8c613c90565b505080518051602091820151919092015191011190565b612dab613c90565b612db482612d82565b612dbd57600080fd5b60208201516000612dcd8261374f565b80830160209586015260408051808201909152908152938401919091525090919050565b805160009015801590612e0657508151602110155b612e0f57600080fd5b6000612e1e83602001516136ec565b83516020808601518301805193945091849003929190831015612e4857826020036101000a820491505b50949350505050565b6060612e5c826136b2565b612e6557600080fd5b6000612e70836137e8565b9050606081604051908082528060200260200182016040528015612eae57816020015b612e9b613c90565b815260200190600190039081612e935790505b5090506000612ec085602001516136ec565b60208601510190506000805b84811015612f1757612edd8361374f565b9150604051806040016040528083815260200184815250848281518110612f0057fe5b602090810291909101015291810191600101612ecc565b509195945050505050565b612f2a613c5b565b6000612f34613c5b565b612f3c613c3b565b612f4585612d38565b90506000805b612f5483612d82565b15611b765780612f7f57612f6f612f6a84612da3565b613844565b6001600160a01b03168452612ff7565b8060011415612fa757612f94612f6a84612da3565b6001600160a01b03166020850152612ff7565b8060021415612fcf57612fbc612f6a84612da3565b6001600160a01b03166040850152612ff7565b8060031415611b6957612fe4611a7b84612da3565b6001600160401b03166060850152600191505b600101612f4b565b6060612d0861300d8361385e565b613944565b60608151600014156130335750604080516000815260208101909152610ead565b60608260008151811061304257fe5b602002602001015190506000600190505b8351811015613083576130798285838151811061306c57fe5b6020026020010151613996565b9150600101613053565b50610b1f613096825160c060ff16613a13565b82613996565b60006060815b83518110156131355760005b8181101561312c578481815181106130c257fe5b6020026020010151600001516001600160a01b03168583815181106130e357fe5b6020026020010151600001516001600160a01b031614156131245760006040518060600160405280602b8152602001613cab602b9139935093505050611b7f565b6001016130ae565b506001016130a2565b505060408051602081019091526000815260019150915091565b6000610b1f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613b0b565b600082820183811015610b1f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154815160005b82811015613308576001613205613c5b565b6001838154811061321257fe5b600091825260208083206040805160c08101825260049490940290910180546001600160a01b0390811685526001820154811693850193909352600281015492831691840191909152600160a01b82046001600160401b03166060840152600160e01b90910460ff16151560808301526003015460a082015291505b848110156132dc578681815181106132a257fe5b6020026020010151600001516001600160a01b031682600001516001600160a01b031614156132d457600092506132dc565b60010161328e565b5081156132fe5780516001600160a01b03166000908152600460205260408120555b50506001016131f3565b508082111561337d57805b8281101561337b57600180548061332657fe5b60008281526020812060046000199093019283020180546001600160a01b03199081168255600182810180549092169091556002820180546001600160e81b0319169055600390910191909155915501613313565b505b600081831061338c578161338e565b825b905060005b81811015613588576134408582815181106133aa57fe5b6020026020010151600183815481106133bf57fe5b60009182526020918290206040805160c08101825260049390930290910180546001600160a01b0390811684526001820154811694840194909452600281015493841691830191909152600160a01b83046001600160401b03166060830152600160e01b90920460ff161515608082015260039091015460a0820152613ba2565b61355b57806001016004600087848151811061345857fe5b6020026020010151600001516001600160a01b03166001600160a01b031681526020019081526020016000208190555084818151811061349457fe5b6020026020010151600182815481106134a957fe5b6000918252602091829020835160049092020180546001600160a01b039283166001600160a01b0319918216178255928401516001820180549184169185169190911790556040840151600282018054606087015160808801511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b1995909716929097169190911792909216939093171692909217905560a090910151600390910155613580565b60006001828154811061356a57fe5b9060005260206000209060040201600301819055505b600101613393565b50828211156136ac57825b82811015610e3d5760018582815181106135a957fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782559585015181840180549184169188169190911790556040850151600282018054606088015160808901511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590971692909a169190911792909216939093171695909517905560a0909201516003909301929092558751908401929088908590811061367f57fe5b602090810291909101810151516001600160a01b0316825281019190915260400160002055600101613593565b50505050565b80516000906136c357506000610ead565b6020820151805160001a9060c08210156136e257600092505050610ead565b5060019392505050565b8051600090811a6080811015613706576000915050610ead565b60b8811080613721575060c08110801590613721575060f881105b15613730576001915050610ead565b60c08110156137445760b519019050610ead565b60f519019050610ead565b80516000908190811a608081101561376a57600191506137e1565b60b881101561377f57607e19810191506137e1565b60c08110156137ac5760b78103600185019450806020036101000a855104600182018101935050506137e1565b60f88110156137c15760be19810191506137e1565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80516000906137f957506000610ead565b6000809050600061380d84602001516136ec565b602085015185519181019250015b8082101561383b5761382c8261374f565b6001909301929091019061381b565b50909392505050565b805160009060151461385557600080fd5b612d0882612df1565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff1984166138a2575060186138c6565b6fffffffffffffffffffffffffffffffff1984166138c2575060106138c6565b5060005b60208110156138fc578181815181106138db57fe5b01602001516001600160f81b031916156138f4576138fc565b6001016138c6565b60008160200390506060816040519080825280601f01601f191660200182016040528015613931576020820181803683370190505b5080830196909652508452509192915050565b6060815160011480156139765750607f60f81b8260008151811061396457fe5b01602001516001600160f81b03191611155b15613982575080610ead565b612d086139948351608060ff16613a13565b835b6060806040519050835180825260208201818101602087015b818310156139c75780518352602092830192016139af565b50855184518101855292509050808201602086015b818310156139f45780518352602092830192016139dc565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310613a63576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b60408051600180825281830190925260609160208201818036833701905050905060378411613abd5782840160f81b81600081518110613a9f57fe5b60200101906001600160f81b031916908160001a9053509050612d08565b6060613ac88561385e565b90508381510160370160f81b82600081518110613ae157fe5b60200101906001600160f81b031916908160001a905350613b028282613996565b95945050505050565b60008184841115613b9a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b5f578181015183820152602001613b47565b50505050905090810190601f168015613b8c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b805182516000916001600160a01b039182169116148015613bdc575081602001516001600160a01b031683602001516001600160a01b0316145b8015613c01575081604001516001600160a01b031683604001516001600160a01b0316145b8015610b1f5750506060908101519101516001600160401b0390811691161490565b60408051808201909152600081526060602082015290565b6040518060400160405280613c4e613c90565b8152602001600081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180604001604052806000815260200160008152509056fe6475706c696361746520636f6e73656e7375732061646472657373206f662076616c696461746f725365747468652065787069726554696d655365636f6e64476170206973206f7574206f662072616e67656c656e677468206f66206a61696c2076616c696461746f7273206d757374206265206f6e65746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374666565206973206c6172676572207468616e2044555354595f494e434f4d494e476c656e677468206f662065787069726554696d655365636f6e64476170206d69736d61746368f84580f842f840949fb29aac15b9a4b7f17c3385939b007540f4d791949fb29aac15b9a4b7f17c3385939b007540f4d791949fb29aac15b9a4b7f17c3385939b007540f4d791646661696c656420746f20706172736520696e69742076616c696461746f72536574746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572746865206d6573736167652073656e646572206d75737420626520736c61736820636f6e7472616374a26469706673582212208c630f13f108003e81700fa3735ee9e0fe7367392094e5653d9448f747591ba264736f6c63430006040033" }, "0x0000000000000000000000000000000000001001": { "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c806396713da91161011a578063c81b1662116100ad578063e1c7392a1161007c578063e1c7392a1461063a578063f9a2bbc714610642578063fc3e59081461064a578063fc4333cd14610652578063fd6a68791461065a576101fb565b8063c81b16621461058c578063c8509d8114610594578063c96be4cb1461060c578063dc927faf14610632576101fb565b8063a78abc16116100e9578063a78abc16146104a2578063ab51bb96146104be578063ac431751146104c6578063c80d4b8f14610584576101fb565b806396713da9146104825780639bc8e4f21461048a5780639dc0926214610492578063a1a11bf51461049a576101fb565b806351e806721161019257806370fd5bad1161016157806370fd5bad146103f05780637912a65d146103f85780637942fd0514610400578063831d65d114610408576101fb565b806351e80672146103d0578063567a372d146103d857806362b72cf5146103e05780636e47b482146103e8576101fb565b80633dffc387116101ce5780633dffc3871461036757806343756e5c14610385578063493279b1146103a95780634bf6c882146103c8576101fb565b80630bee7a67146102005780631182b8751461022157806337c8dab91461030e578063389f4f711461034d575b600080fd5b610208610662565b6040805163ffffffff9092168252519081900360200190f35b6102996004803603604081101561023757600080fd5b60ff8235169190810190604081016020820135600160201b81111561025b57600080fd5b82018360208201111561026d57600080fd5b803590602001918460018302840111600160201b8311171561028e57600080fd5b509092509050610667565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102d35781810151838201526020016102bb565b50505050905090810190601f1680156103005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103346004803603602081101561032457600080fd5b50356001600160a01b03166106f6565b6040805192835260208301919091528051918290030190f35b61035561074d565b60408051918252519081900360200190f35b61036f610753565b6040805160ff9092168252519081900360200190f35b61038d610758565b604080516001600160a01b039092168252519081900360200190f35b6103b161075e565b6040805161ffff9092168252519081900360200190f35b61036f610763565b61038d610768565b61035561076e565b610355610774565b61038d61077a565b61036f610780565b610355610785565b61036f61078a565b6104806004803603604081101561041e57600080fd5b60ff8235169190810190604081016020820135600160201b81111561044257600080fd5b82018360208201111561045457600080fd5b803590602001918460018302840111600160201b8311171561047557600080fd5b50909250905061078f565b005b61036f610865565b61035561086a565b61038d610875565b61038d61087b565b6104aa610881565b604080519115158252519081900360200190f35b61020861088a565b610480600480360360408110156104dc57600080fd5b810190602081018135600160201b8111156104f657600080fd5b82018360208201111561050857600080fd5b803590602001918460018302840111600160201b8311171561052957600080fd5b919390929091602081019035600160201b81111561054657600080fd5b82018360208201111561055857600080fd5b803590602001918460018302840111600160201b8311171561057957600080fd5b50909250905061088f565b610355610c8a565b61038d610c8f565b610480600480360360408110156105aa57600080fd5b60ff8235169190810190604081016020820135600160201b8111156105ce57600080fd5b8201836020820111156105e057600080fd5b803590602001918460018302840111600160201b8311171561060157600080fd5b509092509050610c95565b6104806004803603602081101561062257600080fd5b50356001600160a01b0316610cc3565b61038d6110c8565b6104806110ce565b61038d61113f565b61036f611145565b61048061114a565b61038d61129b565b606481565b606033612000146106a95760405162461bcd60e51b815260040180806020018281038252602f815260200180611c01602f913960400191505060405180910390fd5b6040805162461bcd60e51b815260206004820152601e60248201527f7265636569766520756e65787065637465642073796e207061636b6167650000604482015290519081900360640190fd5b600080610701611ac5565b5050506001600160a01b0316600090815260026020818152604092839020835160608101855281548082526001830154938201849052919093015460ff16151592909301919091529091565b60055481565b600181565b61100181565b606081565b600881565b61200081565b60045481565b60035481565b61100581565b600281565b603281565b600b81565b610797611ae8565b60006107d884848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112a192505050565b9150915080156108225781516040805163ffffffff9092168252517f7f0956d47419b9525356e7111652b653b530ec6f5096dccc04589bc38e6299679181900360200190a161085e565b81516040805163ffffffff9092168252517f7d45f62d17443dd4547bca8a8112c60e2385669318dc300ec61a5d2492f262e79181900360200190a15b5050505050565b600981565b662386f26fc1000081565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff166108e2576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146109225760405162461bcd60e51b815260040180806020018281038252602e815260200180611b8c602e913960400191505060405180910390fd5b61098d84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260148152731b5a5cd9195b59585b9bdc951a1c995cda1bdb1960621b602082015291506113219050565b15610a6657602081146109d15760405162461bcd60e51b8152600401808060200182810382526027815260200180611b356027913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a0f9185858083850183828082843760009201919091525061140992505050565b9050600a8110158015610a23575060055481105b610a5e5760405162461bcd60e51b8152600401808060200182810382526025815260200180611bdc6025913960400191505060405180910390fd5b600455610bf8565b610acc84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e19995b1bdb9e551a1c995cda1bdb19608a1b602082015291506113219050565b15610bbb5760208114610b105760405162461bcd60e51b8152600401808060200182810382526022815260200180611bba6022913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610b4e9185858083850183828082843760009201919091525061140992505050565b9050601481118015610b6257506103e88111155b610bb3576040805162461bcd60e51b815260206004820181905260248201527f7468652066656c6f6e795468726573686f6c64206f7574206f662072616e6765604482015290519081900360640190fd5b600555610bf8565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b609681565b61100281565b6040517f07db600eebe2ac176be8dcebad61858c245a4961bb32ca2aa3d159b09aa0810e90600090a1505050565b334114610d015760405162461bcd60e51b815260040180806020018281038252602d815260200180611c30602d913960400191505060405180910390fd5b60005460ff16610d54576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b6003544311610daa576040805162461bcd60e51b815260206004820181905260248201527f63616e206e6f7420736c61736820747769636520696e206f6e6520626c6f636b604482015290519081900360640190fd5b610db2611ac5565b506001600160a01b0381166000908152600260208181526040928390208351606081018552815481526001820154928101929092529091015460ff161580159282019290925290610e0d576020810180516001019052610e66565b60016040820181905260208201819052805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0384161790555b4381526001600160a01b038216600090815260026020818152604092839020845181559084015160018201819055928401519101805460ff19169115159190911790556005549081610eb457fe5b0661101657604080516335409f7f60e01b81526001600160a01b03841660048201529051611000916335409f7f91602480830192600092919082900301818387803b158015610f0257600080fd5b505af1158015610f16573d6000803e3d6000fd5b505050506120006001600160a01b031663f7a251d7600b610f368561140e565b60006040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610f96578181015183820152602001610f7e565b50505050905090810190601f168015610fc35780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610fe457600080fd5b505af1158015610ff8573d6000803e3d6000fd5b505050506040513d602081101561100e57600080fd5b5061108c9050565b60045481602001518161102557fe5b0661108c57604080516375abf10160e11b81526001600160a01b038416600482015290516110009163eb57e20291602480830192600092919082900301818387803b15801561107357600080fd5b505af1158015611087573d6000803e3d6000fd5b505050505b6040516001600160a01b038316907fddb6012116e51abf5436d956a4f0ebd927e92c576ff96d7918290c8782291e3e90600090a2505043600355565b61100381565b60005460ff1615611126576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b603260045560966005556000805460ff19166001179055565b61100081565b600381565b336110001461118a5760405162461bcd60e51b8152600401808060200182810382526030815260200180611b5c6030913960400191505060405180910390fd5b60005460ff166111dd576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60015460005b8181101561126e5760026000600180848603038154811061120057fe5b60009182526020808320909101546001600160a01b031683528201929092526040018120818155600181810192909255600201805460ff1916905580548061124457fe5b600082815260209020810160001990810180546001600160a01b03191690550190556001016111e3565b506040517fcfdb3b6ccaeccbdc68be3c59c840e3b3c90f0a7c491f5fff1cf56cfda200dd9c90600090a150565b61100481565b6112a9611ae8565b60006112b3611ae8565b6112bb611afa565b6112cc6112c7866114e0565b611505565b90506000805b6112db8361154f565b156113145780611307576112f66112f184611570565b6115be565b63ffffffff1684526001915061130c565b611314565b6001016112d2565b5091935090915050915091565b6000816040516020018082805190602001908083835b602083106113565780518252601f199092019160209182019101611337565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106113c45780518252601f1990920191602091820191016113a5565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b60408051600480825260a08201909252606091829190816020015b6060815260200190600190039081611429579050509050611452836001600160a01b031661161e565b8160008151811061145f57fe5b602002602001018190525061147343611641565b8160018151811061148057fe5b60209081029190910101526114956060611641565b816002815181106114a257fe5b60200260200101819052506114b642611641565b816003815181106114c357fe5b60200260200101819052506114d781611654565b9150505b919050565b6114e8611b1a565b506040805180820190915281518152602082810190820152919050565b61150d611afa565b611516826116de565b61151f57600080fd5b600061152e8360200151611718565b60208085015160408051808201909152868152920190820152915050919050565b6000611559611b1a565b505080518051602091820151919092015191011190565b611578611b1a565b6115818261154f565b61158a57600080fd5b6020820151600061159a8261177b565b80830160209586015260408051808201909152908152938401919091525090919050565b8051600090158015906115d357508151602110155b6115dc57600080fd5b60006115eb8360200151611718565b8351602080860151830180519394509184900392919083101561161557826020036101000a820491505b50949350505050565b60408051600560a21b83186014820152603481019091526060906114d781611814565b606061140361164f8361186a565b611814565b606081516000141561167557506040805160008152602081019091526114db565b60608260008151811061168457fe5b602002602001015190506000600190505b83518110156116c5576116bb828583815181106116ae57fe5b6020026020010151611950565b9150600101611695565b506114d76116d8825160c060ff166119cd565b82611950565b80516000906116ef575060006114db565b6020820151805160001a9060c082101561170e576000925050506114db565b5060019392505050565b8051600090811a60808110156117325760009150506114db565b60b881108061174d575060c0811080159061174d575060f881105b1561175c5760019150506114db565b60c08110156117705760b5190190506114db565b60f5190190506114db565b80516000908190811a6080811015611796576001915061180d565b60b88110156117ab57607e198101915061180d565b60c08110156117d85760b78103600185019450806020036101000a8551046001820181019350505061180d565b60f88110156117ed5760be198101915061180d565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b6060815160011480156118465750607f60f81b8260008151811061183457fe5b01602001516001600160f81b03191611155b156118525750806114db565b6114036118648351608060ff166119cd565b83611950565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff1984166118ae575060186118d2565b6fffffffffffffffffffffffffffffffff1984166118ce575060106118d2565b5060005b6020811015611908578181815181106118e757fe5b01602001516001600160f81b0319161561190057611908565b6001016118d2565b60008160200390506060816040519080825280601f01601f19166020018201604052801561193d576020820181803683370190505b5080830196909652508452509192915050565b6060806040519050835180825260208201818101602087015b81831015611981578051835260209283019201611969565b50855184518101855292509050808201602086015b818310156119ae578051835260209283019201611996565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310611a1d576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b60408051600180825281830190925260609160208201818036833701905050905060378411611a775782840160f81b81600081518110611a5957fe5b60200101906001600160f81b031916908160001a9053509050611403565b6060611a828561186a565b90508381510160370160f81b82600081518110611a9b57fe5b60200101906001600160f81b031916908160001a905350611abc8282611950565b95945050505050565b604051806060016040528060008152602001600081526020016000151581525090565b60408051602081019091526000815290565b6040518060400160405280611b0d611b1a565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe6c656e677468206f66206d697364656d65616e6f725468726573686f6c64206d69736d61746368746865206d6573736167652073656e646572206d7573742062652076616c696461746f7253657420636f6e7472616374746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662066656c6f6e795468726573686f6c64206d69736d61746368746865206d697364656d65616e6f725468726573686f6c64206f7574206f662072616e6765746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572a26469706673582212208b8123e99d04f68ae34a69f17771952c89e65cb056aea8a93079f7d4bd7abbd664736f6c63430006040033" + "code": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c806396713da91161011a578063c81b1662116100ad578063e1c7392a1161007c578063e1c7392a1461064d578063f9a2bbc714610655578063fc3e59081461065d578063fc4333cd14610665578063fd6a68791461066d57610206565b8063c81b16621461059f578063c8509d81146105a7578063c96be4cb1461061f578063dc927faf1461064557610206565b8063a78abc16116100e9578063a78abc16146104b5578063ab51bb96146104d1578063ac431751146104d9578063c80d4b8f1461059757610206565b806396713da9146104955780639bc8e4f21461049d5780639dc09262146104a5578063a1a11bf5146104ad57610206565b806351e806721161019d57806370fd5bad1161016c57806370fd5bad146103fb57806375d47a0a146104035780637912a65d1461040b5780637942fd0514610413578063831d65d11461041b57610206565b806351e80672146103db578063567a372d146103e357806362b72cf5146103eb5780636e47b482146103f357610206565b80633dffc387116101d95780633dffc3871461037257806343756e5c14610390578063493279b1146103b45780634bf6c882146103d357610206565b80630bee7a671461020b5780631182b8751461022c57806337c8dab914610319578063389f4f7114610358575b600080fd5b610213610675565b6040805163ffffffff9092168252519081900360200190f35b6102a46004803603604081101561024257600080fd5b60ff8235169190810190604081016020820135600160201b81111561026657600080fd5b82018360208201111561027857600080fd5b803590602001918460018302840111600160201b8311171561029957600080fd5b50909250905061067a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102de5781810151838201526020016102c6565b50505050905090810190601f16801561030b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61033f6004803603602081101561032f57600080fd5b50356001600160a01b0316610709565b6040805192835260208301919091528051918290030190f35b610360610760565b60408051918252519081900360200190f35b61037a610766565b6040805160ff9092168252519081900360200190f35b61039861076b565b604080516001600160a01b039092168252519081900360200190f35b6103bc610771565b6040805161ffff9092168252519081900360200190f35b61037a610776565b61039861077b565b610360610781565b610360610787565b61039861078d565b61037a610793565b610398610798565b61036061079e565b61037a6107a3565b6104936004803603604081101561043157600080fd5b60ff8235169190810190604081016020820135600160201b81111561045557600080fd5b82018360208201111561046757600080fd5b803590602001918460018302840111600160201b8311171561048857600080fd5b5090925090506107a8565b005b61037a61087e565b610360610883565b61039861088e565b610398610894565b6104bd61089a565b604080519115158252519081900360200190f35b6102136108a3565b610493600480360360408110156104ef57600080fd5b810190602081018135600160201b81111561050957600080fd5b82018360208201111561051b57600080fd5b803590602001918460018302840111600160201b8311171561053c57600080fd5b919390929091602081019035600160201b81111561055957600080fd5b82018360208201111561056b57600080fd5b803590602001918460018302840111600160201b8311171561058c57600080fd5b5090925090506108a8565b610360610ca3565b610398610ca8565b610493600480360360408110156105bd57600080fd5b60ff8235169190810190604081016020820135600160201b8111156105e157600080fd5b8201836020820111156105f357600080fd5b803590602001918460018302840111600160201b8311171561061457600080fd5b509092509050610cae565b6104936004803603602081101561063557600080fd5b50356001600160a01b0316610cdc565b6103986110e1565b6104936110e7565b610398611158565b61037a61115e565b610493611163565b6103986112b4565b606481565b606033612000146106bc5760405162461bcd60e51b815260040180806020018281038252602f815260200180611c1a602f913960400191505060405180910390fd5b6040805162461bcd60e51b815260206004820152601e60248201527f7265636569766520756e65787065637465642073796e207061636b6167650000604482015290519081900360640190fd5b600080610714611ade565b5050506001600160a01b0316600090815260026020818152604092839020835160608101855281548082526001830154938201849052919093015460ff16151592909301919091529091565b60055481565b600181565b61100181565b606081565b600881565b61200081565b60045481565b60035481565b61100581565b600281565b61100881565b603281565b600b81565b6107b0611b01565b60006107f184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112ba92505050565b91509150801561083b5781516040805163ffffffff9092168252517f7f0956d47419b9525356e7111652b653b530ec6f5096dccc04589bc38e6299679181900360200190a1610877565b81516040805163ffffffff9092168252517f7d45f62d17443dd4547bca8a8112c60e2385669318dc300ec61a5d2492f262e79181900360200190a15b5050505050565b600981565b662386f26fc1000081565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff166108fb576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b336110071461093b5760405162461bcd60e51b815260040180806020018281038252602e815260200180611ba5602e913960400191505060405180910390fd5b6109a684848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260148152731b5a5cd9195b59585b9bdc951a1c995cda1bdb1960621b6020820152915061133a9050565b15610a7f57602081146109ea5760405162461bcd60e51b8152600401808060200182810382526027815260200180611b4e6027913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a289185858083850183828082843760009201919091525061142292505050565b9050600a8110158015610a3c575060055481105b610a775760405162461bcd60e51b8152600401808060200182810382526025815260200180611bf56025913960400191505060405180910390fd5b600455610c11565b610ae584848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e19995b1bdb9e551a1c995cda1bdb19608a1b6020820152915061133a9050565b15610bd45760208114610b295760405162461bcd60e51b8152600401808060200182810382526022815260200180611bd36022913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610b679185858083850183828082843760009201919091525061142292505050565b9050601481118015610b7b57506103e88111155b610bcc576040805162461bcd60e51b815260206004820181905260248201527f7468652066656c6f6e795468726573686f6c64206f7574206f662072616e6765604482015290519081900360640190fd5b600555610c11565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b609681565b61100281565b6040517f07db600eebe2ac176be8dcebad61858c245a4961bb32ca2aa3d159b09aa0810e90600090a1505050565b334114610d1a5760405162461bcd60e51b815260040180806020018281038252602d815260200180611c49602d913960400191505060405180910390fd5b60005460ff16610d6d576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b6003544311610dc3576040805162461bcd60e51b815260206004820181905260248201527f63616e206e6f7420736c61736820747769636520696e206f6e6520626c6f636b604482015290519081900360640190fd5b610dcb611ade565b506001600160a01b0381166000908152600260208181526040928390208351606081018552815481526001820154928101929092529091015460ff161580159282019290925290610e26576020810180516001019052610e7f565b60016040820181905260208201819052805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0384161790555b4381526001600160a01b038216600090815260026020818152604092839020845181559084015160018201819055928401519101805460ff19169115159190911790556005549081610ecd57fe5b0661102f57604080516335409f7f60e01b81526001600160a01b03841660048201529051611000916335409f7f91602480830192600092919082900301818387803b158015610f1b57600080fd5b505af1158015610f2f573d6000803e3d6000fd5b505050506120006001600160a01b031663f7a251d7600b610f4f85611427565b60006040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610faf578181015183820152602001610f97565b50505050905090810190601f168015610fdc5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610ffd57600080fd5b505af1158015611011573d6000803e3d6000fd5b505050506040513d602081101561102757600080fd5b506110a59050565b60045481602001518161103e57fe5b066110a557604080516375abf10160e11b81526001600160a01b038416600482015290516110009163eb57e20291602480830192600092919082900301818387803b15801561108c57600080fd5b505af11580156110a0573d6000803e3d6000fd5b505050505b6040516001600160a01b038316907fddb6012116e51abf5436d956a4f0ebd927e92c576ff96d7918290c8782291e3e90600090a2505043600355565b61100381565b60005460ff161561113f576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b603260045560966005556000805460ff19166001179055565b61100081565b600381565b33611000146111a35760405162461bcd60e51b8152600401808060200182810382526030815260200180611b756030913960400191505060405180910390fd5b60005460ff166111f6576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60015460005b818110156112875760026000600180848603038154811061121957fe5b60009182526020808320909101546001600160a01b031683528201929092526040018120818155600181810192909255600201805460ff1916905580548061125d57fe5b600082815260209020810160001990810180546001600160a01b03191690550190556001016111fc565b506040517fcfdb3b6ccaeccbdc68be3c59c840e3b3c90f0a7c491f5fff1cf56cfda200dd9c90600090a150565b61100481565b6112c2611b01565b60006112cc611b01565b6112d4611b13565b6112e56112e0866114f9565b61151e565b90506000805b6112f483611568565b1561132d57806113205761130f61130a84611589565b6115d7565b63ffffffff16845260019150611325565b61132d565b6001016112eb565b5091935090915050915091565b6000816040516020018082805190602001908083835b6020831061136f5780518252601f199092019160209182019101611350565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106113dd5780518252601f1990920191602091820191016113be565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b60408051600480825260a08201909252606091829190816020015b606081526020019060019003908161144257905050905061146b836001600160a01b0316611637565b8160008151811061147857fe5b602002602001018190525061148c4361165a565b8160018151811061149957fe5b60209081029190910101526114ae606061165a565b816002815181106114bb57fe5b60200260200101819052506114cf4261165a565b816003815181106114dc57fe5b60200260200101819052506114f08161166d565b9150505b919050565b611501611b33565b506040805180820190915281518152602082810190820152919050565b611526611b13565b61152f826116f7565b61153857600080fd5b60006115478360200151611731565b60208085015160408051808201909152868152920190820152915050919050565b6000611572611b33565b505080518051602091820151919092015191011190565b611591611b33565b61159a82611568565b6115a357600080fd5b602082015160006115b382611794565b80830160209586015260408051808201909152908152938401919091525090919050565b8051600090158015906115ec57508151602110155b6115f557600080fd5b60006116048360200151611731565b8351602080860151830180519394509184900392919083101561162e57826020036101000a820491505b50949350505050565b60408051600560a21b83186014820152603481019091526060906114f08161182d565b606061141c61166883611883565b61182d565b606081516000141561168e57506040805160008152602081019091526114f4565b60608260008151811061169d57fe5b602002602001015190506000600190505b83518110156116de576116d4828583815181106116c757fe5b6020026020010151611969565b91506001016116ae565b506114f06116f1825160c060ff166119e6565b82611969565b8051600090611708575060006114f4565b6020820151805160001a9060c0821015611727576000925050506114f4565b5060019392505050565b8051600090811a608081101561174b5760009150506114f4565b60b8811080611766575060c08110801590611766575060f881105b156117755760019150506114f4565b60c08110156117895760b5190190506114f4565b60f5190190506114f4565b80516000908190811a60808110156117af5760019150611826565b60b88110156117c457607e1981019150611826565b60c08110156117f15760b78103600185019450806020036101000a85510460018201810193505050611826565b60f88110156118065760be1981019150611826565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b60608151600114801561185f5750607f60f81b8260008151811061184d57fe5b01602001516001600160f81b03191611155b1561186b5750806114f4565b61141c61187d8351608060ff166119e6565b83611969565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff1984166118c7575060186118eb565b6fffffffffffffffffffffffffffffffff1984166118e7575060106118eb565b5060005b60208110156119215781818151811061190057fe5b01602001516001600160f81b0319161561191957611921565b6001016118eb565b60008160200390506060816040519080825280601f01601f191660200182016040528015611956576020820181803683370190505b5080830196909652508452509192915050565b6060806040519050835180825260208201818101602087015b8183101561199a578051835260209283019201611982565b50855184518101855292509050808201602086015b818310156119c75780518352602092830192016119af565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310611a36576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b60408051600180825281830190925260609160208201818036833701905050905060378411611a905782840160f81b81600081518110611a7257fe5b60200101906001600160f81b031916908160001a905350905061141c565b6060611a9b85611883565b90508381510160370160f81b82600081518110611ab457fe5b60200101906001600160f81b031916908160001a905350611ad58282611969565b95945050505050565b604051806060016040528060008152602001600081526020016000151581525090565b60408051602081019091526000815290565b6040518060400160405280611b26611b33565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe6c656e677468206f66206d697364656d65616e6f725468726573686f6c64206d69736d61746368746865206d6573736167652073656e646572206d7573742062652076616c696461746f7253657420636f6e7472616374746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662066656c6f6e795468726573686f6c64206d69736d61746368746865206d697364656d65616e6f725468726573686f6c64206f7574206f662072616e6765746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572a2646970667358221220144c24cffbfb13d14daa6c969f3766da2b4e286c1c0273707667ad2ca591cb7964736f6c63430006040033" }, "0x0000000000000000000000000000000000001002": { "balance": "0x0", - "code": "0x6080604052600436106101445760003560e01c806396713da9116100b6578063c81b16621161006f578063c81b1662146103bc578063dc927faf146103d1578063f9a2bbc7146103e6578063fb5478b3146103fb578063fc3e590814610410578063fd6a68791461042557610188565b806396713da91461031a5780639a99b4f01461032f5780639dc0926214610368578063a1a11bf51461037d578063a78abc1614610392578063ab51bb96146103a757610188565b80634bf6c882116101085780634bf6c8821461026a57806351e806721461027f5780636d70f7ae146102945780636e47b482146102db57806370fd5bad146102f05780637942fd051461030557610188565b80630bee7a671461018d5780633a0b0eff146101bb5780633dffc387146101e257806343756e5c1461020d578063493279b11461023e57610188565b366101885734156101865760408051348152905133917fd4f7d34af79a91579ffbb26e18ffb9866c734383ca40131b18e2ca4db8f6649c919081900360200190a25b005b600080fd5b34801561019957600080fd5b506101a261043a565b6040805163ffffffff9092168252519081900360200190f35b3480156101c757600080fd5b506101d061043f565b60408051918252519081900360200190f35b3480156101ee57600080fd5b506101f7610445565b6040805160ff9092168252519081900360200190f35b34801561021957600080fd5b5061022261044a565b604080516001600160a01b039092168252519081900360200190f35b34801561024a57600080fd5b50610253610450565b6040805161ffff9092168252519081900360200190f35b34801561027657600080fd5b506101f7610455565b34801561028b57600080fd5b5061022261045a565b3480156102a057600080fd5b506102c7600480360360208110156102b757600080fd5b50356001600160a01b0316610460565b604080519115158252519081900360200190f35b3480156102e757600080fd5b5061022261047e565b3480156102fc57600080fd5b506101f7610484565b34801561031157600080fd5b506101f7610489565b34801561032657600080fd5b506101f761048e565b34801561033b57600080fd5b506101d06004803603604081101561035257600080fd5b506001600160a01b038135169060200135610493565b34801561037457600080fd5b5061022261063e565b34801561038957600080fd5b50610222610644565b34801561039e57600080fd5b506102c761064a565b3480156103b357600080fd5b506101a2610653565b3480156103c857600080fd5b50610222610658565b3480156103dd57600080fd5b5061022261065e565b3480156103f257600080fd5b50610222610664565b34801561040757600080fd5b506101d061066a565b34801561041c57600080fd5b506101f7610676565b34801561043157600080fd5b5061022261067b565b606481565b60015481565b600181565b61100181565b606081565b600881565b61200081565b6001600160a01b031660009081526002602052604090205460ff1690565b61100581565b600281565b600b81565b600981565b6000805460ff1661051057600260208190527fe57bda0a954a7c7381b17b2c763e646ba2c60f67292d287ba583603e2c1c41668054600160ff19918216811790925561100560009081527fe25235fc0de9d7165652bef0846fefda506174abb9a190f03d0f7bcc6146dbce80548316841790559282558254161790555b3360009081526002602052604090205460ff1661055e5760405162461bcd60e51b815260040180806020018281038252602d815260200180610682602d913960400191505060405180910390fd5b600047831061056d574761056f565b825b9050670de0b6b3a764000081111561058c5750670de0b6b3a76400005b801561060d576040516001600160a01b0385169082156108fc029083906000818181858888f193505050501580156105c8573d6000803e3d6000fd5b506040805182815290516001600160a01b038616917fa641bcd8a48e29cb86bb641e1ad9cb6642ccd0227d91ec198044193b7f8416b7919081900360200190a2610637565b6040517f9bd2da9e978ed6606b09c156a1bd98da2b52fe189aa7632b66e358095cef70eb90600090a15b9392505050565b61100781565b61100681565b60005460ff1681565b600081565b61100281565b61100381565b61100081565b670de0b6b3a764000081565b600381565b6110048156fe6f6e6c79206f70657261746f7220697320617661696c61626c6520746f2063616c6c20746865206d6574686f64a2646970667358221220d628bd03f08dffe4957bc2f6373dc39aa551c1d4166ecad12626566e0edf67fa64736f6c63430006040033" + "code": "0x60806040526004361061014f5760003560e01c806396713da9116100b6578063c81b16621161006f578063c81b1662146103dc578063dc927faf146103f1578063f9a2bbc714610406578063fb5478b31461041b578063fc3e590814610430578063fd6a68791461044557610193565b806396713da91461033a5780639a99b4f01461034f5780639dc0926214610388578063a1a11bf51461039d578063a78abc16146103b2578063ab51bb96146103c757610193565b806351e806721161010857806351e806721461028a5780636d70f7ae1461029f5780636e47b482146102e657806370fd5bad146102fb57806375d47a0a146103105780637942fd051461032557610193565b80630bee7a67146101985780633a0b0eff146101c65780633dffc387146101ed57806343756e5c14610218578063493279b1146102495780634bf6c8821461027557610193565b366101935734156101915760408051348152905133917f6c98249d85d88c3753a04a22230f595e4dc8d3dc86c34af35deeeedc861b89db919081900360200190a25b005b600080fd5b3480156101a457600080fd5b506101ad61045a565b6040805163ffffffff9092168252519081900360200190f35b3480156101d257600080fd5b506101db61045f565b60408051918252519081900360200190f35b3480156101f957600080fd5b50610202610465565b6040805160ff9092168252519081900360200190f35b34801561022457600080fd5b5061022d61046a565b604080516001600160a01b039092168252519081900360200190f35b34801561025557600080fd5b5061025e610470565b6040805161ffff9092168252519081900360200190f35b34801561028157600080fd5b50610202610475565b34801561029657600080fd5b5061022d61047a565b3480156102ab57600080fd5b506102d2600480360360208110156102c257600080fd5b50356001600160a01b0316610480565b604080519115158252519081900360200190f35b3480156102f257600080fd5b5061022d61049e565b34801561030757600080fd5b506102026104a4565b34801561031c57600080fd5b5061022d6104a9565b34801561033157600080fd5b506102026104af565b34801561034657600080fd5b506102026104b4565b34801561035b57600080fd5b506101db6004803603604081101561037257600080fd5b506001600160a01b0381351690602001356104b9565b34801561039457600080fd5b5061022d610664565b3480156103a957600080fd5b5061022d61066a565b3480156103be57600080fd5b506102d2610670565b3480156103d357600080fd5b506101ad610679565b3480156103e857600080fd5b5061022d61067e565b3480156103fd57600080fd5b5061022d610684565b34801561041257600080fd5b5061022d61068a565b34801561042757600080fd5b506101db610690565b34801561043c57600080fd5b5061020261069c565b34801561045157600080fd5b5061022d6106a1565b606481565b60015481565b600181565b61100181565b606081565b600881565b61200081565b6001600160a01b031660009081526002602052604090205460ff1690565b61100581565b600281565b61100881565b600b81565b600981565b6000805460ff1661053657600260208190527fe57bda0a954a7c7381b17b2c763e646ba2c60f67292d287ba583603e2c1c41668054600160ff19918216811790925561100560009081527fe25235fc0de9d7165652bef0846fefda506174abb9a190f03d0f7bcc6146dbce80548316841790559282558254161790555b3360009081526002602052604090205460ff166105845760405162461bcd60e51b815260040180806020018281038252602d8152602001806106a8602d913960400191505060405180910390fd5b60004783106105935747610595565b825b9050670de0b6b3a76400008111156105b25750670de0b6b3a76400005b8015610633576040516001600160a01b0385169082156108fc029083906000818181858888f193505050501580156105ee573d6000803e3d6000fd5b506040805182815290516001600160a01b038616917ff8b71c64315fc33b2ead2adfa487955065152a8ac33d9d5193aafd7f45dc15a0919081900360200190a261065d565b6040517fe589651933c2457488cc0d8e0941518abf748e799435e4e396d9c4d0b2db2d4d90600090a15b9392505050565b61100781565b61100681565b60005460ff1681565b600081565b61100281565b61100381565b61100081565b670de0b6b3a764000081565b600381565b6110048156fe6f6e6c79206f70657261746f7220697320617661696c61626c6520746f2063616c6c20746865206d6574686f64a2646970667358221220e20f950771c7eceba565baadd64788bc50fb81fbe356345ea2445109a521bf3d64736f6c63430006040033" }, "0x0000000000000000000000000000000000001003": { "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063ab51bb961161011a578063dda83148116100ad578063e405bbc31161007c578063e405bbc31461066e578063ea54b2aa14610676578063f9a2bbc71461067e578063fc3e590814610686578063fd6a68791461068e57610206565b8063dda83148146105f6578063df5fe7041461061c578063e1c7392a14610642578063e2761af01461064a57610206565b8063cba510a9116100e9578063cba510a914610529578063d81698791461054f578063da8d08f0146105c8578063dc927faf146105ee57610206565b8063ab51bb961461044d578063ac43175114610455578063adc879e914610519578063c81b16621461052157610206565b8063564b81ef1161019d5780637942fd051161016c5780637942fd051461041157806396713da9146104195780639dc0926214610421578063a1a11bf514610429578063a78abc161461043157610206565b8063564b81ef146102bf5780635c5ae8db1461033c5780636e47b4821461040157806370fd5bad1461040957610206565b806343756e5c116101d957806343756e5c1461026c578063493279b1146102905780634bf6c882146102af57806351e80672146102b757610206565b80630bee7a671461020b5780632657e9b61461022c57806333f7798d146102465780633dffc3871461024e575b600080fd5b610213610696565b6040805163ffffffff9092168252519081900360200190f35b61023461069b565b60408051918252519081900360200190f35b6102346106a6565b6102566106ac565b6040805160ff9092168252519081900360200190f35b6102746106b1565b604080516001600160a01b039092168252519081900360200190f35b6102986106b7565b6040805161ffff9092168252519081900360200190f35b6102566106bc565b6102746106c1565b6102c76106c7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103015781810151838201526020016102e9565b50505050905090810190601f16801561032e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103626004803603602081101561035257600080fd5b50356001600160401b03166107d3565b60405180856001600160401b03166001600160401b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103c35781810151838201526020016103ab565b50505050905090810190601f1680156103f05780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b61027461088e565b610256610894565b610256610899565b61025661089e565b6102746108a3565b6102746108a9565b6104396108af565b604080519115158252519081900360200190f35b6102136108b8565b6105176004803603604081101561046b57600080fd5b81019060208101813564010000000081111561048657600080fd5b82018360208201111561049857600080fd5b803590602001918460018302840111640100000000831117156104ba57600080fd5b9193909290916020810190356401000000008111156104d857600080fd5b8201836020820111156104ea57600080fd5b8035906020019184600183028401116401000000008311171561050c57600080fd5b5090925090506108bd565b005b610234610b76565b610274610b7c565b6102346004803603602081101561053f57600080fd5b50356001600160401b0316610b82565b6104396004803603604081101561056557600080fd5b81019060208101813564010000000081111561058057600080fd5b82018360208201111561059257600080fd5b803590602001918460018302840111640100000000831117156105b457600080fd5b9193509150356001600160401b0316610ba1565b610274600480360360208110156105de57600080fd5b50356001600160401b0316611381565b61027461139c565b6102746004803603602081101561060c57600080fd5b50356001600160401b03166113a2565b6104396004803603602081101561063257600080fd5b50356001600160401b03166113c6565b610517611408565b6106526115ac565b604080516001600160401b039092168252519081900360200190f35b6106526115bb565b6102c76115d1565b6102746115ed565b6102566115f3565b6102746115f8565b606481565b662386f26fc1000081565b60055481565b600181565b61100181565b606081565b600881565b61200081565b604080516020808252818301909252606091829190602082018180368337505060045460208301525090506000805b60208160ff16101561073d57828160ff168151811061071157fe5b01602001516001600160f81b0319161561073057600190910190610735565b61073d565b6001016106f6565b5060608160ff166040519080825280601f01601f19166020018201604052801561076e576020820181803683370190505b50905060005b8260ff168160ff1610156107ca57838160ff168151811061079157fe5b602001015160f81c60f81b828260ff16815181106107ab57fe5b60200101906001600160f81b031916908160001a905350600101610774565b50925050505b90565b60016020818152600092835260409283902080548184015460028084015460038501805489516101009982161599909902600019011692909204601f81018790048702880187019098528787526001600160401b0390931696919592949091908301828280156108845780601f1061085957610100808354040283529160200191610884565b820191906000526020600020905b81548152906001019060200180831161086757829003601f168201915b5050505050905084565b61100581565b600281565b600b81565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff16610914576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b33611007146109545760405162461bcd60e51b815260040180806020018281038252602e8152602001806119ca602e913960400191505060405180910390fd5b6109c884848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601b81527f726577617264466f7256616c696461746f725365744368616e67650000000000602082015291506115fe9050565b15610aa75760208114610a0c5760405162461bcd60e51b815260040180806020018281038252602e815260200180611969602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a4a918585808385018382808284376000920191909152506116e592505050565b9050600081118015610a645750670de0b6b3a76400008111155b610a9f5760405162461bcd60e51b815260040180806020018281038252602f8152602001806119f8602f913960400191505060405180910390fd5b600555610ae4565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60045481565b61100281565b6001600160401b03166000908152600160208190526040909120015490565b60408051630a83aaa960e31b815233600482015290516000916110069163541d554891602480820192602092909190829003018186803b158015610be457600080fd5b505afa158015610bf8573d6000803e3d6000fd5b505050506040513d6020811015610c0e57600080fd5b5051610c61576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b6001600160401b0382166000908152600260205260409020546001600160a01b031615610cd5576040805162461bcd60e51b815260206004820152601c60248201527f63616e27742073796e63206475706c6963617465642068656164657200000000604482015290519081900360640190fd5b6003546001600160401b0390811690831611610d225760405162461bcd60e51b8152600401808060200182810382526026815260200180611ab76026913960400191505060405180910390fd5b600354600160401b90046001600160401b0316610d3d611847565b6001600160401b0382811660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f81018490048402850184019095528484529093606086019392830182828015610e035780601f10610dd857610100808354040283529160200191610e03565b820191906000526020600020905b815481529060010190602001808311610de657829003601f168201915b50505050508152505090505b6003546001600160401b0390811690831610610f2057836001600160401b0316826001600160401b03161015610e4457610f20565b80516001600160401b0380821660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f8101849004840285018401909552848452959750939460608601939091830182828015610f105780601f10610ee557610100808354040283529160200191610f10565b820191906000526020600020905b815481529060010190602001808311610ef357829003601f168201915b5050505050815250509050610e0f565b6060810151516110175780516001600160401b03811660009081526001602081815260409283902060030180548451600294821615610100026000190190911693909304601f810183900483028401830190945283835293955090929190830182828015610fcf5780601f10610fa457610100808354040283529160200191610fcf565b820191906000526020600020905b815481529060010190602001808311610fb257829003601f168201915b505050506060830182905250516110175760405162461bcd60e51b81526004018080602001828103825260218152602001806119486021913960400191505060405180910390fd5b6000816060015151608801905060608787905082016040519080825280601f01601f191660200182016040528015611056576020820181803683370190505b5090506000611064826116ea565b9050611072848683866116f0565b6110ad5760405162461bcd60e51b81526004018080602001828103825260238152602001806119256023913960400191505060405180910390fd5b600083820191506110f38a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061175c92505050565b94509050611102818386611766565b8251602001935061111161186d565b6110008186866064600019fa61112657600080fd5b805194506000600160f81b8616156111b55750600554604080516309a99b4f60e41b815233600482015260248101929092525160019161100291639a99b4f0916044808201926020929091908290030181600087803b15801561118857600080fd5b505af115801561119c573d6000803e3d6000fd5b505050506040513d60208110156111b257600080fd5b50505b856001600160401b0316955060208201935060006111d5858884156117a7565b90985090506001600160401b03808216908c16146112245760405162461bcd60e51b81526004018080602001828103825260338152602001806119976033913960400191505060405180910390fd5b6001600160401b03808c16600081815260026020818152604080842080546001600160a01b031916331790558e86168e529383526001808252928490208d518154961667ffffffffffffffff199096169590951785558c81015192850192909255918b01519183019190915560608a015180518b93926112ab92600385019291019061188c565b50506003546001600160401b03600160401b9091048116908d16111590506112f3576003805467ffffffffffffffff60401b1916600160401b6001600160401b038e16021790555b7f4042c1020a8f410fb1c8859d276ab436aeb2c3074960e48467299cf1c966d3b48b8a8a602001518560405180856001600160401b03166001600160401b03168152602001846001600160401b03166001600160401b031681526020018381526020018215151515815260200194505050505060405180910390a15060019c9b505050505050505050505050565b6002602052600090815260409020546001600160a01b031681565b61100381565b6001600160401b03166000908152600260205260409020546001600160a01b031690565b6001600160401b0381166000908152600260205260408120546001600160a01b031615158061140257506003546001600160401b038381169116145b92915050565b60005460ff1615611460576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b6000806114846040518060c0016040528060908152602001611a276090913961175c565b81516004559092509050611496611847565b60006114a4848460006117a7565b60008083526001600160401b038281168252600160208181526040938490208651815467ffffffffffffffff191694169390931783558086015191830191909155918401516002820155606084015180519496509294508593909261151092600385019291019061188c565b50506003805467ffffffffffffffff19166001600160401b0384811691821767ffffffffffffffff60401b1916600160401b9290920291909117918290556000805460ff19166001179055662386f26fc10000600555602085810151604080519490931684529083015280517f5ac9b37d571677b80957ca05693f371526c602fd08042b416a29fdab7efefa499350918290030190a150505050565b6003546001600160401b031681565b600354600160401b90046001600160401b031681565b6040518060c0016040528060908152602001611a276090913981565b61100081565b600381565b61100481565b6000816040516020018082805190602001908083835b602083106116335780518252601f199092019160209182019101611614565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106116a15780518252601f199092019160209182019101611682565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60200190565b600084606001515182840103925060008061170e876060015161175c565b909250905061171e828683611766565b5050506040840151601f1983810191909152602090940151603f19830152605f19820192909252600454606719820152910160871990910152600190565b8051602090910191565b5b60208110611786578251825260209283019290910190601f1901611767565b915181516020939093036101000a6000190180199091169216919091179052565b6117af611847565b60088401516028850151604890950180519095600092916117ce611847565b6020810183905260408101829052866118395760008060688a036040519080825280601f01601f191660200182016040528015611812576020820181803683370190505b50606084018190526118239061175c565b909250905061183660208c018383611766565b50505b989297509195505050505050565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518061100001604052806080906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118cd57805160ff19168380011785556118fa565b828001600101855582156118fa579182015b828111156118fa5782518255916020019190600101906118df565b5061190692915061190a565b5090565b6107d091905b80821115611906576000815560010161191056fe6661696c656420746f2073657269616c697a6520636f6e73656e7375732073746174656661696c656420746f206c6f61642076616c696461746f722073657420646174616c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d617463686865616465722068656967687420646f65736e277420657175616c20746f207468652073706563696669656420686569676874746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577526577617264466f7256616c696461746f725365744368616e6765206f7574206f662072616e676542696e616e63652d436861696e2d4e696c650000000000000000000000000000000000000000000229eca254b3859bffefaf85f4c95da9fbd26527766b784272789c30ec56b380b6eb96442aaab207bc59978ba3dd477690f5c5872334fc39e627723daa97e441e88ba4515150ec3182bc82593df36f8abb25a619187fcfab7e552b94e64ed2deed000000e8d4a5100063616e27742073796e6320686561646572206265666f726520696e697469616c486569676874a26469706673582212203595b52d77946b253ea8da14fd05bfe29dfbdc5a3f07494c9bf244be055345e564736f6c63430006040033" + "code": "0x608060405234801561001057600080fd5b50600436106102115760003560e01c8063a78abc1611610125578063dda83148116100ad578063e405bbc31161007c578063e405bbc314610681578063ea54b2aa14610689578063f9a2bbc714610691578063fc3e590814610699578063fd6a6879146106a157610211565b8063dda8314814610609578063df5fe7041461062f578063e1c7392a14610655578063e2761af01461065d57610211565b8063c81b1662116100f4578063c81b166214610534578063cba510a91461053c578063d816987914610562578063da8d08f0146105db578063dc927faf1461060157610211565b8063a78abc1614610444578063ab51bb9614610460578063ac43175114610468578063adc879e91461052c57610211565b8063564b81ef116101a857806375d47a0a1161017757806375d47a0a1461041c5780637942fd051461042457806396713da91461042c5780639dc0926214610434578063a1a11bf51461043c57610211565b8063564b81ef146102ca5780635c5ae8db146103475780636e47b4821461040c57806370fd5bad1461041457610211565b806343756e5c116101e457806343756e5c14610277578063493279b11461029b5780634bf6c882146102ba57806351e80672146102c257610211565b80630bee7a67146102165780632657e9b61461023757806333f7798d146102515780633dffc38714610259575b600080fd5b61021e6106a9565b6040805163ffffffff9092168252519081900360200190f35b61023f6106ae565b60408051918252519081900360200190f35b61023f6106b9565b6102616106bf565b6040805160ff9092168252519081900360200190f35b61027f6106c4565b604080516001600160a01b039092168252519081900360200190f35b6102a36106ca565b6040805161ffff9092168252519081900360200190f35b6102616106cf565b61027f6106d4565b6102d26106da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561030c5781810151838201526020016102f4565b50505050905090810190601f1680156103395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61036d6004803603602081101561035d57600080fd5b50356001600160401b03166107e6565b60405180856001600160401b03166001600160401b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103ce5781810151838201526020016103b6565b50505050905090810190601f1680156103fb5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b61027f6108a1565b6102616108a7565b61027f6108ac565b6102616108b2565b6102616108b7565b61027f6108bc565b61027f6108c2565b61044c6108c8565b604080519115158252519081900360200190f35b61021e6108d1565b61052a6004803603604081101561047e57600080fd5b81019060208101813564010000000081111561049957600080fd5b8201836020820111156104ab57600080fd5b803590602001918460018302840111640100000000831117156104cd57600080fd5b9193909290916020810190356401000000008111156104eb57600080fd5b8201836020820111156104fd57600080fd5b8035906020019184600183028401116401000000008311171561051f57600080fd5b5090925090506108d6565b005b61023f610b8f565b61027f610b95565b61023f6004803603602081101561055257600080fd5b50356001600160401b0316610b9b565b61044c6004803603604081101561057857600080fd5b81019060208101813564010000000081111561059357600080fd5b8201836020820111156105a557600080fd5b803590602001918460018302840111640100000000831117156105c757600080fd5b9193509150356001600160401b0316610bba565b61027f600480360360208110156105f157600080fd5b50356001600160401b031661139a565b61027f6113b5565b61027f6004803603602081101561061f57600080fd5b50356001600160401b03166113bb565b61044c6004803603602081101561064557600080fd5b50356001600160401b03166113df565b61052a611421565b6106656115c5565b604080516001600160401b039092168252519081900360200190f35b6106656115d4565b6102d26115ea565b61027f611606565b61026161160c565b61027f611611565b606481565b662386f26fc1000081565b60055481565b600181565b61100181565b606081565b600881565b61200081565b604080516020808252818301909252606091829190602082018180368337505060045460208301525090506000805b60208160ff16101561075057828160ff168151811061072457fe5b01602001516001600160f81b0319161561074357600190910190610748565b610750565b600101610709565b5060608160ff166040519080825280601f01601f191660200182016040528015610781576020820181803683370190505b50905060005b8260ff168160ff1610156107dd57838160ff16815181106107a457fe5b602001015160f81c60f81b828260ff16815181106107be57fe5b60200101906001600160f81b031916908160001a905350600101610787565b50925050505b90565b60016020818152600092835260409283902080548184015460028084015460038501805489516101009982161599909902600019011692909204601f81018790048702880187019098528787526001600160401b0390931696919592949091908301828280156108975780601f1061086c57610100808354040283529160200191610897565b820191906000526020600020905b81548152906001019060200180831161087a57829003601f168201915b5050505050905084565b61100581565b600281565b61100881565b600b81565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661092d576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b336110071461096d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806119e3602e913960400191505060405180910390fd5b6109e184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601b81527f726577617264466f7256616c696461746f725365744368616e67650000000000602082015291506116179050565b15610ac05760208114610a255760405162461bcd60e51b815260040180806020018281038252602e815260200180611982602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a63918585808385018382808284376000920191909152506116fe92505050565b9050600081118015610a7d5750670de0b6b3a76400008111155b610ab85760405162461bcd60e51b815260040180806020018281038252602f815260200180611a11602f913960400191505060405180910390fd5b600555610afd565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60045481565b61100281565b6001600160401b03166000908152600160208190526040909120015490565b60408051630a83aaa960e31b815233600482015290516000916110069163541d554891602480820192602092909190829003018186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b5051610c7a576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b6001600160401b0382166000908152600260205260409020546001600160a01b031615610cee576040805162461bcd60e51b815260206004820152601c60248201527f63616e27742073796e63206475706c6963617465642068656164657200000000604482015290519081900360640190fd5b6003546001600160401b0390811690831611610d3b5760405162461bcd60e51b8152600401808060200182810382526026815260200180611ad06026913960400191505060405180910390fd5b600354600160401b90046001600160401b0316610d56611860565b6001600160401b0382811660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f81018490048402850184019095528484529093606086019392830182828015610e1c5780601f10610df157610100808354040283529160200191610e1c565b820191906000526020600020905b815481529060010190602001808311610dff57829003601f168201915b50505050508152505090505b6003546001600160401b0390811690831610610f3957836001600160401b0316826001600160401b03161015610e5d57610f39565b80516001600160401b0380821660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f8101849004840285018401909552848452959750939460608601939091830182828015610f295780601f10610efe57610100808354040283529160200191610f29565b820191906000526020600020905b815481529060010190602001808311610f0c57829003601f168201915b5050505050815250509050610e28565b6060810151516110305780516001600160401b03811660009081526001602081815260409283902060030180548451600294821615610100026000190190911693909304601f810183900483028401830190945283835293955090929190830182828015610fe85780601f10610fbd57610100808354040283529160200191610fe8565b820191906000526020600020905b815481529060010190602001808311610fcb57829003601f168201915b505050506060830182905250516110305760405162461bcd60e51b81526004018080602001828103825260218152602001806119616021913960400191505060405180910390fd5b6000816060015151608801905060608787905082016040519080825280601f01601f19166020018201604052801561106f576020820181803683370190505b509050600061107d82611703565b905061108b84868386611709565b6110c65760405162461bcd60e51b815260040180806020018281038252602381526020018061193e6023913960400191505060405180910390fd5b6000838201915061110c8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061177592505050565b9450905061111b81838661177f565b8251602001935061112a611886565b6110008186866064600019fa61113f57600080fd5b805194506000600160f81b8616156111ce5750600554604080516309a99b4f60e41b815233600482015260248101929092525160019161100291639a99b4f0916044808201926020929091908290030181600087803b1580156111a157600080fd5b505af11580156111b5573d6000803e3d6000fd5b505050506040513d60208110156111cb57600080fd5b50505b856001600160401b0316955060208201935060006111ee858884156117c0565b90985090506001600160401b03808216908c161461123d5760405162461bcd60e51b81526004018080602001828103825260338152602001806119b06033913960400191505060405180910390fd5b6001600160401b03808c16600081815260026020818152604080842080546001600160a01b031916331790558e86168e529383526001808252928490208d518154961667ffffffffffffffff199096169590951785558c81015192850192909255918b01519183019190915560608a015180518b93926112c49260038501929101906118a5565b50506003546001600160401b03600160401b9091048116908d161115905061130c576003805467ffffffffffffffff60401b1916600160401b6001600160401b038e16021790555b7f4042c1020a8f410fb1c8859d276ab436aeb2c3074960e48467299cf1c966d3b48b8a8a602001518560405180856001600160401b03166001600160401b03168152602001846001600160401b03166001600160401b031681526020018381526020018215151515815260200194505050505060405180910390a15060019c9b505050505050505050505050565b6002602052600090815260409020546001600160a01b031681565b61100381565b6001600160401b03166000908152600260205260409020546001600160a01b031690565b6001600160401b0381166000908152600260205260408120546001600160a01b031615158061141b57506003546001600160401b038381169116145b92915050565b60005460ff1615611479576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b60008061149d6040518060c0016040528060908152602001611a4060909139611775565b815160045590925090506114af611860565b60006114bd848460006117c0565b60008083526001600160401b038281168252600160208181526040938490208651815467ffffffffffffffff19169416939093178355808601519183019190915591840151600282015560608401518051949650929450859390926115299260038501929101906118a5565b50506003805467ffffffffffffffff19166001600160401b0384811691821767ffffffffffffffff60401b1916600160401b9290920291909117918290556000805460ff19166001179055662386f26fc10000600555602085810151604080519490931684529083015280517f5ac9b37d571677b80957ca05693f371526c602fd08042b416a29fdab7efefa499350918290030190a150505050565b6003546001600160401b031681565b600354600160401b90046001600160401b031681565b6040518060c0016040528060908152602001611a406090913981565b61100081565b600381565b61100481565b6000816040516020018082805190602001908083835b6020831061164c5780518252601f19909201916020918201910161162d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106116ba5780518252601f19909201916020918201910161169b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60200190565b60008460600151518284010392506000806117278760600151611775565b909250905061173782868361177f565b5050506040840151601f1983810191909152602090940151603f19830152605f19820192909252600454606719820152910160871990910152600190565b8051602090910191565b5b6020811061179f578251825260209283019290910190601f1901611780565b915181516020939093036101000a6000190180199091169216919091179052565b6117c8611860565b60088401516028850151604890950180519095600092916117e7611860565b6020810183905260408101829052866118525760008060688a036040519080825280601f01601f19166020018201604052801561182b576020820181803683370190505b506060840181905261183c90611775565b909250905061184f60208c01838361177f565b50505b989297509195505050505050565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518061100001604052806080906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118e657805160ff1916838001178555611913565b82800160010185558215611913579182015b828111156119135782518255916020019190600101906118f8565b5061191f929150611923565b5090565b6107e391905b8082111561191f576000815560010161192956fe6661696c656420746f2073657269616c697a6520636f6e73656e7375732073746174656661696c656420746f206c6f61642076616c696461746f722073657420646174616c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d617463686865616465722068656967687420646f65736e277420657175616c20746f207468652073706563696669656420686569676874746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577526577617264466f7256616c696461746f725365744368616e6765206f7574206f662072616e676542696e616e63652d436861696e2d4e696c650000000000000000000000000000000000000000000229eca254b3859bffefaf85f4c95da9fbd26527766b784272789c30ec56b380b6eb96442aaab207bc59978ba3dd477690f5c5872334fc39e627723daa97e441e88ba4515150ec3182bc82593df36f8abb25a619187fcfab7e552b94e64ed2deed000000e8d4a5100063616e27742073796e6320686561646572206265666f726520696e697469616c486569676874a2646970667358221220cac33daf3ddf1c6389ed19fc8f514df99a30932f1870ba9ad45741e514f374bd64736f6c63430006040033" }, "0x0000000000000000000000000000000000001004": { "balance": "180000000000000000000000000", - "code": "0x60806040526004361061038c5760003560e01c80639a854bbd116101dc578063c8509d8111610102578063ece9d81e116100a0578063fc3e59081161006f578063fc3e59081461074a578063fd6a687914610e6f578063fe3a2af51461061c578063ff9c00271461088b5761038c565b8063ece9d81e1461088b578063f014847214610e12578063f9a2bbc714610e27578063fc1a598f14610e3c5761038c565b8063dc6f5e90116100dc578063dc6f5e901461074a578063dc927faf14610de8578063e1c7392a14610dfd578063ebf71d53146104f95761038c565b8063c8509d8114610ce3578063cc12eabc1461088b578063d117a11014610d685761038c565b8063a7c9f02d1161017a578063b770186111610149578063b770186114610ca4578063b9fd21e314610cb9578063c3dc4d9a146104e4578063c81b166214610cce5761038c565b8063a7c9f02d1461074a578063aa7415f514610b7e578063ab51bb9614610bc4578063ac43175114610bd95761038c565b8063a1a11bf5116101b6578063a1a11bf514610b21578063a496fba21461061c578063a5cd588b14610b36578063a78abc1614610b695761038c565b80639a854bbd14610abe5780639a99b4f014610ad35780639dc0926214610b0c5761038c565b806361368475116102c157806372c4e0861161025f578063831d65d11161022e578063831d65d114610a225780638b87b21f146104e457806395b9ad261461074a57806396713da914610aa95761038c565b806372c4e086146108b557806377d9dae8146109595780637942fd0514610a0d5780637d078e13146104e45761038c565b80636e0565201161029b5780636e0565201461075f5780636e47b4821461087657806370fd5bad1461088b57806371d30863146108a05761038c565b806361368475146103915780636b3f1307146106825780636bc2ecdb1461074a5761038c565b806343756e5c1161032e5780634bf6c882116103085780634bf6c8821461039157806350432d32146106315780635170639c1461065857806351e806721461066d5761038c565b806343756e5c146105db578063493279b1146105f05780634a6888181461061c5761038c565b806323996b531161036a57806323996b53146104e45780632ab36d83146104f95780633d7132231461050e5780633dffc387146104e45761038c565b8063077b8f35146103915780630bee7a67146103bc5780631182b875146103ea575b600080fd5b34801561039d57600080fd5b506103a6610e84565b6040805160ff9092168252519081900360200190f35b3480156103c857600080fd5b506103d1610e89565b6040805163ffffffff9092168252519081900360200190f35b3480156103f657600080fd5b5061046f6004803603604081101561040d57600080fd5b60ff8235169190810190604081016020820135600160201b81111561043157600080fd5b82018360208201111561044357600080fd5b803590602001918460018302840111600160201b8311171561046457600080fd5b509092509050610e8e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104a9578181015183820152602001610491565b50505050905090810190601f1680156104d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104f057600080fd5b506103a6611007565b34801561050557600080fd5b506103a661100c565b34801561051a57600080fd5b506105bf6004803603602081101561053157600080fd5b810190602081018135600160201b81111561054b57600080fd5b82018360208201111561055d57600080fd5b803590602001918460018302840111600160201b8311171561057e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611011945050505050565b604080516001600160a01b039092168252519081900360200190f35b3480156105e757600080fd5b506105bf61103e565b3480156105fc57600080fd5b50610605611044565b6040805161ffff9092168252519081900360200190f35b34801561062857600080fd5b506103a6611049565b34801561063d57600080fd5b5061064661104e565b60408051918252519081900360200190f35b34801561066457600080fd5b50610646611059565b34801561067957600080fd5b506105bf61105f565b6107366004803603604081101561069857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460018302840111600160201b831117156106f557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611065945050505050565b604080519115158252519081900360200190f35b34801561075657600080fd5b506103a6611b52565b6107366004803603608081101561077557600080fd5b810190602081018135600160201b81111561078f57600080fd5b8201836020820111156107a157600080fd5b803590602001918460208302840111600160201b831117156107c257600080fd5b919390929091602081019035600160201b8111156107df57600080fd5b8201836020820111156107f157600080fd5b803590602001918460208302840111600160201b8311171561081257600080fd5b919390929091602081019035600160201b81111561082f57600080fd5b82018360208201111561084157600080fd5b803590602001918460208302840111600160201b8311171561086257600080fd5b9193509150356001600160401b0316611b57565b34801561088257600080fd5b506105bf611fe0565b34801561089757600080fd5b506103a6611fe6565b3480156108ac57600080fd5b50610646611feb565b610736600480360360208110156108cb57600080fd5b810190602081018135600160201b8111156108e557600080fd5b8201836020820111156108f757600080fd5b803590602001918460018302840111600160201b8311171561091857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611ff1945050505050565b6107366004803603604081101561096f57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561099957600080fd5b8201836020820111156109ab57600080fd5b803590602001918460018302840111600160201b831117156109cc57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506122ec945050505050565b348015610a1957600080fd5b506103a66126a4565b348015610a2e57600080fd5b50610aa760048036036040811015610a4557600080fd5b60ff8235169190810190604081016020820135600160201b811115610a6957600080fd5b820183602082011115610a7b57600080fd5b803590602001918460018302840111600160201b83111715610a9c57600080fd5b5090925090506126a9565b005b348015610ab557600080fd5b506103a66127f2565b348015610aca57600080fd5b506106466127f7565b348015610adf57600080fd5b5061064660048036036040811015610af657600080fd5b506001600160a01b038135169060200135612803565b348015610b1857600080fd5b506105bf612924565b348015610b2d57600080fd5b506105bf61292a565b348015610b4257600080fd5b5061064660048036036020811015610b5957600080fd5b50356001600160a01b0316612930565b348015610b7557600080fd5b50610736612942565b61073660048036036080811015610b9457600080fd5b5080356001600160a01b0390811691602081013590911690604081013590606001356001600160401b031661294b565b348015610bd057600080fd5b506103d1611049565b348015610be557600080fd5b50610aa760048036036040811015610bfc57600080fd5b810190602081018135600160201b811115610c1657600080fd5b820183602082011115610c2857600080fd5b803590602001918460018302840111600160201b83111715610c4957600080fd5b919390929091602081019035600160201b811115610c6657600080fd5b820183602082011115610c7857600080fd5b803590602001918460018302840111600160201b83111715610c9957600080fd5b509092509050612f77565b348015610cb057600080fd5b506106466131e6565b348015610cc557600080fd5b506106466131ec565b348015610cda57600080fd5b506105bf6131f6565b348015610cef57600080fd5b50610aa760048036036040811015610d0657600080fd5b60ff8235169190810190604081016020820135600160201b811115610d2a57600080fd5b820183602082011115610d3c57600080fd5b803590602001918460018302840111600160201b83111715610d5d57600080fd5b5090925090506131fc565b348015610d7457600080fd5b50610d9260048036036020811015610d8b57600080fd5b5035613281565b6040805160ff988916815260208101979097526001600160a01b03909516868601526060860193909352608085019190915290931660a08301526001600160401b0390921660c082015290519081900360e00190f35b348015610df457600080fd5b506105bf6132d7565b348015610e0957600080fd5b50610aa76132dd565b348015610e1e57600080fd5b506103a6613351565b348015610e3357600080fd5b506105bf613356565b348015610e4857600080fd5b5061046f60048036036020811015610e5f57600080fd5b50356001600160a01b031661335c565b348015610e7b57600080fd5b506105bf613483565b600881565b606481565b60005460609060ff16610ed6576040805162461bcd60e51b81526020600482015260196024820152600080516020615a0b833981519152604482015290519081900360640190fd5b3361200014610f165760405162461bcd60e51b815260040180806020018281038252602f815260200180615971602f913960400191505060405180910390fd5b60ff841660011415610f6857610f6183838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061348992505050565b9050611000565b60ff841660021415610fb357610f6183838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136c792505050565b6040805162461bcd60e51b815260206004820152601960248201527f756e7265636f676e697a65642073796e63207061636b61676500000000000000604482015290519081900360640190fd5b9392505050565b600181565b600481565b60008061101d836137eb565b6000908152600560205260409020546001600160a01b03169150505b919050565b61100181565b606081565b600081565b662386f26fc1000081565b60015490565b61200081565b600080611071836137eb565b905061107b6154e3565b50600081815260026020818152604092839020835160e081018552815460ff90811682526001830154938201849052938201546001600160a01b03169481019490945260038101546060850152600481015460808501526005015491821660a08401526101009091046001600160401b031660c0830152611140576040805162461bcd60e51b815260206004820152601a602482015279189a5b99081c995c5d595cdd08191bd95cdb89dd08195e1a5cdd60321b604482015290519081900360640190fd5b600061115d826080015183606001516137f290919063ffffffff16565b905081604001516001600160a01b0316866001600160a01b0316146111b35760405162461bcd60e51b81526004018080602001828103825260458152602001806157216045913960600191505060405180910390fd5b336001600160a01b0316866001600160a01b031663893d20e86040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f657600080fd5b505afa15801561120a573d6000803e3d6000fd5b505050506040513d602081101561122057600080fd5b50516001600160a01b0316146112675760405162461bcd60e51b815260040180806020018281038252602e815260200180615883602e913960400191505060405180910390fd5b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b1580156112b657600080fd5b505afa1580156112ca573d6000803e3d6000fd5b505050506040513d60208110156112e057600080fd5b50511461131e5760405162461bcd60e51b81526004018080602001828103825260368152602001806159006036913960400191505060405180910390fd5b600154341461135e5760405162461bcd60e51b815260040180806020018281038252602381526020018061567e6023913960400191505060405180910390fd5b428260c001516001600160401b031610156114f55760008381526002602081905260408220805460ff191681556001810183905590810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff191690556113cd61551f565b50604080518082019091526001808252602082018590526120009063f7a251d7906113f784613834565b60015461140f906402540be40063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561146d578181015183820152602001611455565b50505050905090810190601f16801561149a5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156114bb57600080fd5b505af11580156114cf573d6000803e3d6000fd5b505050506040513d60208110156114e557600080fd5b5060009550611b4c945050505050565b6000866001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561153057600080fd5b505afa158015611544573d6000803e3d6000fd5b505050506040513d602081101561155a57600080fd5b5051604080516395d89b4160e01b815290519192506060916001600160a01b038a16916395d89b41916004808301926000929190829003018186803b1580156115a257600080fd5b505afa1580156115b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156115df57600080fd5b8101908080516040519392919084600160201b8211156115fe57600080fd5b90830190602082018581111561161357600080fd5b8251600160201b81118282018810171561162c57600080fd5b82525081516020918201929091019080838360005b83811015611659578181015183820152602001611641565b50505050905090810190601f1680156116865780820380516001836020036101000a031916815260200191505b5060405250505090506116998186613900565b15806116c157506020808501516000908152600590915260409020546001600160a01b031615155b806116e557506040808501516001600160a01b031660009081526004602052205415155b8061175c5750836060015184604001516001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561172d57600080fd5b505afa158015611741573d6000803e3d6000fd5b505050506040513d602081101561175757600080fd5b505114155b8061176e57508360a0015160ff168214155b156118f65760008581526002602081905260408220805460ff191681556001810183905590810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff191690556117cd61551f565b5060408051808201909152600281526020810186905261200063f7a251d760016117f684613834565b60015461180e906402540be40063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561186c578181015183820152602001611854565b50505050905090810190601f1680156118995780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156118ba57600080fd5b505af11580156118ce573d6000803e3d6000fd5b505050506040513d60208110156118e457600080fd5b5060009750611b4c9650505050505050565b604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b038a16916323b872dd9160648083019260209291908290030181600087803b15801561194b57600080fd5b505af115801561195f573d6000803e3d6000fd5b505050506040513d602081101561197557600080fd5b505060208481018051604080880180516001600160a01b03908116600090815260048088528482209590955560a08b0151835183168252600380895285832060ff90921690915592519551815260058088528482208054979093166001600160a01b0319978816179092558b8152600296879052928320805460ff1916815560018101849055958601805490951690945584018190559083015501805468ffffffffffffffffff19169055611a2861551f565b5060408051808201909152600081526020810186905261200063f7a251d76001611a5184613834565b600154611a69906402540be40063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611ac7578181015183820152602001611aaf565b50505050905090810190601f168015611af45780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015611b1557600080fd5b505af1158015611b29573d6000803e3d6000fd5b505050506040513d6020811015611b3f57600080fd5b5060019750505050505050505b92915050565b600381565b6000868514611b975760405162461bcd60e51b815260040180806020018281038252603b815260200180615936603b913960400191505060405180910390fd5b868314611bd55760405162461bcd60e51b815260040180806020018281038252603f815260200180615808603f913960400191505060405180910390fd5b42607801826001600160401b03161015611c205760405162461bcd60e51b81526004018080602001828103825260248152602001806156c86024913960400191505060405180910390fd5b846000805b82811015611c5c57611c52898983818110611c3c57fe5b90506020020135836139de90919063ffffffff16565b9150600101611c25565b50606082604051908082528060200260200182016040528015611c89578160200160208202803683370190505b50905060005b838160ff161015611d5f576402540be4008a8a8360ff16818110611caf57fe5b9050602002013581611cbd57fe5b0615611d10576040805162461bcd60e51b815260206004820152601760248201527f696e76616c6964207472616e7366657220616d6f756e74000000000000000000604482015290519081900360640190fd5b611d3d6402540be4008b8b8460ff16818110611d2857fe5b905060200201356138be90919063ffffffff16565b828260ff1681518110611d4c57fe5b6020908102919091010152600101611c8f565b50600154611d8490611d77908563ffffffff613a3816565b839063ffffffff6139de16565b3414611dc15760405162461bcd60e51b815260040180806020018281038252604c815260200180615797604c913960600191505060405180910390fd5b611dc9615536565b6040518060c001604052806221272160e91b60001b815260200160006001600160a01b031681526020018381526020018d8d808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c9182918501908490808284376000920191909152505050908252506001600160401b038816602090910152905061200063f7a251d76003611e8c84613a91565b611eb66402540be400611eaa8a600154613a3890919063ffffffff16565b9063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611f14578181015183820152602001611efc565b50505050905090810190601f168015611f415780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015611f6257600080fd5b505af1158015611f76573d6000803e3d6000fd5b505050506040513d6020811015611f8c57600080fd5b5050604080516000815233602082015280820185905290517fe9750a449d7c7d8f872b7ee10d75b95a948bc425b3c2d52052587665742c81ec9181900360600190a15060019b9a5050505050505050505050565b61100581565b600281565b60015481565b600080611ffd836137eb565b90506120076154e3565b50600081815260026020818152604092839020835160e081018552815460ff90811682526001830154938201849052938201546001600160a01b03169481019490945260038101546060850152600481015460808501526005015491821660a08401526101009091046001600160401b031660c08301526120cc576040805162461bcd60e51b815260206004820152601a602482015279189a5b99081c995c5d595cdd08191bd95cdb89dd08195e1a5cdd60321b604482015290519081900360640190fd5b428160c001516001600160401b03161061212d576040805162461bcd60e51b815260206004820152601b60248201527f62696e642072657175657374206973206e6f7420657870697265640000000000604482015290519081900360640190fd5b600154341461216d5760405162461bcd60e51b81526004018080602001828103825260278152602001806156a16027913960400191505060405180910390fd5b60008281526002602081905260408220805460ff191681556001810183905590810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff191690556121c761551f565b50604080518082019091526001808252602082018490526120009063f7a251d7906121f184613834565b600154612209906402540be40063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561226757818101518382015260200161224f565b50505050905090810190601f1680156122945780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156122b557600080fd5b505af11580156122c9573d6000803e3d6000fd5b505050506040513d60208110156122df57600080fd5b5060019695505050505050565b6000806122f8836137eb565b90506123026154e3565b50600081815260026020818152604092839020835160e081018552815460ff90811682526001830154938201849052938201546001600160a01b03169481019490945260038101546060850152600481015460808501526005015491821660a08401526101009091046001600160401b031660c08301526123c7576040805162461bcd60e51b815260206004820152601a602482015279189a5b99081c995c5d595cdd08191bd95cdb89dd08195e1a5cdd60321b604482015290519081900360640190fd5b80604001516001600160a01b0316856001600160a01b03161461241b5760405162461bcd60e51b81526004018080602001828103825260458152602001806157216045913960600191505060405180910390fd5b336001600160a01b0316856001600160a01b031663893d20e86040518163ffffffff1660e01b815260040160206040518083038186803b15801561245e57600080fd5b505afa158015612472573d6000803e3d6000fd5b505050506040513d602081101561248857600080fd5b50516001600160a01b0316146124e5576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c79206265703265206f776e65722063616e2072656a6563740000000000604482015290519081900360640190fd5b60015434146125255760405162461bcd60e51b81526004018080602001828103825260278152602001806156a16027913960400191505060405180910390fd5b60008281526002602081905260408220805460ff191681556001810183905590810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff1916905561257f61551f565b5060408051808201909152600381526020810183905261200063f7a251d760016125a884613834565b6001546125c0906402540be40063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561261e578181015183820152602001612606565b50505050905090810190601f16801561264b5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561266c57600080fd5b505af1158015612680573d6000803e3d6000fd5b505050506040513d602081101561269657600080fd5b506001979650505050505050565b600b81565b60005460ff166126ee576040805162461bcd60e51b81526020600482015260196024820152600080516020615a0b833981519152604482015290519081900360640190fd5b336120001461272e5760405162461bcd60e51b815260040180806020018281038252602f815260200180615971602f913960400191505060405180910390fd5b60ff83166003141561277e5761277982828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d4b92505050565b6127ed565b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a15b505050565b600981565b677ce66c50e284000081565b6000805460ff16612849576040805162461bcd60e51b81526020600482015260196024820152600080516020615a0b833981519152604482015290519081900360640190fd5b33611005146128895760405162461bcd60e51b815260040180806020018281038252602f81526020018061564f602f913960400191505060405180910390fd5b6000478310612898574761289a565b825b90508015611000576040516001600160a01b0385169082156108fc029083906000818181858888f193505050501580156128d8573d6000803e3d6000fd5b50604080516001600160a01b03861681526020810183905281517ff8b71c64315fc33b2ead2adfa487955065152a8ac33d9d5193aafd7f45dc15a0929181900390910190a19392505050565b61100781565b61100681565b60036020526000908152604090205481565b60005460ff1681565b600042607801826001600160401b031610156129985760405162461bcd60e51b81526004018080602001828103825260248152602001806156c86024913960400191505060405180910390fd5b6000806001600160a01b038716612a63576402540be4008506156129ed5760405162461bcd60e51b815260040180806020018281038252603c815260200180615847603c913960400191505060405180910390fd5b600154612a0190869063ffffffff6139de16565b3414612a3e5760405162461bcd60e51b815260040180806020018281038252604c815260200180615797604c913960600191505060405180910390fd5b612a53856402540be40063ffffffff6138be16565b6221272160e91b92509050612d01565b6001600160a01b038716600090815260046020526040902054915081612aba5760405162461bcd60e51b81526004018080602001828103825260318152602001806157666031913960400191505060405180910390fd5b6001543414612afa5760405162461bcd60e51b815260040180806020018281038252602d8152602001806159de602d913960400191505060405180910390fd5b6001600160a01b038716600090815260036020526040902054600881111580612b425750600881118015612b425750612b40866007198301600a0a63ffffffff61422116565b155b612b7d5760405162461bcd60e51b815260040180806020018281038252603c815260200180615847603c913960400191505060405180910390fd5b612b878682614263565b9150612b92836142a3565b15612bd9576305f5e1008211612bd95760405162461bcd60e51b815260040180806020018281038252603e8152602001806159a0603e913960400191505060405180910390fd5b600881101580612bf35750600881108015612bf357508582115b612c2e5760405162461bcd60e51b81526004018080602001828103825260258152602001806157e36025913960400191505060405180910390fd5b677ce66c50e2840000821115612c755760405162461bcd60e51b81526004018080602001828103825260358152602001806156ec6035913960400191505060405180910390fd5b604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b038a16916323b872dd9160648083019260209291908290030181600087803b158015612cca57600080fd5b505af1158015612cde573d6000803e3d6000fd5b505050506040513d6020811015612cf457600080fd5b5051612cff57600080fd5b505b612d09615536565b6040805160c0810182528481526001600160a01b038a16602082015281516001808252818401845291928301918160200160208202803683375050508152604080516001808252818301909252602092830192909190808301908036833750505081526040805160018082528183019092526020928301929091908083019080368337019050508152602001866001600160401b03168152509050818160400151600081518110612db657fe5b602002602001018181525050868160600151600081518110612dd457fe5b60200260200101906001600160a01b031690816001600160a01b031681525050338160800151600081518110612e0657fe5b6001600160a01b039092166020928302919091019091015261200063f7a251d76003612e3184613a91565b600154612e49906402540be40063ffffffff6138be16565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612ea7578181015183820152602001612e8f565b50505050905090810190601f168015612ed45780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015612ef557600080fd5b505af1158015612f09573d6000803e3d6000fd5b505050506040513d6020811015612f1f57600080fd5b5050604080516001600160a01b038a16815233602082015280820188905290517fe9750a449d7c7d8f872b7ee10d75b95a948bc425b3c2d52052587665742c81ec9181900360600190a1506001979650505050505050565b3361100714612fb75760405162461bcd60e51b815260040180806020018281038252602e8152602001806158d2602e913960400191505060405180910390fd5b6020811461300c576040805162461bcd60e51b815260206004820152601b60248201527f65787065637465642076616c7565206c656e6774682069732033320000000000604482015290519081900360640190fd5b606084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8801819004810282018101909252868152939450606093925086915085908190840183828082843760009201919091525050505060208301519091506772656c617946656560c01b811415613114576020820151670de0b6b3a764000081111580156130bb57506402540be4008106155b61310c576040805162461bcd60e51b815260206004820152601960248201527f7468652072656c6179466565206f7574206f662072616e676500000000000000604482015290519081900360640190fd5b600155613151565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a878787876040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050505050565b61c35081565b6221272160e91b81565b61100281565b60005460ff16613241576040805162461bcd60e51b81526020600482015260196024820152600080516020615a0b833981519152604482015290519081900360640190fd5b336120001461277e5760405162461bcd60e51b815260040180806020018281038252602f815260200180615971602f913960400191505060405180910390fd5b600260208190526000918252604090912080546001820154928201546003830154600484015460059094015460ff93841695946001600160a01b039093169391929181169061010090046001600160401b031687565b61100381565b60005460ff1615613335576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b662386f26fc1000060019081556000805460ff19169091179055565b600581565b61100081565b6001600160a01b03811660009081526004602090815260409182902054825182815280840190935260609290918391906020820181803683375050506020810183905290506000805b60208160ff1610156133ec57828160ff16815181106133c057fe5b01602001516001600160f81b031916156133df576001909101906133e4565b6133ec565b6001016133a5565b5060608160ff166040519080825280601f01601f19166020018201604052801561341d576020820181803683370190505b50905060005b8260ff168160ff16101561347957838160ff168151811061344057fe5b602001015160f81c60f81b828260ff168151811061345a57fe5b60200101906001600160f81b031916908160001a905350600101613423565b5095945050505050565b61100481565b60005460609060ff166134d1576040805162461bcd60e51b81526020600482015260196024820152600080516020615a0b833981519152604482015290519081900360640190fd5b6134d96154e3565b60006134e484614357565b915091508061353a576040805162461bcd60e51b815260206004820152601f60248201527f756e7265636f676e697a6564207472616e73666572496e207061636b61676500604482015290519081900360640190fd5b815160ff166135ee576020828101805160009081526002928390526040908190208551815460ff1990811660ff928316178355935160018301559186015193810180546001600160a01b0319166001600160a01b0390951694909417909355606085015160038401556080850151600484015560a08501516005909301805460c08701519316939091169290921768ffffffffffffffff0019166101006001600160401b03909216919091021790556136ac565b815160ff166001141561365f576020808301516000908152600590915260409020546001600160a01b03168015613659576001600160a01b03811660009081526004602090815260408083208390558582015183526005909152902080546001600160a01b03191690555b506136ac565b6040805162461bcd60e51b815260206004820152601960248201527f756e7265636f676e697a65642062696e64207061636b61676500000000000000604482015290519081900360640190fd5b60408051600080825260208201909252905b50949350505050565b60606136d1615581565b60006136dc846144a8565b9150915080613732576040805162461bcd60e51b815260206004820152601f60248201527f756e7265636f676e697a6564207472616e73666572496e207061636b61676500604482015290519081900360640190fd5b600061373d836145c1565b905063ffffffff8116156137d1576040808401516020808601516001600160a01b031660009081526003909152918220546137789190614263565b90506137826155b6565b60405180608001604052808660000151815260200183815260200186608001516001600160a01b031681526020018463ffffffff1681525090506137c5816149d6565b95505050505050611039565b505060408051600081526020810190915291506110399050565b6020015190565b600061100083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614a9e565b6040805160028082526060828101909352829190816020015b606081526020019060019003908161384d57505083519091506138759063ffffffff16614b35565b8160008151811061388257fe5b602002602001018190525061389d836020015160001c614b35565b816001815181106138aa57fe5b602002602001018190525061100081614b48565b600061100083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614bd2565b8151600090839060081080613916575080516003115b15613925576000915050611b4c565b6040805160208082528183019092526060916020820181803683370190505090508360208201528082518151811061395957fe5b6020910101516001600160f81b031916602d60f81b1461397e57600092505050611b4c565b600160005b83518110156134795782818151811061399857fe5b602001015160f81c60f81b6001600160f81b0319168482815181106139b957fe5b01602001516001600160f81b031916146139d65760009150613479565b600101613983565b600082820183811015611000576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082613a4757506000611b4c565b82820282848281613a5457fe5b04146110005760405162461bcd60e51b81526004018080602001828103825260218152602001806158b16021913960400191505060405180910390fd5b60408051600680825260e08201909252606091829190816020015b6060815260200190600190039081613aac5750508351909150613ace90614b35565b81600081518110613adb57fe5b6020026020010181905250613afc83602001516001600160a01b0316614c37565b81600181518110613b0957fe5b602002602001018190525060008360400151519050606081604051908082528060200260200182016040528015613b5457816020015b6060815260200190600190039081613b3f5790505b50905060005b82811015613ba157613b8286604001518281518110613b7557fe5b6020026020010151614b35565b828281518110613b8e57fe5b6020908102919091010152600101613b5a565b50613bab81614b48565b83600281518110613bb857fe5b6020026020010181905250606082604051908082528060200260200182016040528015613bf957816020015b6060815260200190600190039081613be45790505b50905060005b83811015613c4f57613c3087606001518281518110613c1a57fe5b60200260200101516001600160a01b0316614c37565b828281518110613c3c57fe5b6020908102919091010152600101613bff565b50613c5981614b48565b84600381518110613c6657fe5b6020026020010181905250606083604051908082528060200260200182016040528015613ca757816020015b6060815260200190600190039081613c925790505b50905060005b84811015613ce757613cc888608001518281518110613c1a57fe5b828281518110613cd457fe5b6020908102919091010152600101613cad565b50613cf181614b48565b85600481518110613cfe57fe5b6020026020010181905250613d1f8760a001516001600160401b0316614b35565b85600581518110613d2c57fe5b6020026020010181905250613d4085614b48565b979650505050505050565b8051613d565761421e565b613d5e6155dd565b6000613d6983614c5a565b9150915080613d7957505061421e565b81516001600160a01b0316613f405760005b826020015151811015613f3a5782604001518181518110613da857fe5b60200260200101516001600160a01b03166108fc84602001518381518110613dcc57fe5b60200260200101519081150290604051600060405180830381858888f19350505050613e94577f1ea8ad5a464cfa84623ec8a881307f46a40b76b3fb8947f39fabcc52471474aa836000015184604001518381518110613e2857fe5b602002602001015185602001518481518110613e4057fe5b602002602001015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a1613f32565b7fd75a89530cbec0a9eed0b88a6f7eb726de5d1c5c234cf1e260dfcf921cdc61c3836000015184604001518381518110613eca57fe5b602002602001015185602001518481518110613ee257fe5b602002602001015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a15b600101613d8b565b506127ed565b60005b82602001515181101561421a5782600001516001600160a01b031663a9059cbb61c35085604001518481518110613f7657fe5b602002602001015186602001518581518110613f8e57fe5b60200260200101516040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600088803b158015613fe557600080fd5b5087f19350505050801561400b57506040513d602081101561400657600080fd5b505160015b6141d6576040516000815260443d1015614027575060006140c2565b60046000803e60005160e01c6308c379a081146140485760009150506140c2565b60043d036004833e81513d60248201116001600160401b0382111715614073576000925050506140c2565b80830180516001600160401b038111156140945760009450505050506140c2565b8060208301013d86018111156140b2576000955050505050506140c2565b601f01601f191660405250925050505b806140cd5750614170565b7f1ea8ad5a464cfa84623ec8a881307f46a40b76b3fb8947f39fabcc52471474aa84600001518560400151848151811061410357fe5b60200260200101518660200151858151811061411b57fe5b602002602001015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a150614212565b3d80801561419a576040519150601f19603f3d011682016040523d82523d6000602084013e61419f565b606091505b507f1ea8ad5a464cfa84623ec8a881307f46a40b76b3fb8947f39fabcc52471474aa84600001518560400151848151811061410357fe5b80156140cd577fd75a89530cbec0a9eed0b88a6f7eb726de5d1c5c234cf1e260dfcf921cdc61c384600001518560400151848151811061410357fe5b600101613f43565b5050505b50565b600061100083836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250614e25565b6000600882111561428c57614285836007198401600a0a63ffffffff6138be16565b9050611b4c565b611000836008849003600a0a63ffffffff613a3816565b6040805160208082528183019092526000916060919060208201818036833750505060208101849052805190915060088110156142e557600092505050611039565b8160058203815181106142f457fe5b6020910101516001600160f81b031916602d60f81b1461431957600092505050611039565b81600182038151811061432857fe5b6020910101516001600160f81b031916604d60f81b1461434d57600092505050611039565b5060019392505050565b61435f6154e3565b60006143696154e3565b614371615614565b61438261437d86614e87565b614eac565b90506000805b61439183614ef6565b1561449b57806143b6576143ac6143a784614f17565b614f65565b60ff168452614493565b80600114156143d5576143cb6143a784614f17565b6020850152614493565b8060021415614402576143ef6143ea84614f17565b614fc3565b6001600160a01b03166040850152614493565b8060031415614421576144176143a784614f17565b6060850152614493565b8060041415614440576144366143a784614f17565b6080850152614493565b8060051415614462576144556143a784614f17565b60ff1660a0850152614493565b806006141561448e576144776143a784614f17565b6001600160401b031660c085015260019150614493565b61449b565b600101614388565b5091935090915050915091565b6144b0615581565b60006144ba615581565b6144c2615614565b6144ce61437d86614e87565b90506000805b6144dd83614ef6565b1561449b57806144fa576144f36143a784614f17565b84526145b9565b80600114156145225761450f6143ea84614f17565b6001600160a01b031660208501526145b9565b8060021415614541576145376143a784614f17565b60408501526145b9565b8060031415614569576145566143ea84614f17565b6001600160a01b031660608501526145b9565b80600414156145915761457e6143ea84614f17565b6001600160a01b031660808501526145b9565b806005141561448e576145a66143a784614f17565b6001600160401b031660a0850152600191505b6001016144d4565b60208101516000906001600160a01b03166146c2578160a001516001600160401b03164211156145f357506001611039565b816040015147101561460757506003611039565b81606001516001600160a01b03166108fc83604001519081150290604051600060405180830381858888f1935050505061464357506004611039565b7f471eb9cc1ffe55ffadf15b32595415eb9d80f22e761d24bd6dffc607e1284d5982602001518360600151846040015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a1506000611039565b8160a001516001600160401b03164211156146df57506001611039565b81516020808401516001600160a01b03166000908152600490915260409020541461470c57506002611039565b602080830151604080516370a0823160e01b815230600482015290516001600160a01b03909216926370a082319261c350926024808201939291829003018187803b15801561475a57600080fd5b5086fa9350505050801561478057506040513d602081101561477b57600080fd5b505160015b614887576040516000815260443d101561479c57506000614837565b60046000803e60005160e01c6308c379a081146147bd576000915050614837565b60043d036004833e81513d60248201116001600160401b03821117156147e857600092505050614837565b80830180516001600160401b03811115614809576000945050505050614837565b8060208301013d860181111561482757600095505050505050614837565b601f01601f191660405250925050505b80614842575061484c565b5060059050611039565b3d808015614876576040519150601f19603f3d011682016040523d82523d6000602084013e61487b565b606091505b50600591506110399050565b826040015181101561489d575060039050611039565b5081602001516001600160a01b031663a9059cbb61c350846060015185604001516040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600088803b15801561490d57600080fd5b5087f19350505050801561493357506040513d602081101561492e57600080fd5b505160015b61494f576040516000815260443d101561479c57506000614837565b8015614842577f471eb9cc1ffe55ffadf15b32595415eb9d80f22e761d24bd6dffc607e1284d5983602001518460600151856040015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a15060009050611039565b60408051600480825260a08201909252606091829190816020015b60608152602001906001900390816149f15750508351909150614a1390614b35565b81600081518110614a2057fe5b6020026020010181905250614a388360200151614b35565b81600181518110614a4557fe5b6020026020010181905250614a6683604001516001600160a01b0316614c37565b81600281518110614a7357fe5b6020026020010181905250614a91836060015163ffffffff16614b35565b816003815181106138aa57fe5b60008184841115614b2d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614af2578181015183820152602001614ada565b50505050905090810190601f168015614b1f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6060611b4c614b4383614fdd565b6150c3565b6060815160001415614b695750604080516000815260208101909152611039565b606082600081518110614b7857fe5b602002602001015190506000600190505b8351811015614bb957614baf82858381518110614ba257fe5b6020026020010151615115565b9150600101614b89565b50611000614bcc825160c060ff16615192565b82615115565b60008183614c215760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315614af2578181015183820152602001614ada565b506000838581614c2d57fe5b0495945050505050565b60408051600560a21b8318601482015260348101909152606090611000816150c3565b614c626155dd565b6000614c6c6155dd565b614c74615614565b614c8061437d86614e87565b90506000805b614c8f83614ef6565b1561449b5780614cb557614ca56143ea84614f17565b6001600160a01b03168452614e1d565b8060011415614d56576060614cd1614ccc85614f17565b61528a565b90508051604051908082528060200260200182016040528015614cfe578160200160208202803683370190505b50602086015260005b8151811015614d4f57614d2c828281518110614d1f57fe5b6020026020010151614f65565b86602001518281518110614d3c57fe5b6020908102919091010152600101614d07565b5050614e1d565b8060021415614df8576060614d6d614ccc85614f17565b90508051604051908082528060200260200182016040528015614d9a578160200160208202803683370190505b50604086015260005b8151811015614d4f57614dc8828281518110614dbb57fe5b6020026020010151614fc3565b86604001518281518110614dd857fe5b6001600160a01b0390921660209283029190910190910152600101614da3565b806003141561448e57614e0d6143a784614f17565b63ffffffff166060850152600191505b600101614c86565b60008183614e745760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315614af2578181015183820152602001614ada565b50828481614e7e57fe5b06949350505050565b614e8f615634565b506040805180820190915281518152602082810190820152919050565b614eb4615614565b614ebd8261535b565b614ec657600080fd5b6000614ed5836020015161538b565b60208085015160408051808201909152868152920190820152915050919050565b6000614f00615634565b505080518051602091820151919092015191011190565b614f1f615634565b614f2882614ef6565b614f3157600080fd5b60208201516000614f41826153ee565b80830160209586015260408051808201909152908152938401919091525090919050565b805160009015801590614f7a57508151602110155b614f8357600080fd5b6000614f92836020015161538b565b835160208086015183018051939450918490039291908310156136be57506020919091036101000a90049392505050565b8051600090601514614fd457600080fd5b611b4c82614f65565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff19841661502157506018615045565b6fffffffffffffffffffffffffffffffff19841661504157506010615045565b5060005b602081101561507b5781818151811061505a57fe5b01602001516001600160f81b031916156150735761507b565b600101615045565b60008160200390506060816040519080825280601f01601f1916602001820160405280156150b0576020820181803683370190505b5080830196909652508452509192915050565b6060815160011480156150f55750607f60f81b826000815181106150e357fe5b01602001516001600160f81b03191611155b15615101575080611039565b611b4c6151138351608060ff16615192565b835b6060806040519050835180825260208201818101602087015b8183101561514657805183526020928301920161512e565b50855184518101855292509050808201602086015b8183101561517357805183526020928301920161515b565b508651929092011591909101601f01601f191660405250905092915050565b60606801000000000000000083106151e2576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b6040805160018082528183019092526060916020820181803683370190505090506037841161523c5782840160f81b8160008151811061521e57fe5b60200101906001600160f81b031916908160001a9053509050611b4c565b606061524785614fdd565b90508381510160370160f81b8260008151811061526057fe5b60200101906001600160f81b031916908160001a9053506152818282615115565b95945050505050565b60606152958261535b565b61529e57600080fd5b60006152a983615487565b90506060816040519080825280602002602001820160405280156152e757816020015b6152d4615634565b8152602001906001900390816152cc5790505b50905060006152f9856020015161538b565b60208601510190506000805b8481101561535057615316836153ee565b915060405180604001604052808381526020018481525084828151811061533957fe5b602090810291909101015291810191600101615305565b509195945050505050565b805160009061536c57506000611039565b6020820151805160001a9060c082101561434d57600092505050611039565b8051600090811a60808110156153a5576000915050611039565b60b88110806153c0575060c081108015906153c0575060f881105b156153cf576001915050611039565b60c08110156153e35760b519019050611039565b60f519019050611039565b80516000908190811a60808110156154095760019150615480565b60b881101561541e57607e1981019150615480565b60c081101561544b5760b78103600185019450806020036101000a85510460018201810193505050615480565b60f88110156154605760be1981019150615480565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b805160009061549857506000611039565b600080905060006154ac846020015161538b565b602085015185519181019250015b808210156154da576154cb826153ee565b600190930192909101906154ba565b50909392505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b604080518082019091526000808252602082015290565b6040518060c001604052806000801916815260200160006001600160a01b0316815260200160608152602001606081526020016060815260200160006001600160401b031681525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b604051806080016040528060006001600160a01b031681526020016060815260200160608152602001600063ffffffff1681525090565b6040518060400160405280615627615634565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe746865206d6573736167652073656e646572206d75737420626520696e63656e746976697a6520636f6e74726163746d73672e76616c756520646f65736e277420657175616c20746f2072656c61794665656d73672e76616c756520646f65736e277420657175616c20746f2073796e6352656c617946656565787069726554696d65206d7573742062652074776f206d696e75746573206c61746572616d6f756e7420697320746f6f206c617267652c20657863656564206d6178696d756d206265703220746f6b656e20616d6f756e74636f6e74616374206164647265737320646f65736e277420657175616c20746f2074686520636f6e7472616374206164647265737320696e2062696e64207265717565737474686520636f6e747261637420686173206e6f74206265656e20626f756e6420746f20616e79206265703220746f6b656e726563656976656420424e4220616d6f756e7420646f65736e277420657175616c20746f207468652073756d206f66207472616e7366657220616d6f756e7420616e642072656c6179466565616d6f756e7420697320746f6f206c617267652c2075696e74323536206f766572666c6f774c656e677468206f6620726563697069656e74416464727320646f65736e277420657175616c20746f206c656e677468206f6620726566756e644164647273696e76616c6964207472616e7366657220616d6f756e743a20707265636973696f6e206c6f737320696e20616d6f756e7420636f6e76657273696f6e6f6e6c79206265703265206f776e65722063616e20617070726f766520746869732062696e642072657175657374536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374616c6c6f77616e636520646f65736e277420657175616c20746f2028746f74616c537570706c79202d207065676779416d6f756e74294c656e677468206f6620726563697069656e74416464727320646f65736e277420657175616c20746f206c656e677468206f6620616d6f756e7473746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374466f72206d696e69546f6b656e2c20746865207472616e7366657220616d6f756e74206d75737420626520656974686572206c61726765207468616e2031726563656976656420424e4220616d6f756e7420646f65736e277420657175616c20746f2072656c617946656574686520636f6e7472616374206e6f7420696e69742079657400000000000000a26469706673582212209a9afeaab49ef8bdc51996c673c9ccc90bf809ae8db4de9ffcb503b04ddf53a564736f6c63430006040033" + "code": "0x6080604052600436106102cd5760003560e01c80639dc0926211610175578063bd466461116100dc578063ebf71d5311610095578063fc1a598f1161006f578063fc1a598f14610c23578063fc3e59081461094e578063fd6a687914610c56578063ff9c00271461074c57610315565b8063ebf71d5314610be4578063f014847214610bf9578063f9a2bbc714610c0e57610315565b8063bd46646114610aed578063c81b166214610b20578063c8509d8114610b35578063dc6f5e901461094e578063dc927faf14610bba578063e1c7392a14610bcf57610315565b8063aa7415f51161012e578063aa7415f514610963578063ab51bb96146109aa578063ac431751146109bf578063b770186114610a8a578063b99328c514610a9f578063b9fd21e314610ad857610315565b80639dc09262146108c7578063a1a11bf5146108dc578063a496fba2146108f1578063a5cd588b14610906578063a78abc1614610939578063a7c9f02d1461094e57610315565b806361368475116102345780637942fd05116101ed5780638eff336c116101c75780638eff336c1461082557806396713da9146108645780639a854bbd146108795780639a99b4f01461088e57610315565b80637942fd051461078b578063831d65d1146107a05780638b87b21f1461053a57610315565b8063613684751461031a5780636e0565201461060b5780636e47b4821461073757806370fd5bad1461074c57806371d308631461076157806375d47a0a1461077657610315565b8063493279b111610286578063493279b1146105645780634bf6c8821461031a57806350432d32146105905780635170639c146105b757806351e80672146105cc57806359b92789146105e157610315565b8063077b8f351461031a5780630bee7a67146103455780631182b875146103735780633d7132231461046d5780633dffc3871461053a57806343756e5c1461054f57610315565b36610315573415610313576040805133815234602082015281517f6c98249d85d88c3753a04a22230f595e4dc8d3dc86c34af35deeeedc861b89db929181900390910190a15b005b600080fd5b34801561032657600080fd5b5061032f610c6b565b6040805160ff9092168252519081900360200190f35b34801561035157600080fd5b5061035a610c70565b6040805163ffffffff9092168252519081900360200190f35b34801561037f57600080fd5b506103f86004803603604081101561039657600080fd5b60ff8235169190810190604081016020820135600160201b8111156103ba57600080fd5b8201836020820111156103cc57600080fd5b803590602001918460018302840111600160201b831117156103ed57600080fd5b509092509050610c75565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561043257818101518382015260200161041a565b50505050905090810190601f16801561045f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561047957600080fd5b5061051e6004803603602081101561049057600080fd5b810190602081018135600160201b8111156104aa57600080fd5b8201836020820111156104bc57600080fd5b803590602001918460018302840111600160201b831117156104dd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610da3945050505050565b604080516001600160a01b039092168252519081900360200190f35b34801561054657600080fd5b5061032f610dc7565b34801561055b57600080fd5b5061051e610dcc565b34801561057057600080fd5b50610579610dd2565b6040805161ffff9092168252519081900360200190f35b34801561059c57600080fd5b506105a5610dd7565b60408051918252519081900360200190f35b3480156105c357600080fd5b506105a5610de2565b3480156105d857600080fd5b5061051e610de8565b3480156105ed57600080fd5b5061051e6004803603602081101561060457600080fd5b5035610dee565b6107236004803603608081101561062157600080fd5b810190602081018135600160201b81111561063b57600080fd5b82018360208201111561064d57600080fd5b803590602001918460208302840111600160201b8311171561066e57600080fd5b919390929091602081019035600160201b81111561068b57600080fd5b82018360208201111561069d57600080fd5b803590602001918460208302840111600160201b831117156106be57600080fd5b919390929091602081019035600160201b8111156106db57600080fd5b8201836020820111156106ed57600080fd5b803590602001918460208302840111600160201b8311171561070e57600080fd5b91935091503567ffffffffffffffff16610e09565b604080519115158252519081900360200190f35b34801561074357600080fd5b5061051e6112d8565b34801561075857600080fd5b5061032f6112de565b34801561076d57600080fd5b506105a56112e3565b34801561078257600080fd5b5061051e6112e9565b34801561079757600080fd5b5061032f6112ef565b3480156107ac57600080fd5b50610313600480360360408110156107c357600080fd5b60ff8235169190810190604081016020820135600160201b8111156107e757600080fd5b8201836020820111156107f957600080fd5b803590602001918460018302840111600160201b8311171561081a57600080fd5b5090925090506112f4565b34801561083157600080fd5b506103136004803603606081101561084857600080fd5b508035906001600160a01b03602082013516906040013561143d565b34801561087057600080fd5b5061032f6114c3565b34801561088557600080fd5b506105a56114c8565b34801561089a57600080fd5b506105a5600480360360408110156108b157600080fd5b506001600160a01b0381351690602001356114d4565b3480156108d357600080fd5b5061051e6115f8565b3480156108e857600080fd5b5061051e6115fe565b3480156108fd57600080fd5b5061032f611604565b34801561091257600080fd5b506105a56004803603602081101561092957600080fd5b50356001600160a01b0316611609565b34801561094557600080fd5b5061072361161b565b34801561095a57600080fd5b5061032f611624565b6107236004803603608081101561097957600080fd5b5080356001600160a01b03908116916020810135909116906040810135906060013567ffffffffffffffff16611629565b3480156109b657600080fd5b5061035a611604565b3480156109cb57600080fd5b50610313600480360360408110156109e257600080fd5b810190602081018135600160201b8111156109fc57600080fd5b820183602082011115610a0e57600080fd5b803590602001918460018302840111600160201b83111715610a2f57600080fd5b919390929091602081019035600160201b811115610a4c57600080fd5b820183602082011115610a5e57600080fd5b803590602001918460018302840111600160201b83111715610a7f57600080fd5b509092509050611c9c565b348015610a9657600080fd5b506105a5611f0b565b348015610aab57600080fd5b5061031360048036036040811015610ac257600080fd5b50803590602001356001600160a01b0316611f11565b348015610ae457600080fd5b506105a5611f87565b348015610af957600080fd5b506105a560048036036020811015610b1057600080fd5b50356001600160a01b0316611f91565b348015610b2c57600080fd5b5061051e611fac565b348015610b4157600080fd5b5061031360048036036040811015610b5857600080fd5b60ff8235169190810190604081016020820135600160201b811115610b7c57600080fd5b820183602082011115610b8e57600080fd5b803590602001918460018302840111600160201b83111715610baf57600080fd5b509092509050611fb2565b348015610bc657600080fd5b5061051e612082565b348015610bdb57600080fd5b50610313612088565b348015610bf057600080fd5b5061032f6120fc565b348015610c0557600080fd5b5061032f612101565b348015610c1a57600080fd5b5061051e612106565b348015610c2f57600080fd5b506103f860048036036020811015610c4657600080fd5b50356001600160a01b031661210c565b348015610c6257600080fd5b5061051e612233565b600881565b606481565b60005460609060ff16610cbd576040805162461bcd60e51b8152602060048201526019602482015260008051602061445e833981519152604482015290519081900360640190fd5b3361200014610cfd5760405162461bcd60e51b815260040180806020018281038252602f8152602001806143df602f913960400191505060405180910390fd5b60ff841660021415610d4f57610d4883838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061223992505050565b9050610d9c565b6040805162461bcd60e51b815260206004820152601860248201527f756e7265636f676e697a65642073796e207061636b6167650000000000000000604482015290519081900360640190fd5b9392505050565b6020818101516000908152600490915260409020546001600160a01b03165b919050565b600181565b61100181565b606081565b662386f26fc1000081565b60015490565b61200081565b6000908152600460205260409020546001600160a01b031690565b6000805460ff16610e4f576040805162461bcd60e51b8152602060048201526019602482015260008051602061445e833981519152604482015290519081900360640190fd5b868514610e8d5760405162461bcd60e51b815260040180806020018281038252603b8152602001806143a4603b913960400191505060405180910390fd5b868314610ecb5760405162461bcd60e51b815260040180806020018281038252603f8152602001806142b6603f913960400191505060405180910390fd5b426078018267ffffffffffffffff161015610f175760405162461bcd60e51b81526004018080602001828103825260248152602001806141bb6024913960400191505060405180910390fd5b846000805b82811015610f5357610f49898983818110610f3357fe5b905060200201358361235d90919063ffffffff16565b9150600101610f1c565b50606082604051908082528060200260200182016040528015610f80578160200160208202803683370190505b50905060005b838160ff161015611056576402540be4008a8a8360ff16818110610fa657fe5b9050602002013581610fb457fe5b0615611007576040805162461bcd60e51b815260206004820152601760248201527f696e76616c6964207472616e7366657220616d6f756e74000000000000000000604482015290519081900360640190fd5b6110346402540be4008b8b8460ff1681811061101f57fe5b905060200201356123b790919063ffffffff16565b828260ff168151811061104357fe5b6020908102919091010152600101610f86565b5060015461107b9061106e908563ffffffff6123f916565b839063ffffffff61235d16565b34146110b85760405162461bcd60e51b815260040180806020018281038252604c815260200180614245604c913960600191505060405180910390fd5b6110c0614014565b6040518060c001604052806221272160e91b60001b815260200160006001600160a01b031681526020018381526020018d8d808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050908252506040805160208b810282810182019093528b82529283019290918c918c91829185019084908082843760009201919091525050509082525067ffffffffffffffff8816602090910152905061200063f7a251d7600361118484612452565b6111ae6402540be4006111a28a6001546123f990919063ffffffff16565b9063ffffffff6123b716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561120c5781810151838201526020016111f4565b50505050905090810190601f1680156112395780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561125a57600080fd5b505af115801561126e573d6000803e3d6000fd5b505050506040513d602081101561128457600080fd5b5050604080516000815233602082015280820185905290517fe9750a449d7c7d8f872b7ee10d75b95a948bc425b3c2d52052587665742c81ec9181900360600190a15060019b9a5050505050505050505050565b61100581565b600281565b60015481565b61100881565b600b81565b60005460ff16611339576040805162461bcd60e51b8152602060048201526019602482015260008051602061445e833981519152604482015290519081900360640190fd5b33612000146113795760405162461bcd60e51b815260040180806020018281038252602f8152602001806143df602f913960400191505060405180910390fd5b60ff8316600314156113c9576113c482828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061270d92505050565b611438565b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a15b505050565b336110081461147d5760405162461bcd60e51b815260040180806020018281038252602381526020018061440e6023913960400191505060405180910390fd5b600083815260046020908152604080832080546001600160a01b039096166001600160a01b03199096168617905593825260038152838220949094556002909352912055565b600981565b677ce66c50e284000081565b6000805460ff1661151a576040805162461bcd60e51b8152602060048201526019602482015260008051602061445e833981519152604482015290519081900360640190fd5b336110051461155a5760405162461bcd60e51b815260040180806020018281038252602f81526020018061412e602f913960400191505060405180910390fd5b6000478310611569574761156b565b825b905080156115ef576040516001600160a01b0385169082156108fc029083906000818181858888f193505050501580156115a9573d6000803e3d6000fd5b50604080516001600160a01b03861681526020810183905281517ff8b71c64315fc33b2ead2adfa487955065152a8ac33d9d5193aafd7f45dc15a0929181900390910190a15b90505b92915050565b61100781565b61100681565b600081565b60026020526000908152604090205481565b60005460ff1681565b600381565b6000805460ff1661166f576040805162461bcd60e51b8152602060048201526019602482015260008051602061445e833981519152604482015290519081900360640190fd5b426078018267ffffffffffffffff1610156116bb5760405162461bcd60e51b81526004018080602001828103825260248152602001806141bb6024913960400191505060405180910390fd5b6000806001600160a01b038716611786576402540be4008506156117105760405162461bcd60e51b815260040180806020018281038252603c8152602001806142f5603c913960400191505060405180910390fd5b60015461172490869063ffffffff61235d16565b34146117615760405162461bcd60e51b815260040180806020018281038252604c815260200180614245604c913960600191505060405180910390fd5b611776856402540be40063ffffffff6123b716565b6221272160e91b92509050611a25565b6001600160a01b0387166000908152600360205260409020549150816117dd5760405162461bcd60e51b81526004018080602001828103825260318152602001806142146031913960400191505060405180910390fd5b600154341461181d5760405162461bcd60e51b815260040180806020018281038252602d815260200180614431602d913960400191505060405180910390fd5b6001600160a01b03871660009081526002602052604090205460088111158061186557506008811180156118655750611863866007198301600a0a63ffffffff61276916565b155b6118a05760405162461bcd60e51b815260040180806020018281038252603c8152602001806142f5603c913960400191505060405180910390fd5b6118aa86826127ab565b91506118b5836127eb565b156118fd576305f5e1008210156118fd5760405162461bcd60e51b815260040180806020018281038252603a81526020018061415d603a913960400191505060405180910390fd5b600881101580611917575060088110801561191757508582115b6119525760405162461bcd60e51b81526004018080602001828103825260258152602001806142916025913960400191505060405180910390fd5b677ce66c50e28400008211156119995760405162461bcd60e51b81526004018080602001828103825260358152602001806141df6035913960400191505060405180910390fd5b604080516323b872dd60e01b81523360048201523060248201526044810188905290516001600160a01b038a16916323b872dd9160648083019260209291908290030181600087803b1580156119ee57600080fd5b505af1158015611a02573d6000803e3d6000fd5b505050506040513d6020811015611a1857600080fd5b5051611a2357600080fd5b505b611a2d614014565b6040805160c0810182528481526001600160a01b038a166020820152815160018082528184018452919283019181602001602082028036833750505081526040805160018082528183019092526020928301929091908083019080368337505050815260408051600180825281830190925260209283019290919080830190803683370190505081526020018667ffffffffffffffff168152509050818160400151600081518110611adb57fe5b602002602001018181525050868160600151600081518110611af957fe5b60200260200101906001600160a01b031690816001600160a01b031681525050338160800151600081518110611b2b57fe5b6001600160a01b039092166020928302919091019091015261200063f7a251d76003611b5684612452565b600154611b6e906402540be40063ffffffff6123b716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611bcc578181015183820152602001611bb4565b50505050905090810190601f168015611bf95780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015611c1a57600080fd5b505af1158015611c2e573d6000803e3d6000fd5b505050506040513d6020811015611c4457600080fd5b5050604080516001600160a01b038a16815233602082015280820188905290517fe9750a449d7c7d8f872b7ee10d75b95a948bc425b3c2d52052587665742c81ec9181900360600190a1506001979650505050505050565b3361100714611cdc5760405162461bcd60e51b815260040180806020018281038252602e815260200180614352602e913960400191505060405180910390fd5b60208114611d31576040805162461bcd60e51b815260206004820152601b60248201527f65787065637465642076616c7565206c656e6774682069732033320000000000604482015290519081900360640190fd5b606084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8801819004810282018101909252868152939450606093925086915085908190840183828082843760009201919091525050505060208301519091506772656c617946656560c01b811415611e39576020820151670de0b6b3a76400008111158015611de057506402540be4008106155b611e31576040805162461bcd60e51b815260206004820152601960248201527f7468652072656c6179466565206f7574206f662072616e676500000000000000604482015290519081900360640190fd5b600155611e76565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a878787876040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050505050565b61c35081565b3361100814611f515760405162461bcd60e51b815260040180806020018281038252602381526020018061440e6023913960400191505060405180910390fd5b600091825260046020908152604080842080546001600160a01b03191690556001600160a01b0392909216835260039052812055565b6221272160e91b81565b6001600160a01b031660009081526003602052604090205490565b61100281565b60005460ff16611ff7576040805162461bcd60e51b8152602060048201526019602482015260008051602061445e833981519152604482015290519081900360640190fd5b33612000146120375760405162461bcd60e51b815260040180806020018281038252602f8152602001806143df602f913960400191505060405180910390fd5b60ff8316600314156113c9576113c482828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128f192505050565b61100381565b60005460ff16156120e0576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b662386f26fc1000060019081556000805460ff19169091179055565b600481565b600581565b61100081565b6001600160a01b03811660009081526003602090815260409182902054825182815280840190935260609290918391906020820181803683375050506020810183905290506000805b60208160ff16101561219c57828160ff168151811061217057fe5b01602001516001600160f81b0319161561218f57600190910190612194565b61219c565b600101612155565b5060608160ff166040519080825280601f01601f1916602001820160405280156121cd576020820181803683370190505b50905060005b8260ff168160ff16101561222957838160ff16815181106121f057fe5b602001015160f81c60f81b828260ff168151811061220a57fe5b60200101906001600160f81b031916908160001a9053506001016121d3565b5095945050505050565b61100481565b6060612243614060565b600061224e846129ef565b91509150806122a4576040805162461bcd60e51b815260206004820152601f60248201527f756e7265636f676e697a6564207472616e73666572496e207061636b61676500604482015290519081900360640190fd5b60006122af83612b2e565b905063ffffffff811615612343576040808401516020808601516001600160a01b031660009081526002909152918220546122ea91906127ab565b90506122f4614095565b60405180608001604052808660000151815260200183815260200186608001516001600160a01b031681526020018463ffffffff16815250905061233781612e46565b95505050505050610dc2565b50506040805160008152602081019091529150610dc29050565b6000828201838110156115ef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006115ef83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612f22565b600082612408575060006115f2565b8282028284828161241557fe5b04146115ef5760405162461bcd60e51b81526004018080602001828103825260218152602001806143316021913960400191505060405180910390fd5b60408051600680825260e08201909252606091829190816020015b606081526020019060019003908161246d575050835190915061248f90612fc4565b8160008151811061249c57fe5b60200260200101819052506124bd83602001516001600160a01b0316612fd7565b816001815181106124ca57fe5b60200260200101819052506000836040015151905060608160405190808252806020026020018201604052801561251557816020015b60608152602001906001900390816125005790505b50905060005b82811015612562576125438660400151828151811061253657fe5b6020026020010151612fc4565b82828151811061254f57fe5b602090810291909101015260010161251b565b5061256c81612ffa565b8360028151811061257957fe5b60200260200101819052506060826040519080825280602002602001820160405280156125ba57816020015b60608152602001906001900390816125a55790505b50905060005b83811015612610576125f1876060015182815181106125db57fe5b60200260200101516001600160a01b0316612fd7565b8282815181106125fd57fe5b60209081029190910101526001016125c0565b5061261a81612ffa565b8460038151811061262757fe5b602002602001018190525060608360405190808252806020026020018201604052801561266857816020015b60608152602001906001900390816126535790505b50905060005b848110156126a857612689886080015182815181106125db57fe5b82828151811061269557fe5b602090810291909101015260010161266e565b506126b281612ffa565b856004815181106126bf57fe5b60200260200101819052506126e18760a0015167ffffffffffffffff16612fc4565b856005815181106126ee57fe5b602002602001018190525061270285612ffa565b979650505050505050565b6127156140bc565b600061272083613084565b91509150806127605760405162461bcd60e51b81526004018080602001828103825260248152602001806143806024913960400191505060405180910390fd5b6114388261324f565b60006115ef83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506136a0565b600060088211156127d4576127cd836007198401600a0a63ffffffff6123b716565b90506115f2565b6115ef836008849003600a0a63ffffffff6123f916565b604080516020808252818301909252600091606091906020820181803683375050506020810184905290506000805b60208160ff16101561286157828160ff168151811061283557fe5b01602001516001600160f81b0319161561285457600190910190612859565b612861565b60010161281a565b50600860ff8216101561287957600092505050610dc2565b816005820360ff168151811061288b57fe5b6020910101516001600160f81b031916602d60f81b146128b057600092505050610dc2565b816001820360ff16815181106128c257fe5b6020910101516001600160f81b031916604d60f81b146128e757600092505050610dc2565b5060019392505050565b6128f9614014565b600061290483613702565b91509150806129445760405162461bcd60e51b81526004018080602001828103825260248152602001806141976024913960400191505060405180910390fd5b61294c6140bc565b602080840180516001600160a01b0390811684526040808701518585015291511660009081526002909252812054905b8460400151518110156129cd576129aa8560400151828151811061299c57fe5b60200260200101518361397d565b856040015182815181106129ba57fe5b602090810291909101015260010161297c565b5060808401516040830152600560608301526129e88261324f565b5050505050565b6129f7614060565b6000612a01614060565b612a096140f3565b612a1a612a15866139b6565b6139db565b90506000805b612a2983613a25565b15612b215780612a4b57612a44612a3f84613a46565b613a94565b8452612b19565b8060011415612a7857612a65612a6084613a46565b613af4565b6001600160a01b03166020850152612b19565b8060021415612a9757612a8d612a3f84613a46565b6040850152612b19565b8060031415612abf57612aac612a6084613a46565b6001600160a01b03166060850152612b19565b8060041415612ae757612ad4612a6084613a46565b6001600160a01b03166080850152612b19565b8060051415612b1457612afc612a3f84613a46565b67ffffffffffffffff1660a085015260019150612b19565b612b21565b600101612a20565b5091935090915050915091565b60208101516000906001600160a01b0316612c30578160a0015167ffffffffffffffff16421115612b6157506001610dc2565b8160400151471015612b7557506003610dc2565b81606001516001600160a01b03166108fc83604001519081150290604051600060405180830381858888f19350505050612bb157506004610dc2565b7f471eb9cc1ffe55ffadf15b32595415eb9d80f22e761d24bd6dffc607e1284d5982602001518360600151846040015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a1506000610dc2565b8160a0015167ffffffffffffffff16421115612c4e57506001610dc2565b81516020808401516001600160a01b031660009081526003909152604090205414612c7b57506002610dc2565b602080830151604080516370a0823160e01b815230600482015290516000936001600160a01b03909316926370a082319261c3509260248083019392829003018187803b158015612ccb57600080fd5b5086fa158015612cdf573d6000803e3d6000fd5b50505050506040513d6020811015612cf657600080fd5b50516040840151909150811015612d11575060039050610dc2565b600083602001516001600160a01b031663a9059cbb61c350866060015187604001516040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600088803b158015612d8257600080fd5b5087f1158015612d96573d6000803e3d6000fd5b50505050506040513d6020811015612dad57600080fd5b505190508015612e3a577f471eb9cc1ffe55ffadf15b32595415eb9d80f22e761d24bd6dffc607e1284d5984602001518560600151866040015160405180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b03168152602001828152602001935050505060405180910390a15060009150610dc29050565b5060059150610dc29050565b60408051600480825260a08201909252606091829190816020015b6060815260200190600190039081612e615750508351909150612e8390612fc4565b81600081518110612e9057fe5b6020026020010181905250612ea88360200151612fc4565b81600181518110612eb557fe5b6020026020010181905250612ed683604001516001600160a01b0316612fd7565b81600281518110612ee357fe5b6020026020010181905250612f01836060015163ffffffff16612fc4565b81600381518110612f0e57fe5b6020026020010181905250610d9c81612ffa565b60008183612fae5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612f73578181015183820152602001612f5b565b50505050905090810190601f168015612fa05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612fba57fe5b0495945050505050565b60606115f2612fd283613b0e565b613bf4565b60408051600560a21b8318601482015260348101909152606090610d9c81613bf4565b606081516000141561301b5750604080516000815260208101909152610dc2565b60608260008151811061302a57fe5b602002602001015190506000600190505b835181101561306b576130618285838151811061305457fe5b6020026020010151613c46565b915060010161303b565b50610d9c61307e825160c060ff16613cc3565b82613c46565b61308c6140bc565b60006130966140bc565b61309e6140f3565b6130aa612a15866139b6565b90506000805b6130b983613a25565b15612b2157806130df576130cf612a6084613a46565b6001600160a01b03168452613247565b80600114156131805760606130fb6130f685613a46565b613dbb565b90508051604051908082528060200260200182016040528015613128578160200160208202803683370190505b50602086015260005b81518110156131795761315682828151811061314957fe5b6020026020010151613a94565b8660200151828151811061316657fe5b6020908102919091010152600101613131565b5050613247565b80600214156132225760606131976130f685613a46565b905080516040519080825280602002602001820160405280156131c4578160200160208202803683370190505b50604086015260005b8151811015613179576131f28282815181106131e557fe5b6020026020010151613af4565b8660400151828151811061320257fe5b6001600160a01b03909216602092830291909101909101526001016131cd565b8060031415612b1457613237612a3f84613a46565b63ffffffff166060850152600191505b6001016130b0565b80516001600160a01b03166134465760005b816020015151811015613440578160400151818151811061327e57fe5b60200260200101516001600160a01b03166108fc836020015183815181106132a257fe5b60200260200101519081150290604051600060405180830381858888f19350505050613382577f203f9f67a785f4f81be4d48b109aa0c498d1bc8097ecc2627063f480cc5fe73e8260000151836040015183815181106132fe57fe5b60200260200101518460200151848151811061331657fe5b6020026020010151856060015160405180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b031681526020018381526020018263ffffffff1663ffffffff16815260200194505050505060405180910390a1613438565b7fd468d4fa5e8fb4adc119b29a983fd0785e04af5cb8b7a3a69a47270c54b6901a8260000151836040015183815181106133b857fe5b6020026020010151846020015184815181106133d057fe5b6020026020010151856060015160405180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b031681526020018381526020018263ffffffff1663ffffffff16815260200194505050505060405180910390a15b600101613261565b5061369d565b60005b81602001515181101561369b57600082600001516001600160a01b031663a9059cbb61c3508560400151858151811061347e57fe5b60200260200101518660200151868151811061349657fe5b60200260200101516040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600088803b1580156134ed57600080fd5b5087f1158015613501573d6000803e3d6000fd5b50505050506040513d602081101561351857600080fd5b5051905080156135dc577fd468d4fa5e8fb4adc119b29a983fd0785e04af5cb8b7a3a69a47270c54b6901a83600001518460400151848151811061355857fe5b60200260200101518560200151858151811061357057fe5b6020026020010151866060015160405180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b031681526020018381526020018263ffffffff1663ffffffff16815260200194505050505060405180910390a1613692565b7f203f9f67a785f4f81be4d48b109aa0c498d1bc8097ecc2627063f480cc5fe73e83600001518460400151848151811061361257fe5b60200260200101518560200151858151811061362a57fe5b6020026020010151866060015160405180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b031681526020018381526020018263ffffffff1663ffffffff16815260200194505050505060405180910390a15b50600101613449565b505b50565b600081836136ef5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612f73578181015183820152602001612f5b565b508284816136f957fe5b06949350505050565b61370a614014565b6000613714614014565b61371c6140f3565b613728612a15866139b6565b90506000805b61373783613a25565b1561396f57806137545761374d612a3f84613a46565b8452613967565b806001141561377c57613769612a6084613a46565b6001600160a01b03166020850152613967565b806002141561380b5760606137936130f685613a46565b905080516040519080825280602002602001820160405280156137c0578160200160208202803683370190505b50604086015260005b8151811015613804576137e182828151811061314957fe5b866040015182815181106137f157fe5b60209081029190910101526001016137c9565b5050613967565b80600314156138a05760606138226130f685613a46565b9050805160405190808252806020026020018201604052801561384f578160200160208202803683370190505b50606086015260005b8151811015613804576138708282815181106131e557fe5b8660600151828151811061388057fe5b6001600160a01b0390921660209283029190910190910152600101613858565b80600414156139355760606138b76130f685613a46565b905080516040519080825280602002602001820160405280156138e4578160200160208202803683370190505b50608086015260005b8151811015613804576139058282815181106131e557fe5b8660800151828151811061391557fe5b6001600160a01b03909216602092830291909101909101526001016138ed565b80600514156139625761394a612a3f84613a46565b67ffffffffffffffff1660a085015260019150613967565b61396f565b60010161372e565b509195600195509350505050565b6000600882111561399f576127cd836007198401600a0a63ffffffff6123f916565b6115ef836008849003600a0a63ffffffff6123b716565b6139be614113565b506040805180820190915281518152602082810190820152919050565b6139e36140f3565b6139ec82613e8c565b6139f557600080fd5b6000613a048360200151613ebc565b60208085015160408051808201909152868152920190820152915050919050565b6000613a2f614113565b505080518051602091820151919092015191011190565b613a4e614113565b613a5782613a25565b613a6057600080fd5b60208201516000613a7082613f1f565b80830160209586015260408051808201909152908152938401919091525090919050565b805160009015801590613aa957508151602110155b613ab257600080fd5b6000613ac18360200151613ebc565b83516020808601518301805193945091849003929190831015613aeb57826020036101000a820491505b50949350505050565b8051600090601514613b0557600080fd5b6115f282613a94565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff198416613b5257506018613b76565b6fffffffffffffffffffffffffffffffff198416613b7257506010613b76565b5060005b6020811015613bac57818181518110613b8b57fe5b01602001516001600160f81b03191615613ba457613bac565b600101613b76565b60008160200390506060816040519080825280601f01601f191660200182016040528015613be1576020820181803683370190505b5080830196909652508452509192915050565b606081516001148015613c265750607f60f81b82600081518110613c1457fe5b01602001516001600160f81b03191611155b15613c32575080610dc2565b6115f2613c448351608060ff16613cc3565b835b6060806040519050835180825260208201818101602087015b81831015613c77578051835260209283019201613c5f565b50855184518101855292509050808201602086015b81831015613ca4578051835260209283019201613c8c565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310613d13576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b60408051600180825281830190925260609160208201818036833701905050905060378411613d6d5782840160f81b81600081518110613d4f57fe5b60200101906001600160f81b031916908160001a90535090506115f2565b6060613d7885613b0e565b90508381510160370160f81b82600081518110613d9157fe5b60200101906001600160f81b031916908160001a905350613db28282613c46565b95945050505050565b6060613dc682613e8c565b613dcf57600080fd5b6000613dda83613fb8565b9050606081604051908082528060200260200182016040528015613e1857816020015b613e05614113565b815260200190600190039081613dfd5790505b5090506000613e2a8560200151613ebc565b60208601510190506000805b84811015613e8157613e4783613f1f565b9150604051806040016040528083815260200184815250848281518110613e6a57fe5b602090810291909101015291810191600101613e36565b509195945050505050565b8051600090613e9d57506000610dc2565b6020820151805160001a9060c08210156128e757600092505050610dc2565b8051600090811a6080811015613ed6576000915050610dc2565b60b8811080613ef1575060c08110801590613ef1575060f881105b15613f00576001915050610dc2565b60c0811015613f145760b519019050610dc2565b60f519019050610dc2565b80516000908190811a6080811015613f3a5760019150613fb1565b60b8811015613f4f57607e1981019150613fb1565b60c0811015613f7c5760b78103600185019450806020036101000a85510460018201810193505050613fb1565b60f8811015613f915760be1981019150613fb1565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b8051600090613fc957506000610dc2565b60008090506000613fdd8460200151613ebc565b602085015185519181019250015b8082101561400b57613ffc82613f1f565b60019093019290910190613feb565b50909392505050565b6040518060c001604052806000801916815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001600067ffffffffffffffff1681525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b604051806080016040528060006001600160a01b031681526020016060815260200160608152602001600063ffffffff1681525090565b6040518060400160405280614106614113565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe746865206d6573736167652073656e646572206d75737420626520696e63656e746976697a6520636f6e7472616374466f72206d696e69546f6b656e2c20746865207472616e7366657220616d6f756e74206d757374206e6f74206265206c657373207468616e2031756e7265636f676e697a6564207472616e736665724f75742073796e207061636b61676565787069726554696d65206d7573742062652074776f206d696e75746573206c61746572616d6f756e7420697320746f6f206c617267652c20657863656564206d6178696d756d206265703220746f6b656e20616d6f756e7474686520636f6e747261637420686173206e6f74206265656e20626f756e6420746f20616e79206265703220746f6b656e726563656976656420424e4220616d6f756e7420646f65736e277420657175616c20746f207468652073756d206f66207472616e7366657220616d6f756e7420616e642072656c6179466565616d6f756e7420697320746f6f206c617267652c2075696e74323536206f766572666c6f774c656e677468206f6620726563697069656e74416464727320646f65736e277420657175616c20746f206c656e677468206f6620726566756e644164647273696e76616c6964207472616e7366657220616d6f756e743a20707265636973696f6e206c6f737320696e20616d6f756e7420636f6e76657273696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374756e7265636f676e697a6564207472616e736665724f75742061636b207061636b6167654c656e677468206f6620726563697069656e74416464727320646f65736e277420657175616c20746f206c656e677468206f6620616d6f756e7473746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d73672073656e646572206d75737420626520746f6b656e4d616e61676572726563656976656420424e4220616d6f756e7420646f65736e277420657175616c20746f2072656c617946656574686520636f6e7472616374206e6f7420696e69742079657400000000000000a2646970667358221220434a714081c045cd9ed2ce98357b4e71106119387236fd35d74f825915a9d9ec64736f6c63430006040033" }, "0x0000000000000000000000000000000000001005": { "balance": "0x0", - "code": "0x6080604052600436106102555760003560e01c806387c1830a11610139578063ac431751116100b6578063dc927faf1161007a578063dc927faf1461074a578063dcae76ab1461075f578063e1c7392a14610774578063f9a2bbc714610789578063fc3e59081461079e578063fd6a6879146107b35761025c565b8063ac43175114610610578063af400681146106e1578063bd4cc8301461070b578063c7d2b028146102e0578063c81b1662146107355761025c565b8063a3c3c0ad116100fd578063a3c3c0ad146105a7578063a413aff6146105bc578063a60d770b146105d1578063a78abc16146105e6578063ab51bb96146105fb5761025c565b806387c1830a14610520578063930e1b091461053557806396713da9146105685780639dc092621461057d578063a1a11bf5146105925761025c565b806343756e5c116101d25780635413330711610196578063541333071461043a578063572120951461044f5780636e47b482146104825780636f93d2e61461049757806370fd5bad146104f65780637942fd051461050b5761025c565b806343756e5c146103a5578063490dfdf7146103ba578063493279b1146103e45780634bf6c8821461041057806351e80672146104255761025c565b8063189d817211610219578063189d8172146102f55780631b20087c1461030a5780631c6433121461031f5780633dffc3871461036557806341b5f4e5146103905761025c565b806308f2ec06146102615780630bee7a67146102885780630c732068146102b657806310e06a76146102cb578063117048d8146102e05761025c565b3661025c57005b600080fd5b34801561026d57600080fd5b506102766107c8565b60408051918252519081900360200190f35b34801561029457600080fd5b5061029d6107ce565b6040805163ffffffff9092168252519081900360200190f35b3480156102c257600080fd5b506102766107d3565b3480156102d757600080fd5b506102766107d9565b3480156102ec57600080fd5b506102766107df565b34801561030157600080fd5b506102766107e4565b34801561031657600080fd5b506102766107ea565b34801561032b57600080fd5b506103496004803603602081101561034257600080fd5b50356107f0565b604080516001600160a01b039092168252519081900360200190f35b34801561037157600080fd5b5061037a6107df565b6040805160ff9092168252519081900360200190f35b34801561039c57600080fd5b50610276610817565b3480156103b157600080fd5b5061034961081c565b3480156103c657600080fd5b50610349600480360360208110156103dd57600080fd5b5035610822565b3480156103f057600080fd5b506103f961082f565b6040805161ffff9092168252519081900360200190f35b34801561041c57600080fd5b5061037a610834565b34801561043157600080fd5b50610349610839565b34801561044657600080fd5b5061027661083f565b34801561045b57600080fd5b506102766004803603602081101561047257600080fd5b50356001600160a01b0316610845565b34801561048e57600080fd5b50610349610857565b3480156104a357600080fd5b506104e2600480360360808110156104ba57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135151561085d565b604080519115158252519081900360200190f35b34801561050257600080fd5b5061037a610c01565b34801561051757600080fd5b5061037a610c06565b34801561052c57600080fd5b50610276610c0b565b34801561054157600080fd5b506102766004803603602081101561055857600080fd5b50356001600160a01b0316610c11565b34801561057457600080fd5b5061037a610c23565b34801561058957600080fd5b50610349610c28565b34801561059e57600080fd5b50610349610c2e565b3480156105b357600080fd5b50610276610c34565b3480156105c857600080fd5b50610276610c3a565b3480156105dd57600080fd5b50610276610c40565b3480156105f257600080fd5b506104e2610c45565b34801561060757600080fd5b5061029d610c4e565b34801561061c57600080fd5b506106df6004803603604081101561063357600080fd5b81019060208101813564010000000081111561064e57600080fd5b82018360208201111561066057600080fd5b8035906020019184600183028401116401000000008311171561068257600080fd5b9193909290916020810190356401000000008111156106a057600080fd5b8201836020820111156106b257600080fd5b803590602001918460018302840111640100000000831117156106d457600080fd5b509092509050610c53565b005b3480156106ed57600080fd5b506102766004803603602081101561070457600080fd5b5035611211565b34801561071757600080fd5b506102766004803603602081101561072e57600080fd5b5035611273565b34801561074157600080fd5b5061034961128e565b34801561075657600080fd5b50610349611294565b34801561076b57600080fd5b5061027661129a565b34801561078057600080fd5b506106df6112a0565b34801561079557600080fd5b50610349611369565b3480156107aa57600080fd5b5061037a61136f565b3480156107bf57600080fd5b50610349611374565b61019081565b606481565b60035481565b600b5481565b600181565b60045481565b600c5481565b600681815481106107fd57fe5b6000918252602090912001546001600160a01b0316905081565b605081565b61100181565b600881815481106107fd57fe5b606081565b600881565b61200081565b6103e881565b60076020526000908152604090205481565b61100581565b6000805460ff166108b5576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b33612000146108f55760405162461bcd60e51b815260040180806020018281038252602f815260200180611d05602f913960400191505060405180910390fd5b6000821561097a57604080516309a99b4f60e41b8152611005600482015260248101869052905161100291639a99b4f09160448083019260209291908290030181600087803b15801561094757600080fd5b505af115801561095b573d6000803e3d6000fd5b505050506040513d602081101561097157600080fd5b505190506109f3565b604080516309a99b4f60e41b8152611005600482015260248101869052905161100491639a99b4f09160448083019260209291908290030181600087803b1580156109c457600080fd5b505af11580156109d8573d6000803e3d6000fd5b505050506040513d60208110156109ee57600080fd5b505190505b600c805460010190556000610a078261137a565b600954909150610a1d908263ffffffff6113a916565b600955600a54610a45908290610a39908563ffffffff6113a916565b9063ffffffff61140a16565b600a556001600160a01b038716600090815260056020526040902054610ab157600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0389161790555b6001600160a01b038088166000908152600560209081526040808320805460010190559289168252600790522054610b2f57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0388161790555b6001600160a01b038616600090815260076020526040902080546001019055600c546103e81415610bf457600b54600954600a5460408051938452602084019290925282820152517f127fd0fd1fcf84c71c5c649625ef186be105a71ecc80c7cb3f96cd99ccae1e0f9181900360600190a1610baa8661144c565b610bb3866116f9565b6040516110029081904780156108fc02916000818181858888f19350505050158015610be3573d6000803e3d6000fd5b5050600b805460010190556000600c555b5060019695505050505050565b600281565b600b81565b60015481565b60056020526000908152604090205481565b600981565b61100781565b61100681565b600a5481565b60025481565b600581565b60005460ff1681565b600081565b3361100714610c935760405162461bcd60e51b815260040180806020018281038252602e815260200180611cb6602e913960400191505060405180910390fd5b60005460ff16610cd45760405162461bcd60e51b8152600401808060200182810382526021815260200180611ce46021913960400191505060405180910390fd5b610d4084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601581527436b7b632b1bab632a432b0b232b92932b630bcb2b960591b602082015291506119799050565b15610dcb5760208114610d845760405162461bcd60e51b8152600401808060200182810382526028815260200180611c3f6028913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610dc291858580838501838280828437600092019190915250611a6092505050565b6001555061117f565b610e3f84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601881527f64656e6f6d696e61746f7248656164657252656c617965720000000000000000602082015291506119799050565b15610f075760208114610e835760405162461bcd60e51b815260040180806020018281038252602e815260200180611c67602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610ec191858580838501838280828437600092019190915250611a6092505050565b905080610eff5760405162461bcd60e51b8152600401808060200182810382526030815260200180611d346030913960400191505060405180910390fd5b60025561117f565b610f7b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601a81527f6d6f6c6563756c6543616c6c6572436f6d70656e736174696f6e000000000000602082015291506119799050565b156110065760208114610fbf5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c67602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610ffd91858580838501838280828437600092019190915250611a6092505050565b6003555061117f565b61107a84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601d81527f64656e6f6d696e61746f7243616c6c6572436f6d70656e736174696f6e000000602082015291506119799050565b1561114257602081146110be5760405162461bcd60e51b815260040180806020018281038252602e815260200180611c67602e913960400191505060405180910390fd5b604080516020601f84018190048102820181019092528281526000916110fc91858580838501838280828437600092019190915250611a6092505050565b90508061113a5760405162461bcd60e51b8152600401808060200182810382526035815260200180611d646035913960400191505060405180910390fd5b60045561117f565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b6000610190821161122357508061126e565b8161019010801561123657506103208211155b15611244575061019061126e565b61032082118015611257575061044c8211155b1561126857506104b081900361126e565b50600481045b919050565b6000610190821161128557508061126e565b5061019061126e565b61100281565b61100381565b60095481565b60005460ff16156112f8576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b60005460ff1615611346576040805162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b60018080556005600255600381905560506004556000805460ff19169091179055565b61100081565b600381565b61100481565b60006113a360025461139760015485611a6590919063ffffffff16565b9063ffffffff611abe16565b92915050565b600082820183811015611403576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061140383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b00565b600954600680546040805160208084028201810190925282815260009360609391929091908301828280156114aa57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161148c575b50505050509050606081516040519080825280602002602001820160405280156114de578160200160208202803683370190505b50905060005b825181101561156b5760008382815181106114fb57fe5b60200260200101519050600061153560056000846001600160a01b03166001600160a01b0316815260200190815260200160002054611273565b90508084848151811061154457fe5b602090810291909101015261155f868263ffffffff6113a916565b955050506001016114e4565b50600061158960045461139760035488611a6590919063ffffffff16565b905061159b858263ffffffff61140a16565b94508460015b84518110156116315760006115d6876113978a8886815181106115c057fe5b6020026020010151611a6590919063ffffffff16565b90508582815181106115e457fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f15061162693508692508491505063ffffffff61140a16565b9250506001016115a1565b508360008151811061163f57fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f150506040516001600160a01b038b16935085156108fc0292508591506000818181858888f1505060006009819055925050505b84518110156116e357600560008683815181106116b557fe5b6020908102919091018101516001600160a01b0316825281019190915260400160009081205560010161169c565b506116f060066000611bfc565b50505050505050565b600a546008805460408051602080840282018101909252828152600093606093919290919083018282801561175757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611739575b505050505090506060815160405190808252806020026020018201604052801561178b578160200160208202803683370190505b50905060005b825181101561180a5760008382815181106117a857fe5b6020026020010151905060006117e260076000846001600160a01b03166001600160a01b0316815260200190815260200160002054611211565b9050808484815181106117f157fe5b6020908102919091010152949094019350600101611791565b50600061182860045461139760035488611a6590919063ffffffff16565b905061183a858263ffffffff61140a16565b94508460015b84518110156118ba57600061185f876113978a8886815181106115c057fe5b905085828151811061186d57fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f1506118af93508692508491505063ffffffff61140a16565b925050600101611840565b50836000815181106118c857fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f150506040516001600160a01b038b16935085156108fc0292508591506000818181858888f150506000600a819055925050505b845181101561196c576007600086838151811061193e57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600090812055600101611925565b506116f060086000611bfc565b6000816040516020018082805190602001908083835b602083106119ae5780518252601f19909201916020918201910161198f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310611a1c5780518252601f1990920191602091820191016119fd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b600082611a74575060006113a3565b82820282848281611a8157fe5b04146114035760405162461bcd60e51b8152600401808060200182810382526021815260200180611c956021913960400191505060405180910390fd5b600061140383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b97565b60008184841115611b8f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b54578181015183820152602001611b3c565b50505050905090810190601f168015611b815780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611be65760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611b54578181015183820152602001611b3c565b506000838581611bf257fe5b0495945050505050565b5080546000825590600052602060002090810190611c1a9190611c1d565b50565b611c3b91905b80821115611c375760008155600101611c23565b5090565b9056fe6c656e677468206f66206d6f6c6563756c6548656164657252656c61796572206d69736d617463686c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d61746368536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374636f6e747261637420686173206e6f74206265656e20696e697469616c697a6564746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206e657744656e6f6d696e61746f7248656164657252656c61796572206d757374206e6f74206265207a65726f746865206e657744656e6f6d696e61746f7243616c6c6572436f6d70656e736174696f6e206d757374206e6f74206265207a65726fa26469706673582212202e3d88278e2f11fe16b6e81fc1745e5f9eea6294a3734cdd27d66d8e8ae6b77a64736f6c63430006040033" + "code": "0x6080604052600436106102605760003560e01c80637942fd0511610144578063ac431751116100b6578063dc927faf1161007a578063dc927faf1461076a578063dcae76ab1461077f578063e1c7392a14610794578063f9a2bbc7146107a9578063fc3e5908146107be578063fd6a6879146107d357610267565b8063ac43175114610630578063af40068114610701578063bd4cc8301461072b578063c7d2b028146102eb578063c81b16621461075557610267565b8063a1a11bf511610108578063a1a11bf5146105b2578063a3c3c0ad146105c7578063a413aff6146105dc578063a60d770b146105f1578063a78abc1614610606578063ab51bb961461061b57610267565b80637942fd051461052b57806387c1830a14610540578063930e1b091461055557806396713da9146105885780639dc092621461059d57610267565b806343756e5c116101dd57806354133307116101a15780635413330714610445578063572120951461045a5780636e47b4821461048d5780636f93d2e6146104a257806370fd5bad1461050157806375d47a0a1461051657610267565b806343756e5c146103b0578063490dfdf7146103c5578063493279b1146103ef5780634bf6c8821461041b57806351e806721461043057610267565b8063189d817211610224578063189d8172146103005780631b20087c146103155780631c6433121461032a5780633dffc3871461037057806341b5f4e51461039b57610267565b806308f2ec061461026c5780630bee7a67146102935780630c732068146102c157806310e06a76146102d6578063117048d8146102eb57610267565b3661026757005b600080fd5b34801561027857600080fd5b506102816107e8565b60408051918252519081900360200190f35b34801561029f57600080fd5b506102a86107ee565b6040805163ffffffff9092168252519081900360200190f35b3480156102cd57600080fd5b506102816107f3565b3480156102e257600080fd5b506102816107f9565b3480156102f757600080fd5b506102816107ff565b34801561030c57600080fd5b50610281610804565b34801561032157600080fd5b5061028161080a565b34801561033657600080fd5b506103546004803603602081101561034d57600080fd5b5035610810565b604080516001600160a01b039092168252519081900360200190f35b34801561037c57600080fd5b506103856107ff565b6040805160ff9092168252519081900360200190f35b3480156103a757600080fd5b50610281610837565b3480156103bc57600080fd5b5061035461083c565b3480156103d157600080fd5b50610354600480360360208110156103e857600080fd5b5035610842565b3480156103fb57600080fd5b5061040461084f565b6040805161ffff9092168252519081900360200190f35b34801561042757600080fd5b50610385610854565b34801561043c57600080fd5b50610354610859565b34801561045157600080fd5b5061028161085f565b34801561046657600080fd5b506102816004803603602081101561047d57600080fd5b50356001600160a01b0316610865565b34801561049957600080fd5b50610354610877565b3480156104ae57600080fd5b506104ed600480360360808110156104c557600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135151561087d565b604080519115158252519081900360200190f35b34801561050d57600080fd5b50610385610c21565b34801561052257600080fd5b50610354610c26565b34801561053757600080fd5b50610385610c2c565b34801561054c57600080fd5b50610281610c31565b34801561056157600080fd5b506102816004803603602081101561057857600080fd5b50356001600160a01b0316610c37565b34801561059457600080fd5b50610385610c49565b3480156105a957600080fd5b50610354610c4e565b3480156105be57600080fd5b50610354610c54565b3480156105d357600080fd5b50610281610c5a565b3480156105e857600080fd5b50610281610c60565b3480156105fd57600080fd5b50610281610c66565b34801561061257600080fd5b506104ed610c6b565b34801561062757600080fd5b506102a8610c74565b34801561063c57600080fd5b506106ff6004803603604081101561065357600080fd5b81019060208101813564010000000081111561066e57600080fd5b82018360208201111561068057600080fd5b803590602001918460018302840111640100000000831117156106a257600080fd5b9193909290916020810190356401000000008111156106c057600080fd5b8201836020820111156106d257600080fd5b803590602001918460018302840111640100000000831117156106f457600080fd5b509092509050610c79565b005b34801561070d57600080fd5b506102816004803603602081101561072457600080fd5b5035611237565b34801561073757600080fd5b506102816004803603602081101561074e57600080fd5b5035611299565b34801561076157600080fd5b506103546112b4565b34801561077657600080fd5b506103546112ba565b34801561078b57600080fd5b506102816112c0565b3480156107a057600080fd5b506106ff6112c6565b3480156107b557600080fd5b5061035461138f565b3480156107ca57600080fd5b50610385611395565b3480156107df57600080fd5b5061035461139a565b61019081565b606481565b60035481565b600b5481565b600181565b60045481565b600c5481565b6006818154811061081d57fe5b6000918252602090912001546001600160a01b0316905081565b605081565b61100181565b6008818154811061081d57fe5b606081565b600881565b61200081565b6103e881565b60076020526000908152604090205481565b61100581565b6000805460ff166108d5576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b33612000146109155760405162461bcd60e51b815260040180806020018281038252602f815260200180611d2b602f913960400191505060405180910390fd5b6000821561099a57604080516309a99b4f60e41b8152611005600482015260248101869052905161100291639a99b4f09160448083019260209291908290030181600087803b15801561096757600080fd5b505af115801561097b573d6000803e3d6000fd5b505050506040513d602081101561099157600080fd5b50519050610a13565b604080516309a99b4f60e41b8152611005600482015260248101869052905161100491639a99b4f09160448083019260209291908290030181600087803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b505190505b600c805460010190556000610a27826113a0565b600954909150610a3d908263ffffffff6113cf16565b600955600a54610a65908290610a59908563ffffffff6113cf16565b9063ffffffff61143016565b600a556001600160a01b038716600090815260056020526040902054610ad157600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0389161790555b6001600160a01b038088166000908152600560209081526040808320805460010190559289168252600790522054610b4f57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0388161790555b6001600160a01b038616600090815260076020526040902080546001019055600c546103e81415610c1457600b54600954600a5460408051938452602084019290925282820152517f127fd0fd1fcf84c71c5c649625ef186be105a71ecc80c7cb3f96cd99ccae1e0f9181900360600190a1610bca86611472565b610bd38661171f565b6040516110029081904780156108fc02916000818181858888f19350505050158015610c03573d6000803e3d6000fd5b5050600b805460010190556000600c555b5060019695505050505050565b600281565b61100881565b600b81565b60015481565b60056020526000908152604090205481565b600981565b61100781565b61100681565b600a5481565b60025481565b600581565b60005460ff1681565b600081565b3361100714610cb95760405162461bcd60e51b815260040180806020018281038252602e815260200180611cdc602e913960400191505060405180910390fd5b60005460ff16610cfa5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d0a6021913960400191505060405180910390fd5b610d6684848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601581527436b7b632b1bab632a432b0b232b92932b630bcb2b960591b6020820152915061199f9050565b15610df15760208114610daa5760405162461bcd60e51b8152600401808060200182810382526028815260200180611c656028913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610de891858580838501838280828437600092019190915250611a8692505050565b600155506111a5565b610e6584848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601881527f64656e6f6d696e61746f7248656164657252656c6179657200000000000000006020820152915061199f9050565b15610f2d5760208114610ea95760405162461bcd60e51b815260040180806020018281038252602e815260200180611c8d602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610ee791858580838501838280828437600092019190915250611a8692505050565b905080610f255760405162461bcd60e51b8152600401808060200182810382526030815260200180611d5a6030913960400191505060405180910390fd5b6002556111a5565b610fa184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601a81527f6d6f6c6563756c6543616c6c6572436f6d70656e736174696f6e0000000000006020820152915061199f9050565b1561102c5760208114610fe55760405162461bcd60e51b815260040180806020018281038252602e815260200180611c8d602e913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161102391858580838501838280828437600092019190915250611a8692505050565b600355506111a5565b6110a084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601d81527f64656e6f6d696e61746f7243616c6c6572436f6d70656e736174696f6e0000006020820152915061199f9050565b1561116857602081146110e45760405162461bcd60e51b815260040180806020018281038252602e815260200180611c8d602e913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161112291858580838501838280828437600092019190915250611a8692505050565b9050806111605760405162461bcd60e51b8152600401808060200182810382526035815260200180611d8a6035913960400191505060405180910390fd5b6004556111a5565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60006101908211611249575080611294565b8161019010801561125c57506103208211155b1561126a5750610190611294565b6103208211801561127d575061044c8211155b1561128e57506104b0819003611294565b50600481045b919050565b600061019082116112ab575080611294565b50610190611294565b61100281565b61100381565b60095481565b60005460ff161561131e576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b60005460ff161561136c576040805162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b60018080556005600255600381905560506004556000805460ff19169091179055565b61100081565b600381565b61100481565b60006113c96002546113bd60015485611a8b90919063ffffffff16565b9063ffffffff611ae416565b92915050565b600082820183811015611429576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061142983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b26565b600954600680546040805160208084028201810190925282815260009360609391929091908301828280156114d057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114b2575b5050505050905060608151604051908082528060200260200182016040528015611504578160200160208202803683370190505b50905060005b825181101561159157600083828151811061152157fe5b60200260200101519050600061155b60056000846001600160a01b03166001600160a01b0316815260200190815260200160002054611299565b90508084848151811061156a57fe5b6020908102919091010152611585868263ffffffff6113cf16565b9550505060010161150a565b5060006115af6004546113bd60035488611a8b90919063ffffffff16565b90506115c1858263ffffffff61143016565b94508460015b84518110156116575760006115fc876113bd8a8886815181106115e657fe5b6020026020010151611a8b90919063ffffffff16565b905085828151811061160a57fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f15061164c93508692508491505063ffffffff61143016565b9250506001016115c7565b508360008151811061166557fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f150506040516001600160a01b038b16935085156108fc0292508591506000818181858888f1505060006009819055925050505b845181101561170957600560008683815181106116db57fe5b6020908102919091018101516001600160a01b031682528101919091526040016000908120556001016116c2565b5061171660066000611c22565b50505050505050565b600a546008805460408051602080840282018101909252828152600093606093919290919083018282801561177d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161175f575b50505050509050606081516040519080825280602002602001820160405280156117b1578160200160208202803683370190505b50905060005b82518110156118305760008382815181106117ce57fe5b60200260200101519050600061180860076000846001600160a01b03166001600160a01b0316815260200190815260200160002054611237565b90508084848151811061181757fe5b60209081029190910101529490940193506001016117b7565b50600061184e6004546113bd60035488611a8b90919063ffffffff16565b9050611860858263ffffffff61143016565b94508460015b84518110156118e0576000611885876113bd8a8886815181106115e657fe5b905085828151811061189357fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f1506118d593508692508491505063ffffffff61143016565b925050600101611866565b50836000815181106118ee57fe5b60200260200101516001600160a01b03166108fc829081150290604051600060405180830381858888f150506040516001600160a01b038b16935085156108fc0292508591506000818181858888f150506000600a819055925050505b8451811015611992576007600086838151811061196457fe5b6020908102919091018101516001600160a01b0316825281019190915260400160009081205560010161194b565b5061171660086000611c22565b6000816040516020018082805190602001908083835b602083106119d45780518252601f1990920191602091820191016119b5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310611a425780518252601f199092019160209182019101611a23565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b600082611a9a575060006113c9565b82820282848281611aa757fe5b04146114295760405162461bcd60e51b8152600401808060200182810382526021815260200180611cbb6021913960400191505060405180910390fd5b600061142983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611bbd565b60008184841115611bb55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b7a578181015183820152602001611b62565b50505050905090810190601f168015611ba75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611c0c5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611b7a578181015183820152602001611b62565b506000838581611c1857fe5b0495945050505050565b5080546000825590600052602060002090810190611c409190611c43565b50565b611c6191905b80821115611c5d5760008155600101611c49565b5090565b9056fe6c656e677468206f66206d6f6c6563756c6548656164657252656c61796572206d69736d617463686c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d61746368536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374636f6e747261637420686173206e6f74206265656e20696e697469616c697a6564746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206e657744656e6f6d696e61746f7248656164657252656c61796572206d757374206e6f74206265207a65726f746865206e657744656e6f6d696e61746f7243616c6c6572436f6d70656e736174696f6e206d757374206e6f74206265207a65726fa264697066735822122025e7e7027a3acb792fdf1226379e59cce431796a9d1a9fe79ff20112aebca14b64736f6c63430006040033" }, "0x0000000000000000000000000000000000001006": { "balance": "0x0", - "code": "0x6080604052600436106101b75760003560e01c806396713da9116100ec578063dc927faf1161008a578063f9a2bbc711610064578063f9a2bbc714610509578063fb7cfdd71461051e578063fc3e590814610533578063fd6a687914610548576101b7565b8063dc927faf146104ca578063e1c7392a146104df578063e79a198f146104f4576101b7565b8063a78abc16116100c6578063a78abc16146103bc578063ab51bb96146103d1578063ac431751146103e6578063c81b1662146104b5576101b7565b806396713da91461037d5780639dc0926214610392578063a1a11bf5146103a7576101b7565b8063541d55481161015957806370fd5bad1161013357806370fd5bad146103295780637942fd051461033e5780637ae230881461035357806395468d2614610368576101b7565b8063541d5548146102a65780636a87d780146102ed5780636e47b48214610314576101b7565b806343756e5c1161019557806343756e5c1461021f578063493279b1146102505780634bf6c8821461027c57806351e8067214610291576101b7565b80630bee7a67146101bc5780631aa3a008146101ea5780633dffc387146101f4575b600080fd5b3480156101c857600080fd5b506101d161055d565b6040805163ffffffff9092168252519081900360200190f35b6101f2610562565b005b34801561020057600080fd5b50610209610713565b6040805160ff9092168252519081900360200190f35b34801561022b57600080fd5b50610234610718565b604080516001600160a01b039092168252519081900360200190f35b34801561025c57600080fd5b5061026561071e565b6040805161ffff9092168252519081900360200190f35b34801561028857600080fd5b50610209610723565b34801561029d57600080fd5b50610234610728565b3480156102b257600080fd5b506102d9600480360360208110156102c957600080fd5b50356001600160a01b031661072e565b604080519115158252519081900360200190f35b3480156102f957600080fd5b5061030261074c565b60408051918252519081900360200190f35b34801561032057600080fd5b50610234610752565b34801561033557600080fd5b50610209610758565b34801561034a57600080fd5b5061020961075d565b34801561035f57600080fd5b50610302610762565b34801561037457600080fd5b5061030261076f565b34801561038957600080fd5b5061020961077b565b34801561039e57600080fd5b50610234610780565b3480156103b357600080fd5b50610234610786565b3480156103c857600080fd5b506102d961078c565b3480156103dd57600080fd5b506101d1610795565b3480156103f257600080fd5b506101f26004803603604081101561040957600080fd5b81019060208101813564010000000081111561042457600080fd5b82018360208201111561043657600080fd5b8035906020019184600183028401116401000000008311171561045857600080fd5b91939092909160208101903564010000000081111561047657600080fd5b82018360208201111561048857600080fd5b803590602001918460018302840111640100000000831117156104aa57600080fd5b50909250905061079a565b3480156104c157600080fd5b50610234610bb0565b3480156104d657600080fd5b50610234610bb6565b3480156104eb57600080fd5b506101f2610bbc565b34801561050057600080fd5b506101f2610c3e565b34801561051557600080fd5b50610234610de5565b34801561052a57600080fd5b50610302610deb565b34801561053f57600080fd5b50610209610df1565b34801561055457600080fd5b50610234610df6565b606481565b3360009081526004602052604090205460ff16156105bf576040805162461bcd60e51b81526020600482015260156024820152741c995b185e595c88185b1c9958591e48195e1a5cdd605a1b604482015290519081900360640190fd5b60005460ff16610612576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b61061b33610dfc565b156106575760405162461bcd60e51b8152600401808060200182810382526027815260200180610f2e6027913960400191505060405180910390fd5b60015434146106975760405162461bcd60e51b8152600401808060200182810382526025815260200180610f096025913960400191505060405180910390fd5b604080518082018252600180548252600254602080840191825233600081815260038352868120955186559251948401949094556004815290849020805460ff1916909217909155825191825291517fdb33a09d38b59a8fa8b7d92a1d82c8015e99f05f67ae9c9ae623157767959496929181900390910190a1565b600181565b61100181565b606081565b600881565b61200081565b6001600160a01b031660009081526004602052604090205460ff1690565b60025481565b61100581565b600281565b600b81565b68056bc75e2d6310000081565b67016345785d8a000081565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff166107ed576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b336110071461082d5760405162461bcd60e51b815260040180806020018281038252602e815260200180610f55602e913960400191505060405180910390fd5b61089384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e1c995c5d5a5c995911195c1bdcda5d608a1b60208201529150610e029050565b1561098a57602081146108d75760405162461bcd60e51b8152600401808060200182810382526022815260200180610f836022913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161091591858580838501838280828437600092019190915250610ee992505050565b9050600181101580156109315750683635c9adc5dea000008111155b610982576040805162461bcd60e51b815260206004820181905260248201527f7468652072657175697265644465706f736974206f7574206f662072616e6765604482015290519081900360640190fd5b600155610b1e565b6109e584848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636475657360e01b60208201529150610e029050565b15610ae15760208114610a3f576040805162461bcd60e51b815260206004820152601760248201527f6c656e677468206f662064756573206d69736d61746368000000000000000000604482015290519081900360640190fd5b604080516020601f8401819004810282018101909252828152600091610a7d91858580838501838280828437600092019190915250610ee992505050565b9050600081118015610a90575060015481105b610ad9576040805162461bcd60e51b81526020600482015260156024820152747468652064756573206f7574206f662072616e676560581b604482015290519081900360640190fd5b600255610b1e565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b61100281565b61100381565b60005460ff1615610c14576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b68056bc75e2d63100000600190815567016345785d8a00006002556000805460ff19169091179055565b3360009081526004602052604090205460ff16610c99576040805162461bcd60e51b81526020600482015260146024820152731c995b185e595c88191bc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b60005460ff16610cec576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b610cf4610eee565b50336000818152600360209081526040808320815180830183528154808252600190920154938101849052915191949392900380156108fc0292909190818181858888f19350505050158015610d4e573d6000803e3d6000fd5b50602081015160405161100291829181156108fc0291906000818181858888f19350505050158015610d84573d6000803e3d6000fd5b50336000818152600460209081526040808320805460ff191690556003825280832083815560010192909255815192835290517fd17202129b83db7880d6b9f25df81c58ad46f7e0e2c92236b1aa10663a4876679281900390910190a15050565b61100081565b60015481565b600381565b61100481565b3b151590565b6000816040516020018082805190602001908083835b60208310610e375780518252601f199092019160209182019101610e18565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310610ea55780518252601f199092019160209182019101610e86565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60405180604001604052806000815260200160008152509056fe6465706f7369742076616c7565206973206e6f742065786163746c79207468652073616d65636f6e7472616374206973206e6f7420616c6c6f77656420746f20626520612072656c61796572746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662072657175697265644465706f736974206d69736d61746368a2646970667358221220d46c63d7c7f592ec8aa8955f0de0ebbc30cbd477958fda86144b7245edf48d8964736f6c63430006040033" + "code": "0x6080604052600436106101c25760003560e01c806395468d26116100f7578063c81b166211610095578063f9a2bbc711610064578063f9a2bbc714610529578063fb7cfdd71461053e578063fc3e590814610553578063fd6a687914610568576101c2565b8063c81b1662146104d5578063dc927faf146104ea578063e1c7392a146104ff578063e79a198f14610514576101c2565b8063a1a11bf5116100d1578063a1a11bf5146103c7578063a78abc16146103dc578063ab51bb96146103f1578063ac43175114610406576101c2565b806395468d261461038857806396713da91461039d5780639dc09262146103b2576101c2565b8063541d55481161016457806370fd5bad1161013e57806370fd5bad1461033457806375d47a0a146103495780637942fd051461035e5780637ae2308814610373576101c2565b8063541d5548146102b15780636a87d780146102f85780636e47b4821461031f576101c2565b806343756e5c116101a057806343756e5c1461022a578063493279b11461025b5780634bf6c8821461028757806351e806721461029c576101c2565b80630bee7a67146101c75780631aa3a008146101f55780633dffc387146101ff575b600080fd5b3480156101d357600080fd5b506101dc61057d565b6040805163ffffffff9092168252519081900360200190f35b6101fd610582565b005b34801561020b57600080fd5b50610214610733565b6040805160ff9092168252519081900360200190f35b34801561023657600080fd5b5061023f610738565b604080516001600160a01b039092168252519081900360200190f35b34801561026757600080fd5b5061027061073e565b6040805161ffff9092168252519081900360200190f35b34801561029357600080fd5b50610214610743565b3480156102a857600080fd5b5061023f610748565b3480156102bd57600080fd5b506102e4600480360360208110156102d457600080fd5b50356001600160a01b031661074e565b604080519115158252519081900360200190f35b34801561030457600080fd5b5061030d61076c565b60408051918252519081900360200190f35b34801561032b57600080fd5b5061023f610772565b34801561034057600080fd5b50610214610778565b34801561035557600080fd5b5061023f61077d565b34801561036a57600080fd5b50610214610783565b34801561037f57600080fd5b5061030d610788565b34801561039457600080fd5b5061030d610795565b3480156103a957600080fd5b506102146107a1565b3480156103be57600080fd5b5061023f6107a6565b3480156103d357600080fd5b5061023f6107ac565b3480156103e857600080fd5b506102e46107b2565b3480156103fd57600080fd5b506101dc6107bb565b34801561041257600080fd5b506101fd6004803603604081101561042957600080fd5b81019060208101813564010000000081111561044457600080fd5b82018360208201111561045657600080fd5b8035906020019184600183028401116401000000008311171561047857600080fd5b91939092909160208101903564010000000081111561049657600080fd5b8201836020820111156104a857600080fd5b803590602001918460018302840111640100000000831117156104ca57600080fd5b5090925090506107c0565b3480156104e157600080fd5b5061023f610bd6565b3480156104f657600080fd5b5061023f610bdc565b34801561050b57600080fd5b506101fd610be2565b34801561052057600080fd5b506101fd610c64565b34801561053557600080fd5b5061023f610e0b565b34801561054a57600080fd5b5061030d610e11565b34801561055f57600080fd5b50610214610e17565b34801561057457600080fd5b5061023f610e1c565b606481565b3360009081526004602052604090205460ff16156105df576040805162461bcd60e51b81526020600482015260156024820152741c995b185e595c88185b1c9958591e48195e1a5cdd605a1b604482015290519081900360640190fd5b60005460ff16610632576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b61063b33610e22565b156106775760405162461bcd60e51b8152600401808060200182810382526027815260200180610f546027913960400191505060405180910390fd5b60015434146106b75760405162461bcd60e51b8152600401808060200182810382526025815260200180610f2f6025913960400191505060405180910390fd5b604080518082018252600180548252600254602080840191825233600081815260038352868120955186559251948401949094556004815290849020805460ff1916909217909155825191825291517fdb33a09d38b59a8fa8b7d92a1d82c8015e99f05f67ae9c9ae623157767959496929181900390910190a1565b600181565b61100181565b606081565b600881565b61200081565b6001600160a01b031660009081526004602052604090205460ff1690565b60025481565b61100581565b600281565b61100881565b600b81565b68056bc75e2d6310000081565b67016345785d8a000081565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff16610813576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146108535760405162461bcd60e51b815260040180806020018281038252602e815260200180610f7b602e913960400191505060405180910390fd5b6108b984848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e1c995c5d5a5c995911195c1bdcda5d608a1b60208201529150610e289050565b156109b057602081146108fd5760405162461bcd60e51b8152600401808060200182810382526022815260200180610fa96022913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161093b91858580838501838280828437600092019190915250610f0f92505050565b9050600181101580156109575750683635c9adc5dea000008111155b6109a8576040805162461bcd60e51b815260206004820181905260248201527f7468652072657175697265644465706f736974206f7574206f662072616e6765604482015290519081900360640190fd5b600155610b44565b610a0b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636475657360e01b60208201529150610e289050565b15610b075760208114610a65576040805162461bcd60e51b815260206004820152601760248201527f6c656e677468206f662064756573206d69736d61746368000000000000000000604482015290519081900360640190fd5b604080516020601f8401819004810282018101909252828152600091610aa391858580838501838280828437600092019190915250610f0f92505050565b9050600081118015610ab6575060015481105b610aff576040805162461bcd60e51b81526020600482015260156024820152747468652064756573206f7574206f662072616e676560581b604482015290519081900360640190fd5b600255610b44565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b61100281565b61100381565b60005460ff1615610c3a576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b68056bc75e2d63100000600190815567016345785d8a00006002556000805460ff19169091179055565b3360009081526004602052604090205460ff16610cbf576040805162461bcd60e51b81526020600482015260146024820152731c995b185e595c88191bc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b60005460ff16610d12576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b610d1a610f14565b50336000818152600360209081526040808320815180830183528154808252600190920154938101849052915191949392900380156108fc0292909190818181858888f19350505050158015610d74573d6000803e3d6000fd5b50602081015160405161100291829181156108fc0291906000818181858888f19350505050158015610daa573d6000803e3d6000fd5b50336000818152600460209081526040808320805460ff191690556003825280832083815560010192909255815192835290517fd17202129b83db7880d6b9f25df81c58ad46f7e0e2c92236b1aa10663a4876679281900390910190a15050565b61100081565b60015481565b600381565b61100481565b3b151590565b6000816040516020018082805190602001908083835b60208310610e5d5780518252601f199092019160209182019101610e3e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310610ecb5780518252601f199092019160209182019101610eac565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60405180604001604052806000815260200160008152509056fe6465706f7369742076616c7565206973206e6f742065786163746c79207468652073616d65636f6e7472616374206973206e6f7420616c6c6f77656420746f20626520612072656c61796572746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662072657175697265644465706f736974206d69736d61746368a2646970667358221220877c6fe15c3b300bf84e214694adcee6f9f1184fc51d7f46b3099f30ac29681964736f6c63430006040033" }, "0x0000000000000000000000000000000000001007": { "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c8063831d65d1116100de578063ab51bb9611610097578063dc927faf11610071578063dc927faf14610463578063f9a2bbc71461046b578063fc3e590814610473578063fd6a68791461047b57610173565b8063ab51bb96146103d9578063c81b1662146103e1578063c8509d81146103e957610173565b8063831d65d11461032157806396713da91461039d5780639ab1a373146103a55780639dc09262146103ad578063a1a11bf5146103b5578063a78abc16146103bd57610173565b8063493279b111610130578063493279b1146102da5780634bf6c882146102f957806351e80672146103015780636e47b4821461030957806370fd5bad146103115780637942fd051461031957610173565b80630bee7a67146101785780631182b875146101995780633a21baae146102885780633dffc3871461029057806343756e5c146102ae5780634900c4ea146102d2575b600080fd5b610180610483565b6040805163ffffffff9092168252519081900360200190f35b610213600480360360408110156101af57600080fd5b60ff82351691908101906040810160208201356401000000008111156101d457600080fd5b8201836020820111156101e657600080fd5b8035906020019184600183028401116401000000008311171561020857600080fd5b509092509050610488565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561024d578181015183820152602001610235565b50505050905090810190601f16801561027a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610180610577565b61029861057c565b6040805160ff9092168252519081900360200190f35b6102b6610581565b604080516001600160a01b039092168252519081900360200190f35b610298610587565b6102e261058c565b6040805161ffff9092168252519081900360200190f35b610298610591565b6102b6610596565b6102b661059c565b6102986105a2565b6102986105a7565b61039b6004803603604081101561033757600080fd5b60ff823516919081019060408101602082013564010000000081111561035c57600080fd5b82018360208201111561036e57600080fd5b8035906020019184600183028401116401000000008311171561039057600080fd5b5090925090506105ac565b005b6102986105fe565b610180610603565b6102b6610608565b6102b661060e565b6103c5610614565b604080519115158252519081900360200190f35b610180610587565b6102b661061d565b61039b600480360360408110156103ff57600080fd5b60ff823516919081019060408101602082013564010000000081111561042457600080fd5b82018360208201111561043657600080fd5b8035906020019184600183028401116401000000008311171561045857600080fd5b509092509050610623565b6102b661065a565b6102b6610660565b610298610666565b6102b661066b565b606481565b606033612000146104ca5760405162461bcd60e51b815260040180806020018281038252602f81526020018061124d602f913960400191505060405180910390fd5b6104d26111e8565b600061051385858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067192505050565b915091508061052f576105266064610737565b92505050610570565b600061053a836107a1565b905063ffffffff811661056157505060408051600081526020810190915291506105709050565b61056a81610737565b93505050505b9392505050565b606681565b600181565b61100181565b600081565b606081565b600881565b61200081565b61100581565b600281565b600b81565b6040805162461bcd60e51b815260206004820152601e60248201527f7265636569766520756e65787065637465642061636b207061636b6167650000604482015290519081900360640190fd5b505050565b600981565b606581565b61100781565b61100681565b60005460ff1681565b61100281565b60405162461bcd60e51b815260040180806020018281038252602381526020018061127c6023913960400191505060405180910390fd5b61100381565b61100081565b600381565b61100481565b6106796111e8565b60006106836111e8565b61068b611212565b61069c61069786610b42565b610b67565b90506000805b6106ab83610bb1565b1561072a57806106cd576106c66106c184610bd2565b610c20565b8452610722565b80600114156106ec576106e26106c184610bd2565b6020850152610722565b806002141561071d5761070661070184610bd2565b610c99565b6001600160a01b0316604085015260019150610722565b61072a565b6001016106a2565b5091935090915050915091565b604080516001808252818301909252606091829190816020015b60608152602001906001900390816107515790505090506107778363ffffffff16610cb9565b8160008151811061078457fe5b602002602001018190525061079881610ccc565b9150505b919050565b60006107b08260400151610d56565b61081c57604080516020808252601c908201527f74686520746172676574206973206e6f74206120636f6e7472616374000000008183015290517f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb29181900360600190a150606561079c565b81604001516001600160a01b031663ac431751836000015184602001516040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610889578181015183820152602001610871565b50505050905090810190601f1680156108b65780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156108e95781810151838201526020016108d1565b50505050905090810190601f1680156109165780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561093757600080fd5b505af1925050508015610948575060015b610b3a576040516000815260443d101561096457506000610a01565b60046000803e60005160e01c6308c379a08114610985576000915050610a01565b60043d036004833e81513d602482011167ffffffffffffffff821117156109b157600092505050610a01565b808301805167ffffffffffffffff8111156109d3576000945050505050610a01565b8060208301013d86018111156109f157600095505050505050610a01565b601f01601f191660405250925050505b80610a0c5750610aaf565b7f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a6b578181015183820152602001610a53565b50505050905090810190601f168015610a985780820380516001836020036101000a031916815260200191505b509250505060405180910390a1606691505061079c565b3d808015610ad9576040519150601f19603f3d011682016040523d82523d6000602084013e610ade565b606091505b5060408051602080825283518183015283517f1279f84165b4fd69c35e1f338ff107231b036c655cd1688851e011ce617c4e8d938593928392918301919085019080838360008315610a6b578181015183820152602001610a53565b506000919050565b610b4a611232565b506040805180820190915281518152602082810190820152919050565b610b6f611212565b610b7882610d5c565b610b8157600080fd5b6000610b908360200151610d96565b60208085015160408051808201909152868152920190820152915050919050565b6000610bbb611232565b505080518051602091820151919092015191011190565b610bda611232565b610be382610bb1565b610bec57600080fd5b60208201516000610bfc82610df9565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610c2e57600080fd5b6000610c3d8360200151610d96565b83516040805191839003808352601f19601f8201168301602001909152919250606090828015610c74576020820181803683370190505b5090506000816020019050610c90848760200151018285610e92565b50949350505050565b8051600090601514610caa57600080fd5b610cb382610edd565b92915050565b6060610cb3610cc783610f3b565b611021565b6060815160001415610ced575060408051600081526020810190915261079c565b606082600081518110610cfc57fe5b602002602001015190506000600190505b8351811015610d3d57610d3382858381518110610d2657fe5b6020026020010151611073565b9150600101610d0d565b50610798610d50825160c060ff166110f0565b82611073565b3b151590565b8051600090610d6d5750600061079c565b6020820151805160001a9060c0821015610d8c5760009250505061079c565b5060019392505050565b8051600090811a6080811015610db057600091505061079c565b60b8811080610dcb575060c08110801590610dcb575060f881105b15610dda57600191505061079c565b60c0811015610dee5760b51901905061079c565b60f51901905061079c565b80516000908190811a6080811015610e145760019150610e8b565b60b8811015610e2957607e1981019150610e8b565b60c0811015610e565760b78103600185019450806020036101000a85510460018201810193505050610e8b565b60f8811015610e6b5760be1981019150610e8b565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80610e9c576105f9565b5b60208110610ebc578251825260209283019290910190601f1901610e9d565b915181516020939093036101000a6000190180199091169216919091179052565b805160009015801590610ef257508151602110155b610efb57600080fd5b6000610f0a8360200151610d96565b83516020808601518301805193945091849003929190831015610c9057506020919091036101000a90049392505050565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff198416610f7f57506018610fa3565b6fffffffffffffffffffffffffffffffff198416610f9f57506010610fa3565b5060005b6020811015610fd957818181518110610fb857fe5b01602001516001600160f81b03191615610fd157610fd9565b600101610fa3565b60008160200390506060816040519080825280601f01601f19166020018201604052801561100e576020820181803683370190505b5080830196909652508452509192915050565b6060815160011480156110535750607f60f81b8260008151811061104157fe5b01602001516001600160f81b03191611155b1561105f57508061079c565b610cb36110718351608060ff166110f0565b835b6060806040519050835180825260208201818101602087015b818310156110a457805183526020928301920161108c565b50855184518101855292509050808201602086015b818310156110d15780518352602092830192016110b9565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310611140576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b6040805160018082528183019092526060916020820181803683370190505090506037841161119a5782840160f81b8160008151811061117c57fe5b60200101906001600160f81b031916908160001a9053509050610cb3565b60606111a585610f3b565b90508381510160370160f81b826000815181106111be57fe5b60200101906001600160f81b031916908160001a9053506111df8282611073565b95945050505050565b6040518060600160405280606081526020016060815260200160006001600160a01b031681525090565b6040518060400160405280611225611232565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e74726163747265636569766520756e6578706563746564206661696c2061636b207061636b616765a2646970667358221220f691dd6992c991556e26a4ecff513e612d825946281fcd792d6eb3207e36caa864736f6c63430006040033" + "code": "0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063831d65d1116100de578063ab51bb9611610097578063dc927faf11610071578063dc927faf14610486578063f9a2bbc71461048e578063fc3e590814610496578063fd6a68791461049e5761018e565b8063ab51bb96146103fc578063c81b166214610404578063c8509d811461040c5761018e565b8063831d65d11461034457806396713da9146103c05780639ab1a373146103c85780639dc09262146103d0578063a1a11bf5146103d8578063a78abc16146103e05761018e565b8063493279b11161014b5780636e47b482116101255780636e47b4821461032457806370fd5bad1461032c57806375d47a0a146103345780637942fd051461033c5761018e565b8063493279b1146102f55780634bf6c8821461031457806351e806721461031c5761018e565b80630bee7a67146101935780631182b875146101b45780633a21baae146102a35780633dffc387146102ab57806343756e5c146102c95780634900c4ea146102ed575b600080fd5b61019b6104a6565b6040805163ffffffff9092168252519081900360200190f35b61022e600480360360408110156101ca57600080fd5b60ff82351691908101906040810160208201356401000000008111156101ef57600080fd5b82018360208201111561020157600080fd5b8035906020019184600183028401116401000000008311171561022357600080fd5b5090925090506104ab565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610268578181015183820152602001610250565b50505050905090810190601f1680156102955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61019b61059a565b6102b361059f565b6040805160ff9092168252519081900360200190f35b6102d16105a4565b604080516001600160a01b039092168252519081900360200190f35b6102b36105aa565b6102fd6105af565b6040805161ffff9092168252519081900360200190f35b6102b36105b4565b6102d16105b9565b6102d16105bf565b6102b36105c5565b6102d16105ca565b6102b36105d0565b6103be6004803603604081101561035a57600080fd5b60ff823516919081019060408101602082013564010000000081111561037f57600080fd5b82018360208201111561039157600080fd5b803590602001918460018302840111640100000000831117156103b357600080fd5b5090925090506105d5565b005b6102b3610627565b61019b61062c565b6102d1610631565b6102d1610637565b6103e861063d565b604080519115158252519081900360200190f35b61019b6105aa565b6102d1610646565b6103be6004803603604081101561042257600080fd5b60ff823516919081019060408101602082013564010000000081111561044757600080fd5b82018360208201111561045957600080fd5b8035906020019184600183028401116401000000008311171561047b57600080fd5b50909250905061064c565b6102d1610683565b6102d1610689565b6102b361068f565b6102d1610694565b606481565b606033612000146104ed5760405162461bcd60e51b815260040180806020018281038252602f815260200180611276602f913960400191505060405180910390fd5b6104f5611211565b600061053685858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061069a92505050565b9150915080610552576105496064610760565b92505050610593565b600061055d836107ca565b905063ffffffff811661058457505060408051600081526020810190915291506105939050565b61058d81610760565b93505050505b9392505050565b606681565b600181565b61100181565b600081565b606081565b600881565b61200081565b61100581565b600281565b61100881565b600b81565b6040805162461bcd60e51b815260206004820152601e60248201527f7265636569766520756e65787065637465642061636b207061636b6167650000604482015290519081900360640190fd5b505050565b600981565b606581565b61100781565b61100681565b60005460ff1681565b61100281565b60405162461bcd60e51b81526004018080602001828103825260238152602001806112a56023913960400191505060405180910390fd5b61100381565b61100081565b600381565b61100481565b6106a2611211565b60006106ac611211565b6106b461123b565b6106c56106c086610b6b565b610b90565b90506000805b6106d483610bda565b1561075357806106f6576106ef6106ea84610bfb565b610c49565b845261074b565b80600114156107155761070b6106ea84610bfb565b602085015261074b565b80600214156107465761072f61072a84610bfb565b610cc2565b6001600160a01b031660408501526001915061074b565b610753565b6001016106cb565b5091935090915050915091565b604080516001808252818301909252606091829190816020015b606081526020019060019003908161077a5790505090506107a08363ffffffff16610ce2565b816000815181106107ad57fe5b60200260200101819052506107c181610cf5565b9150505b919050565b60006107d98260400151610d7f565b61084557604080516020808252601c908201527f74686520746172676574206973206e6f74206120636f6e7472616374000000008183015290517f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb29181900360600190a15060656107c5565b81604001516001600160a01b031663ac431751836000015184602001516040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b838110156108b257818101518382015260200161089a565b50505050905090810190601f1680156108df5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156109125781810151838201526020016108fa565b50505050905090810190601f16801561093f5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561096057600080fd5b505af1925050508015610971575060015b610b63576040516000815260443d101561098d57506000610a2a565b60046000803e60005160e01c6308c379a081146109ae576000915050610a2a565b60043d036004833e81513d602482011167ffffffffffffffff821117156109da57600092505050610a2a565b808301805167ffffffffffffffff8111156109fc576000945050505050610a2a565b8060208301013d8601811115610a1a57600095505050505050610a2a565b601f01601f191660405250925050505b80610a355750610ad8565b7f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a94578181015183820152602001610a7c565b50505050905090810190601f168015610ac15780820380516001836020036101000a031916815260200191505b509250505060405180910390a160669150506107c5565b3d808015610b02576040519150601f19603f3d011682016040523d82523d6000602084013e610b07565b606091505b5060408051602080825283518183015283517f1279f84165b4fd69c35e1f338ff107231b036c655cd1688851e011ce617c4e8d938593928392918301919085019080838360008315610a94578181015183820152602001610a7c565b506000919050565b610b7361125b565b506040805180820190915281518152602082810190820152919050565b610b9861123b565b610ba182610d85565b610baa57600080fd5b6000610bb98360200151610dbf565b60208085015160408051808201909152868152920190820152915050919050565b6000610be461125b565b505080518051602091820151919092015191011190565b610c0361125b565b610c0c82610bda565b610c1557600080fd5b60208201516000610c2582610e22565b80830160209586015260408051808201909152908152938401919091525090919050565b8051606090610c5757600080fd5b6000610c668360200151610dbf565b83516040805191839003808352601f19601f8201168301602001909152919250606090828015610c9d576020820181803683370190505b5090506000816020019050610cb9848760200151018285610ebb565b50949350505050565b8051600090601514610cd357600080fd5b610cdc82610f06565b92915050565b6060610cdc610cf083610f64565b61104a565b6060815160001415610d1657506040805160008152602081019091526107c5565b606082600081518110610d2557fe5b602002602001015190506000600190505b8351811015610d6657610d5c82858381518110610d4f57fe5b602002602001015161109c565b9150600101610d36565b506107c1610d79825160c060ff16611119565b8261109c565b3b151590565b8051600090610d96575060006107c5565b6020820151805160001a9060c0821015610db5576000925050506107c5565b5060019392505050565b8051600090811a6080811015610dd95760009150506107c5565b60b8811080610df4575060c08110801590610df4575060f881105b15610e035760019150506107c5565b60c0811015610e175760b5190190506107c5565b60f5190190506107c5565b80516000908190811a6080811015610e3d5760019150610eb4565b60b8811015610e5257607e1981019150610eb4565b60c0811015610e7f5760b78103600185019450806020036101000a85510460018201810193505050610eb4565b60f8811015610e945760be1981019150610eb4565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b80610ec557610622565b5b60208110610ee5578251825260209283019290910190601f1901610ec6565b915181516020939093036101000a6000190180199091169216919091179052565b805160009015801590610f1b57508151602110155b610f2457600080fd5b6000610f338360200151610dbf565b83516020808601518301805193945091849003929190831015610cb957506020919091036101000a90049392505050565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff198416610fa857506018610fcc565b6fffffffffffffffffffffffffffffffff198416610fc857506010610fcc565b5060005b602081101561100257818181518110610fe157fe5b01602001516001600160f81b03191615610ffa57611002565b600101610fcc565b60008160200390506060816040519080825280601f01601f191660200182016040528015611037576020820181803683370190505b5080830196909652508452509192915050565b60608151600114801561107c5750607f60f81b8260008151811061106a57fe5b01602001516001600160f81b03191611155b156110885750806107c5565b610cdc61109a8351608060ff16611119565b835b6060806040519050835180825260208201818101602087015b818310156110cd5780518352602092830192016110b5565b50855184518101855292509050808201602086015b818310156110fa5780518352602092830192016110e2565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310611169576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b604080516001808252818301909252606091602082018180368337019050509050603784116111c35782840160f81b816000815181106111a557fe5b60200101906001600160f81b031916908160001a9053509050610cdc565b60606111ce85610f64565b90508381510160370160f81b826000815181106111e757fe5b60200101906001600160f81b031916908160001a905350611208828261109c565b95945050505050565b6040518060600160405280606081526020016060815260200160006001600160a01b031681525090565b604051806040016040528061124e61125b565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e74726163747265636569766520756e6578706563746564206661696c2061636b207061636b616765a2646970667358221220e8e1b578be303f63867411cb6216f97f71097a3c20d4ca1b3a38db1328dfe84464736f6c63430006040033" + }, + "0x0000000000000000000000000000000000001008": { + "balance": "0x0", + "code": "0x6080604052600436106102045760003560e01c80637d078e1311610118578063c8509d81116100a0578063ece9d81e1161006f578063ece9d81e146104d5578063f9a2bbc71461081c578063fc3e5908146106f3578063fd6a687914610831578063fe3a2af5146103ce57610204565b8063c8509d811461066c578063d117a11014610786578063dc6f5e90146106f3578063dc927faf1461080757610204565b80639dc09262116100e75780639dc092621461071d578063a1a11bf514610732578063a78abc1614610747578063ab51bb961461075c578063c81b16621461077157610204565b80637d078e131461035c578063831d65d11461066c57806395b9ad26146106f357806396713da91461070857610204565b80634bf6c8821161019b57806370fd5bad1161016a57806370fd5bad146104d557806372c4e086146104ea57806375d47a0a1461058e57806377d9dae8146105a35780637942fd051461065757610204565b80634bf6c8821461020957806351e80672146103e35780636b3f1307146103f85780636e47b482146104c057610204565b80633dffc387116101d75780633dffc3871461035c57806343756e5c14610371578063493279b1146103a25780634a688818146103ce57610204565b8063077b8f35146102095780630bee7a67146102345780631182b8751461026257806323996b531461035c575b600080fd5b34801561021557600080fd5b5061021e610846565b6040805160ff9092168252519081900360200190f35b34801561024057600080fd5b5061024961084b565b6040805163ffffffff9092168252519081900360200190f35b34801561026e57600080fd5b506102e76004803603604081101561028557600080fd5b60ff8235169190810190604081016020820135600160201b8111156102a957600080fd5b8201836020820111156102bb57600080fd5b803590602001918460018302840111600160201b831117156102dc57600080fd5b509092509050610850565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610321578181015183820152602001610309565b50505050905090810190601f16801561034e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561036857600080fd5b5061021e6108d9565b34801561037d57600080fd5b506103866108de565b604080516001600160a01b039092168252519081900360200190f35b3480156103ae57600080fd5b506103b76108e4565b6040805161ffff9092168252519081900360200190f35b3480156103da57600080fd5b5061021e6108e9565b3480156103ef57600080fd5b506103866108ee565b6104ac6004803603604081101561040e57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561043857600080fd5b82018360208201111561044a57600080fd5b803590602001918460018302840111600160201b8311171561046b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506108f4945050505050565b604080519115158252519081900360200190f35b3480156104cc57600080fd5b506103866115cd565b3480156104e157600080fd5b5061021e6115d3565b6104ac6004803603602081101561050057600080fd5b810190602081018135600160201b81111561051a57600080fd5b82018360208201111561052c57600080fd5b803590602001918460018302840111600160201b8311171561054d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506115d8945050505050565b34801561059a57600080fd5b5061038661196d565b6104ac600480360360408110156105b957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e357600080fd5b8201836020820111156105f557600080fd5b803590602001918460018302840111600160201b8311171561061657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611973945050505050565b34801561066357600080fd5b5061021e611dc3565b34801561067857600080fd5b506106f16004803603604081101561068f57600080fd5b60ff8235169190810190604081016020820135600160201b8111156106b357600080fd5b8201836020820111156106c557600080fd5b803590602001918460018302840111600160201b831117156106e657600080fd5b509092509050611dc8565b005b3480156106ff57600080fd5b5061021e611e7b565b34801561071457600080fd5b5061021e611e80565b34801561072957600080fd5b50610386611e85565b34801561073e57600080fd5b50610386611e8b565b34801561075357600080fd5b506104ac611e91565b34801561076857600080fd5b506102496108e9565b34801561077d57600080fd5b50610386611e9a565b34801561079257600080fd5b506107b0600480360360208110156107a957600080fd5b5035611ea0565b6040805160ff988916815260208101979097526001600160a01b03909516868601526060860193909352608085019190915290931660a083015267ffffffffffffffff90921660c082015290519081900360e00190f35b34801561081357600080fd5b50610386611ef8565b34801561082857600080fd5b50610386611efe565b34801561083d57600080fd5b50610386611f04565b600881565b606481565b606033612000146108925760405162461bcd60e51b815260040180806020018281038252602f815260200180612d1f602f913960400191505060405180910390fd5b6108d183838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f0a92505050565b949350505050565b600181565b61100181565b606081565b600081565b61200081565b6000806109008361219d565b905061090a612bc5565b50600081815260016020818152604092839020835160e081018552815460ff90811682529382015492810183905260028201546001600160a01b03169481019490945260038101546060850152600481015460808501526005015491821660a084015261010090910467ffffffffffffffff1660c08301526109d0576040805162461bcd60e51b815260206004820152601a602482015279189a5b99081c995c5d595cdd08191bd95cdb89dd08195e1a5cdd60321b604482015290519081900360640190fd5b60006109ed826080015183606001516121a490919063ffffffff16565b905081604001516001600160a01b0316866001600160a01b031614610a435760405162461bcd60e51b8152600401808060200182810382526045815260200180612c766045913960600191505060405180910390fd5b336001600160a01b0316866001600160a01b031663893d20e86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8657600080fd5b505afa158015610a9a573d6000803e3d6000fd5b505050506040513d6020811015610ab057600080fd5b50516001600160a01b031614610af75760405162461bcd60e51b815260040180806020018281038252602e815260200180612cbb602e913960400191505060405180910390fd5b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b158015610b4657600080fd5b505afa158015610b5a573d6000803e3d6000fd5b505050506040513d6020811015610b7057600080fd5b505114610bae5760405162461bcd60e51b8152600401808060200182810382526036815260200180612ce96036913960400191505060405180910390fd5b60006110046001600160a01b0316635170639c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610bed57600080fd5b505af1158015610c01573d6000803e3d6000fd5b505050506040513d6020811015610c1757600080fd5b50519050348114610c595760405162461bcd60e51b8152600401808060200182810382526023815260200180612c536023913960400191505060405180910390fd5b428360c0015167ffffffffffffffff161015610e1c5760008481526001602081905260408220805460ff191681559081018290556002810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff19169055610cc9612c01565b50604080518082018252600181526020810186905290516110049083156108fc029084906000818181858888f19350505050158015610d0c573d6000803e3d6000fd5b5061200063f7a251d76001610d20846121ed565b610d35866402540be40063ffffffff61227716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015610d93578181015183820152602001610d7b565b50505050905090810190601f168015610dc05780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610de157600080fd5b505af1158015610df5573d6000803e3d6000fd5b505050506040513d6020811015610e0b57600080fd5b50600096506115c795505050505050565b6000876001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5757600080fd5b505afa158015610e6b573d6000803e3d6000fd5b505050506040513d6020811015610e8157600080fd5b5051604080516395d89b4160e01b815290519192506060916001600160a01b038b16916395d89b41916004808301926000929190829003018186803b158015610ec957600080fd5b505afa158015610edd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f0657600080fd5b8101908080516040519392919084600160201b821115610f2557600080fd5b908301906020820185811115610f3a57600080fd5b8251600160201b811182820188101715610f5357600080fd5b82525081516020918201929091019080838360005b83811015610f80578181015183820152602001610f68565b50505050905090810190601f168015610fad5780820380516001836020036101000a031916815260200191505b506040525050509050610fc081876122b9565b15806110455750602080860151604080516359b9278960e01b8152600481019290925251600092611004926359b92789926024808301939282900301818787803b15801561100d57600080fd5b505af1158015611021573d6000803e3d6000fd5b505050506040513d602081101561103757600080fd5b50516001600160a01b031614155b806110dc57506000801b6110046001600160a01b031663bd46646187604001516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b1580156110ad57600080fd5b505af11580156110c1573d6000803e3d6000fd5b505050506040513d60208110156110d757600080fd5b505114155b806111535750846060015185604001516001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561112457600080fd5b505afa158015611138573d6000803e3d6000fd5b505050506040513d602081101561114e57600080fd5b505114155b8061116557508460a0015160ff168214155b156113195760008681526001602081905260408220805460ff191681559081018290556002810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff191690556111c4612c01565b50604080518082018252600281526020810188905290516110049085156108fc029086906000818181858888f19350505050158015611207573d6000803e3d6000fd5b5061200063f7a251d7600161121b846121ed565b611230886402540be40063ffffffff61227716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561128e578181015183820152602001611276565b50505050905090810190601f1680156112bb5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1580156112dc57600080fd5b505af11580156112f0573d6000803e3d6000fd5b505050506040513d602081101561130657600080fd5b50600098506115c7975050505050505050565b604080516323b872dd60e01b815233600482015261100460248201526044810186905290516001600160a01b038b16916323b872dd9160648083019260209291908290030181600087803b15801561137057600080fd5b505af1158015611384573d6000803e3d6000fd5b505050506040513d602081101561139a57600080fd5b5050602085015160408087015160a088015182516323bfccdb60e21b815260048101949094526001600160a01b03909116602484015260ff1660448301525161100491638eff336c91606480830192600092919082900301818387803b15801561140357600080fd5b505af1158015611417573d6000803e3d6000fd5b50505060008781526001602081905260408220805460ff191681559081018290556002810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff1916905550611475612c01565b50604080518082018252600080825260208201899052915190916110049186156108fc0291879190818181858888f193505050501580156114ba573d6000803e3d6000fd5b5061200063f7a251d760016114ce846121ed565b6114e3886402540be40063ffffffff61227716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611541578181015183820152602001611529565b50505050905090810190601f16801561156e5780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561158f57600080fd5b505af11580156115a3573d6000803e3d6000fd5b505050506040513d60208110156115b957600080fd5b506001985050505050505050505b92915050565b61100581565b600281565b6000806115e48361219d565b90506115ee612bc5565b50600081815260016020818152604092839020835160e081018552815460ff90811682529382015492810183905260028201546001600160a01b03169481019490945260038101546060850152600481015460808501526005015491821660a084015261010090910467ffffffffffffffff1660c08301526116b4576040805162461bcd60e51b815260206004820152601a602482015279189a5b99081c995c5d595cdd08191bd95cdb89dd08195e1a5cdd60321b604482015290519081900360640190fd5b428160c0015167ffffffffffffffff1610611716576040805162461bcd60e51b815260206004820152601b60248201527f62696e642072657175657374206973206e6f7420657870697265640000000000604482015290519081900360640190fd5b60006110046001600160a01b0316635170639c6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561175557600080fd5b505af1158015611769573d6000803e3d6000fd5b505050506040513d602081101561177f57600080fd5b505190503481146117c15760405162461bcd60e51b8152600401808060200182810382526023815260200180612c536023913960400191505060405180910390fd5b60008381526001602081905260408220805460ff191681559081018290556002810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff1916905561181b612c01565b50604080518082018252600181526020810185905290516110049083156108fc029084906000818181858888f1935050505015801561185e573d6000803e3d6000fd5b5061200063f7a251d76001611872846121ed565b611887866402540be40063ffffffff61227716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156118e55781810151838201526020016118cd565b50505050905090810190601f1680156119125780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561193357600080fd5b505af1158015611947573d6000803e3d6000fd5b505050506040513d602081101561195d57600080fd5b506001955050505050505b919050565b61100881565b60008061197f8361219d565b9050611989612bc5565b50600081815260016020818152604092839020835160e081018552815460ff90811682529382015492810183905260028201546001600160a01b03169481019490945260038101546060850152600481015460808501526005015491821660a084015261010090910467ffffffffffffffff1660c0830152611a4f576040805162461bcd60e51b815260206004820152601a602482015279189a5b99081c995c5d595cdd08191bd95cdb89dd08195e1a5cdd60321b604482015290519081900360640190fd5b80604001516001600160a01b0316856001600160a01b031614611aa35760405162461bcd60e51b8152600401808060200182810382526045815260200180612c766045913960600191505060405180910390fd5b336001600160a01b0316856001600160a01b031663893d20e86040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae657600080fd5b505afa158015611afa573d6000803e3d6000fd5b505050506040513d6020811015611b1057600080fd5b50516001600160a01b031614611b6d576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c79206265703265206f776e65722063616e2072656a6563740000000000604482015290519081900360640190fd5b60006110046001600160a01b0316635170639c6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611bac57600080fd5b505af1158015611bc0573d6000803e3d6000fd5b505050506040513d6020811015611bd657600080fd5b50519050348114611c185760405162461bcd60e51b8152600401808060200182810382526023815260200180612c536023913960400191505060405180910390fd5b60008381526001602081905260408220805460ff191681559081018290556002810180546001600160a01b0319169055600381018290556004810191909155600501805468ffffffffffffffffff19169055611c72612c01565b50604080518082018252600381526020810185905290516110049083156108fc029084906000818181858888f19350505050158015611cb5573d6000803e3d6000fd5b5061200063f7a251d76001611cc9846121ed565b611cde866402540be40063ffffffff61227716565b6040518463ffffffff1660e01b8152600401808460ff1660ff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b83811015611d3c578181015183820152602001611d24565b50505050905090810190601f168015611d695780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015611d8a57600080fd5b505af1158015611d9e573d6000803e3d6000fd5b505050506040513d6020811015611db457600080fd5b50600198975050505050505050565b600b81565b3361200014611e085760405162461bcd60e51b815260040180806020018281038252602f815260200180612d1f602f913960400191505060405180910390fd5b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b600381565b600981565b61100781565b61100681565b60005460ff1681565b61100281565b600160208190526000918252604090912080549181015460028201546003830154600484015460059094015460ff9586169593946001600160a01b0390931693919291811690610100900467ffffffffffffffff1687565b61100381565b61100081565b61100481565b6060611f14612bc5565b6000611f1f846123a1565b9150915080611f75576040805162461bcd60e51b815260206004820152601f60248201527f756e7265636f676e697a6564207472616e73666572496e207061636b61676500604482015290519081900360640190fd5b815160ff16612029576020828101805160009081526001928390526040908190208551815460ff1990811660ff928316178355935194820194909455908501516002820180546001600160a01b0319166001600160a01b03909216919091179055606085015160038201556080850151600482015560a08501516005909101805460c08701519316919093161768ffffffffffffffff00191661010067ffffffffffffffff90921691909102179055612182565b815160ff16600114156121355760006110046001600160a01b03166359b9278984602001516040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561208457600080fd5b505af1158015612098573d6000803e3d6000fd5b505050506040513d60208110156120ae57600080fd5b505190506001600160a01b0381161561212f5760208301516040805163b99328c560e01b815260048101929092526001600160a01b0383166024830152516110049163b99328c591604480830192600092919082900301818387803b15801561211657600080fd5b505af115801561212a573d6000803e3d6000fd5b505050505b50612182565b6040805162461bcd60e51b815260206004820152601960248201527f756e7265636f676e697a65642062696e64207061636b61676500000000000000604482015290519081900360640190fd5b60408051600080825260208201909252905b50949350505050565b6020015190565b60006121e683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124f3565b9392505050565b6040805160028082526060828101909352829190816020015b6060815260200190600190039081612206575050835190915061222e9063ffffffff1661258a565b8160008151811061223b57fe5b6020026020010181905250612256836020015160001c61258a565b8160018151811061226357fe5b60200260200101819052506121e68161259d565b60006121e683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612627565b81516000908390600810806122cf575080516003115b156122de5760009150506115c7565b6040805160208082528183019092526060916020820181803683370190505090508360208201528082518151811061231257fe5b6020910101516001600160f81b031916602d60f81b14612337576000925050506115c7565b600160005b83518110156123975782818151811061235157fe5b602001015160f81c60f81b6001600160f81b03191684828151811061237257fe5b01602001516001600160f81b0319161461238f5760009150612397565b60010161233c565b5095945050505050565b6123a9612bc5565b60006123b3612bc5565b6123bb612c18565b6123cc6123c78661268c565b6126b1565b90506000805b6123db836126fb565b156124e65780612400576123f66123f18461271c565b61276a565b60ff1684526124de565b806001141561241f576124156123f18461271c565b60208501526124de565b806002141561244c576124396124348461271c565b6127c8565b6001600160a01b031660408501526124de565b806003141561246b576124616123f18461271c565b60608501526124de565b806004141561248a576124806123f18461271c565b60808501526124de565b80600514156124ac5761249f6123f18461271c565b60ff1660a08501526124de565b80600614156124d9576124c16123f18461271c565b67ffffffffffffffff1660c0850152600191506124de565b6124e6565b6001016123d2565b5091935090915050915091565b600081848411156125825760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561254757818101518382015260200161252f565b50505050905090810190601f1680156125745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606115c7612598836127e2565b6128c8565b60608151600014156125be5750604080516000815260208101909152611968565b6060826000815181106125cd57fe5b602002602001015190506000600190505b835181101561260e57612604828583815181106125f757fe5b602002602001015161291a565b91506001016125de565b506121e6612621825160c060ff16612997565b8261291a565b600081836126765760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561254757818101518382015260200161252f565b50600083858161268257fe5b0495945050505050565b612694612c38565b506040805180820190915281518152602082810190820152919050565b6126b9612c18565b6126c282612a8f565b6126cb57600080fd5b60006126da8360200151612ac9565b60208085015160408051808201909152868152920190820152915050919050565b6000612705612c38565b505080518051602091820151919092015191011190565b612724612c38565b61272d826126fb565b61273657600080fd5b6020820151600061274682612b2c565b80830160209586015260408051808201909152908152938401919091525090919050565b80516000901580159061277f57508151602110155b61278857600080fd5b60006127978360200151612ac9565b8351602080860151830180519394509184900392919083101561219457506020919091036101000a90049392505050565b80516000906015146127d957600080fd5b6115c78261276a565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff1984166128265750601861284a565b6fffffffffffffffffffffffffffffffff1984166128465750601061284a565b5060005b60208110156128805781818151811061285f57fe5b01602001516001600160f81b0319161561287857612880565b60010161284a565b60008160200390506060816040519080825280601f01601f1916602001820160405280156128b5576020820181803683370190505b5080830196909652508452509192915050565b6060815160011480156128fa5750607f60f81b826000815181106128e857fe5b01602001516001600160f81b03191611155b15612906575080611968565b6115c76129188351608060ff16612997565b835b6060806040519050835180825260208201818101602087015b8183101561294b578051835260209283019201612933565b50855184518101855292509050808201602086015b81831015612978578051835260209283019201612960565b508651929092011591909101601f01601f191660405250905092915050565b60606801000000000000000083106129e7576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b60408051600180825281830190925260609160208201818036833701905050905060378411612a415782840160f81b81600081518110612a2357fe5b60200101906001600160f81b031916908160001a90535090506115c7565b6060612a4c856127e2565b90508381510160370160f81b82600081518110612a6557fe5b60200101906001600160f81b031916908160001a905350612a86828261291a565b95945050505050565b8051600090612aa057506000611968565b6020820151805160001a9060c0821015612abf57600092505050611968565b5060019392505050565b8051600090811a6080811015612ae3576000915050611968565b60b8811080612afe575060c08110801590612afe575060f881105b15612b0d576001915050611968565b60c0811015612b215760b519019050611968565b60f519019050611968565b80516000908190811a6080811015612b475760019150612bbe565b60b8811015612b5c57607e1981019150612bbe565b60c0811015612b895760b78103600185019450806020036101000a85510460018201810193505050612bbe565b60f8811015612b9e5760be1981019150612bbe565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b604080518082019091526000808252602082015290565b6040518060400160405280612c2b612c38565b8152602001600081525090565b60405180604001604052806000815260200160008152509056fe6d73672e76616c756520646f65736e277420657175616c20746f2072656c6179466565636f6e74616374206164647265737320646f65736e277420657175616c20746f2074686520636f6e7472616374206164647265737320696e2062696e6420726571756573746f6e6c79206265703265206f776e65722063616e20617070726f766520746869732062696e642072657175657374616c6c6f77616e636520646f65736e277420657175616c20746f2028746f74616c537570706c79202d207065676779416d6f756e7429746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374a2646970667358221220cdf56f7e89d798810bddda96bfaff19e46193883b360d4b847a1438fe9cdb09764736f6c63430006040033" }, "0x0000000000000000000000000000000000002000": { "balance": "0x0", - "code": "0x608060405234801561001057600080fd5b506004361061023d5760003560e01c8063863fe4ab1161013b578063c81b1662116100b8578063eb1cc8ac1161007c578063eb1cc8ac1461070a578063f7a251d714610730578063f9a2bbc7146107a8578063fc3e5908146107b0578063fd6a6879146107b85761023d565b8063c81b1662146106ca578063d76a8675146106d2578063dc927faf146106da578063e1c7392a146106e2578063e3b04805146106ea5761023d565b8063a78abc16116100ff578063a78abc16146105c0578063ab51bb96146105c8578063ac431751146105d0578063b0355f5b146103f4578063c27cdcfb1461068e5761023d565b8063863fe4ab146105a05780638cc8f561146104ab57806396713da9146105a85780639dc09262146105b0578063a1a11bf5146105b85761023d565b806343756e5c116101c95780636e47b4821161018d5780636e47b482146104a357806370fd5bad146104ab57806374f079b8146104b35780637942fd05146104bb57806384013b6a146104c35761023d565b806343756e5c14610430578063493279b1146104545780634bf6c8821461047357806351e806721461047b5780636e47a51a146104835761023d565b80632ff32aea116102105780632ff32aea146102a3578063308325f4146102c45780633bdc47a6146102cc5780633dffc387146103f4578063422f9050146103fc5761023d565b806305e68258146102425780630bee7a671461026057806314b3023b1461028157806322556cdc1461029b575b600080fd5b61024a6107c0565b6040805160ff9092168252519081900360200190f35b6102686107c5565b6040805163ffffffff9092168252519081900360200190f35b6102896107ca565b60408051918252519081900360200190f35b6102896107d0565b6102ab6107d5565b60408051600792830b90920b8252519081900360200190f35b6102896107de565b61037f600480360360608110156102e257600080fd5b60ff82351691602081013591810190606081016040820135600160201b81111561030b57600080fd5b82018360208201111561031d57600080fd5b803590602001918460018302840111600160201b8311171561033e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506107e4945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103b95781810151838201526020016103a1565b50505050905090810190601f1680156103e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61024a61085a565b61041c6004803603602081101561041257600080fd5b503560ff1661085f565b604080519115158252519081900360200190f35b610438610874565b604080516001600160a01b039092168252519081900360200190f35b61045c61087a565b6040805161ffff9092168252519081900360200190f35b61024a61087f565b610438610884565b6104386004803603602081101561049957600080fd5b503560ff1661088a565b6104386108a5565b61024a6108ab565b6102896108b0565b61024a6108b6565b61059e600480360360a08110156104d957600080fd5b810190602081018135600160201b8111156104f357600080fd5b82018360208201111561050557600080fd5b803590602001918460018302840111600160201b8311171561052657600080fd5b919390929091602081019035600160201b81111561054357600080fd5b82018360208201111561055557600080fd5b803590602001918460018302840111600160201b8311171561057657600080fd5b919350915080356001600160401b03908116916020810135909116906040013560ff166108bb565b005b610289611a30565b61024a611a38565b610438611a3d565b610438611a43565b61041c611a49565b6102686107c0565b61059e600480360360408110156105e657600080fd5b810190602081018135600160201b81111561060057600080fd5b82018360208201111561061257600080fd5b803590602001918460018302840111600160201b8311171561063357600080fd5b919390929091602081019035600160201b81111561065057600080fd5b82018360208201111561066257600080fd5b803590602001918460018302840111600160201b8311171561068357600080fd5b509092509050611a52565b6106ae600480360360208110156106a457600080fd5b503560ff16611e46565b604080516001600160401b039092168252519081900360200190f35b610438611e61565b61037f611e67565b610438611e86565b61059e611e8c565b6106ae6004803603602081101561070057600080fd5b503560ff166121d0565b61041c6004803603602081101561072057600080fd5b50356001600160a01b03166121eb565b61041c6004803603606081101561074657600080fd5b60ff8235169190810190604081016020820135600160201b81111561076a57600080fd5b82018360208201111561077c57600080fd5b803590602001918460018302840111600160201b8311171561079d57600080fd5b919350915035612200565b610438612342565b61024a612348565b61043861234d565b600081565b606481565b60015481565b603281565b60045460070b81565b60025481565b60606000825160210190506060816040519080825280601f01601f19166020018201604052801561081c576020820181803683370190505b506021810186905260018101879052828152905060418101600061083f86612353565b50905061084e8183885161235d565b50909695505050505050565b600181565b60096020526000908152604090205460ff1681565b61100181565b606081565b600881565b61200081565b6005602052600090815260409020546001600160a01b031681565b61100581565b600281565b60035481565b600b81565b60005460ff1661090e576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60408051630a83aaa960e31b815233600482015290516110069163541d5548916024808301926020929190829003018186803b15801561094d57600080fd5b505afa158015610961573d6000803e3d6000fd5b505050506040513d602081101561097757600080fd5b50516109ca576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b60ff8116600090815260086020526040902054829082906001600160401b039081169083168114610a3a576040805162461bcd60e51b815260206004820152601560248201527439b2b8bab2b731b2903737ba1034b71037b93232b960591b604482015290519081900360640190fd5b60ff8216600090815260086020908152604091829020805467ffffffffffffffff1916600185016001600160401b039081169190911790915582516337d7f9c160e21b81529089166004820152915188926110039263df5fe70492602480840193829003018186803b158015610aaf57600080fd5b505afa158015610ac3573d6000803e3d6000fd5b505050506040513d6020811015610ad957600080fd5b5051610b165760405162461bcd60e51b81526004018080602001828103825260238152602001806128856023913960400191505060405180910390fd5b60ff851660009081526005602052604090205485906001600160a01b0316610b85576040805162461bcd60e51b815260206004820152601860248201527f6368616e6e656c206973206e6f7420737570706f727465640000000000000000604482015290519081900360640190fd5b60608c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060608b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805163cba510a960e01b81526001600160401b038f1660048201529051939450610cac93611003935063cba510a992506024808301926020929190829003018186803b158015610c5557600080fd5b505afa158015610c69573d6000803e3d6000fd5b505050506040513d6020811015610c7f57600080fd5b505160408051808201909152600381526269626360e81b6020820152610ca58c8c61239e565b85856123e5565b610cf4576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b604482015290519081900360640190fd5b60408051631bb5062960e31b81526001600160401b038c16600482015290516000916110039163dda8314891602480820192602092909190829003018186803b158015610d4057600080fd5b505afa158015610d54573d6000803e3d6000fd5b505050506040513d6020811015610d6a57600080fd5b5051905088600080806060610d7e886124e2565b935093509350935083610e4f5760ff851660008181526007602090815260408083205481518381528d51818501528d516001600160401b03909216947ff7b2e42d694eb1100184aae86d4245d9e46966100b1dc7e723275b98326854ac948f9492938493840192918601918190849084905b83811015610e08578181015183820152602001610df0565b50505050905090810190601f168015610e355780820380516001836020036101000a031916815260200191505b509250505060405180910390a35050505050505050611a22565b60ff831661138d5760ff85166000818152600560209081526040808320548151631182b87560e01b815260048101958652602481019283528651604482015286516001600160a01b03909216958695631182b875958d958a9593949093606490910192918601918190849084905b83811015610ed5578181015183820152602001610ebd565b50505050905090810190601f168015610f025780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610f2257600080fd5b505af192505050801561100657506040513d6000823e601f3d908101601f191682016040526020811015610f5557600080fd5b8101908080516040519392919084600160201b821115610f7457600080fd5b908301906020820185811115610f8957600080fd5b8251600160201b811182820188101715610fa257600080fd5b82525081516020918201929091019080838360005b83811015610fcf578181015183820152602001610fb7565b50505050905090810190601f168015610ffc5780820380516001836020036101000a031916815260200191505b5060405250505060015b611318576040516000815260443d1015611022575060006110bd565b60046000803e60005160e01c6308c379a081146110435760009150506110bd565b60043d036004833e81513d60248201116001600160401b038211171561106e576000925050506110bd565b80830180516001600160401b0381111561108f5760009450505050506110bd565b8060208301013d86018111156110ad576000955050505050506110bd565b601f01601f191660405250925050505b806110c857506111da565b60ff87166000908152600760205260408120546110ff916001600160401b039091169089906110fa90600290886107e4565b612592565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf948794849390840192918601918190849084905b8381101561119a578181015183820152602001611182565b50505050905090810190601f1680156111c75780820380516001836020036101000a031916815260200191505b509250505060405180910390a250611313565b3d808015611204576040519150601f19603f3d011682016040523d82523d6000602084013e611209565b606091505b5060ff871660009081526007602052604081205461123c916001600160401b039091169089906110fa90600290886107e4565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351948794849390840192918601918190849084905b838110156112d75781810151838201526020016112bf565b50505050905090810190601f1680156113045780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b611387565b8051156113855760ff8716600090815260076020526040812054611351916001600160401b039091169089906110fa90600190866107e4565b60ff8716600090815260076020526040902080546001600160401b038082166001011667ffffffffffffffff199091161790555b505b5061195b565b60ff8316600114156116315760ff8516600081815260056020908152604080832054815163831d65d160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563831d65d1958d958a9593949093606490910192918601918190849084905b838110156114175781810151838201526020016113ff565b50505050905090810190601f1680156114445780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561146457600080fd5b505af1925050508015611475575060015b611387576040516000815260443d10156114915750600061152c565b60046000803e60005160e01c6308c379a081146114b257600091505061152c565b60043d036004833e81513d60248201116001600160401b03821117156114dd5760009250505061152c565b80830180516001600160401b038111156114fe57600094505050505061152c565b8060208301013d860181111561151c5760009550505050505061152c565b601f01601f191660405250925050505b80611537575061159c565b60408051602080825283518183015283516001600160a01b038616937ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf938693909283928301918501908083836000831561119a578181015183820152602001611182565b3d8080156115c6576040519150601f19603f3d011682016040523d82523d6000602084013e6115cb565b606091505b5060408051602080825283518183015283516001600160a01b038616937f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd297735193869390928392830191850190808383600083156112d75781810151838201526020016112bf565b60ff83166002141561195b5760ff8516600081815260056020908152604080832054815163c8509d8160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563c8509d81958d958a9593949093606490910192918601918190849084905b838110156116bb5781810151838201526020016116a3565b50505050905090810190601f1680156116e85780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561170857600080fd5b505af1925050508015611719575060015b611959576040516000815260443d1015611735575060006117d0565b60046000803e60005160e01c6308c379a081146117565760009150506117d0565b60043d036004833e81513d60248201116001600160401b0382111715611781576000925050506117d0565b80830180516001600160401b038111156117a25760009450505050506117d0565b8060208301013d86018111156117c0576000955050505050506117d0565b601f01601f191660405250925050505b806117db5750611884565b816001600160a01b03167ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561184457818101518382015260200161182c565b50505050905090810190601f1680156118715780820380516001836020036101000a031916815260200191505b509250505060405180910390a250611959565b3d8080156118ae576040519150601f19603f3d011682016040523d82523d6000602084013e6118b3565b606091505b50816001600160a01b03167f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561191d578181015183820152602001611905565b50505050905090810190601f16801561194a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b505b60ff80861660009081526009602052604090205461100591636f93d2e691899133918791168061198d575060ff881615155b604080516001600160e01b031960e088901b1681526001600160a01b039586166004820152939094166024840152604483019190915215156064820152905160848083019260209291908290030181600087803b1580156119ed57600080fd5b505af1158015611a01573d6000803e3d6000fd5b505050506040513d6020811015611a1757600080fd5b505050505050505050505b505050505050505050505050565b630100600081565b600981565b61100781565b61100681565b60005460ff1681565b3361100714611a925760405162461bcd60e51b815260040180806020018281038252602e815260200180612825602e913960400191505060405180910390fd5b611afb84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526012815271626174636853697a65466f724f7261636c6560701b602082015291506126e79050565b15611b9657604080516020601f8401819004810282018101909252828152600091611b3e918585808385018382808284376000920191909152506127ce92505050565b90506127108111158015611b535750600a8110155b611b8e5760405162461bcd60e51b81526004018080602001828103825260328152602001806128536032913960400191505060405180910390fd5b600155611db4565b611bf784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600a81526918591910da185b9b995b60b21b602082015291506126e79050565b15611d7757606082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505060169091149050611c7a5760405162461bcd60e51b81526004018080602001828103825260528152602001806128a86052913960600191505060405180910390fd5b600181015160028201516016830151611c92816127d3565b611ce3576040805162461bcd60e51b815260206004820152601960248201527f61646472657373206973206e6f74206120636f6e747261637400000000000000604482015290519081900360640190fd5b60ff808416600081815260056020908152604080832080546001600160a01b0388166001600160a01b0319909116811790915580845260068352818420805460ff19908116600117909155858552600990935281842080549093169588161595909517909155517f7e3b6af43092577ee20e60eaa1d9b114a7031305c895ee7dd3ffe17196d2e1e09190a350505050611db4565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b6008602052600090815260409020546001600160401b031681565b61100281565b6040518060400160405280600381526020016269626360e81b81525081565b61100381565b60005460ff1615611ee4576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b7f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b80546001600160a01b03199081166110049081179092557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36805460ff199081169091557f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a80548316841790557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c38054821690557fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc0805483169093179092557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e78054831690557f21babf77c105200c693262f578bd7d0d133ce8c839999c7b76b906819737f4288054831660019081179091557ffb33122aa9f93cc639ebe80a7bc4784c11e6053dde89c6f4f7e268c6a623da1e805483166110001790557fc7694af312c4f286114180fd0ba6a52461fcee8a381636770b19a343af92538a80548416821790557fc02926598b8ed20edcb67ada393e92ac3eb31e0f05ee8aee1b9c764771769c4580548416821790557fc0a4a8be475dfebc377ebef2d7c4ff47656f572a08dd92b81017efcdba0febe1805483166110071790557f87e8a52529e8ece4ef759037313542a6429ff494a9fab9027fb79db90124eba680548416821790557f0f7e10a7f6d0990f8249be0937dee5f2964a2891efdbfbe4628d25df2549c71280548416821790557f40f28f99a40bc9f6beea1013afdbc3cdcc689eb76b82c4de06c0acf1e1932ed580549092166110019081179092557f0d9cf2cd531699eed8dd34e40ff2884a14a698c4898184fba85194e6f6772d248054841682179055600091825260066020527f23f68c9bd22b8a93d06adabe17481c87c016bcbd20adc8bfd707a4d813a572178054841682179055603281556004805467ffffffffffffffff19166001600160401b031790556002829055600382905581549092169091179055565b6007602052600090815260409020546001600160401b031681565b60066020526000908152604090205460ff1681565b6000805460ff16612254576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3360009081526006602052604090205460ff166122a25760405162461bcd60e51b81526004018080602001828103825260278152602001806127fe6027913960400191505060405180910390fd5b60ff85166000908152600760209081526040808320548151601f88018490048402810184019092528682526001600160401b0316926123079284928a926110fa92909189918c908c90819084018382808284376000920191909152506107e492505050565b60ff959095166000908152600760205260409020805467ffffffffffffffff191660019687016001600160401b031617905550929392505050565b61100081565b600381565b61100481565b8051602090910191565b5b6020811061237d578251825260209283019290910190601f190161235e565b915181516020939093036101000a6000190180199091169216919091179052565b60408051600e808252818301909252606091630100600060ff851617918391602082018180368337505050600e818101969096526006810192909252509283525090919050565b6000856123f4575060006124d9565b606082518451865160800101016040519080825280601f01601f19166020018201604052801561242b576020820181803683370190505b5090506000612439826127d9565b60208089015182520190508660008061245189612353565b808652602090950194909250905061246a82858361235d565b9283019261247788612353565b808652602090950194909250905061249082858361235d565b9283018a8152602001926124a387612353565b90925090506124b382858361235d565b5083516020016124c16127df565b60208183886065600019fa5051600114955050505050505b95945050505050565b6000806000606060218551101561251257505060408051600080825260208201909252909250829150819061258b565b600185015160218601518651604080516020198301808252601f196001199094019390931681016020019091526041890193929160609190801561255d576020820181803683370190505b509050600061256b82612353565b50905061257d858260218d510361235d565b506001975091955093509150505b9193509193565b6002544311156125d1576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b161790915560035543600255612611565b6003805460019081019182905554116126115760048054600781810b600101900b6001600160401b031667ffffffffffffffff1990911617905560006003555b8160ff16836001600160401b0316600460009054906101000a900460070b6001600160401b03167f3a6e0fc61675aa2a100bcba0568368bb92bcec91c97673391074f11138f0cffe606085604051808361ffff1661ffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156126a757818101518382015260200161268f565b50505050905090810190601f1680156126d45780820380516001836020036101000a031916815260200191505b50935050505060405180910390a4505050565b6000816040516020018082805190602001908083835b6020831061271c5780518252601f1990920191602091820191016126fd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b6020831061278a5780518252601f19909201916020918201910161276b565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b3b151590565b60200190565b6040518060200160405280600190602082028036833750919291505056fe68616e646c6520636f6e747261637420686173206e6f74206265656e2072656769737465726564746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577426174636853697a65466f724f7261636c652073686f756c6420626520696e205b31302c2031303030305d6c6967687420636c69656e74206e6f742073796e632074686520626c6f636b207965746c656e677468206f662076616c756520666f72206164644368616e6e656c2073686f756c642062652032322c206368616e6e656c49643a697346726f6d53797374656d3a68616e646c657241646472657373a264697066735822122030e60cfd3ea011d123f8a397e406cb3d2dba808d544172c679c02e87b560994764736f6c63430006040033" + "code": "0x608060405234801561001057600080fd5b50600436106102485760003560e01c8063863fe4ab1161013b578063c81b1662116100b8578063eb1cc8ac1161007c578063eb1cc8ac1461071d578063f7a251d714610743578063f9a2bbc7146107bb578063fc3e5908146107c3578063fd6a6879146107cb57610248565b8063c81b1662146106dd578063d76a8675146106e5578063dc927faf146106ed578063e1c7392a146106f5578063e3b04805146106fd57610248565b8063a78abc16116100ff578063a78abc16146105d3578063ab51bb96146105db578063ac431751146105e3578063b0355f5b146103ff578063c27cdcfb146106a157610248565b8063863fe4ab146105b35780638cc8f561146104b657806396713da9146105bb5780639dc09262146105c3578063a1a11bf5146105cb57610248565b8063493279b1116101c957806370fd5bad1161018d57806370fd5bad146104b657806374f079b8146104be57806375d47a0a146104c65780637942fd05146104ce57806384013b6a146104d657610248565b8063493279b11461045f5780634bf6c8821461047e57806351e80672146104865780636e47a51a1461048e5780636e47b482146104ae57610248565b8063308325f411610210578063308325f4146102cf5780633bdc47a6146102d75780633dffc387146103ff578063422f90501461040757806343756e5c1461043b57610248565b806305e682581461024d5780630bee7a671461026b57806314b3023b1461028c57806322556cdc146102a65780632ff32aea146102ae575b600080fd5b6102556107d3565b6040805160ff9092168252519081900360200190f35b6102736107d8565b6040805163ffffffff9092168252519081900360200190f35b6102946107dd565b60408051918252519081900360200190f35b6102946107e3565b6102b66107e8565b60408051600792830b90920b8252519081900360200190f35b6102946107f1565b61038a600480360360608110156102ed57600080fd5b60ff82351691602081013591810190606081016040820135600160201b81111561031657600080fd5b82018360208201111561032857600080fd5b803590602001918460018302840111600160201b8311171561034957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506107f7945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103c45781810151838201526020016103ac565b50505050905090810190601f1680156103f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61025561086d565b6104276004803603602081101561041d57600080fd5b503560ff16610872565b604080519115158252519081900360200190f35b610443610887565b604080516001600160a01b039092168252519081900360200190f35b61046761088d565b6040805161ffff9092168252519081900360200190f35b610255610892565b610443610897565b610443600480360360208110156104a457600080fd5b503560ff1661089d565b6104436108b8565b6102556108be565b6102946108c3565b6104436108c9565b6102556108cf565b6105b1600480360360a08110156104ec57600080fd5b810190602081018135600160201b81111561050657600080fd5b82018360208201111561051857600080fd5b803590602001918460018302840111600160201b8311171561053957600080fd5b919390929091602081019035600160201b81111561055657600080fd5b82018360208201111561056857600080fd5b803590602001918460018302840111600160201b8311171561058957600080fd5b919350915080356001600160401b03908116916020810135909116906040013560ff166108d4565b005b610294611a49565b610255611a51565b610443611a56565b610443611a5c565b610427611a62565b6102736107d3565b6105b1600480360360408110156105f957600080fd5b810190602081018135600160201b81111561061357600080fd5b82018360208201111561062557600080fd5b803590602001918460018302840111600160201b8311171561064657600080fd5b919390929091602081019035600160201b81111561066357600080fd5b82018360208201111561067557600080fd5b803590602001918460018302840111600160201b8311171561069657600080fd5b509092509050611a6b565b6106c1600480360360208110156106b757600080fd5b503560ff16611e5f565b604080516001600160401b039092168252519081900360200190f35b610443611e7a565b61038a611e80565b610443611e9f565b6105b1611ea5565b6106c16004803603602081101561071357600080fd5b503560ff16612212565b6104276004803603602081101561073357600080fd5b50356001600160a01b031661222d565b6104276004803603606081101561075957600080fd5b60ff8235169190810190604081016020820135600160201b81111561077d57600080fd5b82018360208201111561078f57600080fd5b803590602001918460018302840111600160201b831117156107b057600080fd5b919350915035612242565b610443612384565b61025561238a565b61044361238f565b600081565b606481565b60015481565b603281565b60045460070b81565b60025481565b60606000825160210190506060816040519080825280601f01601f19166020018201604052801561082f576020820181803683370190505b506021810186905260018101879052828152905060418101600061085286612395565b5090506108618183885161239f565b50909695505050505050565b600181565b60096020526000908152604090205460ff1681565b61100181565b606081565b600881565b61200081565b6005602052600090815260409020546001600160a01b031681565b61100581565b600281565b60035481565b61100881565b600b81565b60005460ff16610927576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60408051630a83aaa960e31b815233600482015290516110069163541d5548916024808301926020929190829003018186803b15801561096657600080fd5b505afa15801561097a573d6000803e3d6000fd5b505050506040513d602081101561099057600080fd5b50516109e3576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b60ff8116600090815260086020526040902054829082906001600160401b039081169083168114610a53576040805162461bcd60e51b815260206004820152601560248201527439b2b8bab2b731b2903737ba1034b71037b93232b960591b604482015290519081900360640190fd5b60ff8216600090815260086020908152604091829020805467ffffffffffffffff1916600185016001600160401b039081169190911790915582516337d7f9c160e21b81529089166004820152915188926110039263df5fe70492602480840193829003018186803b158015610ac857600080fd5b505afa158015610adc573d6000803e3d6000fd5b505050506040513d6020811015610af257600080fd5b5051610b2f5760405162461bcd60e51b81526004018080602001828103825260238152602001806128c76023913960400191505060405180910390fd5b60ff851660009081526005602052604090205485906001600160a01b0316610b9e576040805162461bcd60e51b815260206004820152601860248201527f6368616e6e656c206973206e6f7420737570706f727465640000000000000000604482015290519081900360640190fd5b60608c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060608b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805163cba510a960e01b81526001600160401b038f1660048201529051939450610cc593611003935063cba510a992506024808301926020929190829003018186803b158015610c6e57600080fd5b505afa158015610c82573d6000803e3d6000fd5b505050506040513d6020811015610c9857600080fd5b505160408051808201909152600381526269626360e81b6020820152610cbe8c8c6123e0565b8585612427565b610d0d576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b604482015290519081900360640190fd5b60408051631bb5062960e31b81526001600160401b038c16600482015290516000916110039163dda8314891602480820192602092909190829003018186803b158015610d5957600080fd5b505afa158015610d6d573d6000803e3d6000fd5b505050506040513d6020811015610d8357600080fd5b5051905088600080806060610d9788612524565b935093509350935083610e685760ff851660008181526007602090815260408083205481518381528d51818501528d516001600160401b03909216947ff7b2e42d694eb1100184aae86d4245d9e46966100b1dc7e723275b98326854ac948f9492938493840192918601918190849084905b83811015610e21578181015183820152602001610e09565b50505050905090810190601f168015610e4e5780820380516001836020036101000a031916815260200191505b509250505060405180910390a35050505050505050611a3b565b60ff83166113a65760ff85166000818152600560209081526040808320548151631182b87560e01b815260048101958652602481019283528651604482015286516001600160a01b03909216958695631182b875958d958a9593949093606490910192918601918190849084905b83811015610eee578181015183820152602001610ed6565b50505050905090810190601f168015610f1b5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610f3b57600080fd5b505af192505050801561101f57506040513d6000823e601f3d908101601f191682016040526020811015610f6e57600080fd5b8101908080516040519392919084600160201b821115610f8d57600080fd5b908301906020820185811115610fa257600080fd5b8251600160201b811182820188101715610fbb57600080fd5b82525081516020918201929091019080838360005b83811015610fe8578181015183820152602001610fd0565b50505050905090810190601f1680156110155780820380516001836020036101000a031916815260200191505b5060405250505060015b611331576040516000815260443d101561103b575060006110d6565b60046000803e60005160e01c6308c379a0811461105c5760009150506110d6565b60043d036004833e81513d60248201116001600160401b0382111715611087576000925050506110d6565b80830180516001600160401b038111156110a85760009450505050506110d6565b8060208301013d86018111156110c6576000955050505050506110d6565b601f01601f191660405250925050505b806110e157506111f3565b60ff8716600090815260076020526040812054611118916001600160401b0390911690899061111390600290886107f7565b6125d4565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf948794849390840192918601918190849084905b838110156111b357818101518382015260200161119b565b50505050905090810190601f1680156111e05780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061132c565b3d80801561121d576040519150601f19603f3d011682016040523d82523d6000602084013e611222565b606091505b5060ff8716600090815260076020526040812054611255916001600160401b0390911690899061111390600290886107f7565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351948794849390840192918601918190849084905b838110156112f05781810151838201526020016112d8565b50505050905090810190601f16801561131d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6113a0565b80511561139e5760ff871660009081526007602052604081205461136a916001600160401b0390911690899061111390600190866107f7565b60ff8716600090815260076020526040902080546001600160401b038082166001011667ffffffffffffffff199091161790555b505b50611974565b60ff83166001141561164a5760ff8516600081815260056020908152604080832054815163831d65d160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563831d65d1958d958a9593949093606490910192918601918190849084905b83811015611430578181015183820152602001611418565b50505050905090810190601f16801561145d5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561147d57600080fd5b505af192505050801561148e575060015b6113a0576040516000815260443d10156114aa57506000611545565b60046000803e60005160e01c6308c379a081146114cb576000915050611545565b60043d036004833e81513d60248201116001600160401b03821117156114f657600092505050611545565b80830180516001600160401b03811115611517576000945050505050611545565b8060208301013d860181111561153557600095505050505050611545565b601f01601f191660405250925050505b8061155057506115b5565b60408051602080825283518183015283516001600160a01b038616937ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf93869390928392830191850190808383600083156111b357818101518382015260200161119b565b3d8080156115df576040519150601f19603f3d011682016040523d82523d6000602084013e6115e4565b606091505b5060408051602080825283518183015283516001600160a01b038616937f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd297735193869390928392830191850190808383600083156112f05781810151838201526020016112d8565b60ff8316600214156119745760ff8516600081815260056020908152604080832054815163c8509d8160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563c8509d81958d958a9593949093606490910192918601918190849084905b838110156116d45781810151838201526020016116bc565b50505050905090810190601f1680156117015780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561172157600080fd5b505af1925050508015611732575060015b611972576040516000815260443d101561174e575060006117e9565b60046000803e60005160e01c6308c379a0811461176f5760009150506117e9565b60043d036004833e81513d60248201116001600160401b038211171561179a576000925050506117e9565b80830180516001600160401b038111156117bb5760009450505050506117e9565b8060208301013d86018111156117d9576000955050505050506117e9565b601f01601f191660405250925050505b806117f4575061189d565b816001600160a01b03167ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561185d578181015183820152602001611845565b50505050905090810190601f16801561188a5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250611972565b3d8080156118c7576040519150601f19603f3d011682016040523d82523d6000602084013e6118cc565b606091505b50816001600160a01b03167f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561193657818101518382015260200161191e565b50505050905090810190601f1680156119635780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b505b60ff80861660009081526009602052604090205461100591636f93d2e69189913391879116806119a6575060ff881615155b604080516001600160e01b031960e088901b1681526001600160a01b039586166004820152939094166024840152604483019190915215156064820152905160848083019260209291908290030181600087803b158015611a0657600080fd5b505af1158015611a1a573d6000803e3d6000fd5b505050506040513d6020811015611a3057600080fd5b505050505050505050505b505050505050505050505050565b630100600081565b600981565b61100781565b61100681565b60005460ff1681565b3361100714611aab5760405162461bcd60e51b815260040180806020018281038252602e815260200180612867602e913960400191505060405180910390fd5b611b1484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526012815271626174636853697a65466f724f7261636c6560701b602082015291506127299050565b15611baf57604080516020601f8401819004810282018101909252828152600091611b579185858083850183828082843760009201919091525061281092505050565b90506127108111158015611b6c5750600a8110155b611ba75760405162461bcd60e51b81526004018080602001828103825260328152602001806128956032913960400191505060405180910390fd5b600155611dcd565b611c1084848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600a81526918591910da185b9b995b60b21b602082015291506127299050565b15611d9057606082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505060169091149050611c935760405162461bcd60e51b81526004018080602001828103825260528152602001806128ea6052913960600191505060405180910390fd5b600181015160028201516016830151611cab81612815565b611cfc576040805162461bcd60e51b815260206004820152601960248201527f61646472657373206973206e6f74206120636f6e747261637400000000000000604482015290519081900360640190fd5b60ff808416600081815260056020908152604080832080546001600160a01b0388166001600160a01b0319909116811790915580845260068352818420805460ff19908116600117909155858552600990935281842080549093169588161595909517909155517f7e3b6af43092577ee20e60eaa1d9b114a7031305c895ee7dd3ffe17196d2e1e09190a350505050611dcd565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b6008602052600090815260409020546001600160401b031681565b61100281565b6040518060400160405280600381526020016269626360e81b81525081565b61100381565b60005460ff1615611efd576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b7f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b80546001600160a01b0319908116611008179091557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36805460ff199081169091557fd3e8431360a83fc4ddedb8caffb965f6da962ee3fd2deea2083c3c602597cea28054821660019081179091557f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a805484166110049081179091557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c38054841690557fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc08054851690911790557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e78054831690557f21babf77c105200c693262f578bd7d0d133ce8c839999c7b76b906819737f42880548316821790557ffb33122aa9f93cc639ebe80a7bc4784c11e6053dde89c6f4f7e268c6a623da1e805484166110001790557fc7694af312c4f286114180fd0ba6a52461fcee8a381636770b19a343af92538a80548316821790557fc02926598b8ed20edcb67ada393e92ac3eb31e0f05ee8aee1b9c764771769c4580548316821790557fc0a4a8be475dfebc377ebef2d7c4ff47656f572a08dd92b81017efcdba0febe1805484166110071790557f87e8a52529e8ece4ef759037313542a6429ff494a9fab9027fb79db90124eba680548316821790557f0f7e10a7f6d0990f8249be0937dee5f2964a2891efdbfbe4628d25df2549c71280548316821790557f40f28f99a40bc9f6beea1013afdbc3cdcc689eb76b82c4de06c0acf1e1932ed580549093166110019081179093557f0d9cf2cd531699eed8dd34e40ff2884a14a698c4898184fba85194e6f6772d248054831682179055600092835260066020527f23f68c9bd22b8a93d06adabe17481c87c016bcbd20adc8bfd707a4d813a572178054831682179055603281556004805467ffffffffffffffff19166001600160401b03179055600283905560038390558254909116179055565b6007602052600090815260409020546001600160401b031681565b60066020526000908152604090205460ff1681565b6000805460ff16612296576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3360009081526006602052604090205460ff166122e45760405162461bcd60e51b81526004018080602001828103825260278152602001806128406027913960400191505060405180910390fd5b60ff85166000908152600760209081526040808320548151601f88018490048402810184019092528682526001600160401b0316926123499284928a9261111392909189918c908c90819084018382808284376000920191909152506107f792505050565b60ff959095166000908152600760205260409020805467ffffffffffffffff191660019687016001600160401b031617905550929392505050565b61100081565b600381565b61100481565b8051602090910191565b5b602081106123bf578251825260209283019290910190601f19016123a0565b915181516020939093036101000a6000190180199091169216919091179052565b60408051600e808252818301909252606091630100600060ff851617918391602082018180368337505050600e818101969096526006810192909252509283525090919050565b6000856124365750600061251b565b606082518451865160800101016040519080825280601f01601f19166020018201604052801561246d576020820181803683370190505b509050600061247b8261281b565b60208089015182520190508660008061249389612395565b80865260209095019490925090506124ac82858361239f565b928301926124b988612395565b80865260209095019490925090506124d282858361239f565b9283018a8152602001926124e587612395565b90925090506124f582858361239f565b508351602001612503612821565b60208183886065600019fa5051600114955050505050505b95945050505050565b600080600060606021855110156125545750506040805160008082526020820190925290925082915081906125cd565b600185015160218601518651604080516020198301808252601f196001199094019390931681016020019091526041890193929160609190801561259f576020820181803683370190505b50905060006125ad82612395565b5090506125bf858260218d510361239f565b506001975091955093509150505b9193509193565b600254431115612613576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b161790915560035543600255612653565b6003805460019081019182905554116126535760048054600781810b600101900b6001600160401b031667ffffffffffffffff1990911617905560006003555b8160ff16836001600160401b0316600460009054906101000a900460070b6001600160401b03167f3a6e0fc61675aa2a100bcba0568368bb92bcec91c97673391074f11138f0cffe606085604051808361ffff1661ffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156126e95781810151838201526020016126d1565b50505050905090810190601f1680156127165780820380516001836020036101000a031916815260200191505b50935050505060405180910390a4505050565b6000816040516020018082805190602001908083835b6020831061275e5780518252601f19909201916020918201910161273f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106127cc5780518252601f1990920191602091820191016127ad565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b3b151590565b60200190565b6040518060200160405280600190602082028036833750919291505056fe68616e646c6520636f6e747261637420686173206e6f74206265656e2072656769737465726564746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577426174636853697a65466f724f7261636c652073686f756c6420626520696e205b31302c2031303030305d6c6967687420636c69656e74206e6f742073796e632074686520626c6f636b207965746c656e677468206f662076616c756520666f72206164644368616e6e656c2073686f756c642062652032322c206368616e6e656c49643a697346726f6d53797374656d3a68616e646c657241646472657373a264697066735822122055253b91e29c63243b5a30d925eed1239fd58078242bfc270ac2fb1150c6ddb364736f6c63430006040033" }, "9fB29AAc15b9A4B7F17c3385939b007540f4d791": { "balance": "0x21e19e0c9bab2400000" diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 161838e8..c93fc4d8 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -20,6 +20,7 @@ const RelayerIncentivize = artifacts.require("RelayerIncentivize"); const TendermintLightClient = artifacts.require("TendermintLightClient"); const CrossChain = artifacts.require("CrossChain"); const TokenHub = artifacts.require("TokenHub"); +const TokenManager = artifacts.require("TokenManager"); const ABCToken = artifacts.require("test/ABCToken"); const DEFToken = artifacts.require("test/DEFToken"); const MiniToken = artifacts.require("test/MiniToken"); @@ -61,6 +62,7 @@ module.exports = function(deployer, network, accounts) { instance.addOperator(RelayerIncentivize.address, {from: accounts[0]}); }); + let tokenMgrInstance; let tokenHubInstance; let relayerHubInstance; // deploy lib @@ -87,9 +89,15 @@ module.exports = function(deployer, network, accounts) { deployer.link(RLPDecode, TokenHub); deployer.link(SafeMath, TokenHub); tokenHubInstance=_tokenHubInstance; - tokenHubInstance.init({ - from: accounts[0], - value: 50e18}) + tokenHubInstance.init(); + tokenHubInstance.sendTransaction({from:accounts[0],value:50e18}); + }); + }).then(function() { + deployer.deploy(TokenManager).then(function(_tokenMgrInstance){ + deployer.link(RLPEncode, TokenManager); + deployer.link(RLPDecode, TokenManager); + deployer.link(SafeMath, TokenManager); + tokenMgrInstance=_tokenMgrInstance; }); }).then(function() { // deploy mock @@ -124,14 +132,15 @@ module.exports = function(deployer, network, accounts) { return deployer.deploy(BSCValidatorSet).then(function (validatorInstance) { validatorInstance.init(); - relayerIncentivizeInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, CrossChain.address); - tendermintLightClientInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, CrossChain.address); - tokenHubInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, CrossChain.address); - govHubInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, accounts[8]); - slashInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, CrossChain.address); - validatorInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,MockTokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, accounts[8]); - relayerHubInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, CrossChain.address); - crossChainInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, CrossChain.address); + relayerIncentivizeInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); + tendermintLightClientInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); + tokenHubInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); + tokenMgrInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); + govHubInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, accounts[8]); + slashInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); + validatorInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,MockTokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, accounts[8]); + relayerHubInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); + crossChainInstance.updateContractAddr(BSCValidatorSet.address, SlashIndicator.address, SystemReward.address, MockLightClient.address,TokenHub.address,RelayerIncentivize.address,RelayerHub.address,GovHub.address, TokenManager.address, CrossChain.address); crossChainInstance.init(); }); }); diff --git a/package.json b/package.json index 5dcbf5ad..95391ca1 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "lint:js": "eslint test/**/*.js", "lint:sol:fix": "solium -d contracts/ --fix", "lint:sol": "solium -d contracts/", - "flatten": "truffle-flattener contracts/BSCValidatorSet.sol > contracts/flattened/BSCValidatorSet.sol && truffle-flattener contracts/GovHub.sol > contracts/flattened/GovHub.sol && truffle-flattener contracts/RelayerHub.sol > contracts/flattened/RelayerHub.sol && truffle-flattener contracts/RelayerIncentivize.sol > contracts/flattened/RelayerIncentivize.sol && truffle-flattener contracts/SlashIndicator.sol > contracts/flattened/SlashIndicator.sol && truffle-flattener contracts/SystemReward.sol > contracts/flattened/SystemReward.sol && truffle-flattener contracts/TendermintLightClient.sol > contracts/flattened/TendermintLightClient.sol && truffle-flattener contracts/TokenHub.sol > contracts/flattened/TokenHub.sol && truffle-flattener contracts/CrossChain.sol > contracts/flattened/CrossChain.sol", + "flatten": "truffle-flattener contracts/BSCValidatorSet.sol > contracts/flattened/BSCValidatorSet.sol && truffle-flattener contracts/GovHub.sol > contracts/flattened/GovHub.sol && truffle-flattener contracts/RelayerHub.sol > contracts/flattened/RelayerHub.sol && truffle-flattener contracts/RelayerIncentivize.sol > contracts/flattened/RelayerIncentivize.sol && truffle-flattener contracts/SlashIndicator.sol > contracts/flattened/SlashIndicator.sol && truffle-flattener contracts/SystemReward.sol > contracts/flattened/SystemReward.sol && truffle-flattener contracts/TendermintLightClient.sol > contracts/flattened/TendermintLightClient.sol && truffle-flattener contracts/TokenHub.sol > contracts/flattened/TokenHub.sol && truffle-flattener contracts/CrossChain.sol > contracts/flattened/CrossChain.sol && truffle-flattener contracts/TokenManager.sol > contracts/flattened/TokenManager.sol", "generate-test": "node generate-system.js --mock true && node generate-systemReward.js --mock true && node generate-validatorset.js --mock true && node generate-system.js --mock true && node generate-crosschain.js --mock true && node generate-tokenhub.js --mock true && node generate-tendermintlightclient.js --mock true && node generate-relayerincentivizecontract.js --roundSize 30 --maximumWeight 3 --mock true" }, "author": "", diff --git a/test/SystemReward.js b/test/SystemReward.js index 62b4ca2c..9e5a13d7 100644 --- a/test/SystemReward.js +++ b/test/SystemReward.js @@ -9,7 +9,7 @@ contract('SystemReward', (accounts) => { let tx = await systemRewardInstance.send(1e8, {from: accounts[3]}); let balance_wei = await web3.eth.getBalance(systemRewardInstance.address); assert.equal(balance_wei, 1e8, "balance not equal"); - truffleAssert.eventEmitted(tx, "ReceiveDeposit",(ev) => { + truffleAssert.eventEmitted(tx, "receiveDeposit",(ev) => { return ev.amount.toNumber() === 1e8 && ev.from === accounts[3]; }); }); @@ -36,7 +36,7 @@ contract('SystemReward', (accounts) => { await systemRewardInstance.send(1e8, {from: accounts[3]}); let tx = await systemRewardInstance.claimRewards(newAccount.address, 1e7, {from: accounts[0]}) - truffleAssert.eventEmitted(tx, "RewardTo",(ev) => { + truffleAssert.eventEmitted(tx, "rewardTo",(ev) => { return ev.amount.toNumber() === 1e7 && ev.to === newAccount.address; }); @@ -64,7 +64,7 @@ contract('SystemReward', (accounts) => { const systemRewardInstance = await SystemReward.deployed(); let newAccount = web3.eth.accounts.create(); let tx = await systemRewardInstance.claimRewards(newAccount.address, 1e7, {from: accounts[0]}) - truffleAssert.eventEmitted(tx, "RewardEmpty"); + truffleAssert.eventEmitted(tx, "rewardEmpty"); let balance_wei = await web3.eth.getBalance(newAccount.address); assert.equal(balance_wei, 0, "balance not equal"); }); diff --git a/test/TestTokenHub.js b/test/TestTokenHub.js index e1d0238d..229ff879 100644 --- a/test/TestTokenHub.js +++ b/test/TestTokenHub.js @@ -7,6 +7,7 @@ const RelayerIncentivize = artifacts.require("RelayerIncentivize"); //const TendermintLightClient = artifacts.require("TendermintLightClient"); const MockLightClient = artifacts.require("mock/MockLightClient"); const TokenHub = artifacts.require("TokenHub"); +const TokenManager = artifacts.require("TokenManager"); const CrossChain = artifacts.require("CrossChain"); const ABCToken = artifacts.require("ABCToken"); const DEFToken = artifacts.require("DEFToken"); @@ -138,8 +139,6 @@ contract('TokenHub', (accounts) => { const tokenHub = await TokenHub.deployed(); let balance_wei = await web3.eth.getBalance(tokenHub.address); assert.equal(balance_wei, 50e18, "wrong balance"); - const _lightClientContract = await tokenHub.LIGHT_CLIENT_ADDR.call(); - assert.equal(_lightClientContract, MockLightClient.address, "wrong tendermint light client contract address"); const relayer = accounts[1]; const relayerInstance = await RelayerHub.deployed(); @@ -149,58 +148,58 @@ contract('TokenHub', (accounts) => { }); it('Relay expired bind package', async () => { const abcToken = await ABCToken.deployed(); - const tokenHub = await TokenHub.deployed(); + const tokenManager = await TokenManager.deployed(); const crossChain = await CrossChain.deployed(); const owner = accounts[0]; const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "ABC-9C7", abcToken.address, 1e8, 99e6, 18); - let bindSequence = 0; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); - let bindRequenst = await tokenHub.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 + let bindRequenst = await tokenManager.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 assert.equal(bindRequenst.bep2TokenSymbol.toString(), toBytes32Bep2Symbol("ABC-9C7"), "wrong bep2TokenSymbol"); assert.equal(bindRequenst.totalSupply.eq(new BN('52b7d2dcc80cd2e4000000', 16)), true, "wrong total supply"); // 1e26 assert.equal(bindRequenst.peggyAmount.eq(new BN('51e410c0f93fe543000000', 16)), true, "wrong peggy amount"); // 99e24 assert.equal(bindRequenst.contractAddr.toString(), abcToken.address.toString(), "wrong contract address"); try { - await tokenHub.approveBind(abcToken.address, "ABC-9C7", {from: relayer}); + await tokenManager.approveBind(abcToken.address, "ABC-9C7", {from: relayer}); assert.fail(); } catch (error) { assert.ok(error.toString().includes("only bep2e owner can approve this bind request")); } try { - await tokenHub.approveBind("0x0000000000000000000000000000000000000000", "ABC-9C7", {from: relayer}); + await tokenManager.approveBind("0x0000000000000000000000000000000000000000", "ABC-9C7", {from: relayer}); assert.fail(); } catch (error) { assert.ok(error.toString().includes("contact address doesn't equal to the contract address in bind request")); } try { - await tokenHub.approveBind(abcToken.address, "ABC-9C7", {from: owner}); + await tokenManager.approveBind(abcToken.address, "ABC-9C7", {from: owner}); assert.fail(); } catch (error) { assert.ok(error.toString().includes("allowance doesn't equal to (totalSupply - peggyAmount)")); } - await abcToken.approve(tokenHub.address, web3.utils.toBN(1e18).mul(web3.utils.toBN(1e6)), {from: owner}); + await abcToken.approve(tokenManager.address, web3.utils.toBN(1e18).mul(web3.utils.toBN(1e6)), {from: owner}); await sleep(5 * 1000); // approve expired bind request - let tx = await tokenHub.approveBind(abcToken.address, "ABC-9C7", {from: owner, value: 1e16}); + let tx = await tokenManager.approveBind(abcToken.address, "ABC-9C7", {from: owner, value: 1e16}); let nestedEventValues = (await truffleAssert.createTransactionResult(crossChain, tx.tx)).logs[0].args; decoded = verifyPrefixAndExtractSyncPackage(nestedEventValues.payload, 1e6); assert.equal(web3.utils.bytesToHex(decoded[0]), "0x01", "bind status should be timeout"); assert.equal(web3.utils.bytesToHex(decoded[1]), toBytes32Bep2Symbol("ABC-9C7"), "wrong bep2TokenSymbol"); - bindRequenst = await tokenHub.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 + bindRequenst = await tokenManager.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 assert.equal(bindRequenst.bep2TokenSymbol.toString(), "0x0000000000000000000000000000000000000000000000000000000000000000", "wrong bep2TokenSymbol"); }); it('Reject bind', async () => { - const tokenHub = await TokenHub.deployed(); + const tokenManager = await TokenManager.deployed(); const abcToken = await ABCToken.deployed(); const crossChain = await CrossChain.deployed(); @@ -208,18 +207,18 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "ABC-9C7", abcToken.address, 1e8, 99e6, 18); //expire time - let bindSequence = 1; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); try { - await tokenHub.rejectBind(abcToken.address, "ABC-9C7", {from: relayer, value: 1e16}); + await tokenManager.rejectBind(abcToken.address, "ABC-9C7", {from: relayer, value: 1e16}); assert.fail(); } catch (error) { assert.ok(error.toString().includes("only bep2e owner can reject")); } - let tx = await tokenHub.rejectBind(abcToken.address, "ABC-9C7", {from: owner, value: 1e16}); + let tx = await tokenManager.rejectBind(abcToken.address, "ABC-9C7", {from: owner, value: 1e16}); let nestedEventValues = (await truffleAssert.createTransactionResult(crossChain, tx.tx)).logs[0].args; decoded = verifyPrefixAndExtractSyncPackage(nestedEventValues.payload, 1e6); @@ -227,11 +226,11 @@ contract('TokenHub', (accounts) => { assert.equal(web3.utils.bytesToHex(decoded[0]), "0x03", "bind status should be rejected"); assert.equal(web3.utils.bytesToHex(decoded[1]), toBytes32Bep2Symbol("ABC-9C7"), "wrong bep2TokenSymbol"); - const bindRequenst = await tokenHub.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 + const bindRequenst = await tokenManager.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 assert.equal(bindRequenst.bep2TokenSymbol.toString(), "0x0000000000000000000000000000000000000000000000000000000000000000", "wrong bep2TokenSymbol"); }); it('Expire bind', async () => { - const tokenHub = await TokenHub.deployed(); + const tokenManager = await TokenManager.deployed(); const abcToken = await ABCToken.deployed(); const crossChain = await CrossChain.deployed(); @@ -239,12 +238,12 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "ABC-9C7", abcToken.address, 1e8, 99e6, 18); - let bindSequence = 2; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); let tx = await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); try { - await tokenHub.expireBind("ABC-9C7", {from: accounts[2], value: 1e16}); + await tokenManager.expireBind("ABC-9C7", {from: accounts[2], value: 1e16}); assert.fail(); } catch (error) { assert.ok(error.toString().includes("bind request is not expired")); @@ -252,18 +251,18 @@ contract('TokenHub', (accounts) => { await sleep(5 * 1000); - tx = await tokenHub.expireBind("ABC-9C7", {from: accounts[2], value: 1e16}); + tx = await tokenManager.expireBind("ABC-9C7", {from: accounts[2], value: 1e16}); let nestedEventValues = (await truffleAssert.createTransactionResult(crossChain, tx.tx)).logs[0].args; decoded = verifyPrefixAndExtractSyncPackage(nestedEventValues.payload, 1e6); assert.equal(web3.utils.bytesToHex(decoded[0]), "0x01", "bind status should be timeout"); assert.equal(web3.utils.bytesToHex(decoded[1]), toBytes32Bep2Symbol("ABC-9C7"), "wrong bep2TokenSymbol"); - bindRequenst = await tokenHub.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 + bindRequenst = await tokenManager.bindPackageRecord.call(toBytes32Bep2Symbol("ABC-9C7")); // symbol: ABC-9C7 assert.equal(bindRequenst.bep2TokenSymbol.toString(), "0x0000000000000000000000000000000000000000000000000000000000000000", "wrong bep2TokenSymbol"); }); it('Mismatched token symbol', async () => { - const tokenHub = await TokenHub.deployed(); + const tokenManager = await TokenManager.deployed(); const abcToken = await ABCToken.deployed(); const crossChain = await CrossChain.deployed(); @@ -271,22 +270,22 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "DEF-9C7", abcToken.address, 1e8, 99e6, 18); - let bindSequence = 3; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); let tx = await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); - - tx = await tokenHub.approveBind(abcToken.address, "DEF-9C7", {from: owner, value: 1e16}); + + tx = await tokenManager.approveBind(abcToken.address, "DEF-9C7", {from: owner, value: 1e16}); let nestedEventValues = (await truffleAssert.createTransactionResult(crossChain, tx.tx)).logs[0].args; decoded = verifyPrefixAndExtractSyncPackage(nestedEventValues.payload, 1e6); assert.equal(web3.utils.bytesToHex(decoded[0]), "0x02", "bind status should be incorrect parameters"); assert.equal(web3.utils.bytesToHex(decoded[1]), toBytes32Bep2Symbol("DEF-9C7"), "wrong bep2TokenSymbol"); - bindRequenst = await tokenHub.bindPackageRecord.call(toBytes32Bep2Symbol("DEF-9C7")); // symbol: ABC-9C7 + bindRequenst = await tokenManager.bindPackageRecord.call(toBytes32Bep2Symbol("DEF-9C7")); // symbol: ABC-9C7 assert.equal(bindRequenst.bep2TokenSymbol.toString(), "0x0000000000000000000000000000000000000000000000000000000000000000", "wrong bep2TokenSymbol"); }); it('Success bind', async () => { - const tokenHub = await TokenHub.deployed(); + const tokenManager = await TokenManager.deployed(); const abcToken = await ABCToken.deployed(); const crossChain = await CrossChain.deployed(); @@ -294,21 +293,25 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "ABC-9C7", abcToken.address, 1e8, 99e6, 18); - let bindSequence = 4; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); - let tx = await tokenHub.approveBind(abcToken.address, "ABC-9C7", {from: owner, value: 1e16}); + let tx = await tokenManager.approveBind(abcToken.address, "ABC-9C7", {from: owner, value: 1e16}); let nestedEventValues = (await truffleAssert.createTransactionResult(crossChain, tx.tx)).logs[0].args; decoded = verifyPrefixAndExtractSyncPackage(nestedEventValues.payload, 1e6); assert.equal(web3.utils.bytesToHex(decoded[0]), "0x", "bind status should be successful"); assert.equal(web3.utils.bytesToHex(decoded[1]), toBytes32Bep2Symbol("ABC-9C7"), "wrong bep2TokenSymbol"); + const tokenHub = await TokenHub.deployed(); const bep2Symbol = await tokenHub.getBoundBep2Symbol.call(abcToken.address); assert.equal(bep2Symbol, "ABC-9C7", "wrong symbol"); const contractAddr = await tokenHub.getBoundContract.call("ABC-9C7"); assert.equal(contractAddr, abcToken.address, "wrong contract addr"); + + let tokenManagerBalance = await web3.eth.getBalance(tokenManager.address); + assert.equal(tokenManagerBalance, "0", "tokenManager balance should be zero"); }); it('Relayer transfer from BC to BSC', async () => { const tokenHub = await TokenHub.deployed(); @@ -318,7 +321,7 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const transferInPackage = buildTransferInPackage("ABC-9C7", abcToken.address, 155e17, accounts[2], "0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"); - let transferInSequence = 0; + let transferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); let balance = await abcToken.balanceOf.call(accounts[2]); assert.equal(balance.toNumber(), 0, "wrong balance"); @@ -336,7 +339,7 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const transferInPackage = buildTransferInPackage("ABC-9C7", abcToken.address, 155e17, accounts[2], "0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"); - let transferInSequence = 1; + let transferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); await sleep(5 * 1000); @@ -365,7 +368,7 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const transferInPackage = buildTransferInPackage("BNB", "0x0000000000000000000000000000000000000000", 1e18, accounts[2], "0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"); - let transferInSequence = 2; + let transferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); const initBalance = await web3.eth.getBalance(accounts[2]); @@ -458,7 +461,7 @@ contract('TokenHub', (accounts) => { [refundAddr], //refund address 1]); //status - let refundSequence = 0; + let refundSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_OUT_CHANNELID); const amount = web3.utils.toBN(1e18); let balance = await abcToken.balanceOf.call(refundAddr); @@ -504,6 +507,7 @@ contract('TokenHub', (accounts) => { }); it('Bind malicious BEP2E token', async () => { const maliciousToken = await MaliciousToken.deployed(); + const tokenManager = await TokenManager.deployed(); const tokenHub = await TokenHub.deployed(); const crossChain = await CrossChain.deployed(); @@ -511,19 +515,19 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "MALICIOU-A09", maliciousToken.address, 1e8, 99e6, 18); - let bindSequence = 5; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); let tx = await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); assert.equal(tx.receipt.status, true, "failed transaction"); - await maliciousToken.approve(tokenHub.address, web3.utils.toBN('1000000000000000000000000'), {from: owner}); - await tokenHub.approveBind(maliciousToken.address, "MALICIOU-A09", {from: owner, value: 1e16}); + await maliciousToken.approve(tokenManager.address, web3.utils.toBN('1000000000000000000000000'), {from: owner}); + await tokenManager.approveBind(maliciousToken.address, "MALICIOU-A09", {from: owner, value: 1e16}); const bep2Symbol = await tokenHub.getBoundBep2Symbol.call(maliciousToken.address); assert.equal(bep2Symbol, "MALICIOU-A09", "wrong symbol"); const transferInPackage = buildTransferInPackage("MALICIOU-A09", maliciousToken.address, 155e17, accounts[2], "0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"); - let transferInSequence = 3; + let transferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); let balance = await maliciousToken.balanceOf.call(accounts[2]); assert.equal(balance.toNumber(), 0, "wrong balance"); @@ -532,7 +536,7 @@ contract('TokenHub', (accounts) => { assert.equal(tx.receipt.status, true, "failed transaction"); let newTransferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); - assert.equal(newTransferInSequence, transferInSequence+1, "wrong transferIn sequence"); + assert.equal(newTransferInSequence.toNumber(), transferInSequence.toNumber()+1, "wrong transferIn sequence"); packageBytesPrefix = Buffer.from(web3.utils.hexToBytes( "0x01" + @@ -544,13 +548,13 @@ contract('TokenHub', (accounts) => { ["0x000000000000000000000000000000000000000000000000000000174876E800"], //amount ["0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"], //refund address 1]); //refund address - let refundSequence = 1; + let refundSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_OUT_CHANNELID); tx = await crossChain.handlePackage(Buffer.concat([packageBytesPrefix, packageBytes]), proof, merkleHeight, refundSequence, TRANSFER_OUT_CHANNELID, {from: relayer}); assert.equal(tx.receipt.status, true, "failed transaction"); let newRefundSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_OUT_CHANNELID); - assert.equal(newRefundSequence, refundSequence+1, "wrong transferIn sequence"); + assert.equal(newRefundSequence.toNumber(), refundSequence.toNumber()+1, "wrong transferIn sequence"); }); it('Uint256 overflow in transferOut and batchTransferOutBNB', async () => { const tokenHub = await TokenHub.deployed(); @@ -605,7 +609,7 @@ contract('TokenHub', (accounts) => { [accounts[3], accounts[4]], Math.floor(Date.now() / 1000) ]); - let refundSequence = 2; + let refundSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_OUT_CHANNELID); await crossChain.handlePackage(Buffer.concat([packageBytesPrefix, packageBytes]), proof, merkleHeight, refundSequence, TRANSFER_OUT_CHANNELID, {from: relayer}); @@ -623,7 +627,7 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(1, "ABC-9C7", abcToken.address, 0, 0, 0); - let bindSequence = 6; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); let tx = await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); assert.equal(tx.receipt.status, true, "failed transaction"); @@ -635,7 +639,7 @@ contract('TokenHub', (accounts) => { const transferInPackage = buildTransferInPackage("ABC-9C7", abcToken.address, 1e18, accounts[2], "0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"); - let transferInSequence = 4; + let transferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); tx = await crossChain.handlePackage(transferInPackage, proof, merkleHeight, transferInSequence, TRANSFER_IN_CHANNELID, {from: relayer}); assert.equal(tx.receipt.status, true, "failed transaction"); @@ -652,7 +656,7 @@ contract('TokenHub', (accounts) => { [refundAddr], //refund address 1]); //refund address - let refundSequence = 3; + let refundSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_OUT_CHANNELID); let beforeRefundBalance = await abcToken.balanceOf.call(refundAddr); @@ -681,6 +685,7 @@ contract('TokenHub', (accounts) => { } }); it('bind and transfer miniToken', async () => { + const tokenManager = await TokenManager.deployed(); const tokenHub = await TokenHub.deployed(); const miniToken = await MiniToken.deployed(); const crossChain = await CrossChain.deployed(); @@ -689,12 +694,12 @@ contract('TokenHub', (accounts) => { const relayer = accounts[1]; const bindPackage = buildBindPackage(0, "XYZ-9C7M", miniToken.address, 1e4, 5e3, 18); - let bindSequence = 7; + let bindSequence = await crossChain.channelReceiveSequenceMap.call(BIND_CHANNEL_ID); await crossChain.handlePackage(bindPackage, proof, merkleHeight, bindSequence, BIND_CHANNEL_ID, {from: relayer}); - await miniToken.approve(tokenHub.address, web3.utils.toBN(1e18).mul(web3.utils.toBN(5e3)), {from: owner}); - let tx = await tokenHub.approveBind(miniToken.address, "XYZ-9C7M", {from: owner, value: 1e16}); + await miniToken.approve(tokenManager.address, web3.utils.toBN(1e18).mul(web3.utils.toBN(5e3)), {from: owner}); + let tx = await tokenManager.approveBind(miniToken.address, "XYZ-9C7M", {from: owner, value: 1e16}); let nestedEventValues = (await truffleAssert.createTransactionResult(crossChain, tx.tx)).logs[0].args; decoded = verifyPrefixAndExtractSyncPackage(nestedEventValues.payload, 1e6); @@ -729,7 +734,7 @@ contract('TokenHub', (accounts) => { amount = web3.utils.toBN(1e18); const transferInPackage = buildTransferInPackage("XYZ-9C7M", miniToken.address, amount, accounts[2], "0x35d9d41a13d6c2e01c9b1e242baf2df98e7e8c48"); - let transferInSequence = 5; + let transferInSequence = await crossChain.channelReceiveSequenceMap.call(TRANSFER_IN_CHANNELID); const initBalance = await miniToken.balanceOf.call(accounts[2]); await crossChain.handlePackage(transferInPackage, proof, merkleHeight, transferInSequence, TRANSFER_IN_CHANNELID, {from: relayer}); diff --git a/test/ToolTest.js b/test/ToolTest.js index 994c1551..9bcd161e 100644 --- a/test/ToolTest.js +++ b/test/ToolTest.js @@ -1,9 +1,19 @@ const BSCValidatorSetTool = artifacts.require("tool/BSCValidatorSetTool"); +const Web3 = require('web3'); +const web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545')); contract('Tool', (accounts) => { it('tool test', async () => { const toolInstance = await BSCValidatorSetTool.deployed(); await toolInstance.init(); }); + + it('decode payload header', async () => { + let payload = "0x00000000000000000000000000000000000000000000000000002386f26fc10000f85580a04142432d304237000000000000000000000000000000000000000000000000009450ee0de39df3b9c2bc8f8e33d9e4cd03dba9210c8b52b7d2dcc80cd2e40000008b31a17e847807b1bc00000012845f5efcc1" + const toolInstance = await BSCValidatorSetTool.deployed(); + let x = await toolInstance.decodePayloadHeader.call(web3.utils.hexToBytes(payload)); + assert.equal(x[2].toString(), "10000000000000000"); + }); + });