UNPKG

test-contracts-sovryn

Version:

Smart contracts for the Sovryn protocol and external integrations.

1,660 lines 121 kB
{ "_format": "hh-sol-artifact-1", "contractName": "StakingMockup", "sourceName": "contracts/mockup/StakingMockup.sol", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "admin", "type": "address" } ], "name": "AdminAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "admin", "type": "address" } ], "name": "AdminRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "hash", "type": "bytes32" } ], "name": "ContractCodeHashAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "hash", "type": "bytes32" } ], "name": "ContractCodeHashRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "delegator", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "lockedUntil", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address" }, { "indexed": true, "internalType": "address", "name": "toDelegate", "type": "address" } ], "name": "DelegateChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "lockedUntil", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } ], "name": "DelegateStakeChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "previousDate", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newDate", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountStaked", "type": "uint256" } ], "name": "ExtendedStakingDuration", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "until", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "isGovernance", "type": "bool" } ], "name": "StakingWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "staker", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "lockedUntil", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "totalStaked", "type": "uint256" } ], "name": "TokensStaked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "TokensUnlocked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "vesting", "type": "address" }, { "indexed": false, "internalType": "address", "name": "receiver", "type": "address" } ], "name": "VestingTokensWithdrawn", "type": "event" }, { "constant": true, "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MAX_DURATION", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "MAX_VOTING_WEIGHT", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint96", "name": "_priorTotalVotingPower", "type": "uint96" } ], "name": "MOCK_priorTotalVotingPower", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint96", "name": "_priorWeightedStake", "type": "uint96" } ], "name": "MOCK_priorWeightedStake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "SOVToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "WEIGHT_FACTOR", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_admin", "type": "address" } ], "name": "addAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "admins", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "allUnlocked", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint96", "name": "balance", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf_MultipliedByTwo", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "date", "type": "uint256" } ], "name": "calculatePriorWeightedStake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "date", "type": "uint256" }, { "internalType": "uint256", "name": "startDate", "type": "uint256" } ], "name": "computeWeightByDate", "outputs": [ { "internalType": "uint96", "name": "weight", "type": "uint96" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "delegatee", "type": "address" }, { "internalType": "uint256", "name": "lockDate", "type": "uint256" } ], "name": "delegate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "delegatee", "type": "address" }, { "internalType": "uint256", "name": "lockDate", "type": "uint256" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint32", "name": "", "type": "uint32" } ], "name": "delegateStakingCheckpoints", "outputs": [ { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, { "internalType": "uint96", "name": "stake", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "delegates", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "previousLock", "type": "uint256" }, { "internalType": "uint256", "name": "until", "type": "uint256" } ], "name": "extendStakingDuration", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "feeSharing", "outputs": [ { "internalType": "contract IFeeSharingProxy", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "lockedTS", "type": "uint256" } ], "name": "getCurrentStakedUntil", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "getCurrentVotes", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "date", "type": "uint256" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } ], "name": "getPriorStakeByDateForDelegatee", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "date", "type": "uint256" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } ], "name": "getPriorTotalStakesForDate", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint32", "name": "blockNumber", "type": "uint32" }, { "internalType": "uint256", "name": "time", "type": "uint256" } ], "name": "getPriorTotalVotingPower", "outputs": [ { "internalType": "uint96", "name": "totalVotingPower", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "date", "type": "uint256" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } ], "name": "getPriorUserStakeByDate", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "date", "type": "uint256" } ], "name": "getPriorVotes", "outputs": [ { "internalType": "uint96", "name": "votes", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "date", "type": "uint256" } ], "name": "getPriorWeightedStake", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "getStakes", "outputs": [ { "internalType": "uint256[]", "name": "dates", "type": "uint256[]" }, { "internalType": "uint96[]", "name": "stakes", "type": "uint96[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint96", "name": "amount", "type": "uint96" }, { "internalType": "uint256", "name": "until", "type": "uint256" } ], "name": "getWithdrawAmounts", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" }, { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint96", "name": "amount", "type": "uint96" }, { "internalType": "uint256", "name": "until", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "governanceWithdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "vesting", "type": "address" }, { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "governanceWithdrawVesting", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "kickoffTS", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "migrateToNewStakingContract", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "newStakingContract", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "nonces", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "numDelegateStakingCheckpoints", "outputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "numTotalStakingCheckpoints", "outputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "numUserStakingCheckpoints", "outputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_sender", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "receiveApproval", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_admin", "type": "address" } ], "name": "removeAdmin", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "delegatee", "type": "address" }, { "internalType": "uint256", "name": "lockedTS", "type": "uint256" }, { "internalType": "uint96", "name": "value", "type": "uint96" } ], "name": "setDelegateStake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_feeSharing", "type": "address" } ], "name": "setFeeSharing", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_newStakingContract", "type": "address" } ], "name": "setNewStakingContract", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_vestingRegistryProxy", "type": "address" } ], "name": "setVestingRegistry", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint96", "name": "_weightScaling", "type": "uint96" } ], "name": "setWeightScaling", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint96", "name": "amount", "type": "uint96" }, { "internalType": "uint256", "name": "until", "type": "uint256" }, { "internalType": "address", "name": "stakeFor", "type": "address" }, { "internalType": "address", "name": "delegatee", "type": "address" } ], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "uint96", "name": "amount", "type": "uint96" }, { "internalType": "uint256", "name": "until", "type": "uint256" }, { "internalType": "address", "name": "stakeFor", "type": "address" }, { "internalType": "address", "name": "delegatee", "type": "address" } ], "name": "stakeWithApproval", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "cliff", "type": "uint256" }, { "internalType": "uint256", "name": "duration", "type": "uint256" }, { "internalType": "uint256", "name": "intervalLength", "type": "uint256" }, { "internalType": "address", "name": "stakeFor", "type": "address" }, { "internalType": "address", "name": "delegatee", "type": "address" } ], "name": "stakesBySchedule", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "timestamp", "type": "uint256" } ], "name": "timestampToLockDate", "outputs": [ { "internalType": "uint256", "name": "lockDate", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint32", "name": "", "type": "uint32" } ], "name": "totalStakingCheckpoints", "outputs": [ { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, { "internalType": "uint96", "name": "stake", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "unlockAllTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint32", "name": "", "type": "uint32" } ], "name": "userStakingCheckpoints", "outputs": [ { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, { "internalType": "uint96", "name": "stake", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "name": "vestingCodeHashes", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "vestingRegistryLogic", "outputs": [ { "internalType": "contract VestingRegistryLogic", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "vestingWhitelist", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "weightScaling", "outputs": [ { "internalType": "uint96", "name": "", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "date", "type": "uint256" }, { "internalType": "uint256", "name": "startDate", "type": "uint256" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } ], "name": "weightedStakeByDate", "outputs": [ { "internalType": "uint96", "name": "power", "type": "uint96" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint96", "name": "amount", "type": "uint96" }, { "internalType": "uint256", "name": "until", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x60c0604052600a608081905269534f565374616b696e6760b01b60a09081526200002d9160029190620000ae565b506005805460ff19169055600d80546001600160a01b0316600360a01b179055600062000059620000a9565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35062000150565b335b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620000f157805160ff191683800117855562000121565b8280016001018555821562000121579182015b828111156200012157825182559160200191906001019062000104565b506200012f92915062000133565b5090565b620000ab91905b808211156200012f57600081556001016200013a565b61529380620001606000396000f3fe608060405234801561001057600080fd5b50600436106103c45760003560e01c8063800b64ca116101ff578063b8a987321161011a578063dfb267c2116100ad578063eefb8c471161007c578063eefb8c4714610d9e578063f09cfc6414610dc1578063f2fde38b14610de4578063fbbb8ec614610e0a576103c4565b8063dfb267c214610cee578063e63a562e14610d17578063e7a324dc14610d64578063e97ffacb14610d6c576103c4565b8063d5c38464116100e9578063d5c3846414610c44578063dab6ca4414610c61578063daeaf2f214610c9c578063db27ec1814610cc2576103c4565b8063b8a9873214610bdc578063bf626ec114610c02578063cf7b684a14610c0a578063d27569e714610c3c576103c4565b806396a590c111610192578063adae900211610161578063adae900214610b80578063ae81dfe414610ba6578063b1724b4614610bae578063b4b5ea5714610bb6576103c4565b806396a590c114610af85780639929e88614610b4a5780639a377b8214610b52578063a58848c514610b78576103c4565b80638f32d59b116101ce5780638f32d59b14610a015780638f4ffcb114610a095780639436e7d414610a9657806394c2ce5814610acc576103c4565b8063800b64ca14610954578063836eebee1461098f5780638da5cb5b146109c15780638dae1b16146109c9576103c4565b80633827fca5116102ef57806362cf8a081161028257806370a082311161025157806370a082311461082c57806372ec9795146108525780637ba6f4581461086f5780637ecebe001461092e576103c4565b806362cf8a081461074b57806368cefccc1461076e5780636b6fde0e146107ce5780637048027514610806576103c4565b80634b2fea1e116102be5780634b2fea1e146106cf5780635419675f146107155780635e0be6071461071d578063626ee2d914610725576103c4565b80633827fca514610623578063429b62e514610651578063450b060114610677578063472f88f71461069d576103c4565b806317748adc1161036757806325629ec01161033657806325629ec01461055c57806327dd1b001461059f57806332e9f250146105cb57806337e6b1c1146105f1576103c4565b806317748adc146104e15780631785f53c1461050557806320606b701461052b5780632522d7ba14610533576103c4565b806303a18fa3116103a357806303a18fa31461043757806307392cc01461045b5780630c09ddfd1461048c578063104932cf146104d9576103c4565b8062073f99146103c95780630130f0bf146103e3578063026e402b1461040b575b600080fd5b6103d1610e45565b60408051918252519081900360200190f35b610409600480360360208110156103f957600080fd5b50356001600160601b0316610e4b565b005b6104096004803603604081101561042157600080fd5b506001600160a01b038135169060200135610e72565b61043f610e8c565b604080516001600160a01b039092168252519081900360200190f35b6104786004803603602081101561047157600080fd5b5035610e9b565b604080519115158252519081900360200190f35b610409600480360360a08110156104a257600080fd5b506001600160a01b0381358116916001600160601b0360208201351691604082013591606081013582169160809091013516610eb0565b61043f610f09565b6104e9610f18565b604080516001600160601b039092168252519081900360200190f35b6104096004803603602081101561051b57600080fd5b50356001600160a01b0316610f1d565b6103d1610fbd565b6104e96004803603604081101561054957600080fd5b5063ffffffff8135169060200135610fd8565b6104096004803603608081101561057257600080fd5b506001600160601b03813516906020810135906001600160a01b036040820135811691606001351661101e565b61043f600480360360408110156105b557600080fd5b506001600160a01b038135169060200135611033565b6103d1600480360360208110156105e157600080fd5b50356001600160a01b0316611059565b6104e96004803603606081101561060757600080fd5b506001600160a01b038135169060208101359060400135611077565b6104096004803603604081101561063957600080fd5b506001600160a01b03813581169160200135166110b1565b6104786004803603602081101561066757600080fd5b50356001600160a01b03166111ee565b6104096004803603602081101561068d57600080fd5b50356001600160a01b0316611203565b610409600480360360608110156106b357600080fd5b506001600160a01b0381351690602081013590604001356112c8565b610409600480360360c08110156106e557600080fd5b508035906020810135906040810135906060810135906001600160a01b03608082013581169160a00135166112d3565b610409611372565b6104096113c0565b6104096004803603602081101561073b57600080fd5b50356001600160a01b03166114be565b6104e96004803603604081101561076157600080fd5b508035906020013561156d565b6107a66004803603606081101561078457600080fd5b5080356001600160a01b0316906020810135906040013563ffffffff166116e6565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6107a6600480360360608110156107e457600080fd5b5080356001600160a01b0316906020810135906040013563ffffffff16611721565b6104096004803603602081101561081c57600080fd5b50356001600160a01b031661175c565b6104e96004803603602081101561084257600080fd5b50356001600160a01b03166117ff565b6103d16004803603602081101561086857600080fd5b503561186e565b6108956004803603602081101561088557600080fd5b50356001600160a01b03166118d8565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156108d95781810151838201526020016108c1565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610918578181015183820152602001610900565b5050505090500194505050505060405180910390f35b6103d16004803603602081101561094457600080fd5b50356001600160a01b0316611a13565b6104096004803603606081101561096a57600080fd5b5080356001600160601b031690602081013590604001356001600160a01b0316611a25565b6104e9600480360360608110156109a557600080fd5b506001600160a01b038135169060208101359060400135611a97565b61043f611af9565b6104e9600480360360808110156109df57600080fd5b506001600160a01b038135169060208101359060408101359060600135611b08565b610478611b8a565b61040960048036036080811015610a1f57600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b811115610a5857600080fd5b820183602082011115610a6a57600080fd5b803590602001918460018302840111600160201b83111715610a8b57600080fd5b509092509050611bae565b610ab360048036036020811015610aac57600080fd5b5035611e80565b6040805163ffffffff9092168252519081900360200190f35b610ab360048036036040811015610ae257600080fd5b506001600160a01b038135169060200135611e98565b610b2460048036036040811015610b0e57600080fd5b506001600160601b038135169060200135611ebb565b604080516001600160601b03938416815291909216602082015281519081900390910190f35b610478611ee0565b61040960048036036020811015610b6857600080fd5b50356001600160a01b0316611ee9565b61043f611f9e565b61047860048036036020811015610b9657600080fd5b50356001600160a01b0316611fad565b61043f611fc2565b6103d1611fd6565b6104e960048036036020811015610bcc57600080fd5b50356001600160a01b0316611fde565b61040960048036036020811015610bf257600080fd5b50356001600160601b0316611fee565b6104e96120bd565b6104e960048036036060811015610c2057600080fd5b506001600160a01b0381351690602081013590604001356120d3565b6104e961210d565b6104e960048036036020811015610c5a57600080fd5b5035612112565b61040960048036036060811015610c7757600080fd5b5080356001600160601b031690602081013590604001356001600160a01b031661216e565b61040960048036036020811015610cb257600080fd5b50356001600160601b0316612188565b610ab360048036036040811015610cd857600080fd5b506001600160a01b0381351690602001356121b0565b6107a660048036036040811015610d0457600080fd5b508035906020013563ffffffff166121d3565b610409600480360360e0811015610d2d57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060ff6080820135169060a08101359060c00135612208565b6103d16124de565b6104e960048036036060811015610d8257600080fd5b506001600160a01b0381351690602081013590604001356124f9565b61040960048036036040811015610db457600080fd5b5080359060200135612761565b6104e960048036036040811015610dd757600080fd5b5080359060200135612949565b61040960048036036020811015610dfa57600080fd5b50356001600160a01b0316612b41565b61040960048036036060811015610e2057600080fd5b5080356001600160a01b031690602081013590604001356001600160601b0316612b95565b60015481565b601280546bffffffffffffffffffffffff19166001600160601b0392909216919091179055565b610e7d338383612c03565b610e88338383612cb5565b5050565b600d546001600160a01b031681565b60106020526000908152604090205460ff1681565b333014610ef3576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b610f0285858585856000612de2565b5050505050565b6011546001600160a01b031681565b600981565b610f25611b8a565b610f65576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166000818152600f6020908152604091829020805460ff19169055815192835290517fa3b62bc36326052d97ea62d63c3d60308ed4c3ea8ac079dd8499f1e9c4f80c0f9281900390910190a150565b604051806043614e5b82396043019050604051809103902081565b601154600090600160a01b90046001600160601b031661100157610ffc8383612ffe565b611015565b601154600160a01b90046001600160601b03165b90505b92915050565b61102d33858585856000612de2565b50505050565b60046020908152600092835260408084209091529082529020546001600160a01b031681565b6000611064826117ff565b6002026001600160601b03169050919050565b6012546000906001600160601b031661109a57611095848484613064565b6110a7565b6012546001600160601b03165b90505b9392505050565b6110b9611b8a565b806110d35750336000908152600f602052604090205460ff165b611113576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b038083166000818152600e6020526040808220805460ff191660011790558051633c7925e360e11b815293851660048501525191926378f24bc6926024808301939282900301818387803b15801561117157600080fd5b505af1158015611185573d6000803e3d6000fd5b5050506001600160a01b038084166000818152600e6020908152604091829020805460ff1916905581519283529285169282019290925281517f2366e0b6b1af17c0ceed50685c570d519cae11e7faaf007bbe667e94a5ee3cd593509081900390910190a15050565b600f6020526000908152604090205460ff1681565b61120b611b8a565b61124b576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166112a6576040805162461bcd60e51b815260206004820181905260248201527f76657374696e67207265676973747279206164647265737320696e76616c6964604482015290519081900360640190fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b61102d838383613064565b60006112e086420161186e565b905063059fa6008511156112f65763059fa60094505b600061130386420161186e565b90506000858383038161131257fe5b0460010190506000818a8161132357fe5b0490506001821061134457611344336001840383028c038689896001612de2565b8387015b8381116113655761135e3383838a8a6001612de2565b8701611348565b5050505050505050505050565b60055461010090046001600160a01b03166113be5760405162461bcd60e51b81526004018080602001828103825260248152602001806149a06024913960400191505060405180910390fd5b565b6113c8611b8a565b611408576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6005805460ff19166001179055600354604080516370a0823160e01b815230600482015290517fd8cc4e8d808fe950b07bfffcd83eebf1190cd35ea77fe0c8a7d75a6e9b90e5c1926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d60208110156114a957600080fd5b505160408051918252519081900360200190a1565b6114c6611b8a565b611506576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b03811661154b5760405162461bcd60e51b81526004018080602001828103825260218152602001806151276021913960400191505060405180910390fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000818310156115ae5760405162461bcd60e51b815260040180806020018281038252604c815260200180614ddb604c913960600191505060405180910390fd5b81830363059fa6008111156115f45760405162461bcd60e51b815260040180806020018281038252604d815260200180614e9e604d913960600191505060405180910390fd5b6000620151808263059fa600036001600160601b03168161161157fe5b0490506116dd600a621232106001600160601b0316611691600a600902611673621232108788026040518060400160405280601f81526020017f756e646572666c6f77206f6e207765696768742063616c63756c6174696f6e008152506130d2565b6040518060600160405280602d8152602001614c65602d913961317c565b6001600160601b0316816116a157fe5b046040518060400160405280601e81526020017f6f766572666c6f77206f6e2077656967687420636f6d7075746174696f6e0000815250613208565b95945050505050565b600a60209081526000938452604080852082529284528284209052825290205463ffffffff811690600160201b90046001600160601b031682565b600860209081526000938452604080852082529284528284209052825290205463ffffffff811690600160201b90046001600160601b031682565b611764611b8a565b6117a4576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166000818152600f6020908152604091829020805460ff19166001179055815192835290517f44d6d25963f097ad14f29f06854a01f575648a1ef82f30e562ccd3889717e3399281900390910190a150565b6001546000905b63059fa600420181116118685761185c826118218584613269565b6040518060400160405280601c81526020017f5374616b696e673a3a62616c616e63654f663a206f766572666c6f7700000000815250613208565b91506212750001611806565b50919050565b60006001548210156118b15760405162461bcd60e51b815260040180806020018281038252604d815260200180614beb604d913960600191505060405180910390fd5b6000621275006001548403816118c357fe5b04905060015462127500820201915050919050565b60608060006118ec63059fa600420161186e565b60015490915060009062127500015b82811161192e57600061190e8783613269565b6001600160601b03161115611924576001909101905b62127500016118fb565b5080604051908082528060200260200182016040528015611959578160200160208202803883390190505b50935080604051908082528060200260200182016040528015611986578160200160208202803883390190505b5060015490935060009062127500015b838111611a0a5760006119a98883613269565b90506001600160601b038116156119ff57818784815181106119c757fe5b602002602001018181525050808684815181106119e057fe5b6001600160601b03909216602092830291909101909101526001909201915b506212750001611996565b50505050915091565b600c6020526000908152604090205481565b336000908152600e602052604090205460ff16611a78576040805162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b611a8583838360016132ca565b611a928383836001613616565b505050565b600080611aa38361186e565b905063059fa6008101815b818111611aef57611ae384611ac58984878b613678565b6040518060800160405280604a8152602001614d91604a9139613208565b93506212750001611aae565b5050509392505050565b6000546001600160a01b0316905