UNPKG

@ensuro/core

Version:

Ensuro - Decentralized insurance protocol

1,566 lines 133 kB
{ "_format": "hh-sol-artifact-1", "contractName": "FullSignedBucketRiskModule", "sourceName": "contracts/FullSignedBucketRiskModule.sol", "abi": [ { "inputs": [ { "internalType": "contract IPolicyPool", "name": "policyPool_", "type": "address" }, { "internalType": "contract IPremiumsAccount", "name": "premiumsAccount_", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "BucketCannotBeZero", "type": "error" }, { "inputs": [], "name": "BucketNotFound", "type": "error" }, { "inputs": [], "name": "ExposureLimitCannotBeLessThanActiveExposure", "type": "error" }, { "inputs": [], "name": "NoZeroPolicyPool", "type": "error" }, { "inputs": [], "name": "NoZeroWallet", "type": "error" }, { "inputs": [], "name": "OnlyPolicyPool", "type": "error" }, { "inputs": [], "name": "PremiumsAccountMustBePartOfThePool", "type": "error" }, { "inputs": [], "name": "QuoteExpired", "type": "error" }, { "inputs": [], "name": "UpgradeCannotChangePolicyPool", "type": "error" }, { "inputs": [], "name": "UpgradeCannotChangePremiumsAccount", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "previousAdmin", "type": "address" }, { "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" } ], "name": "AdminChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "beacon", "type": "address" } ], "name": "BeaconUpgraded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "bucketId", "type": "uint256" } ], "name": "BucketDeleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "enum IAccessManager.GovernanceActions", "name": "action", "type": "uint8" }, { "indexed": false, "internalType": "address", "name": "value", "type": "address" } ], "name": "ComponentChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "enum IAccessManager.GovernanceActions", "name": "action", "type": "uint8" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "GovernanceAction", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "bucketId", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "moc", "type": "uint256" }, { "internalType": "uint256", "name": "jrCollRatio", "type": "uint256" }, { "internalType": "uint256", "name": "collRatio", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroPpFee", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCocFee", "type": "uint256" }, { "internalType": "uint256", "name": "jrRoc", "type": "uint256" }, { "internalType": "uint256", "name": "srRoc", "type": "uint256" } ], "indexed": false, "internalType": "struct IRiskModule.Params", "name": "params", "type": "tuple" } ], "name": "NewBucket", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "policyId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "policyData", "type": "bytes32" } ], "name": "NewSignedPolicy", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "implementation", "type": "address" } ], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "activeExposure", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bucketId", "type": "uint256" } ], "name": "bucketParams", "outputs": [ { "components": [ { "internalType": "uint256", "name": "moc", "type": "uint256" }, { "internalType": "uint256", "name": "jrCollRatio", "type": "uint256" }, { "internalType": "uint256", "name": "collRatio", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroPpFee", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCocFee", "type": "uint256" }, { "internalType": "uint256", "name": "jrRoc", "type": "uint256" }, { "internalType": "uint256", "name": "srRoc", "type": "uint256" } ], "internalType": "struct IRiskModule.Params", "name": "params_", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currency", "outputs": [ { "internalType": "contract IERC20Metadata", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bucketId", "type": "uint256" } ], "name": "deleteBucket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "exposureLimit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "name": "getMinimumPremium", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" }, { "internalType": "uint256", "name": "bucketId", "type": "uint256" } ], "name": "getMinimumPremiumForBucket", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" }, { "components": [ { "internalType": "uint16", "name": "moc", "type": "uint16" }, { "internalType": "uint16", "name": "jrCollRatio", "type": "uint16" }, { "internalType": "uint16", "name": "collRatio", "type": "uint16" }, { "internalType": "uint16", "name": "ensuroPpFee", "type": "uint16" }, { "internalType": "uint16", "name": "ensuroCocFee", "type": "uint16" }, { "internalType": "uint16", "name": "jrRoc", "type": "uint16" }, { "internalType": "uint16", "name": "srRoc", "type": "uint16" }, { "internalType": "uint32", "name": "maxPayoutPerPolicy", "type": "uint32" }, { "internalType": "uint32", "name": "exposureLimit", "type": "uint32" }, { "internalType": "uint16", "name": "maxDuration", "type": "uint16" } ], "internalType": "struct RiskModule.PackedParams", "name": "params", "type": "tuple" } ], "name": "getMinimumPremiumFullParams", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "name_", "type": "string" }, { "internalType": "uint256", "name": "collRatio_", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroPpFee_", "type": "uint256" }, { "internalType": "uint256", "name": "srRoc_", "type": "uint256" }, { "internalType": "uint256", "name": "maxPayoutPerPolicy_", "type": "uint256" }, { "internalType": "uint256", "name": "exposureLimit_", "type": "uint256" }, { "internalType": "address", "name": "wallet_", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "maxDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxPayoutPerPolicy", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" }, { "internalType": "address", "name": "onBehalfOf", "type": "address" }, { "internalType": "bytes32", "name": "policyData", "type": "bytes32" }, { "internalType": "uint256", "name": "bucketId", "type": "uint256" }, { "internalType": "bytes32", "name": "quoteSignatureR", "type": "bytes32" }, { "internalType": "bytes32", "name": "quoteSignatureVS", "type": "bytes32" }, { "internalType": "uint40", "name": "quoteValidUntil", "type": "uint40" } ], "name": "newPolicy", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" }, { "internalType": "address", "name": "onBehalfOf", "type": "address" }, { "internalType": "bytes32", "name": "policyData", "type": "bytes32" }, { "components": [ { "internalType": "uint16", "name": "moc", "type": "uint16" }, { "internalType": "uint16", "name": "jrCollRatio", "type": "uint16" }, { "internalType": "uint16", "name": "collRatio", "type": "uint16" }, { "internalType": "uint16", "name": "ensuroPpFee", "type": "uint16" }, { "internalType": "uint16", "name": "ensuroCocFee", "type": "uint16" }, { "internalType": "uint16", "name": "jrRoc", "type": "uint16" }, { "internalType": "uint16", "name": "srRoc", "type": "uint16" }, { "internalType": "uint32", "name": "maxPayoutPerPolicy", "type": "uint32" }, { "internalType": "uint32", "name": "exposureLimit", "type": "uint32" }, { "internalType": "uint16", "name": "maxDuration", "type": "uint16" } ], "internalType": "struct RiskModule.PackedParams", "name": "params", "type": "tuple" }, { "internalType": "bytes32", "name": "quoteSignatureR", "type": "bytes32" }, { "internalType": "bytes32", "name": "quoteSignatureVS", "type": "bytes32" }, { "internalType": "uint40", "name": "quoteValidUntil", "type": "uint40" } ], "name": "newPolicyFullParams", "outputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "createdPolicy", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "params", "outputs": [ { "components": [ { "internalType": "uint256", "name": "moc", "type": "uint256" }, { "internalType": "uint256", "name": "jrCollRatio", "type": "uint256" }, { "internalType": "uint256", "name": "collRatio", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroPpFee", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCocFee", "type": "uint256" }, { "internalType": "uint256", "name": "jrRoc", "type": "uint256" }, { "internalType": "uint256", "name": "srRoc", "type": "uint256" } ], "internalType": "struct IRiskModule.Params", "name": "ret", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "policyPool", "outputs": [ { "internalType": "contract IPolicyPool", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "premiumsAccount", "outputs": [ { "internalType": "contract IPremiumsAccount", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "payout", "type": "uint256" } ], "name": "releaseExposure", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "oldPolicy", "type": "tuple" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" }, { "internalType": "bytes32", "name": "policyData", "type": "bytes32" }, { "internalType": "uint256", "name": "bucketId", "type": "uint256" }, { "internalType": "bytes32", "name": "quoteSignatureR", "type": "bytes32" }, { "internalType": "bytes32", "name": "quoteSignatureVS", "type": "bytes32" }, { "internalType": "uint40", "name": "quoteValidUntil", "type": "uint40" } ], "name": "replacePolicy", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "oldPolicy", "type": "tuple" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" }, { "internalType": "bytes32", "name": "policyData", "type": "bytes32" }, { "components": [ { "internalType": "uint16", "name": "moc", "type": "uint16" }, { "internalType": "uint16", "name": "jrCollRatio", "type": "uint16" }, { "internalType": "uint16", "name": "collRatio", "type": "uint16" }, { "internalType": "uint16", "name": "ensuroPpFee", "type": "uint16" }, { "internalType": "uint16", "name": "ensuroCocFee", "type": "uint16" }, { "internalType": "uint16", "name": "jrRoc", "type": "uint16" }, { "internalType": "uint16", "name": "srRoc", "type": "uint16" }, { "internalType": "uint32", "name": "maxPayoutPerPolicy", "type": "uint32" }, { "internalType": "uint32", "name": "exposureLimit", "type": "uint32" }, { "internalType": "uint16", "name": "maxDuration", "type": "uint16" } ], "internalType": "struct RiskModule.PackedParams", "name": "params", "type": "tuple" }, { "internalType": "bytes32", "name": "quoteSignatureR", "type": "bytes32" }, { "internalType": "bytes32", "name": "quoteSignatureVS", "type": "bytes32" }, { "internalType": "uint40", "name": "quoteValidUntil", "type": "uint40" } ], "name": "replacePolicyFullParams", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "payout", "type": "uint256" }, { "internalType": "uint256", "name": "premium", "type": "uint256" }, { "internalType": "uint256", "name": "jrScr", "type": "uint256" }, { "internalType": "uint256", "name": "srScr", "type": "uint256" }, { "internalType": "uint256", "name": "lossProb", "type": "uint256" }, { "internalType": "uint256", "name": "purePremium", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCommission", "type": "uint256" }, { "internalType": "uint256", "name": "partnerCommission", "type": "uint256" }, { "internalType": "uint256", "name": "jrCoc", "type": "uint256" }, { "internalType": "uint256", "name": "srCoc", "type": "uint256" }, { "internalType": "contract IRiskModule", "name": "riskModule", "type": "address" }, { "internalType": "uint40", "name": "start", "type": "uint40" }, { "internalType": "uint40", "name": "expiration", "type": "uint40" } ], "internalType": "struct Policy.PolicyData", "name": "policy", "type": "tuple" }, { "internalType": "uint256", "name": "payout", "type": "uint256" } ], "name": "resolvePolicy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "bucketId", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "moc", "type": "uint256" }, { "internalType": "uint256", "name": "jrCollRatio", "type": "uint256" }, { "internalType": "uint256", "name": "collRatio", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroPpFee", "type": "uint256" }, { "internalType": "uint256", "name": "ensuroCocFee", "type": "uint256" }, { "internalType": "uint256", "name": "jrRoc", "type": "uint256" }, { "internalType": "uint256", "name": "srRoc", "type": "uint256" } ], "internalType": "struct IRiskModule.Params", "name": "params_", "type": "tuple" } ], "name": "setBucketParams", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "enum IRiskModule.Parameter", "name": "param", "type": "uint8" }, { "internalType": "uint256", "name": "newValue", "type": "uint256" } ], "name": "setParam", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "wallet_", "type": "address" } ], "name": "setWallet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newImplementation", "type": "address" } ], "name": "upgradeTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "wallet", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "bytecode": "0x60e060405230608052348015610013575f5ffd5b50604051615f20380380615f20833981016040819052610032916101fc565b81818181816001600160a01b03811661005e57604051636b23cf0160e01b815260040160405180910390fd5b610066610129565b806001600160a01b031660a0816001600160a01b03168152505050816001600160a01b0316816001600160a01b0316634d15eb036040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100eb9190610234565b6001600160a01b0316146101125760405163fec343d560e01b815260040160405180910390fd5b6001600160a01b031660c052506102569350505050565b5f54610100900460ff16156101945760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff908116146101e3575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101f9575f5ffd5b50565b5f5f6040838503121561020d575f5ffd5b8251610218816101e5565b6020840151909250610229816101e5565b809150509250929050565b5f60208284031215610244575f5ffd5b815161024f816101e5565b9392505050565b60805160a05160c051615bc06103605f395f81816103e00152613ba701525f81816102c3015281816107000152818161098f01528181610aa501528181610d6f015281816110d60152818161127a01528181611399015281816114930152818161152801528181611652015281816117a801528181611947015281816120130152818161214301528181612227015281816125f3015281816129d301528181612a7001528181612b2301528181612cf201528181613228015281816135e50152818161368201528181613728015281816138d5015281816139f2015261442e01525f8181610882015281816108cb01528181610bcc01528181610c0c0152610c990152615bc05ff3fe6080604052600436106101db575f3560e01c8063766dbc56116100fd578063b9b28f2a11610092578063cfd4c60611610062578063cfd4c606146105b9578063cff0ab96146105cd578063deaa59df146105e1578063e5a6b10f14610600575f5ffd5b8063b9b28f2a146104e8578063c1cca2b314610507578063ceddac6f14610526578063cf19171e1461059a575f5ffd5b80638456cb59116100cd5780638456cb591461047557806385272a6e146104895780638bac3a241461049d5780639014d171146104bc575f5ffd5b8063766dbc56146104045780637a702b3c146104235780637ff8bf251461044257806382ff9c8c14610456575f5ffd5b8063521eb273116101735780636a448ef1116101435780636a448ef1146103755780636db5c8fd146103945780636f0dbe6f146103b357806373a952e8146103d2575f5ffd5b8063521eb2731461030e57806352d1902d1461032b578063571e8bcc1461033f5780635c975abb1461035e575f5ffd5b80633f4ba83a116101ae5780633f4ba83a146102745780633f961587146102885780634d15eb03146102b55780634f1ef286146102fb575f5ffd5b806301ffc9a7146101df57806306fdde031461021357806318e26bb9146102345780633659cfe614610255575b5f5ffd5b3480156101ea575f5ffd5b506101fe6101f9366004614b62565b610614565b60405190151581526020015b60405180910390f35b34801561021e575f5ffd5b5061022761063f565b60405161020a9190614b89565b34801561023f575f5ffd5b5061025361024e366004614bbe565b6106cf565b005b348015610260575f5ffd5b5061025361026f366004614be9565b610878565b34801561027f575f5ffd5b5061025361095e565b348015610293575f5ffd5b506102a76102a2366004614d5a565b610a79565b60405190815260200161020a565b3480156102c0575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161020a565b610253610309366004614e64565b610bc2565b348015610319575f5ffd5b5060fe546001600160a01b03166102e3565b348015610336575f5ffd5b506102a7610c8d565b34801561034a575f5ffd5b50610253610359366004614ec4565b610d3e565b348015610369575f5ffd5b5060975460ff166101fe565b348015610380575f5ffd5b5061025361038f366004614bbe565b6110d3565b34801561039f575f5ffd5b5060fc54600160b01b900461ffff166102a7565b3480156103be575f5ffd5b506102536103cd366004614efa565b611135565b3480156103dd575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000006102e3565b34801561040f575f5ffd5b506102a761041e366004614f89565b61124e565b34801561042e575f5ffd5b5061025361043d366004614ffd565b611376565b34801561044d575f5ffd5b5060fd546102a7565b348015610461575f5ffd5b506102a7610470366004615028565b6114fc565b348015610480575f5ffd5b5061025361162f565b348015610494575f5ffd5b506102a7611736565b3480156104a8575f5ffd5b506102a76104b73660046150a2565b611758565b3480156104c7575f5ffd5b506104db6104d63660046150d4565b611775565b60405161020a9190615211565b3480156104f3575f5ffd5b506102a7610502366004615220565b6118fc565b348015610512575f5ffd5b5061025361052136600461525a565b611916565b348015610531575f5ffd5b50610545610540366004614bbe565b611e17565b60405161020a91905f60e082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c083015292915050565b3480156105a5575f5ffd5b506102a76105b4366004615287565b611f14565b3480156105c4575f5ffd5b506102a7611f25565b3480156105d8575f5ffd5b50610545611f43565b3480156105ec575f5ffd5b506102536105fb366004614be9565b611ff0565b34801561060b575f5ffd5b506102e3612140565b5f61061e826121c1565b8061063957506001600160e01b0319821663da40804f60e01b145b92915050565b606060fb805461064e906152cc565b80601f016020809104026020016040519081016040528092919081815260200182805461067a906152cc565b80156106c55780601f1061069c576101008083540402835291602001916106c5565b820191905f5260205f20905b8154815290600101906020018083116106a857829003601f168201915b5050505050905090565b5f516020615b445f395f51905f527fa82e22387fca439f316d78ca566f383218ab8ae1b3e830178c9c82cbd16749c07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa15801561075a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077e91906152fe565b6001600160a01b0316632b1cff1f3084843360016040518663ffffffff1660e01b81526004016107b2959493929190615319565b5f6040518083038186803b1580156107c8575f5ffd5b505afa1580156107da573d5f5f3e3d5ffd5b50505050825f036107fe576040516364ba211360e11b815260040160405180910390fd5b5f83815261012d602052604081205461ffff1690036108305760405163c4c1a0c560e01b815260040160405180910390fd5b5f83815261012d602052604080822080546001600160c01b03191690555184917fda8c8883e1b3ead63d3ef64674f8fc499048554f6fa36776af0ab41d2f99834691a2505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036108c95760405162461bcd60e51b81526004016108c09061534c565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109115f516020615b245f395f51905f52546001600160a01b031690565b6001600160a01b0316146109375760405162461bcd60e51b81526004016108c090615398565b610940816121f6565b604080515f8082526020820190925261095b91839190612313565b50565b7f55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a50415f516020615b445f395f51905f527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a0d91906152fe565b6001600160a01b0316632b1cff1f3084843360016040518663ffffffff1660e01b8152600401610a41959493929190615319565b5f6040518083038186803b158015610a57575f5ffd5b505afa158015610a69573d5f5f3e3d5ffd5b50505050610a7561247d565b5050565b5f610a826124cf565b7f13413a37e797fdcf9481024e55772fdede41168298ffead0664159cf5d0745557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aff573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b2391906152fe565b6001600160a01b0316635ff57d203083335f6040518563ffffffff1660e01b8152600401610b5494939291906153e4565b5f6040518083038186803b158015610b6a575f5ffd5b505afa158015610b7c573d5f5f3e3d5ffd5b50505050610b918b8b8b8b8b8b8b8b8b612517565b610bb18c8c8c8c8c33610ba38e6126fb565b610bac8e61270a565b61279d565b519c9b505050505050505050505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610c0a5760405162461bcd60e51b81526004016108c09061534c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c525f516020615b245f395f51905f52546001600160a01b031690565b6001600160a01b031614610c785760405162461bcd60e51b81526004016108c090615398565b610c81826121f6565b610a7582826001612313565b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d2c5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016108c0565b505f516020615b245f395f51905f5290565b5f516020615b445f395f51905f527fa82e22387fca439f316d78ca566f383218ab8ae1b3e830178c9c82cbd16749c07f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dc9573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ded91906152fe565b6001600160a01b0316632b1cff1f3084843360016040518663ffffffff1660e01b8152600401610e21959493929190615319565b5f6040518083038186803b158015610e37575f5ffd5b505afa158015610e49573d5f5f3e3d5ffd5b50505050835f03610e6d576040516364ba211360e11b815260040160405180910390fd5b604051806101400160405280610e85855f0135612d7b565b61ffff168152602001610e9b8560200135612d7b565b61ffff168152602001610eb18560400135612d7b565b61ffff168152602001610ec78560600135612d7b565b61ffff168152602001610edd8560800135612d7b565b61ffff168152602001610ef38560a00135612d7b565b61ffff168152602001610f098560c00135612d7b565b61ffff908116825263ffffffff6020808401829052604080850183905260609485018490525f8a815261012d835281902086518154938801519288015196880151608089015160a08a015160c08b015160e08c01516101008d0151610120909d01518b16600160b01b0261ffff60b01b199d8b16600160901b029d909d1665ffffffffffff60901b1991909a16600160701b0263ffffffff60701b19928c16600160601b029290921665ffffffffffff60601b19938c16600160501b0261ffff60501b19958d16600160401b029590951663ffffffff60401b19968d16600160301b0261ffff60301b199e8e16600160201b029e909e1667ffffffff00000000199a8e16620100000263ffffffff19909c1698909d169790971799909917979097169990991799909917919091169190911717959095169190911792909217919091161791909117815561105c90612d94565b6040805184358152602080860135908201528482013581830152606080860135908201526080808601359082015260a0808601359082015260c08086013590820152905185917f1f02d2d352ddbf27121545f4d4730d7656c038f9ce75851410c9ef6982728975919081900360e00190a250505050565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461111c5760405163799e780f60e01b815260040160405180910390fd5b8060fd5f82825461112d9190615422565b909155505050565b5f54610100900460ff161580801561115357505f54600160ff909116105b8061116c5750303b15801561116c57505f5460ff166001145b6111cf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108c0565b5f805460ff1916600117905580156111f0575f805461ff0019166101001790555b6111ff8888888888888861318e565b8015611244575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b5f6112576124cf565b7f90fe2ba5da14f172ed5a0a0fec391dbf8f191c9a2f3557d79ede5d6b1c1c9ffb7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112f891906152fe565b6001600160a01b0316635ff57d203083335f6040518563ffffffff1660e01b815260040161132994939291906153e4565b5f6040518083038186803b15801561133f575f5ffd5b505afa158015611351573d5f5f3e3d5ffd5b505050506113668c8c8c8c8b8b8b8b8b6131cb565b610bb18c8c8c8c8b8b338f6132f7565b7f92a19c77d2ea87c7f81d50c74403cb2f401780f3ad919571121efe2bdb427eb17f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113f3573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061141791906152fe565b6001600160a01b0316635ff57d203083335f6040518563ffffffff1660e01b815260040161144894939291906153e4565b5f6040518083038186803b15801561145e575f5ffd5b505afa158015611470573d5f5f3e3d5ffd5b5050505061147c6124cf565b604051631e9c0acf60e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637a702b3c906114ca9086908690600401615501565b5f604051808303815f87803b1580156114e1575f5ffd5b505af11580156114f3573d5f5f3e3d5ffd5b50505050505050565b5f6115056124cf565b7f13413a37e797fdcf9481024e55772fdede41168298ffead0664159cf5d0745557f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371907f176040518163ffffffff1660e01b8152600401602060405180830381865afa158015611582573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115a691906152fe565b6001600160a01b0316635ff57d203083335f6040518563ffffffff1660e01b81526004016115d794939291906153e4565b5f6040518083038186803b1580156115ed575f5ffd5b505afa1580156115ff573d5f5f3e3d5ffd5b505050506116148b8b8b8b8b8b8b8b8b6131cb565b610bb18c8c8c8c8c336116