From ce5f3e426575b3ee0fc1ab1c4a799076da5b7cfa Mon Sep 17 00:00:00 2001 From: PedroCailleret Date: Fri, 19 May 2023 05:14:11 -0300 Subject: [PATCH] Inheritance refactoring :zap: --- .../Constants.sol/Constants.dbg.json | 4 - .../DataTypes.sol/DataTypes.dbg.json | 4 - .../contracts/DataTypes.sol/DataTypes.json | 10 - .../EventAndErrors.dbg.json | 4 - .../Reputation.sol/Reputation.dbg.json | 2 +- .../core/BaseUtils.sol/BaseUtils.dbg.json | 4 + .../core/BaseUtils.sol/BaseUtils.json | 606 +++++++++++++ .../core/Constants.sol/Constants.dbg.json | 4 + .../{ => core}/Constants.sol/Constants.json | 2 +- .../core/DataTypes.sol/DataTypes.dbg.json | 4 + .../core/DataTypes.sol/DataTypes.json | 10 + .../EventAndErrors.dbg.json | 4 + .../EventAndErrors.sol/EventAndErrors.json | 2 +- .../OwnerSettings.sol/OwnerSettings.dbg.json | 4 + .../core/OwnerSettings.sol/OwnerSettings.json | 549 ++++++++++++ .../lib/auth/Owned.sol/Owned.dbg.json | 2 +- .../IReputation.sol/IReputation.dbg.json | 2 +- .../lib/mock/mockToken.sol/MockToken.dbg.json | 2 +- .../lib/tokens/ERC20.sol/ERC20.dbg.json | 2 +- .../lib/utils/ECDSA.sol/ECDSA.dbg.json | 2 +- .../MerkleProofLib.dbg.json | 2 +- .../utils/Multicall.sol/Multicall.dbg.json | 2 +- .../ReentrancyGuard.dbg.json | 2 +- .../SafeTransferLib.dbg.json | 2 +- artifacts/contracts/p2pix.sol/P2PIX.dbg.json | 2 +- artifacts/contracts/p2pix.sol/P2PIX.json | 6 +- contracts/core/BaseUtils.sol | 110 +++ contracts/{ => core}/Constants.sol | 0 contracts/{ => core}/DataTypes.sol | 0 contracts/{ => core}/EventAndErrors.sol | 0 contracts/core/OwnerSettings.sol | 197 +++++ contracts/p2pix.sol | 277 +----- src/types/core/BaseUtils.ts | 835 ++++++++++++++++++ src/types/{ => core}/EventAndErrors.ts | 2 +- src/types/core/OwnerSettings.ts | 730 +++++++++++++++ src/types/core/index.ts | 6 + .../factories/core/BaseUtils__factory.ts | 618 +++++++++++++ .../{ => core}/EventAndErrors__factory.ts | 2 +- .../factories/core/OwnerSettings__factory.ts | 564 ++++++++++++ src/types/factories/core/index.ts | 6 + src/types/factories/index.ts | 2 +- .../factories/p2pix.sol/P2PIX__factory.ts | 4 +- src/types/hardhat.d.ts | 18 + src/types/index.ts | 10 +- 44 files changed, 4314 insertions(+), 306 deletions(-) delete mode 100644 artifacts/contracts/Constants.sol/Constants.dbg.json delete mode 100644 artifacts/contracts/DataTypes.sol/DataTypes.dbg.json delete mode 100644 artifacts/contracts/DataTypes.sol/DataTypes.json delete mode 100644 artifacts/contracts/EventAndErrors.sol/EventAndErrors.dbg.json create mode 100644 artifacts/contracts/core/BaseUtils.sol/BaseUtils.dbg.json create mode 100644 artifacts/contracts/core/BaseUtils.sol/BaseUtils.json create mode 100644 artifacts/contracts/core/Constants.sol/Constants.dbg.json rename artifacts/contracts/{ => core}/Constants.sol/Constants.json (79%) create mode 100644 artifacts/contracts/core/DataTypes.sol/DataTypes.dbg.json create mode 100644 artifacts/contracts/core/DataTypes.sol/DataTypes.json create mode 100644 artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.dbg.json rename artifacts/contracts/{ => core}/EventAndErrors.sol/EventAndErrors.json (99%) create mode 100644 artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.dbg.json create mode 100644 artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.json create mode 100644 contracts/core/BaseUtils.sol rename contracts/{ => core}/Constants.sol (100%) rename contracts/{ => core}/DataTypes.sol (100%) rename contracts/{ => core}/EventAndErrors.sol (100%) create mode 100644 contracts/core/OwnerSettings.sol create mode 100644 src/types/core/BaseUtils.ts rename src/types/{ => core}/EventAndErrors.ts (99%) create mode 100644 src/types/core/OwnerSettings.ts create mode 100644 src/types/core/index.ts create mode 100644 src/types/factories/core/BaseUtils__factory.ts rename src/types/factories/{ => core}/EventAndErrors__factory.ts (99%) create mode 100644 src/types/factories/core/OwnerSettings__factory.ts create mode 100644 src/types/factories/core/index.ts diff --git a/artifacts/contracts/Constants.sol/Constants.dbg.json b/artifacts/contracts/Constants.sol/Constants.dbg.json deleted file mode 100644 index 02a96b0..0000000 --- a/artifacts/contracts/Constants.sol/Constants.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" -} diff --git a/artifacts/contracts/DataTypes.sol/DataTypes.dbg.json b/artifacts/contracts/DataTypes.sol/DataTypes.dbg.json deleted file mode 100644 index 02a96b0..0000000 --- a/artifacts/contracts/DataTypes.sol/DataTypes.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" -} diff --git a/artifacts/contracts/DataTypes.sol/DataTypes.json b/artifacts/contracts/DataTypes.sol/DataTypes.json deleted file mode 100644 index 3639b3f..0000000 --- a/artifacts/contracts/DataTypes.sol/DataTypes.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "DataTypes", - "sourceName": "contracts/DataTypes.sol", - "abi": [], - "bytecode": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea2646970667358221220e2b83942b5818cc4f73c29200b41672c082782c77a5936ed5de9e316913cd2d264736f6c63430008130033", - "deployedBytecode": "0x600080fdfea2646970667358221220e2b83942b5818cc4f73c29200b41672c082782c77a5936ed5de9e316913cd2d264736f6c63430008130033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/artifacts/contracts/EventAndErrors.sol/EventAndErrors.dbg.json b/artifacts/contracts/EventAndErrors.sol/EventAndErrors.dbg.json deleted file mode 100644 index 02a96b0..0000000 --- a/artifacts/contracts/EventAndErrors.sol/EventAndErrors.dbg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" -} diff --git a/artifacts/contracts/Reputation.sol/Reputation.dbg.json b/artifacts/contracts/Reputation.sol/Reputation.dbg.json index 02a96b0..8bc604e 100644 --- a/artifacts/contracts/Reputation.sol/Reputation.dbg.json +++ b/artifacts/contracts/Reputation.sol/Reputation.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/core/BaseUtils.sol/BaseUtils.dbg.json b/artifacts/contracts/core/BaseUtils.sol/BaseUtils.dbg.json new file mode 100644 index 0000000..59166bc --- /dev/null +++ b/artifacts/contracts/core/BaseUtils.sol/BaseUtils.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../build-info/e227c161b97af39988677e65180082ec.json" +} diff --git a/artifacts/contracts/core/BaseUtils.sol/BaseUtils.json b/artifacts/contracts/core/BaseUtils.sol/BaseUtils.json new file mode 100644 index 0000000..b4e72a7 --- /dev/null +++ b/artifacts/contracts/core/BaseUtils.sol/BaseUtils.json @@ -0,0 +1,606 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BaseUtils", + "sourceName": "contracts/core/BaseUtils.sol", + "abi": [ + { + "inputs": [], + "name": "AddressDenied", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyReleased", + "type": "error" + }, + { + "inputs": [], + "name": "AmountNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "DecOverflow", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyPixTarget", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDeposit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSigner", + "type": "error" + }, + { + "inputs": [], + "name": "LengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "LockExpired", + "type": "error" + }, + { + "inputs": [], + "name": "LoopOverflow", + "type": "error" + }, + { + "inputs": [], + "name": "MaxBalExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoTokens", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughTokens", + "type": "error" + }, + { + "inputs": [], + "name": "NotExpired", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "OnlySeller", + "type": "error" + }, + { + "inputs": [], + "name": "StaticCallFailed", + "type": "error" + }, + { + "inputs": [], + "name": "TokenDenied", + "type": "error" + }, + { + "inputs": [], + "name": "TxAlreadyUsed", + "type": "error" + }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "state", + "type": "bool" + } + ], + "name": "AllowedERC20Updated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lockID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seller", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "LockAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "blocks", + "type": "uint256" + } + ], + "name": "LockBlocksUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "LockReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockId", + "type": "uint256" + } + ], + "name": "LockReturned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "reputation", + "type": "address" + } + ], + "name": "ReputationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + } + ], + "name": "RootUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "state", + "type": "bool" + } + ], + "name": "ValidSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "signers", + "type": "address[]" + } + ], + "name": "ValidSignersUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "_castAddrToKey", + "outputs": [ + { + "internalType": "uint256", + "name": "_key", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_key", + "type": "uint256" + } + ], + "name": "_castKeyToAddr", + "outputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "erc20", + "type": "address" + } + ], + "name": "allowedERC20s", + "outputs": [ + { + "internalType": "bool", + "name": "state", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultLockBlocks", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reputation", + "outputs": [ + { + "internalType": "contract IReputation", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sellerKey", + "type": "uint256" + } + ], + "name": "sellerAllowList", + "outputs": [ + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blocks", + "type": "uint256" + } + ], + "name": "setDefaultLockBlocks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IReputation", + "name": "_reputation", + "type": "address" + } + ], + "name": "setReputation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_validSigners", + "type": "address[]" + } + ], + "name": "setValidSigners", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_states", + "type": "bool[]" + } + ], + "name": "tokenSettings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "message", + "type": "bytes32" + } + ], + "name": "usedTransactions", + "outputs": [ + { + "internalType": "bool", + "name": "used", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "signer", + "type": "uint256" + } + ], + "name": "validBacenSigners", + "outputs": [ + { + "internalType": "bool", + "name": "valid", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/core/Constants.sol/Constants.dbg.json b/artifacts/contracts/core/Constants.sol/Constants.dbg.json new file mode 100644 index 0000000..59166bc --- /dev/null +++ b/artifacts/contracts/core/Constants.sol/Constants.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../build-info/e227c161b97af39988677e65180082ec.json" +} diff --git a/artifacts/contracts/Constants.sol/Constants.json b/artifacts/contracts/core/Constants.sol/Constants.json similarity index 79% rename from artifacts/contracts/Constants.sol/Constants.json rename to artifacts/contracts/core/Constants.sol/Constants.json index 07eaf6a..e61ee3e 100644 --- a/artifacts/contracts/Constants.sol/Constants.json +++ b/artifacts/contracts/core/Constants.sol/Constants.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "Constants", - "sourceName": "contracts/Constants.sol", + "sourceName": "contracts/core/Constants.sol", "abi": [], "bytecode": "0x", "deployedBytecode": "0x", diff --git a/artifacts/contracts/core/DataTypes.sol/DataTypes.dbg.json b/artifacts/contracts/core/DataTypes.sol/DataTypes.dbg.json new file mode 100644 index 0000000..59166bc --- /dev/null +++ b/artifacts/contracts/core/DataTypes.sol/DataTypes.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../build-info/e227c161b97af39988677e65180082ec.json" +} diff --git a/artifacts/contracts/core/DataTypes.sol/DataTypes.json b/artifacts/contracts/core/DataTypes.sol/DataTypes.json new file mode 100644 index 0000000..51b9a86 --- /dev/null +++ b/artifacts/contracts/core/DataTypes.sol/DataTypes.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DataTypes", + "sourceName": "contracts/core/DataTypes.sol", + "abi": [], + "bytecode": "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea264697066735822122078bdfdfbb98192401098df5a6389aadd2cb5cf76b3e1f5af04f14038376f40f464736f6c63430008130033", + "deployedBytecode": "0x600080fdfea264697066735822122078bdfdfbb98192401098df5a6389aadd2cb5cf76b3e1f5af04f14038376f40f464736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.dbg.json b/artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.dbg.json new file mode 100644 index 0000000..59166bc --- /dev/null +++ b/artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../build-info/e227c161b97af39988677e65180082ec.json" +} diff --git a/artifacts/contracts/EventAndErrors.sol/EventAndErrors.json b/artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.json similarity index 99% rename from artifacts/contracts/EventAndErrors.sol/EventAndErrors.json rename to artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.json index 0fc5321..aec78e0 100644 --- a/artifacts/contracts/EventAndErrors.sol/EventAndErrors.json +++ b/artifacts/contracts/core/EventAndErrors.sol/EventAndErrors.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "EventAndErrors", - "sourceName": "contracts/EventAndErrors.sol", + "sourceName": "contracts/core/EventAndErrors.sol", "abi": [ { "inputs": [], diff --git a/artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.dbg.json b/artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.dbg.json new file mode 100644 index 0000000..59166bc --- /dev/null +++ b/artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.dbg.json @@ -0,0 +1,4 @@ +{ + "_format": "hh-sol-dbg-1", + "buildInfo": "../../../build-info/e227c161b97af39988677e65180082ec.json" +} diff --git a/artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.json b/artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.json new file mode 100644 index 0000000..3508498 --- /dev/null +++ b/artifacts/contracts/core/OwnerSettings.sol/OwnerSettings.json @@ -0,0 +1,549 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "OwnerSettings", + "sourceName": "contracts/core/OwnerSettings.sol", + "abi": [ + { + "inputs": [], + "name": "AddressDenied", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyReleased", + "type": "error" + }, + { + "inputs": [], + "name": "AmountNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "DecOverflow", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyPixTarget", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDeposit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSigner", + "type": "error" + }, + { + "inputs": [], + "name": "LengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "LockExpired", + "type": "error" + }, + { + "inputs": [], + "name": "LoopOverflow", + "type": "error" + }, + { + "inputs": [], + "name": "MaxBalExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoTokens", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughTokens", + "type": "error" + }, + { + "inputs": [], + "name": "NotExpired", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "OnlySeller", + "type": "error" + }, + { + "inputs": [], + "name": "StaticCallFailed", + "type": "error" + }, + { + "inputs": [], + "name": "TokenDenied", + "type": "error" + }, + { + "inputs": [], + "name": "TxAlreadyUsed", + "type": "error" + }, + { + "inputs": [], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "state", + "type": "bool" + } + ], + "name": "AllowedERC20Updated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FundsWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lockID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seller", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "LockAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "blocks", + "type": "uint256" + } + ], + "name": "LockBlocksUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "LockReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockId", + "type": "uint256" + } + ], + "name": "LockReturned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "reputation", + "type": "address" + } + ], + "name": "ReputationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + } + ], + "name": "RootUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "state", + "type": "bool" + } + ], + "name": "ValidSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "signers", + "type": "address[]" + } + ], + "name": "ValidSignersUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "erc20", + "type": "address" + } + ], + "name": "allowedERC20s", + "outputs": [ + { + "internalType": "bool", + "name": "state", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultLockBlocks", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reputation", + "outputs": [ + { + "internalType": "contract IReputation", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sellerKey", + "type": "uint256" + } + ], + "name": "sellerAllowList", + "outputs": [ + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_blocks", + "type": "uint256" + } + ], + "name": "setDefaultLockBlocks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IReputation", + "name": "_reputation", + "type": "address" + } + ], + "name": "setReputation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_validSigners", + "type": "address[]" + } + ], + "name": "setValidSigners", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_tokens", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "_states", + "type": "bool[]" + } + ], + "name": "tokenSettings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "signer", + "type": "uint256" + } + ], + "name": "validBacenSigners", + "outputs": [ + { + "internalType": "bool", + "name": "valid", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/contracts/lib/auth/Owned.sol/Owned.dbg.json b/artifacts/contracts/lib/auth/Owned.sol/Owned.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/auth/Owned.sol/Owned.dbg.json +++ b/artifacts/contracts/lib/auth/Owned.sol/Owned.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/interfaces/IReputation.sol/IReputation.dbg.json b/artifacts/contracts/lib/interfaces/IReputation.sol/IReputation.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/interfaces/IReputation.sol/IReputation.dbg.json +++ b/artifacts/contracts/lib/interfaces/IReputation.sol/IReputation.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/mock/mockToken.sol/MockToken.dbg.json b/artifacts/contracts/lib/mock/mockToken.sol/MockToken.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/mock/mockToken.sol/MockToken.dbg.json +++ b/artifacts/contracts/lib/mock/mockToken.sol/MockToken.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/tokens/ERC20.sol/ERC20.dbg.json b/artifacts/contracts/lib/tokens/ERC20.sol/ERC20.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/tokens/ERC20.sol/ERC20.dbg.json +++ b/artifacts/contracts/lib/tokens/ERC20.sol/ERC20.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/utils/ECDSA.sol/ECDSA.dbg.json b/artifacts/contracts/lib/utils/ECDSA.sol/ECDSA.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/utils/ECDSA.sol/ECDSA.dbg.json +++ b/artifacts/contracts/lib/utils/ECDSA.sol/ECDSA.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/utils/MerkleProofLib.sol/MerkleProofLib.dbg.json b/artifacts/contracts/lib/utils/MerkleProofLib.sol/MerkleProofLib.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/utils/MerkleProofLib.sol/MerkleProofLib.dbg.json +++ b/artifacts/contracts/lib/utils/MerkleProofLib.sol/MerkleProofLib.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/utils/Multicall.sol/Multicall.dbg.json b/artifacts/contracts/lib/utils/Multicall.sol/Multicall.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/utils/Multicall.sol/Multicall.dbg.json +++ b/artifacts/contracts/lib/utils/Multicall.sol/Multicall.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json b/artifacts/contracts/lib/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +++ b/artifacts/contracts/lib/utils/ReentrancyGuard.sol/ReentrancyGuard.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/lib/utils/SafeTransferLib.sol/SafeTransferLib.dbg.json b/artifacts/contracts/lib/utils/SafeTransferLib.sol/SafeTransferLib.dbg.json index aaabc1e..c3f96c4 100644 --- a/artifacts/contracts/lib/utils/SafeTransferLib.sol/SafeTransferLib.dbg.json +++ b/artifacts/contracts/lib/utils/SafeTransferLib.sol/SafeTransferLib.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/p2pix.sol/P2PIX.dbg.json b/artifacts/contracts/p2pix.sol/P2PIX.dbg.json index 02a96b0..8bc604e 100644 --- a/artifacts/contracts/p2pix.sol/P2PIX.dbg.json +++ b/artifacts/contracts/p2pix.sol/P2PIX.dbg.json @@ -1,4 +1,4 @@ { "_format": "hh-sol-dbg-1", - "buildInfo": "../../build-info/344a2bde6eeb71222e5ca4221b552f86.json" + "buildInfo": "../../build-info/e227c161b97af39988677e65180082ec.json" } diff --git a/artifacts/contracts/p2pix.sol/P2PIX.json b/artifacts/contracts/p2pix.sol/P2PIX.json index 134c423..330b0a3 100644 --- a/artifacts/contracts/p2pix.sol/P2PIX.json +++ b/artifacts/contracts/p2pix.sol/P2PIX.json @@ -16,7 +16,7 @@ "type": "address[]" }, { - "internalType": "contract IReputation", + "internalType": "address", "name": "_reputation", "type": "address" }, @@ -1061,8 +1061,8 @@ "type": "receive" } ], - "bytecode": "0x608060405262002c24803803806200001781620000ce565b928339810160a082820312620000b357815160208301516001600160401b039391929190848111620000b357826200005191830162000124565b604082015191620000628362000112565b6060810151868111620000b357846200007d91830162000124565b936080820151968711620000b357620000a3966200009c920162000193565b93620001fa565b6040516127ee9081620004368239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b03811183821017620000f457604052565b620000b8565b6001600160401b038111620000f45760051b60200190565b6001600160a01b03811603620000b357565b9080601f83011215620000b357815190620001496200014383620000fa565b620000ce565b9182938184526020808095019260051b820101928311620000b3578301905b82821062000177575050505090565b8380918351620001878162000112565b81520191019062000168565b9080601f83011215620000b357815190620001b26200014383620000fa565b9182938184526020808095019260051b820101928311620000b3578301905b828210620001e0575050505090565b81518015158103620000b3578152908301908301620001d1565b600080546001600160a01b03191633908117825591969594939291817f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768180a3600191828055876003556040519788527f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851160208099a160028490556040516001600160a01b0394851681527fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f908990a18051818901989060051b820181013d15158a5b811562000339575b505050604051948186019282875251809352604086019993905b8382106200032157505050505050807f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d7916200031f95960390a162000373565b565b845181168b52998201999382019390850190620002df565b908382600182979896949e999e51600c1b55019083821015620003655791509a959a94939294620002bd565b509a959a94939294620002c5565b60008054919290916001600160a01b03163303620004245782519182156200041757815183036200040a57602092919284818080970195019360051b0101925b838103620003c2575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191620003b3565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b6040516282b42960e81b8152600490fdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806304937320146102065780630d2a2d441461020157806313af4035146101fc5780632cc0f905146101f7578063328a7181146101f2578063367821f0146101ed578063461f3120146101a757806349ef8448146101e85780634b2ae980146101e3578063574983c8146101de5780635fd8c710146101d957806369cc6af4146101d45780636d82d9e0146101cf57806377cd38a4146101ca5780637f94f65d146101c557806380e1d302146101c057806384ab1d28146101bb5780638da5cb5b146101b65780638db564c2146101b15780639872dbfe146101ac57806398a26871146101a75780639eee8d4b146101a2578063ad8f2eed1461019d578063b0983d3914610198578063c52164c614610193578063c593dfd81461018e578063d1c0702814610189578063d4fac45d14610184578063d6e8b9731461017f578063f7d0e04b1461017a5763fb8c5ef00361000e57611678565b611608565b61155d565b611544565b6114a2565b610f64565b610f30565b610ef6565b610ea0565b610e60565b61093c565b610e42565b610e24565b610df0565b610dba565b610da1565b610d50565b610d18565b610c07565b610bc7565b610b44565b610ae0565b610ab6565b610a1f565b610881565b610651565b61058d565b610498565b61036b565b346102325760206003193601126102325760043560005260066020526020604060002054604051908152f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102a757604052565b610237565b60405190610120820182811067ffffffffffffffff8211176102a757604052565b67ffffffffffffffff81116102a75760051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81160361023257565b81601f820112156102325780359161031a836102cd565b926103286040519485610266565b808452602092838086019260051b820101928311610232578301905b828210610352575050505090565b8380918335610360816102e5565b815201910190610344565b34610232576020806003193601126102325760043567ffffffffffffffff81116102325761039d903690600401610303565b9073ffffffffffffffffffffffffffffffffffffffff918260005416330361046e57805181830192849160051b830181013d1515855b811561043a575b50505060405192818401908285525180915260408401949160005b828110610424577f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d786880387a1005b83518516875295810195928101926001016103f5565b90838260018298969499979951600c1b550190838210156104625791509593959492946103d3565b509593959492946103da565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576004356104b5816102e5565b600090815473ffffffffffffffffffffffffffffffffffffffff808216330361046e577fffffffffffffffffffffffff0000000000000000000000000000000000000000921691829116178255337f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768380a380f35b6064359069ffffffffffffffffffff8216820361023257565b6084359069ffffffffffffffffffff8216820361023257565b9181601f840112156102325782359167ffffffffffffffff8311610232576020808501948460051b01011161023257565b346102325760e0600319360112610232576004356105aa816102e5565b602435906105b7826102e5565b604435916105c4836102e5565b6105cc61052a565b916105d5610543565b67ffffffffffffffff9360a435858111610232576105f790369060040161055c565b92909160c435968711610232576106319761061961062198369060040161055c565b979096611927565b6040519081529081906020820190565b0390f35b60643590811515820361023257565b3590811515820361023257565b346102325760a06003193601126102325760043561066e816102e5565b6024356bffffffffffffffffffffffff8116908181036102325760443590610695826102e5565b61069d610635565b6084359373ffffffffffffffffffffffffffffffffffffffff8087169033600c1b90861615610857576106e56106e18363cbc9d1c4600c526000526020600c205490565b1590565b61082d576b3fffffffffffffffffffffff61071683839060205263739094b1600c52600c1c6000526034600c205490565b16906a52b7d2dcc80cd2e400000061072e85846117ce565b1161080357826107ee976107a89661077a8961079f967f63d8d7d5e63e9840ec91a12a160d27b7cfab294f6ba070b7359692acfe6b03bf9d61076e6117db565b806107f3575b506117ce565b9060ff1b91605f1b1717919060205263739094b1600c52600c1c6000526034600c2055565b30903390611816565b6107b160018055565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526bffffffffffffffffffffffff90911660208501523393918291820190565b0390a2005b6107fd9033611fc7565b38610774565b60046040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1578328e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6a3bc53e000000000000000000000000000000000000000000000000000000008152fd5b346102325760206003193601126102325760048035600090815260056020818152604092839020805460018201546002830154600384015497840154958401546006909401548751938452948301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff808616606086015269ffffffffffffffffffff60a096871c8116608087015284169585019590955260509290921c841660c084015290831660e08301529190911661010082015261012090f35b34610232576020600319360112610232576020600435546040519015158152f35b90815180825260208080930193019160005b82811061097d575050505090565b83518552938101939281019260010161096f565b906109a49060408352604083019061095d565b81810360209283015282518082529082019282019160009190825b8281106109ce57505050505090565b909192939485516004808210156109f3575081528201948201939291906001016109bf565b8660216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b34610232576020806003193601126102325760043567ffffffffffffffff8111610232573660238201121561023257806004013590610a5d826102cd565b91610a6b6040519384610266565b80835260248484019160051b8301019136831161023257602401905b828210610aa757610a9784612654565b9061063160405192839283610991565b81358152908401908401610a87565b34610232576020600319360112610232576020600435610ad5816102e5565b60405190600c1b8152f35b346102325760206003193601126102325760043573ffffffffffffffffffffffffffffffffffffffff60005416330361046e576020817f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851192600355604051908152a1005b3461023257600080600319360112610bc45773ffffffffffffffffffffffffffffffffffffffff815416330361046e57478180808084335af115610bb7576040805133815260208101929092527feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d91a180f35b63b12d13eb82526004601cfd5b80fd5b34610232576020600319360112610232576020610bfd600435610be9816102e5565b63cbc9d1c4600c526000526020600c205490565b6040519015158152f35b3461023257604060031936011261023257600435610c24816102e5565b602435801515908181036102325733600c1b610c5684829060205263739094b1600c52600c1c6000526034600c205490565b918215610cee57610ca5927f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff869260ff1b911617919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff6040519216825260208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2005b60046040517f87138d5c000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576020610d486004356374dfee70600c52600c1c60005260206000205490565b604051908152f35b3461023257604060031936011261023257610019600435610d70816102e5565b60243590611fc7565b600319604091011261023257600435610d91816102e5565b90602435610d9e816102e5565b90565b34610232576020610bfd610db436610d79565b9061259c565b3461023257602060031936011261023257602060405173ffffffffffffffffffffffffffffffffffffffff600435600c1c168152f35b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b34610232576000600319360112610232576020600454604051908152f35b34610232576000600319360112610232576020600354604051908152f35b34610232576040600319360112610232576020610d48602435610e82816102e5565b6004359060205263739094b1600c52600c1c6000526034600c205490565b3461023257610eae36610d79565b6000903d15610ed9575b60208273ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60205263739094b1600c525260206034600c2054605f1c38610eb8565b346102325760206003193601126102325760043567ffffffffffffffff811161023257610f2a61001991369060040161055c565b90611d6d565b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346102325760a06003193601126102325760048035906084359060ff8216820361023257610f906117db565b610fa4836000526005602052604060002090565b81810191610fbc835469ffffffffffffffffffff1690565b9169ffffffffffffffffffff908184169586156114685760028201928354431161143f57600383019485549660405161109f816110738b602083019573ffffffffffffffffffffffffffffffffffffffff602435921687917fffffffffffffffffffff00000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000603e959360601b16845260b01b166014830152601e8201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610266565b519020928354611416576110f56110ef6110fa9260643590604435906110ea896020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b611c7c565b600c1b90565b541590565b6113ee5750926112886005846111b3611161989560006111858e7f364537f14276f2a0ce9905588413f96454cbb8fb2e4f5308389307c1098bede89f9e9b61117a6112ca9f9c600661116191015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b9b60a01c1690611c6f565b8a547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168b55965560019055565b01916111d6611161845473ffffffffffffffffffffffffffffffffffffffff1690565b33146113a95783546112019060a01c69ffffffffffffffffffff165b69ffffffffffffffffffff1690565b61122361121b33600c1b6000526006602052604060002090565b9182546117ce565b90556112596112496110ef855473ffffffffffffffffffffffffffffffffffffffff1690565b6000526006602052604060002090565b6112648a82546117ce565b90555b855460501c73ffffffffffffffffffffffffffffffffffffffff1685611ce0565b81546112a29060a01c69ffffffffffffffffffff166111f2565b806112e4575b505050505473ffffffffffffffffffffffffffffffffffffffff9060501c1690565b60408051948552602085019290925292a261001960018055565b611305611161835473ffffffffffffffffffffffffffffffffffffffff1690565b331461139657506111f261135961138d949361137261133b611385955473ffffffffffffffffffffffffffffffffffffffff1690565b61136b6111f2611359855469ffffffffffffffffffff9060a01c1690565b60011c697fffffffffffffffffff1690565b9087611ce0565b5460a01c69ffffffffffffffffffff1690565b903390611ce0565b388080806112a8565b9150506113a4913390611ce0565b61138d565b6113cd896113c86111f2875469ffffffffffffffffffff9060a01c1690565b6117ce565b6113e761121b33600c1b6000526006602052604060002090565b9055611267565b6040517f815e1d64000000000000000000000000000000000000000000000000000000008152fd5b506040517ff490a6ea000000000000000000000000000000000000000000000000000000008152fd5b846040517ff6fafba0000000000000000000000000000000000000000000000000000000008152fd5b836040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b906020610d9e92818152019061095d565b346102325760406003193601126102325760043567ffffffffffffffff8111610232576114d3903690600401610303565b602435906114e0826102e5565b6000918151916114ef836125f1565b935b83811061150657604051806106318782611491565b806115338473ffffffffffffffffffffffffffffffffffffffff61152c60019587612640565b5116612565565b61153d8288612640565b52016114f1565b34610232576020610d4861155736610d79565b90612565565b346102325760406003193601126102325767ffffffffffffffff6004358181116102325761158f903690600401610303565b9060243590811161023257366023820112156102325780600401356115b3816102cd565b916115c16040519384610266565b81835260209160248385019160051b8301019136831161023257602401905b8282106115f1576100198587612016565b8380916115fd84610644565b8152019101906115e0565b3461023257602060031936011261023257600435611625816102e5565b73ffffffffffffffffffffffffffffffffffffffff8060005416330361046e57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360025560405191168152a1005b3461023257606060031936011261023257600435611695816102e5565b60243560443567ffffffffffffffff8111610232577f2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e916116ee6116e061177593369060040161055c565b906116e96117db565b611d6d565b6116f8843361259c565b61177e575b61173933600c1b85836b3fffffffffffffffffffffff61173383859060205263739094b1600c52600c1c6000526034600c205490565b16612529565b611744813386611ce0565b6040805173ffffffffffffffffffffffffffffffffffffffff95909516855260208501919091523393918291820190565b0390a260018055005b6117878461186f565b6116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600182018092116117c957565b61178c565b919082018092116117c957565b6002600154146117ec576002600155565b60046040517fab143c06000000000000000000000000000000000000000000000000000000008152fd5b601c600060649281946020966040519860605260405260601b602c526f23b872dd000000000000000000000000600c525af13d15600160005114171615611861576000606052604052565b637939f4246000526004601cfd5b33600c1b61189382829060205263739094b1600c52600c1c6000526034600c205490565b908115610cee57827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6118dc9316919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff60405191168152600060208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2565b92949761194e9073ffffffffffffffffffffffffffffffffffffffff9395986116e96117db565b169361195d6106e1868461259c565b611c285761196b8583612565565b9669ffffffffffffffffffff9687811693848a10611bfe57600c1b976119926004546117bb565b9560026119a9886000526005602052604060002090565b0154431115611bd4576003546119bf90436117ce565b976119e08a8c9060205263739094b1600c52600c1c6000526034600c205490565b605f1c611a009073ffffffffffffffffffffffffffffffffffffffff1690565b611a086102ac565b8c8152602081018a9052604081019a909a5273ffffffffffffffffffffffffffffffffffffffff1660608a015269ffffffffffffffffffff16608089015260a0880192611a6190849069ffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff1660c08801523360e088015273ffffffffffffffffffffffffffffffffffffffff88166101008801528315611ae4575050611ad89791611ad3913391611acd8a6374dfee70600c52600c1c60005260206000205490565b91612422565b612146565b90611ae260018055565b565b819350809250611b0868056bc75e2d63100000925169ffffffffffffffffffff1690565b1611611b1e575050611b1995612146565b611ad8565b611b4f611b4a611b3b33600c1b6000526006602052604060002090565b54670de0b6b3a7640000900490565b6124b0565b81611b6d611b67855169ffffffffffffffffffff1690565b92611c52565b911611918215611bb1575b5050611b8757611b1995612146565b60046040517f1c18f846000000000000000000000000000000000000000000000000000000008152fd5b5169d3c21bcecceda1000000925069ffffffffffffffffffff1616113880611b78565b60046040517fd0404f85000000000000000000000000000000000000000000000000000000008152fd5b60046040517f22bbb43c000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb2e532de000000000000000000000000000000000000000000000000000000008152fd5b90670de0b6b3a7640000918281029281840414901517156117c957565b919082039182116117c957565b9060806020927f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a160ff9796604051966000998a968795865216875260405280606052105afa508251923d15611cd357606052604052565b638baa579f90526004601cfd5b60109260209260145260345260446000938480936fa9059cbb00000000000000000000000082525af13d156001835114171615611d1c57603452565b6390b8ec1890526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611d685760051b0190565b611d29565b6000905b828210611d8e575010611d8057565b63dfb035c96000526004601cfd5b90611dae611d9d828585611d58565b356000526005602052604060002090565b611db7816120cd565b805490611dde611161600683015473ffffffffffffffffffffffffffffffffffffffff1690565b6b3fffffffffffffffffffffff611e0b82859060205263739094b1600c52600c1c6000526034600c205490565b1690600493848401946a52b7d2dcc80cd2e4000000611e41611e3a6111f2895469ffffffffffffffffffff1690565b80966117ce565b11611f9f57506005611f2e94611e7c6001989795611ebd956110ef959060205263739094b1600c52600c1c6000526034600c20908154019055565b84547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168555015473ffffffffffffffffffffffffffffffffffffffff1690565b611edb611ed4826000526006602052604060002090565b5460011c90565b68056bc75e2d631000008111611f845750611f03611f11916000526006602052604060002090565b68056bc75e2d631000009055565b5460501c73ffffffffffffffffffffffffffffffffffffffff1690565b7f830501e61b8b075e170b22a430e39454bdb12ed3e9620e586430b6ac00079da573ffffffffffffffffffffffffffffffffffffffff611f6f848888611d58565b60405190358152921691602090a20190611d71565b90611f99906000526006602052604060002090565b55611f11565b6040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b338103612008576374dfee70600c5280600052816020600020557f0b294da292f26e55fd442b5c0164fbb9013036ff00c5cfdde0efd01c1baaf632600080a3565b6385d1f7266000526004601cfd5b9060009073ffffffffffffffffffffffffffffffffffffffff825416330361046e5782519182156120c057815183036120b357602092919284818080970195019360051b0101925b83810361206c575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a30192019161205e565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b60028101544310611bd4576004015469ffffffffffffffffffff16156120ef57565b60046040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c95760010190565b9095949391938460005260056020526040600020928451845560208501516001850155604085015160028501556003840160608601516121999073ffffffffffffffffffffffffffffffffffffffff1690565b8154608088015173ffffffffffffffffffffffffffffffffffffffff929092167fffff0000000000000000000000000000000000000000000000000000000000009091161760a091821b7dffffffffffffffffffff0000000000000000000000000000000000000000161790915585018051600486019991959069ffffffffffffffffffff168a547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001669ffffffffffffffffffff909116178a5560c08701998a516122789073ffffffffffffffffffffffffffffffffffffffff1690565b81547fffff0000000000000000000000000000000000000000ffffffffffffffffffff1660509190911b7dffffffffffffffffffffffffffffffffffffffff000000000000000000001617905560e087015173ffffffffffffffffffffffffffffffffffffffff166005820190612329919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61010087015173ffffffffffffffffffffffffffffffffffffffff16906006019061238e919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61239793612529565b6004546123a390612119565b6004558294516123c69073ffffffffffffffffffffffffffffffffffffffff1690565b915190516040805192835269ffffffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff909216917f8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea6591a3565b73ffffffffffffffffffffffffffffffffffffffff8293941692612474575b50500361244a57565b60046040517f3b8474be000000000000000000000000000000000000000000000000000000008152fd5b60059291831b8101915b8135808211851b9182526020809218526040600020910192828410156124a557929061247e565b509150503880612441565b6040519060208201907f4d2b1791000000000000000000000000000000000000000000000000000000008252602483015260248252606082019082821067ffffffffffffffff8311176102a7576020926000926040525190600254617530fa90600051911561251b57565b63e10bf1cc6000526004601cfd5b9291909280848103119015176125575760205263739094b1600c52600c1c6000526034600c20908154039055565b63ce3a3d376000526004601cfd5b600092913d15612573575050565b9091925060205263739094b1600c526000526034600c20546b3fffffffffffffffffffffff1690565b600092913d156125aa575050565b9091925060205263739094b1600c526000526034600c205460ff1c90565b6040516020810181811067ffffffffffffffff8211176102a75760405260008152906000368137565b906125fb826102cd565b6126086040519182610266565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061263682946102cd565b0190602036910137565b8051821015611d685760209160051b010190565b908151156127a5576000809280519061266c826125f1565b92612676836125f1565b955b83811061268757505050509190565b806126a861269760019386612640565b516000526005602052604060002090565b546126d8576126b78185612640565b516126c28288612640565b52826126ce828a612640565b5201925b92612678565b69ffffffffffffffffffff61270660046126f56126978589612640565b015469ffffffffffffffffffff1690565b1661273b576127158185612640565b516127208288612640565b5261273461272e828a612640565b60039052565b01926126d2565b600261274a6126978387612640565b015443111561277c5761275d8185612640565b516127688288612640565b52612734612776828a612640565b60029052565b6127868185612640565b516127918288612640565b5261273461279f828a612640565b60019052565b90506127af6125c8565b90610d9e6125c856fea2646970667358221220637ef5dab3f877f94aaa3a47dff24e5d03955b1e35519a927aad5c994df7ece964736f6c63430008130033", - "deployedBytecode": "0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806304937320146102065780630d2a2d441461020157806313af4035146101fc5780632cc0f905146101f7578063328a7181146101f2578063367821f0146101ed578063461f3120146101a757806349ef8448146101e85780634b2ae980146101e3578063574983c8146101de5780635fd8c710146101d957806369cc6af4146101d45780636d82d9e0146101cf57806377cd38a4146101ca5780637f94f65d146101c557806380e1d302146101c057806384ab1d28146101bb5780638da5cb5b146101b65780638db564c2146101b15780639872dbfe146101ac57806398a26871146101a75780639eee8d4b146101a2578063ad8f2eed1461019d578063b0983d3914610198578063c52164c614610193578063c593dfd81461018e578063d1c0702814610189578063d4fac45d14610184578063d6e8b9731461017f578063f7d0e04b1461017a5763fb8c5ef00361000e57611678565b611608565b61155d565b611544565b6114a2565b610f64565b610f30565b610ef6565b610ea0565b610e60565b61093c565b610e42565b610e24565b610df0565b610dba565b610da1565b610d50565b610d18565b610c07565b610bc7565b610b44565b610ae0565b610ab6565b610a1f565b610881565b610651565b61058d565b610498565b61036b565b346102325760206003193601126102325760043560005260066020526020604060002054604051908152f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102a757604052565b610237565b60405190610120820182811067ffffffffffffffff8211176102a757604052565b67ffffffffffffffff81116102a75760051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81160361023257565b81601f820112156102325780359161031a836102cd565b926103286040519485610266565b808452602092838086019260051b820101928311610232578301905b828210610352575050505090565b8380918335610360816102e5565b815201910190610344565b34610232576020806003193601126102325760043567ffffffffffffffff81116102325761039d903690600401610303565b9073ffffffffffffffffffffffffffffffffffffffff918260005416330361046e57805181830192849160051b830181013d1515855b811561043a575b50505060405192818401908285525180915260408401949160005b828110610424577f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d786880387a1005b83518516875295810195928101926001016103f5565b90838260018298969499979951600c1b550190838210156104625791509593959492946103d3565b509593959492946103da565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576004356104b5816102e5565b600090815473ffffffffffffffffffffffffffffffffffffffff808216330361046e577fffffffffffffffffffffffff0000000000000000000000000000000000000000921691829116178255337f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768380a380f35b6064359069ffffffffffffffffffff8216820361023257565b6084359069ffffffffffffffffffff8216820361023257565b9181601f840112156102325782359167ffffffffffffffff8311610232576020808501948460051b01011161023257565b346102325760e0600319360112610232576004356105aa816102e5565b602435906105b7826102e5565b604435916105c4836102e5565b6105cc61052a565b916105d5610543565b67ffffffffffffffff9360a435858111610232576105f790369060040161055c565b92909160c435968711610232576106319761061961062198369060040161055c565b979096611927565b6040519081529081906020820190565b0390f35b60643590811515820361023257565b3590811515820361023257565b346102325760a06003193601126102325760043561066e816102e5565b6024356bffffffffffffffffffffffff8116908181036102325760443590610695826102e5565b61069d610635565b6084359373ffffffffffffffffffffffffffffffffffffffff8087169033600c1b90861615610857576106e56106e18363cbc9d1c4600c526000526020600c205490565b1590565b61082d576b3fffffffffffffffffffffff61071683839060205263739094b1600c52600c1c6000526034600c205490565b16906a52b7d2dcc80cd2e400000061072e85846117ce565b1161080357826107ee976107a89661077a8961079f967f63d8d7d5e63e9840ec91a12a160d27b7cfab294f6ba070b7359692acfe6b03bf9d61076e6117db565b806107f3575b506117ce565b9060ff1b91605f1b1717919060205263739094b1600c52600c1c6000526034600c2055565b30903390611816565b6107b160018055565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526bffffffffffffffffffffffff90911660208501523393918291820190565b0390a2005b6107fd9033611fc7565b38610774565b60046040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1578328e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6a3bc53e000000000000000000000000000000000000000000000000000000008152fd5b346102325760206003193601126102325760048035600090815260056020818152604092839020805460018201546002830154600384015497840154958401546006909401548751938452948301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff808616606086015269ffffffffffffffffffff60a096871c8116608087015284169585019590955260509290921c841660c084015290831660e08301529190911661010082015261012090f35b34610232576020600319360112610232576020600435546040519015158152f35b90815180825260208080930193019160005b82811061097d575050505090565b83518552938101939281019260010161096f565b906109a49060408352604083019061095d565b81810360209283015282518082529082019282019160009190825b8281106109ce57505050505090565b909192939485516004808210156109f3575081528201948201939291906001016109bf565b8660216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b34610232576020806003193601126102325760043567ffffffffffffffff8111610232573660238201121561023257806004013590610a5d826102cd565b91610a6b6040519384610266565b80835260248484019160051b8301019136831161023257602401905b828210610aa757610a9784612654565b9061063160405192839283610991565b81358152908401908401610a87565b34610232576020600319360112610232576020600435610ad5816102e5565b60405190600c1b8152f35b346102325760206003193601126102325760043573ffffffffffffffffffffffffffffffffffffffff60005416330361046e576020817f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851192600355604051908152a1005b3461023257600080600319360112610bc45773ffffffffffffffffffffffffffffffffffffffff815416330361046e57478180808084335af115610bb7576040805133815260208101929092527feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d91a180f35b63b12d13eb82526004601cfd5b80fd5b34610232576020600319360112610232576020610bfd600435610be9816102e5565b63cbc9d1c4600c526000526020600c205490565b6040519015158152f35b3461023257604060031936011261023257600435610c24816102e5565b602435801515908181036102325733600c1b610c5684829060205263739094b1600c52600c1c6000526034600c205490565b918215610cee57610ca5927f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff869260ff1b911617919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff6040519216825260208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2005b60046040517f87138d5c000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576020610d486004356374dfee70600c52600c1c60005260206000205490565b604051908152f35b3461023257604060031936011261023257610019600435610d70816102e5565b60243590611fc7565b600319604091011261023257600435610d91816102e5565b90602435610d9e816102e5565b90565b34610232576020610bfd610db436610d79565b9061259c565b3461023257602060031936011261023257602060405173ffffffffffffffffffffffffffffffffffffffff600435600c1c168152f35b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b34610232576000600319360112610232576020600454604051908152f35b34610232576000600319360112610232576020600354604051908152f35b34610232576040600319360112610232576020610d48602435610e82816102e5565b6004359060205263739094b1600c52600c1c6000526034600c205490565b3461023257610eae36610d79565b6000903d15610ed9575b60208273ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60205263739094b1600c525260206034600c2054605f1c38610eb8565b346102325760206003193601126102325760043567ffffffffffffffff811161023257610f2a61001991369060040161055c565b90611d6d565b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346102325760a06003193601126102325760048035906084359060ff8216820361023257610f906117db565b610fa4836000526005602052604060002090565b81810191610fbc835469ffffffffffffffffffff1690565b9169ffffffffffffffffffff908184169586156114685760028201928354431161143f57600383019485549660405161109f816110738b602083019573ffffffffffffffffffffffffffffffffffffffff602435921687917fffffffffffffffffffff00000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000603e959360601b16845260b01b166014830152601e8201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610266565b519020928354611416576110f56110ef6110fa9260643590604435906110ea896020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b611c7c565b600c1b90565b541590565b6113ee5750926112886005846111b3611161989560006111858e7f364537f14276f2a0ce9905588413f96454cbb8fb2e4f5308389307c1098bede89f9e9b61117a6112ca9f9c600661116191015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b9b60a01c1690611c6f565b8a547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168b55965560019055565b01916111d6611161845473ffffffffffffffffffffffffffffffffffffffff1690565b33146113a95783546112019060a01c69ffffffffffffffffffff165b69ffffffffffffffffffff1690565b61122361121b33600c1b6000526006602052604060002090565b9182546117ce565b90556112596112496110ef855473ffffffffffffffffffffffffffffffffffffffff1690565b6000526006602052604060002090565b6112648a82546117ce565b90555b855460501c73ffffffffffffffffffffffffffffffffffffffff1685611ce0565b81546112a29060a01c69ffffffffffffffffffff166111f2565b806112e4575b505050505473ffffffffffffffffffffffffffffffffffffffff9060501c1690565b60408051948552602085019290925292a261001960018055565b611305611161835473ffffffffffffffffffffffffffffffffffffffff1690565b331461139657506111f261135961138d949361137261133b611385955473ffffffffffffffffffffffffffffffffffffffff1690565b61136b6111f2611359855469ffffffffffffffffffff9060a01c1690565b60011c697fffffffffffffffffff1690565b9087611ce0565b5460a01c69ffffffffffffffffffff1690565b903390611ce0565b388080806112a8565b9150506113a4913390611ce0565b61138d565b6113cd896113c86111f2875469ffffffffffffffffffff9060a01c1690565b6117ce565b6113e761121b33600c1b6000526006602052604060002090565b9055611267565b6040517f815e1d64000000000000000000000000000000000000000000000000000000008152fd5b506040517ff490a6ea000000000000000000000000000000000000000000000000000000008152fd5b846040517ff6fafba0000000000000000000000000000000000000000000000000000000008152fd5b836040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b906020610d9e92818152019061095d565b346102325760406003193601126102325760043567ffffffffffffffff8111610232576114d3903690600401610303565b602435906114e0826102e5565b6000918151916114ef836125f1565b935b83811061150657604051806106318782611491565b806115338473ffffffffffffffffffffffffffffffffffffffff61152c60019587612640565b5116612565565b61153d8288612640565b52016114f1565b34610232576020610d4861155736610d79565b90612565565b346102325760406003193601126102325767ffffffffffffffff6004358181116102325761158f903690600401610303565b9060243590811161023257366023820112156102325780600401356115b3816102cd565b916115c16040519384610266565b81835260209160248385019160051b8301019136831161023257602401905b8282106115f1576100198587612016565b8380916115fd84610644565b8152019101906115e0565b3461023257602060031936011261023257600435611625816102e5565b73ffffffffffffffffffffffffffffffffffffffff8060005416330361046e57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360025560405191168152a1005b3461023257606060031936011261023257600435611695816102e5565b60243560443567ffffffffffffffff8111610232577f2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e916116ee6116e061177593369060040161055c565b906116e96117db565b611d6d565b6116f8843361259c565b61177e575b61173933600c1b85836b3fffffffffffffffffffffff61173383859060205263739094b1600c52600c1c6000526034600c205490565b16612529565b611744813386611ce0565b6040805173ffffffffffffffffffffffffffffffffffffffff95909516855260208501919091523393918291820190565b0390a260018055005b6117878461186f565b6116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600182018092116117c957565b61178c565b919082018092116117c957565b6002600154146117ec576002600155565b60046040517fab143c06000000000000000000000000000000000000000000000000000000008152fd5b601c600060649281946020966040519860605260405260601b602c526f23b872dd000000000000000000000000600c525af13d15600160005114171615611861576000606052604052565b637939f4246000526004601cfd5b33600c1b61189382829060205263739094b1600c52600c1c6000526034600c205490565b908115610cee57827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6118dc9316919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff60405191168152600060208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2565b92949761194e9073ffffffffffffffffffffffffffffffffffffffff9395986116e96117db565b169361195d6106e1868461259c565b611c285761196b8583612565565b9669ffffffffffffffffffff9687811693848a10611bfe57600c1b976119926004546117bb565b9560026119a9886000526005602052604060002090565b0154431115611bd4576003546119bf90436117ce565b976119e08a8c9060205263739094b1600c52600c1c6000526034600c205490565b605f1c611a009073ffffffffffffffffffffffffffffffffffffffff1690565b611a086102ac565b8c8152602081018a9052604081019a909a5273ffffffffffffffffffffffffffffffffffffffff1660608a015269ffffffffffffffffffff16608089015260a0880192611a6190849069ffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff1660c08801523360e088015273ffffffffffffffffffffffffffffffffffffffff88166101008801528315611ae4575050611ad89791611ad3913391611acd8a6374dfee70600c52600c1c60005260206000205490565b91612422565b612146565b90611ae260018055565b565b819350809250611b0868056bc75e2d63100000925169ffffffffffffffffffff1690565b1611611b1e575050611b1995612146565b611ad8565b611b4f611b4a611b3b33600c1b6000526006602052604060002090565b54670de0b6b3a7640000900490565b6124b0565b81611b6d611b67855169ffffffffffffffffffff1690565b92611c52565b911611918215611bb1575b5050611b8757611b1995612146565b60046040517f1c18f846000000000000000000000000000000000000000000000000000000008152fd5b5169d3c21bcecceda1000000925069ffffffffffffffffffff1616113880611b78565b60046040517fd0404f85000000000000000000000000000000000000000000000000000000008152fd5b60046040517f22bbb43c000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb2e532de000000000000000000000000000000000000000000000000000000008152fd5b90670de0b6b3a7640000918281029281840414901517156117c957565b919082039182116117c957565b9060806020927f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a160ff9796604051966000998a968795865216875260405280606052105afa508251923d15611cd357606052604052565b638baa579f90526004601cfd5b60109260209260145260345260446000938480936fa9059cbb00000000000000000000000082525af13d156001835114171615611d1c57603452565b6390b8ec1890526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611d685760051b0190565b611d29565b6000905b828210611d8e575010611d8057565b63dfb035c96000526004601cfd5b90611dae611d9d828585611d58565b356000526005602052604060002090565b611db7816120cd565b805490611dde611161600683015473ffffffffffffffffffffffffffffffffffffffff1690565b6b3fffffffffffffffffffffff611e0b82859060205263739094b1600c52600c1c6000526034600c205490565b1690600493848401946a52b7d2dcc80cd2e4000000611e41611e3a6111f2895469ffffffffffffffffffff1690565b80966117ce565b11611f9f57506005611f2e94611e7c6001989795611ebd956110ef959060205263739094b1600c52600c1c6000526034600c20908154019055565b84547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168555015473ffffffffffffffffffffffffffffffffffffffff1690565b611edb611ed4826000526006602052604060002090565b5460011c90565b68056bc75e2d631000008111611f845750611f03611f11916000526006602052604060002090565b68056bc75e2d631000009055565b5460501c73ffffffffffffffffffffffffffffffffffffffff1690565b7f830501e61b8b075e170b22a430e39454bdb12ed3e9620e586430b6ac00079da573ffffffffffffffffffffffffffffffffffffffff611f6f848888611d58565b60405190358152921691602090a20190611d71565b90611f99906000526006602052604060002090565b55611f11565b6040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b338103612008576374dfee70600c5280600052816020600020557f0b294da292f26e55fd442b5c0164fbb9013036ff00c5cfdde0efd01c1baaf632600080a3565b6385d1f7266000526004601cfd5b9060009073ffffffffffffffffffffffffffffffffffffffff825416330361046e5782519182156120c057815183036120b357602092919284818080970195019360051b0101925b83810361206c575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a30192019161205e565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b60028101544310611bd4576004015469ffffffffffffffffffff16156120ef57565b60046040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c95760010190565b9095949391938460005260056020526040600020928451845560208501516001850155604085015160028501556003840160608601516121999073ffffffffffffffffffffffffffffffffffffffff1690565b8154608088015173ffffffffffffffffffffffffffffffffffffffff929092167fffff0000000000000000000000000000000000000000000000000000000000009091161760a091821b7dffffffffffffffffffff0000000000000000000000000000000000000000161790915585018051600486019991959069ffffffffffffffffffff168a547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001669ffffffffffffffffffff909116178a5560c08701998a516122789073ffffffffffffffffffffffffffffffffffffffff1690565b81547fffff0000000000000000000000000000000000000000ffffffffffffffffffff1660509190911b7dffffffffffffffffffffffffffffffffffffffff000000000000000000001617905560e087015173ffffffffffffffffffffffffffffffffffffffff166005820190612329919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61010087015173ffffffffffffffffffffffffffffffffffffffff16906006019061238e919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61239793612529565b6004546123a390612119565b6004558294516123c69073ffffffffffffffffffffffffffffffffffffffff1690565b915190516040805192835269ffffffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff909216917f8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea6591a3565b73ffffffffffffffffffffffffffffffffffffffff8293941692612474575b50500361244a57565b60046040517f3b8474be000000000000000000000000000000000000000000000000000000008152fd5b60059291831b8101915b8135808211851b9182526020809218526040600020910192828410156124a557929061247e565b509150503880612441565b6040519060208201907f4d2b1791000000000000000000000000000000000000000000000000000000008252602483015260248252606082019082821067ffffffffffffffff8311176102a7576020926000926040525190600254617530fa90600051911561251b57565b63e10bf1cc6000526004601cfd5b9291909280848103119015176125575760205263739094b1600c52600c1c6000526034600c20908154039055565b63ce3a3d376000526004601cfd5b600092913d15612573575050565b9091925060205263739094b1600c526000526034600c20546b3fffffffffffffffffffffff1690565b600092913d156125aa575050565b9091925060205263739094b1600c526000526034600c205460ff1c90565b6040516020810181811067ffffffffffffffff8211176102a75760405260008152906000368137565b906125fb826102cd565b6126086040519182610266565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061263682946102cd565b0190602036910137565b8051821015611d685760209160051b010190565b908151156127a5576000809280519061266c826125f1565b92612676836125f1565b955b83811061268757505050509190565b806126a861269760019386612640565b516000526005602052604060002090565b546126d8576126b78185612640565b516126c28288612640565b52826126ce828a612640565b5201925b92612678565b69ffffffffffffffffffff61270660046126f56126978589612640565b015469ffffffffffffffffffff1690565b1661273b576127158185612640565b516127208288612640565b5261273461272e828a612640565b60039052565b01926126d2565b600261274a6126978387612640565b015443111561277c5761275d8185612640565b516127688288612640565b52612734612776828a612640565b60029052565b6127868185612640565b516127918288612640565b5261273461279f828a612640565b60019052565b90506127af6125c8565b90610d9e6125c856fea2646970667358221220637ef5dab3f877f94aaa3a47dff24e5d03955b1e35519a927aad5c994df7ece964736f6c63430008130033", + "bytecode": "0x608060405262002bf280380380620000178162000126565b928339810160a0828203126200010b5781516020808401519093916001600160401b03918281116200010b5784620000519185016200017f565b9062000060604085016200016a565b9260608501518181116200010b57866200007c9187016200017f565b9460808101519182116200010b57019480601f870112156200010b578551620000af620000a98262000152565b62000126565b96888089848152019260051b8201019283116200010b578801905b828210620000f157505050620000e19550620001e6565b6040516127b09081620004428239f35b815180151581036200010b578152908801908801620000ca565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b038111838210176200014c57604052565b62000110565b6001600160401b0381116200014c5760051b60200190565b51906001600160a01b03821682036200010b57565b9080601f830112156200010b578151906200019e620000a98362000152565b9182938184526020808095019260051b8201019283116200010b578301905b828210620001cc575050505090565b838091620001da846200016a565b815201910190620001bd565b600080546001600160a01b031916339081178255929695949392817f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768180a3816002556040519182527f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851160208093a18651878301979060051b810183013d1515895b811562000306575b5050506040519280840191818552518092526040840198925b828110620002e85750505050907f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d782620002d593620002db97980390a16001600160a01b031662000337565b62000390565b620002e66001600355565b565b83516001600160a01b03168a52988101989281019260010162000289565b9085826001829697989451600c1b550190838210156200032c5791509493929462000268565b509493929462000270565b6000546001600160a01b0390811633036200037f57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360015560405191168152a1565b6040516282b42960e81b8152600490fd5b60008054919290916001600160a01b031633036200037f5782519182156200043457815183036200042757602092919284818080970195019360051b0101925b838103620003df575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191620003d0565b63ff633a3890526004601cfd5b63df95788390526004601cfdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806304937320146102065780630d2a2d441461020157806313af4035146101fc5780632cc0f905146101f7578063328a7181146101f2578063367821f0146101ed578063461f3120146101a757806349ef8448146101e85780634b2ae980146101e3578063574983c8146101de5780635fd8c710146101d957806369cc6af4146101d45780636d82d9e0146101cf57806377cd38a4146101ca5780637f94f65d146101c557806380e1d302146101c057806384ab1d28146101bb5780638da5cb5b146101b65780638db564c2146101b15780639872dbfe146101ac57806398a26871146101a75780639eee8d4b146101a2578063ad8f2eed1461019d578063b0983d3914610198578063c52164c614610193578063c593dfd81461018e578063d1c0702814610189578063d4fac45d14610184578063d6e8b9731461017f578063f7d0e04b1461017a5763fb8c5ef00361000e576115d8565b611568565b6114bd565b6114a4565b611402565b610f65565b610f31565b610ef7565b610ea1565b610e61565b61093d565b610e43565b610e25565b610df1565b610dbb565b610da2565b610d51565b610d19565b610c08565b610bc8565b610b45565b610ae1565b610ab7565b610a20565b610882565b610651565b61058d565b610498565b61036b565b346102325760206003193601126102325760043560005260066020526020604060002054604051908152f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102a757604052565b610237565b60405190610120820182811067ffffffffffffffff8211176102a757604052565b67ffffffffffffffff81116102a75760051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81160361023257565b81601f820112156102325780359161031a836102cd565b926103286040519485610266565b808452602092838086019260051b820101928311610232578301905b828210610352575050505090565b8380918335610360816102e5565b815201910190610344565b34610232576020806003193601126102325760043567ffffffffffffffff81116102325761039d903690600401610303565b9073ffffffffffffffffffffffffffffffffffffffff918260005416330361046e57805181830192849160051b830181013d1515855b811561043a575b50505060405192818401908285525180915260408401949160005b828110610424577f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d786880387a1005b83518516875295810195928101926001016103f5565b90838260018298969499979951600c1b550190838210156104625791509593959492946103d3565b509593959492946103da565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576004356104b5816102e5565b600090815473ffffffffffffffffffffffffffffffffffffffff808216330361046e577fffffffffffffffffffffffff0000000000000000000000000000000000000000921691829116178255337f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768380a380f35b6064359069ffffffffffffffffffff8216820361023257565b6084359069ffffffffffffffffffff8216820361023257565b9181601f840112156102325782359167ffffffffffffffff8311610232576020808501948460051b01011161023257565b346102325760e0600319360112610232576004356105aa816102e5565b602435906105b7826102e5565b604435916105c4836102e5565b6105cc61052a565b916105d5610543565b67ffffffffffffffff9360a435858111610232576105f790369060040161055c565b92909160c435968711610232576106319761061961062198369060040161055c565b97909661193f565b6040519081529081906020820190565b0390f35b60643590811515820361023257565b3590811515820361023257565b346102325760a06003193601126102325760043561066e816102e5565b6024356bffffffffffffffffffffffff8116908181036102325760443590610695826102e5565b61069d610635565b6084359373ffffffffffffffffffffffffffffffffffffffff8087169033600c1b90861615610858576106e56106e18363cbc9d1c4600c526000526020600c205490565b1590565b61082e576b3fffffffffffffffffffffff61071683839060205263739094b1600c52600c1c6000526034600c205490565b16906a52b7d2dcc80cd2e400000061072e85846117e6565b1161080457826107ef976107a89661077a8961079f967f63d8d7d5e63e9840ec91a12a160d27b7cfab294f6ba070b7359692acfe6b03bf9d61076e6117f3565b806107f4575b506117e6565b9060ff1b91605f1b1717919060205263739094b1600c52600c1c6000526034600c2055565b3090339061182e565b6107b26001600355565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526bffffffffffffffffffffffff90911660208501523393918291820190565b0390a2005b6107fe9033612171565b38610774565b60046040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1578328e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6a3bc53e000000000000000000000000000000000000000000000000000000008152fd5b346102325760206003193601126102325760048035600090815260056020818152604092839020805460018201546002830154600384015497840154958401546006909401548751938452948301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff808616606086015269ffffffffffffffffffff60a096871c8116608087015284169585019590955260509290921c841660c084015290831660e08301529190911661010082015261012090f35b34610232576020600319360112610232576020600435546040519015158152f35b90815180825260208080930193019160005b82811061097e575050505090565b835185529381019392810192600101610970565b906109a59060408352604083019061095e565b81810360209283015282518082529082019282019160009190825b8281106109cf57505050505090565b909192939485516004808210156109f4575081528201948201939291906001016109c0565b8660216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b34610232576020806003193601126102325760043567ffffffffffffffff8111610232573660238201121561023257806004013590610a5e826102cd565b91610a6c6040519384610266565b80835260248484019160051b8301019136831161023257602401905b828210610aa857610a9884612616565b9061063160405192839283610992565b81358152908401908401610a88565b34610232576020600319360112610232576020600435610ad6816102e5565b60405190600c1b8152f35b346102325760206003193601126102325760043573ffffffffffffffffffffffffffffffffffffffff60005416330361046e576020817f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851192600255604051908152a1005b3461023257600080600319360112610bc55773ffffffffffffffffffffffffffffffffffffffff815416330361046e57478180808084335af115610bb8576040805133815260208101929092527feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d91a180f35b63b12d13eb82526004601cfd5b80fd5b34610232576020600319360112610232576020610bfe600435610bea816102e5565b63cbc9d1c4600c526000526020600c205490565b6040519015158152f35b3461023257604060031936011261023257600435610c25816102e5565b602435801515908181036102325733600c1b610c5784829060205263739094b1600c52600c1c6000526034600c205490565b918215610cef57610ca6927f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff869260ff1b911617919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff6040519216825260208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2005b60046040517f87138d5c000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576020610d496004356374dfee70600c52600c1c60005260206000205490565b604051908152f35b3461023257604060031936011261023257610019600435610d71816102e5565b60243590612171565b600319604091011261023257600435610d92816102e5565b90602435610d9f816102e5565b90565b34610232576020610bfe610db536610d7a565b9061255e565b3461023257602060031936011261023257602060405173ffffffffffffffffffffffffffffffffffffffff600435600c1c168152f35b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b34610232576000600319360112610232576020600454604051908152f35b34610232576000600319360112610232576020600254604051908152f35b34610232576040600319360112610232576020610d49602435610e83816102e5565b6004359060205263739094b1600c52600c1c6000526034600c205490565b3461023257610eaf36610d7a565b6000903d15610eda575b60208273ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60205263739094b1600c525260206034600c2054605f1c38610eb9565b346102325760206003193601126102325760043567ffffffffffffffff811161023257610f2b61001991369060040161055c565b90611f17565b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346102325760a06003193601126102325760043560843560ff8116810361023257610f8e6117f3565b610fa2826000526005602052604060002090565b60048101805469ffffffffffffffffffff169269ffffffffffffffffffff918285169384156113c75760028101958654431161139d577f364537f14276f2a0ce9905588413f96454cbb8fb2e4f5308389307c1098bede89661123660058461115b61110998600061112d8d6112789d6110e560036110d59d019b6110a98d549e8f604051928391602083019573ffffffffffffffffffffffffffffffffffffffff602435921687917fffffffffffffffffffff00000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000603e959360601b16845260b01b166014830152601e8201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610266565b5190209560643560443588611d9c565b611122611109600689015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b9b60a01c1690611d8f565b8a547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168b55965560019055565b019161117e611109845473ffffffffffffffffffffffffffffffffffffffff1690565b33146113585783546111a99060a01c69ffffffffffffffffffff165b69ffffffffffffffffffff1690565b6111cb6111c333600c1b6000526006602052604060002090565b9182546117e6565b90556112076111f76111f1855473ffffffffffffffffffffffffffffffffffffffff1690565b600c1b90565b6000526006602052604060002090565b6112128a82546117e6565b90555b855460501c73ffffffffffffffffffffffffffffffffffffffff1685611e8a565b81546112509060a01c69ffffffffffffffffffff1661119a565b80611293575b505050505473ffffffffffffffffffffffffffffffffffffffff9060501c1690565b60408051948552602085019290925292a26100196001600355565b6112b4611109835473ffffffffffffffffffffffffffffffffffffffff1690565b3314611345575061119a61130861133c94936113216112ea611334955473ffffffffffffffffffffffffffffffffffffffff1690565b61131a61119a611308855469ffffffffffffffffffff9060a01c1690565b60011c697fffffffffffffffffff1690565b9087611e8a565b5460a01c69ffffffffffffffffffff1690565b903390611e8a565b38808080611256565b915050611353913390611e8a565b61133c565b61137c8961137761119a875469ffffffffffffffffffff9060a01c1690565b6117e6565b6113966111c333600c1b6000526006602052604060002090565b9055611215565b60046040517ff6fafba0000000000000000000000000000000000000000000000000000000008152fd5b60046040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b906020610d9f92818152019061095e565b346102325760406003193601126102325760043567ffffffffffffffff811161023257611433903690600401610303565b60243590611440826102e5565b60009181519161144f836125b3565b935b838110611466576040518061063187826113f1565b806114938473ffffffffffffffffffffffffffffffffffffffff61148c60019587612602565b5116612527565b61149d8288612602565b5201611451565b34610232576020610d496114b736610d7a565b90612527565b346102325760406003193601126102325767ffffffffffffffff600435818111610232576114ef903690600401610303565b906024359081116102325736602382011215610232578060040135611513816102cd565b916115216040519384610266565b81835260209160248385019160051b8301019136831161023257602401905b8282106115515761001985876116ed565b83809161155d84610644565b815201910190611540565b3461023257602060031936011261023257600435611585816102e5565b73ffffffffffffffffffffffffffffffffffffffff8060005416330361046e57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360015560405191168152a1005b34610232576060600319360112610232576004356115f5816102e5565b60243560443567ffffffffffffffff8111610232577f2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e9161164e6116406116d593369060040161055c565b906116496117f3565b611f17565b611658843361255e565b6116df575b61169933600c1b85836b3fffffffffffffffffffffff61169383859060205263739094b1600c52600c1c6000526034600c205490565b166124eb565b6116a4813386611e8a565b6040805173ffffffffffffffffffffffffffffffffffffffff95909516855260208501919091523393918291820190565b0390a26001600355005b6116e884611887565b61165d565b9060009073ffffffffffffffffffffffffffffffffffffffff825416330361046e578251918215611797578151830361178a57602092919284818080970195019360051b0101925b838103611743575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191611735565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600182018092116117e157565b6117a4565b919082018092116117e157565b600260035414611804576002600355565b60046040517fab143c06000000000000000000000000000000000000000000000000000000008152fd5b601c600060649281946020966040519860605260405260601b602c526f23b872dd000000000000000000000000600c525af13d15600160005114171615611879576000606052604052565b637939f4246000526004601cfd5b33600c1b6118ab82829060205263739094b1600c52600c1c6000526034600c205490565b908115610cef57827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6118f49316919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff60405191168152600060208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2565b9294976119669073ffffffffffffffffffffffffffffffffffffffff9395986116496117f3565b16936119756106e1868461255e565b611c41576119838583612527565b9669ffffffffffffffffffff9687811693848a10611c1757600c1b976119aa6004546117d3565b9560026119c1886000526005602052604060002090565b0154431115611bed576002546119d790436117e6565b976119f88a8c9060205263739094b1600c52600c1c6000526034600c205490565b605f1c611a189073ffffffffffffffffffffffffffffffffffffffff1690565b611a206102ac565b8c8152602081018a9052604081019a909a5273ffffffffffffffffffffffffffffffffffffffff1660608a015269ffffffffffffffffffff16608089015260a0880192611a7990849069ffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff1660c08801523360e088015273ffffffffffffffffffffffffffffffffffffffff88166101008801528315611afd575050611af09791611aeb913391611ae58a6374dfee70600c52600c1c60005260206000205490565b91611c88565b61220f565b90611afb6001600355565b565b819350809250611b2168056bc75e2d63100000925169ffffffffffffffffffff1690565b1611611b37575050611b329561220f565b611af0565b611b68611b63611b5433600c1b6000526006602052604060002090565b54670de0b6b3a7640000900490565b611d16565b81611b86611b80855169ffffffffffffffffffff1690565b92611c6b565b911611918215611bca575b5050611ba057611b329561220f565b60046040517f1c18f846000000000000000000000000000000000000000000000000000000008152fd5b5169d3c21bcecceda1000000925069ffffffffffffffffffff1616113880611b91565b60046040517fd0404f85000000000000000000000000000000000000000000000000000000008152fd5b60046040517f22bbb43c000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb2e532de000000000000000000000000000000000000000000000000000000008152fd5b90670de0b6b3a7640000918281029281840414901517156117e157565b73ffffffffffffffffffffffffffffffffffffffff8293941692611cda575b505003611cb057565b60046040517f3b8474be000000000000000000000000000000000000000000000000000000008152fd5b60059291831b8101915b8135808211851b918252602080921852604060002091019282841015611d0b579290611ce4565b509150503880611ca7565b6040519060208201907f4d2b1791000000000000000000000000000000000000000000000000000000008252602483015260248252606082019082821067ffffffffffffffff8311176102a7576020926000926040525190600154617530fa906000519115611d8157565b63e10bf1cc6000526004601cfd5b919082039182116117e157565b918254611e605760806020927f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1948452600094859384927b19457468657265756d205369676e6564204d6573736167653a0a3332845260ff603c600420996040519a865216875260405280606052105afa508051903d15611e53576060526040829052600c1b5415611e2b5750565b807f815e1d640000000000000000000000000000000000000000000000000000000060049252fd5b638baa579f90526004601cfd5b60046040517ff490a6ea000000000000000000000000000000000000000000000000000000008152fd5b60109260209260145260345260446000938480936fa9059cbb00000000000000000000000082525af13d156001835114171615611ec657603452565b6390b8ec1890526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611f125760051b0190565b611ed3565b6000905b828210611f38575010611f2a57565b63dfb035c96000526004601cfd5b90611f58611f47828585611f02565b356000526005602052604060002090565b611f61816121c0565b805490611f88611109600683015473ffffffffffffffffffffffffffffffffffffffff1690565b6b3fffffffffffffffffffffff611fb582859060205263739094b1600c52600c1c6000526034600c205490565b1690600493848401946a52b7d2dcc80cd2e4000000611feb611fe461119a895469ffffffffffffffffffff1690565b80966117e6565b11612149575060056120d8946120266001989795612067956111f1959060205263739094b1600c52600c1c6000526034600c20908154019055565b84547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168555015473ffffffffffffffffffffffffffffffffffffffff1690565b61208561207e826000526006602052604060002090565b5460011c90565b68056bc75e2d63100000811161212e57506120ad6120bb916000526006602052604060002090565b68056bc75e2d631000009055565b5460501c73ffffffffffffffffffffffffffffffffffffffff1690565b7f830501e61b8b075e170b22a430e39454bdb12ed3e9620e586430b6ac00079da573ffffffffffffffffffffffffffffffffffffffff612119848888611f02565b60405190358152921691602090a20190611f1b565b90612143906000526006602052604060002090565b556120bb565b6040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b3381036121b2576374dfee70600c5280600052816020600020557f0b294da292f26e55fd442b5c0164fbb9013036ff00c5cfdde0efd01c1baaf632600080a3565b6385d1f7266000526004601cfd5b60028101544310611bed576004015469ffffffffffffffffffff16156113c757565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117e15760010190565b9095949391938460005260056020526040600020928451845560208501516001850155604085015160028501556003840160608601516122629073ffffffffffffffffffffffffffffffffffffffff1690565b8154608088015173ffffffffffffffffffffffffffffffffffffffff929092167fffff0000000000000000000000000000000000000000000000000000000000009091161760a091821b7dffffffffffffffffffff0000000000000000000000000000000000000000161790915585018051600486019991959069ffffffffffffffffffff168a547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001669ffffffffffffffffffff909116178a5560c08701998a516123419073ffffffffffffffffffffffffffffffffffffffff1690565b81547fffff0000000000000000000000000000000000000000ffffffffffffffffffff1660509190911b7dffffffffffffffffffffffffffffffffffffffff000000000000000000001617905560e087015173ffffffffffffffffffffffffffffffffffffffff1660058201906123f2919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61010087015173ffffffffffffffffffffffffffffffffffffffff169060060190612457919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b612460936124eb565b60045461246c906121e2565b60045582945161248f9073ffffffffffffffffffffffffffffffffffffffff1690565b915190516040805192835269ffffffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff909216917f8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea6591a3565b9291909280848103119015176125195760205263739094b1600c52600c1c6000526034600c20908154039055565b63ce3a3d376000526004601cfd5b600092913d15612535575050565b9091925060205263739094b1600c526000526034600c20546b3fffffffffffffffffffffff1690565b600092913d1561256c575050565b9091925060205263739094b1600c526000526034600c205460ff1c90565b6040516020810181811067ffffffffffffffff8211176102a75760405260008152906000368137565b906125bd826102cd565b6125ca6040519182610266565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06125f882946102cd565b0190602036910137565b8051821015611f125760209160051b010190565b90815115612767576000809280519061262e826125b3565b92612638836125b3565b955b83811061264957505050509190565b8061266a61265960019386612602565b516000526005602052604060002090565b5461269a576126798185612602565b516126848288612602565b5282612690828a612602565b5201925b9261263a565b69ffffffffffffffffffff6126c860046126b76126598589612602565b015469ffffffffffffffffffff1690565b166126fd576126d78185612602565b516126e28288612602565b526126f66126f0828a612602565b60039052565b0192612694565b600261270c6126598387612602565b015443111561273e5761271f8185612602565b5161272a8288612602565b526126f6612738828a612602565b60029052565b6127488185612602565b516127538288612602565b526126f6612761828a612602565b60019052565b905061277161258a565b90610d9f61258a56fea26469706673582212203e8aba08cc8e47b6111780acdb9c2bff6dec6f7ca5f953c7cbc481f238b3d8fd64736f6c63430008130033", + "deployedBytecode": "0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806304937320146102065780630d2a2d441461020157806313af4035146101fc5780632cc0f905146101f7578063328a7181146101f2578063367821f0146101ed578063461f3120146101a757806349ef8448146101e85780634b2ae980146101e3578063574983c8146101de5780635fd8c710146101d957806369cc6af4146101d45780636d82d9e0146101cf57806377cd38a4146101ca5780637f94f65d146101c557806380e1d302146101c057806384ab1d28146101bb5780638da5cb5b146101b65780638db564c2146101b15780639872dbfe146101ac57806398a26871146101a75780639eee8d4b146101a2578063ad8f2eed1461019d578063b0983d3914610198578063c52164c614610193578063c593dfd81461018e578063d1c0702814610189578063d4fac45d14610184578063d6e8b9731461017f578063f7d0e04b1461017a5763fb8c5ef00361000e576115d8565b611568565b6114bd565b6114a4565b611402565b610f65565b610f31565b610ef7565b610ea1565b610e61565b61093d565b610e43565b610e25565b610df1565b610dbb565b610da2565b610d51565b610d19565b610c08565b610bc8565b610b45565b610ae1565b610ab7565b610a20565b610882565b610651565b61058d565b610498565b61036b565b346102325760206003193601126102325760043560005260066020526020604060002054604051908152f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102a757604052565b610237565b60405190610120820182811067ffffffffffffffff8211176102a757604052565b67ffffffffffffffff81116102a75760051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81160361023257565b81601f820112156102325780359161031a836102cd565b926103286040519485610266565b808452602092838086019260051b820101928311610232578301905b828210610352575050505090565b8380918335610360816102e5565b815201910190610344565b34610232576020806003193601126102325760043567ffffffffffffffff81116102325761039d903690600401610303565b9073ffffffffffffffffffffffffffffffffffffffff918260005416330361046e57805181830192849160051b830181013d1515855b811561043a575b50505060405192818401908285525180915260408401949160005b828110610424577f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d786880387a1005b83518516875295810195928101926001016103f5565b90838260018298969499979951600c1b550190838210156104625791509593959492946103d3565b509593959492946103da565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576004356104b5816102e5565b600090815473ffffffffffffffffffffffffffffffffffffffff808216330361046e577fffffffffffffffffffffffff0000000000000000000000000000000000000000921691829116178255337f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768380a380f35b6064359069ffffffffffffffffffff8216820361023257565b6084359069ffffffffffffffffffff8216820361023257565b9181601f840112156102325782359167ffffffffffffffff8311610232576020808501948460051b01011161023257565b346102325760e0600319360112610232576004356105aa816102e5565b602435906105b7826102e5565b604435916105c4836102e5565b6105cc61052a565b916105d5610543565b67ffffffffffffffff9360a435858111610232576105f790369060040161055c565b92909160c435968711610232576106319761061961062198369060040161055c565b97909661193f565b6040519081529081906020820190565b0390f35b60643590811515820361023257565b3590811515820361023257565b346102325760a06003193601126102325760043561066e816102e5565b6024356bffffffffffffffffffffffff8116908181036102325760443590610695826102e5565b61069d610635565b6084359373ffffffffffffffffffffffffffffffffffffffff8087169033600c1b90861615610858576106e56106e18363cbc9d1c4600c526000526020600c205490565b1590565b61082e576b3fffffffffffffffffffffff61071683839060205263739094b1600c52600c1c6000526034600c205490565b16906a52b7d2dcc80cd2e400000061072e85846117e6565b1161080457826107ef976107a89661077a8961079f967f63d8d7d5e63e9840ec91a12a160d27b7cfab294f6ba070b7359692acfe6b03bf9d61076e6117f3565b806107f4575b506117e6565b9060ff1b91605f1b1717919060205263739094b1600c52600c1c6000526034600c2055565b3090339061182e565b6107b26001600355565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526bffffffffffffffffffffffff90911660208501523393918291820190565b0390a2005b6107fe9033612171565b38610774565b60046040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1578328e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6a3bc53e000000000000000000000000000000000000000000000000000000008152fd5b346102325760206003193601126102325760048035600090815260056020818152604092839020805460018201546002830154600384015497840154958401546006909401548751938452948301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff808616606086015269ffffffffffffffffffff60a096871c8116608087015284169585019590955260509290921c841660c084015290831660e08301529190911661010082015261012090f35b34610232576020600319360112610232576020600435546040519015158152f35b90815180825260208080930193019160005b82811061097e575050505090565b835185529381019392810192600101610970565b906109a59060408352604083019061095e565b81810360209283015282518082529082019282019160009190825b8281106109cf57505050505090565b909192939485516004808210156109f4575081528201948201939291906001016109c0565b8660216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b34610232576020806003193601126102325760043567ffffffffffffffff8111610232573660238201121561023257806004013590610a5e826102cd565b91610a6c6040519384610266565b80835260248484019160051b8301019136831161023257602401905b828210610aa857610a9884612616565b9061063160405192839283610992565b81358152908401908401610a88565b34610232576020600319360112610232576020600435610ad6816102e5565b60405190600c1b8152f35b346102325760206003193601126102325760043573ffffffffffffffffffffffffffffffffffffffff60005416330361046e576020817f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851192600255604051908152a1005b3461023257600080600319360112610bc55773ffffffffffffffffffffffffffffffffffffffff815416330361046e57478180808084335af115610bb8576040805133815260208101929092527feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d91a180f35b63b12d13eb82526004601cfd5b80fd5b34610232576020600319360112610232576020610bfe600435610bea816102e5565b63cbc9d1c4600c526000526020600c205490565b6040519015158152f35b3461023257604060031936011261023257600435610c25816102e5565b602435801515908181036102325733600c1b610c5784829060205263739094b1600c52600c1c6000526034600c205490565b918215610cef57610ca6927f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff869260ff1b911617919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff6040519216825260208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2005b60046040517f87138d5c000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576020610d496004356374dfee70600c52600c1c60005260206000205490565b604051908152f35b3461023257604060031936011261023257610019600435610d71816102e5565b60243590612171565b600319604091011261023257600435610d92816102e5565b90602435610d9f816102e5565b90565b34610232576020610bfe610db536610d7a565b9061255e565b3461023257602060031936011261023257602060405173ffffffffffffffffffffffffffffffffffffffff600435600c1c168152f35b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b34610232576000600319360112610232576020600454604051908152f35b34610232576000600319360112610232576020600254604051908152f35b34610232576040600319360112610232576020610d49602435610e83816102e5565b6004359060205263739094b1600c52600c1c6000526034600c205490565b3461023257610eaf36610d7a565b6000903d15610eda575b60208273ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60205263739094b1600c525260206034600c2054605f1c38610eb9565b346102325760206003193601126102325760043567ffffffffffffffff811161023257610f2b61001991369060040161055c565b90611f17565b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346102325760a06003193601126102325760043560843560ff8116810361023257610f8e6117f3565b610fa2826000526005602052604060002090565b60048101805469ffffffffffffffffffff169269ffffffffffffffffffff918285169384156113c75760028101958654431161139d577f364537f14276f2a0ce9905588413f96454cbb8fb2e4f5308389307c1098bede89661123660058461115b61110998600061112d8d6112789d6110e560036110d59d019b6110a98d549e8f604051928391602083019573ffffffffffffffffffffffffffffffffffffffff602435921687917fffffffffffffffffffff00000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000603e959360601b16845260b01b166014830152601e8201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610266565b5190209560643560443588611d9c565b611122611109600689015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b9b60a01c1690611d8f565b8a547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168b55965560019055565b019161117e611109845473ffffffffffffffffffffffffffffffffffffffff1690565b33146113585783546111a99060a01c69ffffffffffffffffffff165b69ffffffffffffffffffff1690565b6111cb6111c333600c1b6000526006602052604060002090565b9182546117e6565b90556112076111f76111f1855473ffffffffffffffffffffffffffffffffffffffff1690565b600c1b90565b6000526006602052604060002090565b6112128a82546117e6565b90555b855460501c73ffffffffffffffffffffffffffffffffffffffff1685611e8a565b81546112509060a01c69ffffffffffffffffffff1661119a565b80611293575b505050505473ffffffffffffffffffffffffffffffffffffffff9060501c1690565b60408051948552602085019290925292a26100196001600355565b6112b4611109835473ffffffffffffffffffffffffffffffffffffffff1690565b3314611345575061119a61130861133c94936113216112ea611334955473ffffffffffffffffffffffffffffffffffffffff1690565b61131a61119a611308855469ffffffffffffffffffff9060a01c1690565b60011c697fffffffffffffffffff1690565b9087611e8a565b5460a01c69ffffffffffffffffffff1690565b903390611e8a565b38808080611256565b915050611353913390611e8a565b61133c565b61137c8961137761119a875469ffffffffffffffffffff9060a01c1690565b6117e6565b6113966111c333600c1b6000526006602052604060002090565b9055611215565b60046040517ff6fafba0000000000000000000000000000000000000000000000000000000008152fd5b60046040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b906020610d9f92818152019061095e565b346102325760406003193601126102325760043567ffffffffffffffff811161023257611433903690600401610303565b60243590611440826102e5565b60009181519161144f836125b3565b935b838110611466576040518061063187826113f1565b806114938473ffffffffffffffffffffffffffffffffffffffff61148c60019587612602565b5116612527565b61149d8288612602565b5201611451565b34610232576020610d496114b736610d7a565b90612527565b346102325760406003193601126102325767ffffffffffffffff600435818111610232576114ef903690600401610303565b906024359081116102325736602382011215610232578060040135611513816102cd565b916115216040519384610266565b81835260209160248385019160051b8301019136831161023257602401905b8282106115515761001985876116ed565b83809161155d84610644565b815201910190611540565b3461023257602060031936011261023257600435611585816102e5565b73ffffffffffffffffffffffffffffffffffffffff8060005416330361046e57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360015560405191168152a1005b34610232576060600319360112610232576004356115f5816102e5565b60243560443567ffffffffffffffff8111610232577f2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e9161164e6116406116d593369060040161055c565b906116496117f3565b611f17565b611658843361255e565b6116df575b61169933600c1b85836b3fffffffffffffffffffffff61169383859060205263739094b1600c52600c1c6000526034600c205490565b166124eb565b6116a4813386611e8a565b6040805173ffffffffffffffffffffffffffffffffffffffff95909516855260208501919091523393918291820190565b0390a26001600355005b6116e884611887565b61165d565b9060009073ffffffffffffffffffffffffffffffffffffffff825416330361046e578251918215611797578151830361178a57602092919284818080970195019360051b0101925b838103611743575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191611735565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600182018092116117e157565b6117a4565b919082018092116117e157565b600260035414611804576002600355565b60046040517fab143c06000000000000000000000000000000000000000000000000000000008152fd5b601c600060649281946020966040519860605260405260601b602c526f23b872dd000000000000000000000000600c525af13d15600160005114171615611879576000606052604052565b637939f4246000526004601cfd5b33600c1b6118ab82829060205263739094b1600c52600c1c6000526034600c205490565b908115610cef57827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6118f49316919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff60405191168152600060208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2565b9294976119669073ffffffffffffffffffffffffffffffffffffffff9395986116496117f3565b16936119756106e1868461255e565b611c41576119838583612527565b9669ffffffffffffffffffff9687811693848a10611c1757600c1b976119aa6004546117d3565b9560026119c1886000526005602052604060002090565b0154431115611bed576002546119d790436117e6565b976119f88a8c9060205263739094b1600c52600c1c6000526034600c205490565b605f1c611a189073ffffffffffffffffffffffffffffffffffffffff1690565b611a206102ac565b8c8152602081018a9052604081019a909a5273ffffffffffffffffffffffffffffffffffffffff1660608a015269ffffffffffffffffffff16608089015260a0880192611a7990849069ffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff1660c08801523360e088015273ffffffffffffffffffffffffffffffffffffffff88166101008801528315611afd575050611af09791611aeb913391611ae58a6374dfee70600c52600c1c60005260206000205490565b91611c88565b61220f565b90611afb6001600355565b565b819350809250611b2168056bc75e2d63100000925169ffffffffffffffffffff1690565b1611611b37575050611b329561220f565b611af0565b611b68611b63611b5433600c1b6000526006602052604060002090565b54670de0b6b3a7640000900490565b611d16565b81611b86611b80855169ffffffffffffffffffff1690565b92611c6b565b911611918215611bca575b5050611ba057611b329561220f565b60046040517f1c18f846000000000000000000000000000000000000000000000000000000008152fd5b5169d3c21bcecceda1000000925069ffffffffffffffffffff1616113880611b91565b60046040517fd0404f85000000000000000000000000000000000000000000000000000000008152fd5b60046040517f22bbb43c000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb2e532de000000000000000000000000000000000000000000000000000000008152fd5b90670de0b6b3a7640000918281029281840414901517156117e157565b73ffffffffffffffffffffffffffffffffffffffff8293941692611cda575b505003611cb057565b60046040517f3b8474be000000000000000000000000000000000000000000000000000000008152fd5b60059291831b8101915b8135808211851b918252602080921852604060002091019282841015611d0b579290611ce4565b509150503880611ca7565b6040519060208201907f4d2b1791000000000000000000000000000000000000000000000000000000008252602483015260248252606082019082821067ffffffffffffffff8311176102a7576020926000926040525190600154617530fa906000519115611d8157565b63e10bf1cc6000526004601cfd5b919082039182116117e157565b918254611e605760806020927f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1948452600094859384927b19457468657265756d205369676e6564204d6573736167653a0a3332845260ff603c600420996040519a865216875260405280606052105afa508051903d15611e53576060526040829052600c1b5415611e2b5750565b807f815e1d640000000000000000000000000000000000000000000000000000000060049252fd5b638baa579f90526004601cfd5b60046040517ff490a6ea000000000000000000000000000000000000000000000000000000008152fd5b60109260209260145260345260446000938480936fa9059cbb00000000000000000000000082525af13d156001835114171615611ec657603452565b6390b8ec1890526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611f125760051b0190565b611ed3565b6000905b828210611f38575010611f2a57565b63dfb035c96000526004601cfd5b90611f58611f47828585611f02565b356000526005602052604060002090565b611f61816121c0565b805490611f88611109600683015473ffffffffffffffffffffffffffffffffffffffff1690565b6b3fffffffffffffffffffffff611fb582859060205263739094b1600c52600c1c6000526034600c205490565b1690600493848401946a52b7d2dcc80cd2e4000000611feb611fe461119a895469ffffffffffffffffffff1690565b80966117e6565b11612149575060056120d8946120266001989795612067956111f1959060205263739094b1600c52600c1c6000526034600c20908154019055565b84547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168555015473ffffffffffffffffffffffffffffffffffffffff1690565b61208561207e826000526006602052604060002090565b5460011c90565b68056bc75e2d63100000811161212e57506120ad6120bb916000526006602052604060002090565b68056bc75e2d631000009055565b5460501c73ffffffffffffffffffffffffffffffffffffffff1690565b7f830501e61b8b075e170b22a430e39454bdb12ed3e9620e586430b6ac00079da573ffffffffffffffffffffffffffffffffffffffff612119848888611f02565b60405190358152921691602090a20190611f1b565b90612143906000526006602052604060002090565b556120bb565b6040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b3381036121b2576374dfee70600c5280600052816020600020557f0b294da292f26e55fd442b5c0164fbb9013036ff00c5cfdde0efd01c1baaf632600080a3565b6385d1f7266000526004601cfd5b60028101544310611bed576004015469ffffffffffffffffffff16156113c757565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117e15760010190565b9095949391938460005260056020526040600020928451845560208501516001850155604085015160028501556003840160608601516122629073ffffffffffffffffffffffffffffffffffffffff1690565b8154608088015173ffffffffffffffffffffffffffffffffffffffff929092167fffff0000000000000000000000000000000000000000000000000000000000009091161760a091821b7dffffffffffffffffffff0000000000000000000000000000000000000000161790915585018051600486019991959069ffffffffffffffffffff168a547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001669ffffffffffffffffffff909116178a5560c08701998a516123419073ffffffffffffffffffffffffffffffffffffffff1690565b81547fffff0000000000000000000000000000000000000000ffffffffffffffffffff1660509190911b7dffffffffffffffffffffffffffffffffffffffff000000000000000000001617905560e087015173ffffffffffffffffffffffffffffffffffffffff1660058201906123f2919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61010087015173ffffffffffffffffffffffffffffffffffffffff169060060190612457919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b612460936124eb565b60045461246c906121e2565b60045582945161248f9073ffffffffffffffffffffffffffffffffffffffff1690565b915190516040805192835269ffffffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff909216917f8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea6591a3565b9291909280848103119015176125195760205263739094b1600c52600c1c6000526034600c20908154039055565b63ce3a3d376000526004601cfd5b600092913d15612535575050565b9091925060205263739094b1600c526000526034600c20546b3fffffffffffffffffffffff1690565b600092913d1561256c575050565b9091925060205263739094b1600c526000526034600c205460ff1c90565b6040516020810181811067ffffffffffffffff8211176102a75760405260008152906000368137565b906125bd826102cd565b6125ca6040519182610266565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06125f882946102cd565b0190602036910137565b8051821015611f125760209160051b010190565b90815115612767576000809280519061262e826125b3565b92612638836125b3565b955b83811061264957505050509190565b8061266a61265960019386612602565b516000526005602052604060002090565b5461269a576126798185612602565b516126848288612602565b5282612690828a612602565b5201925b9261263a565b69ffffffffffffffffffff6126c860046126b76126598589612602565b015469ffffffffffffffffffff1690565b166126fd576126d78185612602565b516126e28288612602565b526126f66126f0828a612602565b60039052565b0192612694565b600261270c6126598387612602565b015443111561273e5761271f8185612602565b5161272a8288612602565b526126f6612738828a612602565b60029052565b6127488185612602565b516127538288612602565b526126f6612761828a612602565b60019052565b905061277161258a565b90610d9f61258a56fea26469706673582212203e8aba08cc8e47b6111780acdb9c2bff6dec6f7ca5f953c7cbc481f238b3d8fd64736f6c63430008130033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/core/BaseUtils.sol b/contracts/core/BaseUtils.sol new file mode 100644 index 0000000..30c3689 --- /dev/null +++ b/contracts/core/BaseUtils.sol @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +import { OwnerSettings } from "./OwnerSettings.sol"; +import { ECDSA } from "../lib/utils/ECDSA.sol"; +import { MerkleProofLib as Merkle } from "../lib/utils/MerkleProofLib.sol"; + +abstract contract BaseUtils is OwnerSettings { + /// ███ Storage ████████████████████████████████████████████████████████████ + + /// @dev List of Pix transactions already signed. + /// mapping(bytes32 => bool) public usedTransactions; + /// @dev Value in custom storage slot given by: + /// let value := sload(bytes32). + + /// ███ Helper FX ██████████████████████████████████████████████████████████ + function _setUsedTransactions(bytes32 message) internal { + assembly { + sstore(message, true) + } + } + + function usedTransactions( + bytes32 message + ) public view returns (bool used) { + assembly { + used := sload(message) + } + } + + function _signerCheck( + bytes32 _message, + bytes32 _r, + bytes32 _s, + uint8 _v + ) internal view { + if (usedTransactions(_message)) + revert TxAlreadyUsed(); + + if ( + !validBacenSigners( + _castAddrToKey( + ECDSA.recover( + ECDSA.toEthSignedMessageHash( + _message + ), + _v, + _r, + _s + ) + ) + ) + ) revert InvalidSigner(); + } + + function _merkleVerify( + bytes32[] calldata _merkleProof, + bytes32 _root, + address _addr + ) internal pure { + if ( + !Merkle.verify( + _merkleProof, + _root, + bytes32(uint256(uint160(_addr))) + ) + ) revert AddressDenied(); + } + + function _castToUint( + uint96 _amount, + uint160 _pixTarget, + bool _valid + ) + internal + pure + returns ( + uint256 _amountCasted, + uint256 _pixTargetCasted, + uint256 _validCasted + ) + { + assembly { + _amountCasted := _amount + _pixTargetCasted := _pixTarget + _validCasted := _valid + } + } + + /// @notice Public method that handles `address` + /// to `uint256` safe type casting. + /// @dev Function sighash: 0x4b2ae980. + function _castAddrToKey( + address _addr + ) public pure returns (uint256 _key) { + // _key = uint256(uint160(address(_addr))) << 12; + assembly { + _key := shl(12, _addr) + } + } + + function _castKeyToAddr( + uint256 _key + ) public pure returns (address _addr) { + // _addr = address(uint160(uint256(_key >> 12))); + assembly { + _addr := shr(12, _key) + } + } +} diff --git a/contracts/Constants.sol b/contracts/core/Constants.sol similarity index 100% rename from contracts/Constants.sol rename to contracts/core/Constants.sol diff --git a/contracts/DataTypes.sol b/contracts/core/DataTypes.sol similarity index 100% rename from contracts/DataTypes.sol rename to contracts/core/DataTypes.sol diff --git a/contracts/EventAndErrors.sol b/contracts/core/EventAndErrors.sol similarity index 100% rename from contracts/EventAndErrors.sol rename to contracts/core/EventAndErrors.sol diff --git a/contracts/core/OwnerSettings.sol b/contracts/core/OwnerSettings.sol new file mode 100644 index 0000000..6c44980 --- /dev/null +++ b/contracts/core/OwnerSettings.sol @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +import { ERC20, SafeTransferLib } from "../lib/utils/SafeTransferLib.sol"; +import { IReputation } from "../lib/interfaces/IReputation.sol"; +import { EventAndErrors } from "./EventAndErrors.sol"; +import { Constants } from "./Constants.sol"; +import { Owned } from "../lib/auth/Owned.sol"; + +abstract contract OwnerSettings is + Constants, + EventAndErrors, + Owned(msg.sender) +{ + /// ███ Storage ████████████████████████████████████████████████████████████ + + /// @dev List of valid Bacen signature addresses + /// mapping(uint256 => bool) public validBacenSigners; + /// @dev Value in custom storage slot given by: + /// let value := sload(shl(12, address)). + + IReputation public reputation; + /// @dev Default blocks that lock will hold tokens. + uint256 public defaultLockBlocks; + + /// ███ Constructor ████████████████████████████████████████████████████████ + + constructor( + uint256 defaultBlocks, + address[] memory validSigners, + address _reputation, + address[] memory tokens, + bool[] memory tokenStates + ) { + setDefaultLockBlocks(defaultBlocks); + setValidSigners(validSigners); + setReputation(IReputation(_reputation)); + tokenSettings(tokens, tokenStates); + } + + /// ███ Owner Only █████████████████████████████████████████████████████████ + + /// @dev Contract's underlying balance withdraw method. + /// @dev Function sighash: 0x5fd8c710. + function withdrawBalance() external onlyOwner { + uint256 balance = address(this).balance; + SafeTransferLib.safeTransferETH(msg.sender, balance); + emit FundsWithdrawn(msg.sender, balance); + } + + function setReputation( + IReputation _reputation + ) public onlyOwner { + assembly { + sstore(reputation.slot, _reputation) + } + emit ReputationUpdated(address(_reputation)); + } + + function setDefaultLockBlocks( + uint256 _blocks + ) public onlyOwner { + assembly { + sstore(defaultLockBlocks.slot, _blocks) + } + emit LockBlocksUpdated(_blocks); + } + + function setValidSigners( + address[] memory _validSigners + ) public onlyOwner { + assembly { + let i := add(_validSigners, 0x20) + let end := add(i, shl(0x05, mload(_validSigners))) + for { + /* */ + } iszero(returndatasize()) { + /* */ + } { + sstore(shl(12, mload(i)), true) + i := add(i, 0x20) + + if iszero(lt(i, end)) { + break + } + } + } + emit ValidSignersUpdated(_validSigners); + } + + function tokenSettings( + address[] memory _tokens, + bool[] memory _states + ) public onlyOwner { + /* Yul Impl */ + assembly { + // first 32 bytes eq to array's length + let tLen := mload(_tokens) + // NoTokens() + if iszero(tLen) { + mstore(0x00, 0xdf957883) + revert(0x1c, 0x04) + } + // LengthMismatch() + if iszero(eq(tLen, mload(_states))) { + mstore(0x00, 0xff633a38) + revert(0x1c, 0x04) + } + let tLoc := add(_tokens, 0x20) + let sLoc := add(_states, 0x20) + for { + let end := add(tLoc, shl(5, tLen)) + } iszero(eq(tLoc, end)) { + tLoc := add(tLoc, 0x20) + sLoc := add(sLoc, 0x20) + } { + // cache hashmap entry in scratch space + mstore(0x0c, _ALLOWED_ERC20_SLOT_SEED) + mstore(0x00, mload(tLoc)) + // let mapSlot := keccak256(0x0c, 0x20) + sstore(keccak256(0x0c, 0x20), mload(sLoc)) + + // emit AllowedERC20Updated(address, bool) + log3( + 0, + 0, + _ALLOWED_ERC20_UPDATED_EVENT_SIGNATURE, + mload(tLoc), + mload(sLoc) + ) + } + } + } + + /// ███ View FX ████████████████████████████████████████████████████████████ + + function validBacenSigners( + uint256 signer + ) public view returns (bool valid) { + assembly { + valid := sload(signer) + } + } + + function sellerAllowList( + uint256 sellerKey + ) public view returns (bytes32 root) { + assembly { + mstore(0x0c, _SELLER_ALLOWLIST_SLOT_SEED) + mstore(0x00, shr(12, sellerKey)) + root := sload(keccak256(0x00, 0x20)) + } + } + + function allowedERC20s( + ERC20 erc20 + ) public view returns (bool state) { + assembly { + mstore(0x0c, _ALLOWED_ERC20_SLOT_SEED) + mstore(0x00, erc20) + state := sload(keccak256(0x0c, 0x20)) + } + } + + function _limiter( + uint256 _userCredit + ) internal view returns (uint256 _spendLimit) { + bytes memory encodedParams = abi.encodeWithSelector( + // IReputation.limiter.selector, + 0x4d2b1791, + _userCredit + ); + bool success; + assembly { + success := staticcall( + // gas + 0x7530, + // address + sload(reputation.slot), + // argsOffset + add(encodedParams, 0x20), + // argsSize + mload(encodedParams), + // retOffset + 0x00, + // retSize + 0x20 + ) + _spendLimit := mload(0x00) + if iszero(success) { + // StaticCallFailed() + mstore(0x00, 0xe10bf1cc) + revert(0x1c, 0x04) + } + } + } +} diff --git a/contracts/p2pix.sol b/contracts/p2pix.sol index ddc487c..6e7589e 100644 --- a/contracts/p2pix.sol +++ b/contracts/p2pix.sol @@ -8,23 +8,14 @@ pragma solidity 0.8.19; /// |__| |__| /// -import { Owned } from "./lib/auth/Owned.sol"; -import { ERC20, SafeTransferLib } from "./lib/utils/SafeTransferLib.sol"; -import { IReputation } from "./lib/interfaces/IReputation.sol"; -import { MerkleProofLib as Merkle } from "./lib/utils/MerkleProofLib.sol"; -import { ECDSA } from "./lib/utils/ECDSA.sol"; + +import { OwnerSettings, ERC20, SafeTransferLib } from "./core/OwnerSettings.sol"; +import { BaseUtils } from "./core/BaseUtils.sol"; import { ReentrancyGuard } from "./lib/utils/ReentrancyGuard.sol"; -import { EventAndErrors } from "./EventAndErrors.sol"; -import { DataTypes as DT } from "./DataTypes.sol"; -import { Constants } from "./Constants.sol"; +import { DataTypes as DT } from "./core/DataTypes.sol"; -contract P2PIX is - Constants, - EventAndErrors, - Owned(msg.sender), - ReentrancyGuard -{ +contract P2PIX is BaseUtils, ReentrancyGuard { // solhint-disable use-forbidden-name // solhint-disable no-inline-assembly // solhint-disable no-empty-blocks @@ -34,20 +25,6 @@ contract P2PIX is /// ███ Storage ████████████████████████████████████████████████████████████ - /// @dev List of valid Bacen signature addresses - /// mapping(uint256 => bool) public validBacenSigners; - /// @dev Value in custom storage slot given by: - /// let value := sload(shl(12, address)). - - /// @dev List of Pix transactions already signed. - /// mapping(bytes32 => bool) public usedTransactions; - /// @dev Value in custom storage slot given by: - /// let value := sload(bytes32). - - IReputation public reputation; - - /// @dev Default blocks that lock will hold tokens. - uint256 public defaultLockBlocks; uint256 public lockCounter; /// @dev List of Locks. @@ -60,15 +37,18 @@ contract P2PIX is constructor( uint256 defaultBlocks, address[] memory validSigners, - IReputation _reputation, + address _reputation, address[] memory tokens, bool[] memory tokenStates - ) payable { - setDefaultLockBlocks(defaultBlocks); - setReputation(_reputation); - setValidSigners(validSigners); - tokenSettings(tokens, tokenStates); - } + ) + OwnerSettings( + defaultBlocks, + validSigners, + _reputation, + tokens, + tokenStates + ) + payable {/* */} /// ███ Public FX ██████████████████████████████████████████████████████████ @@ -263,12 +243,7 @@ contract P2PIX is ) ); - if (usedTransactions(message)) revert TxAlreadyUsed(); - - if (!validBacenSigners(_castAddrToKey( - ECDSA.recover( - ECDSA.toEthSignedMessageHash(message), v, r, s) - ))) revert InvalidSigner(); + _signerCheck(message, r, s, v); ERC20 t = ERC20(l.token); @@ -437,100 +412,6 @@ contract P2PIX is } } - - /// ███ Owner Only █████████████████████████████████████████████████████████ - - /// @dev Contract's underlying balance withdraw method. - /// @dev Function sighash: 0x5fd8c710. - function withdrawBalance() external onlyOwner { - uint256 balance = address(this).balance; - SafeTransferLib.safeTransferETH(msg.sender, balance); - emit FundsWithdrawn(msg.sender, balance); - } - - function setReputation(IReputation _reputation) - public - onlyOwner - { - assembly { - sstore(reputation.slot, _reputation) - } - emit ReputationUpdated(address(_reputation)); - } - - function setDefaultLockBlocks(uint256 _blocks) - public - onlyOwner - { - assembly { - sstore(defaultLockBlocks.slot, _blocks) - } - emit LockBlocksUpdated(_blocks); - } - - function setValidSigners(address[] memory _validSigners) - public - onlyOwner - { - assembly { - let i := add(_validSigners, 0x20) - let end := add(i, shl(0x05, mload(_validSigners))) - for {/* */} iszero(returndatasize()) {/* */} { - sstore(shl(12, mload(i)), true) - i := add(i, 0x20) - - if iszero(lt(i, end)) { - break - } - } - } - emit ValidSignersUpdated(_validSigners); - } - - function tokenSettings( - address[] memory _tokens, - bool[] memory _states - ) public onlyOwner { - /* Yul Impl */ - assembly { - // first 32 bytes eq to array's length - let tLen := mload(_tokens) - // NoTokens() - if iszero(tLen) { - mstore(0x00, 0xdf957883) - revert(0x1c, 0x04) - } - // LengthMismatch() - if iszero(eq(tLen, mload(_states))) { - mstore(0x00, 0xff633a38) - revert(0x1c, 0x04) - } - let tLoc := add(_tokens, 0x20) - let sLoc := add(_states, 0x20) - for { - let end := add(tLoc, shl(5, tLen)) - } iszero(eq(tLoc, end)) { - tLoc := add(tLoc, 0x20) - sLoc := add(sLoc, 0x20) - } { - // cache hashmap entry in scratch space - mstore(0x0c, _ALLOWED_ERC20_SLOT_SEED) - mstore(0x00, mload(tLoc)) - // let mapSlot := keccak256(0x0c, 0x20) - sstore(keccak256(0x0c, 0x20), mload(sLoc)) - - // emit AllowedERC20Updated(address, bool) - log3( - 0, - 0, - _ALLOWED_ERC20_UPDATED_EVENT_SIGNATURE, - mload(tLoc), - mload(sLoc) - ) - } - } - } - /// ███ Helper FX ██████████████████████████████████████████████████████████ // solhint-disable-next-line no-empty-blocks @@ -568,74 +449,6 @@ contract P2PIX is ); } - function _merkleVerify( - bytes32[] calldata _merkleProof, - bytes32 root, - address _addr - ) private pure { - if ( - !Merkle.verify( - _merkleProof, - root, - bytes32(uint256(uint160(_addr))) - ) - ) revert AddressDenied(); - } - - function _limiter(uint256 _userCredit) - internal - view - returns (uint256 _spendLimit) - { - bytes memory encodedParams = abi.encodeWithSelector( - IReputation.limiter.selector, - _userCredit - ); - bool success; - assembly { - success := staticcall( - // gas - 0x7530, - // address - sload(reputation.slot), - // argsOffset - add(encodedParams, 0x20), - // argsSize - mload(encodedParams), - // retOffset - 0x00, - // retSize - 0x20 - ) - _spendLimit := mload(0x00) - if iszero(success) { - // StaticCallFailed() - mstore(0x00, 0xe10bf1cc) - revert(0x1c, 0x04) - } - } - } - - function _castToUint( - uint96 _amount, - uint160 _pixTarget, - bool _valid - ) - private - pure - returns ( - uint256 _amountCasted, - uint256 _pixTargetCasted, - uint256 _validCasted - ) - { - assembly { - _amountCasted := _amount - _pixTargetCasted := _pixTarget - _validCasted := _valid - } - } - function _decBal( uint256 _bal, uint256 _amount, @@ -811,40 +624,6 @@ contract P2PIX is return (sortedIDs, status); } - function allowedERC20s(ERC20 erc20) public view returns (bool state) { - assembly { - mstore(0x0c, _ALLOWED_ERC20_SLOT_SEED) - mstore(0x00, erc20) - state := sload(keccak256(0x0c, 0x20)) - } - } - - function _setUsedTransactions(bytes32 message) private { - assembly { - sstore(message, true) - } - } - - function usedTransactions(bytes32 message) public view returns(bool used) { - assembly { - used := sload(message) - } - } - - function validBacenSigners(uint256 signer) public view returns(bool valid) { - assembly { - valid := sload(signer) - } - } - - function sellerAllowList(uint256 sellerKey) public view returns(bytes32 root) { - assembly { - mstore(0x0c, _SELLER_ALLOWLIST_SLOT_SEED) - mstore(0x00, shr(12, sellerKey)) - root := sload(keccak256(0x00, 0x20)) - } - } - function _setSellerBalance(uint256 sellerKey, ERC20 erc20, uint256 packed) private { assembly { mstore(0x20, erc20) @@ -884,28 +663,4 @@ contract P2PIX is } } - /// @notice Public method that handles `address` - /// to `uint256` safe type casting. - /// @dev Function sighash: 0x4b2ae980. - function _castAddrToKey(address _addr) - public - pure - returns (uint256 _key) - { - // _key = uint256(uint160(address(_addr))) << 12; - assembly { - _key := shl(12, _addr) - } - } - - function _castKeyToAddr(uint256 _key) - public - pure - returns (address _addr) - { - // _addr = address(uint160(uint256(_key >> 12))); - assembly { - _addr := shr(12, _key) - } - } } diff --git a/src/types/core/BaseUtils.ts b/src/types/core/BaseUtils.ts new file mode 100644 index 0000000..dfc18cd --- /dev/null +++ b/src/types/core/BaseUtils.ts @@ -0,0 +1,835 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../common"; + +export interface BaseUtilsInterface extends utils.Interface { + functions: { + "_castAddrToKey(address)": FunctionFragment; + "_castKeyToAddr(uint256)": FunctionFragment; + "allowedERC20s(address)": FunctionFragment; + "defaultLockBlocks()": FunctionFragment; + "owner()": FunctionFragment; + "reputation()": FunctionFragment; + "sellerAllowList(uint256)": FunctionFragment; + "setDefaultLockBlocks(uint256)": FunctionFragment; + "setOwner(address)": FunctionFragment; + "setReputation(address)": FunctionFragment; + "setValidSigners(address[])": FunctionFragment; + "tokenSettings(address[],bool[])": FunctionFragment; + "usedTransactions(bytes32)": FunctionFragment; + "validBacenSigners(uint256)": FunctionFragment; + "withdrawBalance()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "_castAddrToKey" + | "_castKeyToAddr" + | "allowedERC20s" + | "defaultLockBlocks" + | "owner" + | "reputation" + | "sellerAllowList" + | "setDefaultLockBlocks" + | "setOwner" + | "setReputation" + | "setValidSigners" + | "tokenSettings" + | "usedTransactions" + | "validBacenSigners" + | "withdrawBalance" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "_castAddrToKey", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "_castKeyToAddr", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "allowedERC20s", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "defaultLockBlocks", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "reputation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "sellerAllowList", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setDefaultLockBlocks", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setReputation", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setValidSigners", + values: [PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "tokenSettings", + values: [PromiseOrValue[], PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "usedTransactions", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "validBacenSigners", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdrawBalance", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "_castAddrToKey", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_castKeyToAddr", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "allowedERC20s", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "defaultLockBlocks", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reputation", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sellerAllowList", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setDefaultLockBlocks", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setReputation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setValidSigners", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenSettings", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "usedTransactions", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validBacenSigners", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "withdrawBalance", + data: BytesLike + ): Result; + + events: { + "AllowedERC20Updated(address,bool)": EventFragment; + "DepositAdded(address,address,uint256)": EventFragment; + "DepositWithdrawn(address,address,uint256)": EventFragment; + "FundsWithdrawn(address,uint256)": EventFragment; + "LockAdded(address,uint256,uint256,uint256)": EventFragment; + "LockBlocksUpdated(uint256)": EventFragment; + "LockReleased(address,uint256,uint256)": EventFragment; + "LockReturned(address,uint256)": EventFragment; + "OwnerUpdated(address,address)": EventFragment; + "ReputationUpdated(address)": EventFragment; + "RootUpdated(address,bytes32)": EventFragment; + "ValidSet(address,address,bool)": EventFragment; + "ValidSignersUpdated(address[])": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AllowedERC20Updated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FundsWithdrawn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockBlocksUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockReleased"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockReturned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReputationUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RootUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ValidSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ValidSignersUpdated"): EventFragment; +} + +export interface AllowedERC20UpdatedEventObject { + token: string; + state: boolean; +} +export type AllowedERC20UpdatedEvent = TypedEvent< + [string, boolean], + AllowedERC20UpdatedEventObject +>; + +export type AllowedERC20UpdatedEventFilter = + TypedEventFilter; + +export interface DepositAddedEventObject { + seller: string; + token: string; + amount: BigNumber; +} +export type DepositAddedEvent = TypedEvent< + [string, string, BigNumber], + DepositAddedEventObject +>; + +export type DepositAddedEventFilter = TypedEventFilter; + +export interface DepositWithdrawnEventObject { + seller: string; + token: string; + amount: BigNumber; +} +export type DepositWithdrawnEvent = TypedEvent< + [string, string, BigNumber], + DepositWithdrawnEventObject +>; + +export type DepositWithdrawnEventFilter = + TypedEventFilter; + +export interface FundsWithdrawnEventObject { + owner: string; + amount: BigNumber; +} +export type FundsWithdrawnEvent = TypedEvent< + [string, BigNumber], + FundsWithdrawnEventObject +>; + +export type FundsWithdrawnEventFilter = TypedEventFilter; + +export interface LockAddedEventObject { + buyer: string; + lockID: BigNumber; + seller: BigNumber; + amount: BigNumber; +} +export type LockAddedEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber], + LockAddedEventObject +>; + +export type LockAddedEventFilter = TypedEventFilter; + +export interface LockBlocksUpdatedEventObject { + blocks: BigNumber; +} +export type LockBlocksUpdatedEvent = TypedEvent< + [BigNumber], + LockBlocksUpdatedEventObject +>; + +export type LockBlocksUpdatedEventFilter = + TypedEventFilter; + +export interface LockReleasedEventObject { + buyer: string; + lockId: BigNumber; + amount: BigNumber; +} +export type LockReleasedEvent = TypedEvent< + [string, BigNumber, BigNumber], + LockReleasedEventObject +>; + +export type LockReleasedEventFilter = TypedEventFilter; + +export interface LockReturnedEventObject { + buyer: string; + lockId: BigNumber; +} +export type LockReturnedEvent = TypedEvent< + [string, BigNumber], + LockReturnedEventObject +>; + +export type LockReturnedEventFilter = TypedEventFilter; + +export interface OwnerUpdatedEventObject { + user: string; + newOwner: string; +} +export type OwnerUpdatedEvent = TypedEvent< + [string, string], + OwnerUpdatedEventObject +>; + +export type OwnerUpdatedEventFilter = TypedEventFilter; + +export interface ReputationUpdatedEventObject { + reputation: string; +} +export type ReputationUpdatedEvent = TypedEvent< + [string], + ReputationUpdatedEventObject +>; + +export type ReputationUpdatedEventFilter = + TypedEventFilter; + +export interface RootUpdatedEventObject { + seller: string; + merkleRoot: string; +} +export type RootUpdatedEvent = TypedEvent< + [string, string], + RootUpdatedEventObject +>; + +export type RootUpdatedEventFilter = TypedEventFilter; + +export interface ValidSetEventObject { + seller: string; + token: string; + state: boolean; +} +export type ValidSetEvent = TypedEvent< + [string, string, boolean], + ValidSetEventObject +>; + +export type ValidSetEventFilter = TypedEventFilter; + +export interface ValidSignersUpdatedEventObject { + signers: string[]; +} +export type ValidSignersUpdatedEvent = TypedEvent< + [string[]], + ValidSignersUpdatedEventObject +>; + +export type ValidSignersUpdatedEventFilter = + TypedEventFilter; + +export interface BaseUtils extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BaseUtilsInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + _castAddrToKey( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { _key: BigNumber }>; + + _castKeyToAddr( + _key: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string] & { _addr: string }>; + + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { state: boolean }>; + + defaultLockBlocks(overrides?: CallOverrides): Promise<[BigNumber]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + reputation(overrides?: CallOverrides): Promise<[string]>; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string] & { root: string }>; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + usedTransactions( + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { used: boolean }>; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { valid: boolean }>; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + _castAddrToKey( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + _castKeyToAddr( + _key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + usedTransactions( + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + _castAddrToKey( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + _castKeyToAddr( + _key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + usedTransactions( + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance(overrides?: CallOverrides): Promise; + }; + + filters: { + "AllowedERC20Updated(address,bool)"( + token?: PromiseOrValue | null, + state?: PromiseOrValue | null + ): AllowedERC20UpdatedEventFilter; + AllowedERC20Updated( + token?: PromiseOrValue | null, + state?: PromiseOrValue | null + ): AllowedERC20UpdatedEventFilter; + + "DepositAdded(address,address,uint256)"( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositAddedEventFilter; + DepositAdded( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositAddedEventFilter; + + "DepositWithdrawn(address,address,uint256)"( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositWithdrawnEventFilter; + DepositWithdrawn( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositWithdrawnEventFilter; + + "FundsWithdrawn(address,uint256)"( + owner?: null, + amount?: null + ): FundsWithdrawnEventFilter; + FundsWithdrawn(owner?: null, amount?: null): FundsWithdrawnEventFilter; + + "LockAdded(address,uint256,uint256,uint256)"( + buyer?: PromiseOrValue | null, + lockID?: PromiseOrValue | null, + seller?: null, + amount?: null + ): LockAddedEventFilter; + LockAdded( + buyer?: PromiseOrValue | null, + lockID?: PromiseOrValue | null, + seller?: null, + amount?: null + ): LockAddedEventFilter; + + "LockBlocksUpdated(uint256)"(blocks?: null): LockBlocksUpdatedEventFilter; + LockBlocksUpdated(blocks?: null): LockBlocksUpdatedEventFilter; + + "LockReleased(address,uint256,uint256)"( + buyer?: PromiseOrValue | null, + lockId?: null, + amount?: null + ): LockReleasedEventFilter; + LockReleased( + buyer?: PromiseOrValue | null, + lockId?: null, + amount?: null + ): LockReleasedEventFilter; + + "LockReturned(address,uint256)"( + buyer?: PromiseOrValue | null, + lockId?: null + ): LockReturnedEventFilter; + LockReturned( + buyer?: PromiseOrValue | null, + lockId?: null + ): LockReturnedEventFilter; + + "OwnerUpdated(address,address)"( + user?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null + ): OwnerUpdatedEventFilter; + OwnerUpdated( + user?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null + ): OwnerUpdatedEventFilter; + + "ReputationUpdated(address)"( + reputation?: null + ): ReputationUpdatedEventFilter; + ReputationUpdated(reputation?: null): ReputationUpdatedEventFilter; + + "RootUpdated(address,bytes32)"( + seller?: PromiseOrValue | null, + merkleRoot?: PromiseOrValue | null + ): RootUpdatedEventFilter; + RootUpdated( + seller?: PromiseOrValue | null, + merkleRoot?: PromiseOrValue | null + ): RootUpdatedEventFilter; + + "ValidSet(address,address,bool)"( + seller?: PromiseOrValue | null, + token?: null, + state?: null + ): ValidSetEventFilter; + ValidSet( + seller?: PromiseOrValue | null, + token?: null, + state?: null + ): ValidSetEventFilter; + + "ValidSignersUpdated(address[])"( + signers?: null + ): ValidSignersUpdatedEventFilter; + ValidSignersUpdated(signers?: null): ValidSignersUpdatedEventFilter; + }; + + estimateGas: { + _castAddrToKey( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + _castKeyToAddr( + _key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + usedTransactions( + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + _castAddrToKey( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + _castKeyToAddr( + _key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + usedTransactions( + message: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/types/EventAndErrors.ts b/src/types/core/EventAndErrors.ts similarity index 99% rename from src/types/EventAndErrors.ts rename to src/types/core/EventAndErrors.ts index 5780451..37b5097 100644 --- a/src/types/EventAndErrors.ts +++ b/src/types/core/EventAndErrors.ts @@ -17,7 +17,7 @@ import type { TypedListener, OnEvent, PromiseOrValue, -} from "./common"; +} from "../common"; export interface EventAndErrorsInterface extends utils.Interface { functions: {}; diff --git a/src/types/core/OwnerSettings.ts b/src/types/core/OwnerSettings.ts new file mode 100644 index 0000000..3437ba9 --- /dev/null +++ b/src/types/core/OwnerSettings.ts @@ -0,0 +1,730 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../common"; + +export interface OwnerSettingsInterface extends utils.Interface { + functions: { + "allowedERC20s(address)": FunctionFragment; + "defaultLockBlocks()": FunctionFragment; + "owner()": FunctionFragment; + "reputation()": FunctionFragment; + "sellerAllowList(uint256)": FunctionFragment; + "setDefaultLockBlocks(uint256)": FunctionFragment; + "setOwner(address)": FunctionFragment; + "setReputation(address)": FunctionFragment; + "setValidSigners(address[])": FunctionFragment; + "tokenSettings(address[],bool[])": FunctionFragment; + "validBacenSigners(uint256)": FunctionFragment; + "withdrawBalance()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "allowedERC20s" + | "defaultLockBlocks" + | "owner" + | "reputation" + | "sellerAllowList" + | "setDefaultLockBlocks" + | "setOwner" + | "setReputation" + | "setValidSigners" + | "tokenSettings" + | "validBacenSigners" + | "withdrawBalance" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "allowedERC20s", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "defaultLockBlocks", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "reputation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "sellerAllowList", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setDefaultLockBlocks", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setReputation", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setValidSigners", + values: [PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "tokenSettings", + values: [PromiseOrValue[], PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "validBacenSigners", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdrawBalance", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "allowedERC20s", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "defaultLockBlocks", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reputation", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sellerAllowList", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setDefaultLockBlocks", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setReputation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setValidSigners", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenSettings", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validBacenSigners", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "withdrawBalance", + data: BytesLike + ): Result; + + events: { + "AllowedERC20Updated(address,bool)": EventFragment; + "DepositAdded(address,address,uint256)": EventFragment; + "DepositWithdrawn(address,address,uint256)": EventFragment; + "FundsWithdrawn(address,uint256)": EventFragment; + "LockAdded(address,uint256,uint256,uint256)": EventFragment; + "LockBlocksUpdated(uint256)": EventFragment; + "LockReleased(address,uint256,uint256)": EventFragment; + "LockReturned(address,uint256)": EventFragment; + "OwnerUpdated(address,address)": EventFragment; + "ReputationUpdated(address)": EventFragment; + "RootUpdated(address,bytes32)": EventFragment; + "ValidSet(address,address,bool)": EventFragment; + "ValidSignersUpdated(address[])": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AllowedERC20Updated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FundsWithdrawn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockBlocksUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockReleased"): EventFragment; + getEvent(nameOrSignatureOrTopic: "LockReturned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReputationUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RootUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ValidSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ValidSignersUpdated"): EventFragment; +} + +export interface AllowedERC20UpdatedEventObject { + token: string; + state: boolean; +} +export type AllowedERC20UpdatedEvent = TypedEvent< + [string, boolean], + AllowedERC20UpdatedEventObject +>; + +export type AllowedERC20UpdatedEventFilter = + TypedEventFilter; + +export interface DepositAddedEventObject { + seller: string; + token: string; + amount: BigNumber; +} +export type DepositAddedEvent = TypedEvent< + [string, string, BigNumber], + DepositAddedEventObject +>; + +export type DepositAddedEventFilter = TypedEventFilter; + +export interface DepositWithdrawnEventObject { + seller: string; + token: string; + amount: BigNumber; +} +export type DepositWithdrawnEvent = TypedEvent< + [string, string, BigNumber], + DepositWithdrawnEventObject +>; + +export type DepositWithdrawnEventFilter = + TypedEventFilter; + +export interface FundsWithdrawnEventObject { + owner: string; + amount: BigNumber; +} +export type FundsWithdrawnEvent = TypedEvent< + [string, BigNumber], + FundsWithdrawnEventObject +>; + +export type FundsWithdrawnEventFilter = TypedEventFilter; + +export interface LockAddedEventObject { + buyer: string; + lockID: BigNumber; + seller: BigNumber; + amount: BigNumber; +} +export type LockAddedEvent = TypedEvent< + [string, BigNumber, BigNumber, BigNumber], + LockAddedEventObject +>; + +export type LockAddedEventFilter = TypedEventFilter; + +export interface LockBlocksUpdatedEventObject { + blocks: BigNumber; +} +export type LockBlocksUpdatedEvent = TypedEvent< + [BigNumber], + LockBlocksUpdatedEventObject +>; + +export type LockBlocksUpdatedEventFilter = + TypedEventFilter; + +export interface LockReleasedEventObject { + buyer: string; + lockId: BigNumber; + amount: BigNumber; +} +export type LockReleasedEvent = TypedEvent< + [string, BigNumber, BigNumber], + LockReleasedEventObject +>; + +export type LockReleasedEventFilter = TypedEventFilter; + +export interface LockReturnedEventObject { + buyer: string; + lockId: BigNumber; +} +export type LockReturnedEvent = TypedEvent< + [string, BigNumber], + LockReturnedEventObject +>; + +export type LockReturnedEventFilter = TypedEventFilter; + +export interface OwnerUpdatedEventObject { + user: string; + newOwner: string; +} +export type OwnerUpdatedEvent = TypedEvent< + [string, string], + OwnerUpdatedEventObject +>; + +export type OwnerUpdatedEventFilter = TypedEventFilter; + +export interface ReputationUpdatedEventObject { + reputation: string; +} +export type ReputationUpdatedEvent = TypedEvent< + [string], + ReputationUpdatedEventObject +>; + +export type ReputationUpdatedEventFilter = + TypedEventFilter; + +export interface RootUpdatedEventObject { + seller: string; + merkleRoot: string; +} +export type RootUpdatedEvent = TypedEvent< + [string, string], + RootUpdatedEventObject +>; + +export type RootUpdatedEventFilter = TypedEventFilter; + +export interface ValidSetEventObject { + seller: string; + token: string; + state: boolean; +} +export type ValidSetEvent = TypedEvent< + [string, string, boolean], + ValidSetEventObject +>; + +export type ValidSetEventFilter = TypedEventFilter; + +export interface ValidSignersUpdatedEventObject { + signers: string[]; +} +export type ValidSignersUpdatedEvent = TypedEvent< + [string[]], + ValidSignersUpdatedEventObject +>; + +export type ValidSignersUpdatedEventFilter = + TypedEventFilter; + +export interface OwnerSettings extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: OwnerSettingsInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { state: boolean }>; + + defaultLockBlocks(overrides?: CallOverrides): Promise<[BigNumber]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + reputation(overrides?: CallOverrides): Promise<[string]>; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string] & { root: string }>; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { valid: boolean }>; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance(overrides?: CallOverrides): Promise; + }; + + filters: { + "AllowedERC20Updated(address,bool)"( + token?: PromiseOrValue | null, + state?: PromiseOrValue | null + ): AllowedERC20UpdatedEventFilter; + AllowedERC20Updated( + token?: PromiseOrValue | null, + state?: PromiseOrValue | null + ): AllowedERC20UpdatedEventFilter; + + "DepositAdded(address,address,uint256)"( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositAddedEventFilter; + DepositAdded( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositAddedEventFilter; + + "DepositWithdrawn(address,address,uint256)"( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositWithdrawnEventFilter; + DepositWithdrawn( + seller?: PromiseOrValue | null, + token?: null, + amount?: null + ): DepositWithdrawnEventFilter; + + "FundsWithdrawn(address,uint256)"( + owner?: null, + amount?: null + ): FundsWithdrawnEventFilter; + FundsWithdrawn(owner?: null, amount?: null): FundsWithdrawnEventFilter; + + "LockAdded(address,uint256,uint256,uint256)"( + buyer?: PromiseOrValue | null, + lockID?: PromiseOrValue | null, + seller?: null, + amount?: null + ): LockAddedEventFilter; + LockAdded( + buyer?: PromiseOrValue | null, + lockID?: PromiseOrValue | null, + seller?: null, + amount?: null + ): LockAddedEventFilter; + + "LockBlocksUpdated(uint256)"(blocks?: null): LockBlocksUpdatedEventFilter; + LockBlocksUpdated(blocks?: null): LockBlocksUpdatedEventFilter; + + "LockReleased(address,uint256,uint256)"( + buyer?: PromiseOrValue | null, + lockId?: null, + amount?: null + ): LockReleasedEventFilter; + LockReleased( + buyer?: PromiseOrValue | null, + lockId?: null, + amount?: null + ): LockReleasedEventFilter; + + "LockReturned(address,uint256)"( + buyer?: PromiseOrValue | null, + lockId?: null + ): LockReturnedEventFilter; + LockReturned( + buyer?: PromiseOrValue | null, + lockId?: null + ): LockReturnedEventFilter; + + "OwnerUpdated(address,address)"( + user?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null + ): OwnerUpdatedEventFilter; + OwnerUpdated( + user?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null + ): OwnerUpdatedEventFilter; + + "ReputationUpdated(address)"( + reputation?: null + ): ReputationUpdatedEventFilter; + ReputationUpdated(reputation?: null): ReputationUpdatedEventFilter; + + "RootUpdated(address,bytes32)"( + seller?: PromiseOrValue | null, + merkleRoot?: PromiseOrValue | null + ): RootUpdatedEventFilter; + RootUpdated( + seller?: PromiseOrValue | null, + merkleRoot?: PromiseOrValue | null + ): RootUpdatedEventFilter; + + "ValidSet(address,address,bool)"( + seller?: PromiseOrValue | null, + token?: null, + state?: null + ): ValidSetEventFilter; + ValidSet( + seller?: PromiseOrValue | null, + token?: null, + state?: null + ): ValidSetEventFilter; + + "ValidSignersUpdated(address[])"( + signers?: null + ): ValidSignersUpdatedEventFilter; + ValidSignersUpdated(signers?: null): ValidSignersUpdatedEventFilter; + }; + + estimateGas: { + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + allowedERC20s( + erc20: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + defaultLockBlocks(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + reputation(overrides?: CallOverrides): Promise; + + sellerAllowList( + sellerKey: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setDefaultLockBlocks( + _blocks: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setOwner( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setReputation( + _reputation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setValidSigners( + _validSigners: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tokenSettings( + _tokens: PromiseOrValue[], + _states: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validBacenSigners( + signer: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawBalance( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/types/core/index.ts b/src/types/core/index.ts new file mode 100644 index 0000000..89d882e --- /dev/null +++ b/src/types/core/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { BaseUtils } from "./BaseUtils"; +export type { EventAndErrors } from "./EventAndErrors"; +export type { OwnerSettings } from "./OwnerSettings"; diff --git a/src/types/factories/core/BaseUtils__factory.ts b/src/types/factories/core/BaseUtils__factory.ts new file mode 100644 index 0000000..6bcc05c --- /dev/null +++ b/src/types/factories/core/BaseUtils__factory.ts @@ -0,0 +1,618 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { BaseUtils, BaseUtilsInterface } from "../../core/BaseUtils"; + +const _abi = [ + { + inputs: [], + name: "AddressDenied", + type: "error", + }, + { + inputs: [], + name: "AlreadyReleased", + type: "error", + }, + { + inputs: [], + name: "AmountNotAllowed", + type: "error", + }, + { + inputs: [], + name: "DecOverflow", + type: "error", + }, + { + inputs: [], + name: "EmptyPixTarget", + type: "error", + }, + { + inputs: [], + name: "InvalidDeposit", + type: "error", + }, + { + inputs: [], + name: "InvalidSigner", + type: "error", + }, + { + inputs: [], + name: "LengthMismatch", + type: "error", + }, + { + inputs: [], + name: "LockExpired", + type: "error", + }, + { + inputs: [], + name: "LoopOverflow", + type: "error", + }, + { + inputs: [], + name: "MaxBalExceeded", + type: "error", + }, + { + inputs: [], + name: "NoTokens", + type: "error", + }, + { + inputs: [], + name: "NotEnoughTokens", + type: "error", + }, + { + inputs: [], + name: "NotExpired", + type: "error", + }, + { + inputs: [], + name: "NotInitialized", + type: "error", + }, + { + inputs: [], + name: "OnlySeller", + type: "error", + }, + { + inputs: [], + name: "StaticCallFailed", + type: "error", + }, + { + inputs: [], + name: "TokenDenied", + type: "error", + }, + { + inputs: [], + name: "TxAlreadyUsed", + type: "error", + }, + { + inputs: [], + name: "Unauthorized", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "bool", + name: "state", + type: "bool", + }, + ], + name: "AllowedERC20Updated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "FundsWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "lockID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "seller", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "LockAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "blocks", + type: "uint256", + }, + ], + name: "LockBlocksUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "LockReleased", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + ], + name: "LockReturned", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnerUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "reputation", + type: "address", + }, + ], + name: "ReputationUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "merkleRoot", + type: "bytes32", + }, + ], + name: "RootUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "state", + type: "bool", + }, + ], + name: "ValidSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address[]", + name: "signers", + type: "address[]", + }, + ], + name: "ValidSignersUpdated", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "_castAddrToKey", + outputs: [ + { + internalType: "uint256", + name: "_key", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_key", + type: "uint256", + }, + ], + name: "_castKeyToAddr", + outputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ERC20", + name: "erc20", + type: "address", + }, + ], + name: "allowedERC20s", + outputs: [ + { + internalType: "bool", + name: "state", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "defaultLockBlocks", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "reputation", + outputs: [ + { + internalType: "contract IReputation", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "sellerKey", + type: "uint256", + }, + ], + name: "sellerAllowList", + outputs: [ + { + internalType: "bytes32", + name: "root", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_blocks", + type: "uint256", + }, + ], + name: "setDefaultLockBlocks", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IReputation", + name: "_reputation", + type: "address", + }, + ], + name: "setReputation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_validSigners", + type: "address[]", + }, + ], + name: "setValidSigners", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + { + internalType: "bool[]", + name: "_states", + type: "bool[]", + }, + ], + name: "tokenSettings", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "message", + type: "bytes32", + }, + ], + name: "usedTransactions", + outputs: [ + { + internalType: "bool", + name: "used", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "signer", + type: "uint256", + }, + ], + name: "validBacenSigners", + outputs: [ + { + internalType: "bool", + name: "valid", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdrawBalance", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class BaseUtils__factory { + static readonly abi = _abi; + static createInterface(): BaseUtilsInterface { + return new utils.Interface(_abi) as BaseUtilsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BaseUtils { + return new Contract(address, _abi, signerOrProvider) as BaseUtils; + } +} diff --git a/src/types/factories/EventAndErrors__factory.ts b/src/types/factories/core/EventAndErrors__factory.ts similarity index 99% rename from src/types/factories/EventAndErrors__factory.ts rename to src/types/factories/core/EventAndErrors__factory.ts index 9e9fd81..404b45b 100644 --- a/src/types/factories/EventAndErrors__factory.ts +++ b/src/types/factories/core/EventAndErrors__factory.ts @@ -7,7 +7,7 @@ import type { Provider } from "@ethersproject/providers"; import type { EventAndErrors, EventAndErrorsInterface, -} from "../EventAndErrors"; +} from "../../core/EventAndErrors"; const _abi = [ { diff --git a/src/types/factories/core/OwnerSettings__factory.ts b/src/types/factories/core/OwnerSettings__factory.ts new file mode 100644 index 0000000..bfe7567 --- /dev/null +++ b/src/types/factories/core/OwnerSettings__factory.ts @@ -0,0 +1,564 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + OwnerSettings, + OwnerSettingsInterface, +} from "../../core/OwnerSettings"; + +const _abi = [ + { + inputs: [], + name: "AddressDenied", + type: "error", + }, + { + inputs: [], + name: "AlreadyReleased", + type: "error", + }, + { + inputs: [], + name: "AmountNotAllowed", + type: "error", + }, + { + inputs: [], + name: "DecOverflow", + type: "error", + }, + { + inputs: [], + name: "EmptyPixTarget", + type: "error", + }, + { + inputs: [], + name: "InvalidDeposit", + type: "error", + }, + { + inputs: [], + name: "InvalidSigner", + type: "error", + }, + { + inputs: [], + name: "LengthMismatch", + type: "error", + }, + { + inputs: [], + name: "LockExpired", + type: "error", + }, + { + inputs: [], + name: "LoopOverflow", + type: "error", + }, + { + inputs: [], + name: "MaxBalExceeded", + type: "error", + }, + { + inputs: [], + name: "NoTokens", + type: "error", + }, + { + inputs: [], + name: "NotEnoughTokens", + type: "error", + }, + { + inputs: [], + name: "NotExpired", + type: "error", + }, + { + inputs: [], + name: "NotInitialized", + type: "error", + }, + { + inputs: [], + name: "OnlySeller", + type: "error", + }, + { + inputs: [], + name: "StaticCallFailed", + type: "error", + }, + { + inputs: [], + name: "TokenDenied", + type: "error", + }, + { + inputs: [], + name: "TxAlreadyUsed", + type: "error", + }, + { + inputs: [], + name: "Unauthorized", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "bool", + name: "state", + type: "bool", + }, + ], + name: "AllowedERC20Updated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "FundsWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "lockID", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "seller", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "LockAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "blocks", + type: "uint256", + }, + ], + name: "LockBlocksUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "LockReleased", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + ], + name: "LockReturned", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnerUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "reputation", + type: "address", + }, + ], + name: "ReputationUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "merkleRoot", + type: "bytes32", + }, + ], + name: "RootUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "state", + type: "bool", + }, + ], + name: "ValidSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address[]", + name: "signers", + type: "address[]", + }, + ], + name: "ValidSignersUpdated", + type: "event", + }, + { + inputs: [ + { + internalType: "contract ERC20", + name: "erc20", + type: "address", + }, + ], + name: "allowedERC20s", + outputs: [ + { + internalType: "bool", + name: "state", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "defaultLockBlocks", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "reputation", + outputs: [ + { + internalType: "contract IReputation", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "sellerKey", + type: "uint256", + }, + ], + name: "sellerAllowList", + outputs: [ + { + internalType: "bytes32", + name: "root", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_blocks", + type: "uint256", + }, + ], + name: "setDefaultLockBlocks", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IReputation", + name: "_reputation", + type: "address", + }, + ], + name: "setReputation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_validSigners", + type: "address[]", + }, + ], + name: "setValidSigners", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + { + internalType: "bool[]", + name: "_states", + type: "bool[]", + }, + ], + name: "tokenSettings", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "signer", + type: "uint256", + }, + ], + name: "validBacenSigners", + outputs: [ + { + internalType: "bool", + name: "valid", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdrawBalance", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class OwnerSettings__factory { + static readonly abi = _abi; + static createInterface(): OwnerSettingsInterface { + return new utils.Interface(_abi) as OwnerSettingsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OwnerSettings { + return new Contract(address, _abi, signerOrProvider) as OwnerSettings; + } +} diff --git a/src/types/factories/core/index.ts b/src/types/factories/core/index.ts new file mode 100644 index 0000000..d44d287 --- /dev/null +++ b/src/types/factories/core/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { BaseUtils__factory } from "./BaseUtils__factory"; +export { EventAndErrors__factory } from "./EventAndErrors__factory"; +export { OwnerSettings__factory } from "./OwnerSettings__factory"; diff --git a/src/types/factories/index.ts b/src/types/factories/index.ts index 60f9df1..5f49e4e 100644 --- a/src/types/factories/index.ts +++ b/src/types/factories/index.ts @@ -1,7 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export * as core from "./core"; export * as lib from "./lib"; export * as p2PixSol from "./p2pix.sol"; -export { EventAndErrors__factory } from "./EventAndErrors__factory"; export { Reputation__factory } from "./Reputation__factory"; diff --git a/src/types/factories/p2pix.sol/P2PIX__factory.ts b/src/types/factories/p2pix.sol/P2PIX__factory.ts index ed7149d..6e504c2 100644 --- a/src/types/factories/p2pix.sol/P2PIX__factory.ts +++ b/src/types/factories/p2pix.sol/P2PIX__factory.ts @@ -27,7 +27,7 @@ const _abi = [ type: "address[]", }, { - internalType: "contract IReputation", + internalType: "address", name: "_reputation", type: "address", }, @@ -1074,7 +1074,7 @@ const _abi = [ ]; const _bytecode = - "0x608060405262002c24803803806200001781620000ce565b928339810160a082820312620000b357815160208301516001600160401b039391929190848111620000b357826200005191830162000124565b604082015191620000628362000112565b6060810151868111620000b357846200007d91830162000124565b936080820151968711620000b357620000a3966200009c920162000193565b93620001fa565b6040516127ee9081620004368239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b03811183821017620000f457604052565b620000b8565b6001600160401b038111620000f45760051b60200190565b6001600160a01b03811603620000b357565b9080601f83011215620000b357815190620001496200014383620000fa565b620000ce565b9182938184526020808095019260051b820101928311620000b3578301905b82821062000177575050505090565b8380918351620001878162000112565b81520191019062000168565b9080601f83011215620000b357815190620001b26200014383620000fa565b9182938184526020808095019260051b820101928311620000b3578301905b828210620001e0575050505090565b81518015158103620000b3578152908301908301620001d1565b600080546001600160a01b03191633908117825591969594939291817f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768180a3600191828055876003556040519788527f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851160208099a160028490556040516001600160a01b0394851681527fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f908990a18051818901989060051b820181013d15158a5b811562000339575b505050604051948186019282875251809352604086019993905b8382106200032157505050505050807f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d7916200031f95960390a162000373565b565b845181168b52998201999382019390850190620002df565b908382600182979896949e999e51600c1b55019083821015620003655791509a959a94939294620002bd565b509a959a94939294620002c5565b60008054919290916001600160a01b03163303620004245782519182156200041757815183036200040a57602092919284818080970195019360051b0101925b838103620003c2575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191620003b3565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b6040516282b42960e81b8152600490fdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806304937320146102065780630d2a2d441461020157806313af4035146101fc5780632cc0f905146101f7578063328a7181146101f2578063367821f0146101ed578063461f3120146101a757806349ef8448146101e85780634b2ae980146101e3578063574983c8146101de5780635fd8c710146101d957806369cc6af4146101d45780636d82d9e0146101cf57806377cd38a4146101ca5780637f94f65d146101c557806380e1d302146101c057806384ab1d28146101bb5780638da5cb5b146101b65780638db564c2146101b15780639872dbfe146101ac57806398a26871146101a75780639eee8d4b146101a2578063ad8f2eed1461019d578063b0983d3914610198578063c52164c614610193578063c593dfd81461018e578063d1c0702814610189578063d4fac45d14610184578063d6e8b9731461017f578063f7d0e04b1461017a5763fb8c5ef00361000e57611678565b611608565b61155d565b611544565b6114a2565b610f64565b610f30565b610ef6565b610ea0565b610e60565b61093c565b610e42565b610e24565b610df0565b610dba565b610da1565b610d50565b610d18565b610c07565b610bc7565b610b44565b610ae0565b610ab6565b610a1f565b610881565b610651565b61058d565b610498565b61036b565b346102325760206003193601126102325760043560005260066020526020604060002054604051908152f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102a757604052565b610237565b60405190610120820182811067ffffffffffffffff8211176102a757604052565b67ffffffffffffffff81116102a75760051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81160361023257565b81601f820112156102325780359161031a836102cd565b926103286040519485610266565b808452602092838086019260051b820101928311610232578301905b828210610352575050505090565b8380918335610360816102e5565b815201910190610344565b34610232576020806003193601126102325760043567ffffffffffffffff81116102325761039d903690600401610303565b9073ffffffffffffffffffffffffffffffffffffffff918260005416330361046e57805181830192849160051b830181013d1515855b811561043a575b50505060405192818401908285525180915260408401949160005b828110610424577f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d786880387a1005b83518516875295810195928101926001016103f5565b90838260018298969499979951600c1b550190838210156104625791509593959492946103d3565b509593959492946103da565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576004356104b5816102e5565b600090815473ffffffffffffffffffffffffffffffffffffffff808216330361046e577fffffffffffffffffffffffff0000000000000000000000000000000000000000921691829116178255337f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768380a380f35b6064359069ffffffffffffffffffff8216820361023257565b6084359069ffffffffffffffffffff8216820361023257565b9181601f840112156102325782359167ffffffffffffffff8311610232576020808501948460051b01011161023257565b346102325760e0600319360112610232576004356105aa816102e5565b602435906105b7826102e5565b604435916105c4836102e5565b6105cc61052a565b916105d5610543565b67ffffffffffffffff9360a435858111610232576105f790369060040161055c565b92909160c435968711610232576106319761061961062198369060040161055c565b979096611927565b6040519081529081906020820190565b0390f35b60643590811515820361023257565b3590811515820361023257565b346102325760a06003193601126102325760043561066e816102e5565b6024356bffffffffffffffffffffffff8116908181036102325760443590610695826102e5565b61069d610635565b6084359373ffffffffffffffffffffffffffffffffffffffff8087169033600c1b90861615610857576106e56106e18363cbc9d1c4600c526000526020600c205490565b1590565b61082d576b3fffffffffffffffffffffff61071683839060205263739094b1600c52600c1c6000526034600c205490565b16906a52b7d2dcc80cd2e400000061072e85846117ce565b1161080357826107ee976107a89661077a8961079f967f63d8d7d5e63e9840ec91a12a160d27b7cfab294f6ba070b7359692acfe6b03bf9d61076e6117db565b806107f3575b506117ce565b9060ff1b91605f1b1717919060205263739094b1600c52600c1c6000526034600c2055565b30903390611816565b6107b160018055565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526bffffffffffffffffffffffff90911660208501523393918291820190565b0390a2005b6107fd9033611fc7565b38610774565b60046040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1578328e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6a3bc53e000000000000000000000000000000000000000000000000000000008152fd5b346102325760206003193601126102325760048035600090815260056020818152604092839020805460018201546002830154600384015497840154958401546006909401548751938452948301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff808616606086015269ffffffffffffffffffff60a096871c8116608087015284169585019590955260509290921c841660c084015290831660e08301529190911661010082015261012090f35b34610232576020600319360112610232576020600435546040519015158152f35b90815180825260208080930193019160005b82811061097d575050505090565b83518552938101939281019260010161096f565b906109a49060408352604083019061095d565b81810360209283015282518082529082019282019160009190825b8281106109ce57505050505090565b909192939485516004808210156109f3575081528201948201939291906001016109bf565b8660216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b34610232576020806003193601126102325760043567ffffffffffffffff8111610232573660238201121561023257806004013590610a5d826102cd565b91610a6b6040519384610266565b80835260248484019160051b8301019136831161023257602401905b828210610aa757610a9784612654565b9061063160405192839283610991565b81358152908401908401610a87565b34610232576020600319360112610232576020600435610ad5816102e5565b60405190600c1b8152f35b346102325760206003193601126102325760043573ffffffffffffffffffffffffffffffffffffffff60005416330361046e576020817f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851192600355604051908152a1005b3461023257600080600319360112610bc45773ffffffffffffffffffffffffffffffffffffffff815416330361046e57478180808084335af115610bb7576040805133815260208101929092527feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d91a180f35b63b12d13eb82526004601cfd5b80fd5b34610232576020600319360112610232576020610bfd600435610be9816102e5565b63cbc9d1c4600c526000526020600c205490565b6040519015158152f35b3461023257604060031936011261023257600435610c24816102e5565b602435801515908181036102325733600c1b610c5684829060205263739094b1600c52600c1c6000526034600c205490565b918215610cee57610ca5927f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff869260ff1b911617919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff6040519216825260208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2005b60046040517f87138d5c000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576020610d486004356374dfee70600c52600c1c60005260206000205490565b604051908152f35b3461023257604060031936011261023257610019600435610d70816102e5565b60243590611fc7565b600319604091011261023257600435610d91816102e5565b90602435610d9e816102e5565b90565b34610232576020610bfd610db436610d79565b9061259c565b3461023257602060031936011261023257602060405173ffffffffffffffffffffffffffffffffffffffff600435600c1c168152f35b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b34610232576000600319360112610232576020600454604051908152f35b34610232576000600319360112610232576020600354604051908152f35b34610232576040600319360112610232576020610d48602435610e82816102e5565b6004359060205263739094b1600c52600c1c6000526034600c205490565b3461023257610eae36610d79565b6000903d15610ed9575b60208273ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60205263739094b1600c525260206034600c2054605f1c38610eb8565b346102325760206003193601126102325760043567ffffffffffffffff811161023257610f2a61001991369060040161055c565b90611d6d565b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b346102325760a06003193601126102325760048035906084359060ff8216820361023257610f906117db565b610fa4836000526005602052604060002090565b81810191610fbc835469ffffffffffffffffffff1690565b9169ffffffffffffffffffff908184169586156114685760028201928354431161143f57600383019485549660405161109f816110738b602083019573ffffffffffffffffffffffffffffffffffffffff602435921687917fffffffffffffffffffff00000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000603e959360601b16845260b01b166014830152601e8201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610266565b519020928354611416576110f56110ef6110fa9260643590604435906110ea896020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b611c7c565b600c1b90565b541590565b6113ee5750926112886005846111b3611161989560006111858e7f364537f14276f2a0ce9905588413f96454cbb8fb2e4f5308389307c1098bede89f9e9b61117a6112ca9f9c600661116191015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b9b60a01c1690611c6f565b8a547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168b55965560019055565b01916111d6611161845473ffffffffffffffffffffffffffffffffffffffff1690565b33146113a95783546112019060a01c69ffffffffffffffffffff165b69ffffffffffffffffffff1690565b61122361121b33600c1b6000526006602052604060002090565b9182546117ce565b90556112596112496110ef855473ffffffffffffffffffffffffffffffffffffffff1690565b6000526006602052604060002090565b6112648a82546117ce565b90555b855460501c73ffffffffffffffffffffffffffffffffffffffff1685611ce0565b81546112a29060a01c69ffffffffffffffffffff166111f2565b806112e4575b505050505473ffffffffffffffffffffffffffffffffffffffff9060501c1690565b60408051948552602085019290925292a261001960018055565b611305611161835473ffffffffffffffffffffffffffffffffffffffff1690565b331461139657506111f261135961138d949361137261133b611385955473ffffffffffffffffffffffffffffffffffffffff1690565b61136b6111f2611359855469ffffffffffffffffffff9060a01c1690565b60011c697fffffffffffffffffff1690565b9087611ce0565b5460a01c69ffffffffffffffffffff1690565b903390611ce0565b388080806112a8565b9150506113a4913390611ce0565b61138d565b6113cd896113c86111f2875469ffffffffffffffffffff9060a01c1690565b6117ce565b6113e761121b33600c1b6000526006602052604060002090565b9055611267565b6040517f815e1d64000000000000000000000000000000000000000000000000000000008152fd5b506040517ff490a6ea000000000000000000000000000000000000000000000000000000008152fd5b846040517ff6fafba0000000000000000000000000000000000000000000000000000000008152fd5b836040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b906020610d9e92818152019061095d565b346102325760406003193601126102325760043567ffffffffffffffff8111610232576114d3903690600401610303565b602435906114e0826102e5565b6000918151916114ef836125f1565b935b83811061150657604051806106318782611491565b806115338473ffffffffffffffffffffffffffffffffffffffff61152c60019587612640565b5116612565565b61153d8288612640565b52016114f1565b34610232576020610d4861155736610d79565b90612565565b346102325760406003193601126102325767ffffffffffffffff6004358181116102325761158f903690600401610303565b9060243590811161023257366023820112156102325780600401356115b3816102cd565b916115c16040519384610266565b81835260209160248385019160051b8301019136831161023257602401905b8282106115f1576100198587612016565b8380916115fd84610644565b8152019101906115e0565b3461023257602060031936011261023257600435611625816102e5565b73ffffffffffffffffffffffffffffffffffffffff8060005416330361046e57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360025560405191168152a1005b3461023257606060031936011261023257600435611695816102e5565b60243560443567ffffffffffffffff8111610232577f2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e916116ee6116e061177593369060040161055c565b906116e96117db565b611d6d565b6116f8843361259c565b61177e575b61173933600c1b85836b3fffffffffffffffffffffff61173383859060205263739094b1600c52600c1c6000526034600c205490565b16612529565b611744813386611ce0565b6040805173ffffffffffffffffffffffffffffffffffffffff95909516855260208501919091523393918291820190565b0390a260018055005b6117878461186f565b6116fd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600182018092116117c957565b61178c565b919082018092116117c957565b6002600154146117ec576002600155565b60046040517fab143c06000000000000000000000000000000000000000000000000000000008152fd5b601c600060649281946020966040519860605260405260601b602c526f23b872dd000000000000000000000000600c525af13d15600160005114171615611861576000606052604052565b637939f4246000526004601cfd5b33600c1b61189382829060205263739094b1600c52600c1c6000526034600c205490565b908115610cee57827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6118dc9316919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff60405191168152600060208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2565b92949761194e9073ffffffffffffffffffffffffffffffffffffffff9395986116e96117db565b169361195d6106e1868461259c565b611c285761196b8583612565565b9669ffffffffffffffffffff9687811693848a10611bfe57600c1b976119926004546117bb565b9560026119a9886000526005602052604060002090565b0154431115611bd4576003546119bf90436117ce565b976119e08a8c9060205263739094b1600c52600c1c6000526034600c205490565b605f1c611a009073ffffffffffffffffffffffffffffffffffffffff1690565b611a086102ac565b8c8152602081018a9052604081019a909a5273ffffffffffffffffffffffffffffffffffffffff1660608a015269ffffffffffffffffffff16608089015260a0880192611a6190849069ffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff1660c08801523360e088015273ffffffffffffffffffffffffffffffffffffffff88166101008801528315611ae4575050611ad89791611ad3913391611acd8a6374dfee70600c52600c1c60005260206000205490565b91612422565b612146565b90611ae260018055565b565b819350809250611b0868056bc75e2d63100000925169ffffffffffffffffffff1690565b1611611b1e575050611b1995612146565b611ad8565b611b4f611b4a611b3b33600c1b6000526006602052604060002090565b54670de0b6b3a7640000900490565b6124b0565b81611b6d611b67855169ffffffffffffffffffff1690565b92611c52565b911611918215611bb1575b5050611b8757611b1995612146565b60046040517f1c18f846000000000000000000000000000000000000000000000000000000008152fd5b5169d3c21bcecceda1000000925069ffffffffffffffffffff1616113880611b78565b60046040517fd0404f85000000000000000000000000000000000000000000000000000000008152fd5b60046040517f22bbb43c000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb2e532de000000000000000000000000000000000000000000000000000000008152fd5b90670de0b6b3a7640000918281029281840414901517156117c957565b919082039182116117c957565b9060806020927f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a160ff9796604051966000998a968795865216875260405280606052105afa508251923d15611cd357606052604052565b638baa579f90526004601cfd5b60109260209260145260345260446000938480936fa9059cbb00000000000000000000000082525af13d156001835114171615611d1c57603452565b6390b8ec1890526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611d685760051b0190565b611d29565b6000905b828210611d8e575010611d8057565b63dfb035c96000526004601cfd5b90611dae611d9d828585611d58565b356000526005602052604060002090565b611db7816120cd565b805490611dde611161600683015473ffffffffffffffffffffffffffffffffffffffff1690565b6b3fffffffffffffffffffffff611e0b82859060205263739094b1600c52600c1c6000526034600c205490565b1690600493848401946a52b7d2dcc80cd2e4000000611e41611e3a6111f2895469ffffffffffffffffffff1690565b80966117ce565b11611f9f57506005611f2e94611e7c6001989795611ebd956110ef959060205263739094b1600c52600c1c6000526034600c20908154019055565b84547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168555015473ffffffffffffffffffffffffffffffffffffffff1690565b611edb611ed4826000526006602052604060002090565b5460011c90565b68056bc75e2d631000008111611f845750611f03611f11916000526006602052604060002090565b68056bc75e2d631000009055565b5460501c73ffffffffffffffffffffffffffffffffffffffff1690565b7f830501e61b8b075e170b22a430e39454bdb12ed3e9620e586430b6ac00079da573ffffffffffffffffffffffffffffffffffffffff611f6f848888611d58565b60405190358152921691602090a20190611d71565b90611f99906000526006602052604060002090565b55611f11565b6040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b338103612008576374dfee70600c5280600052816020600020557f0b294da292f26e55fd442b5c0164fbb9013036ff00c5cfdde0efd01c1baaf632600080a3565b6385d1f7266000526004601cfd5b9060009073ffffffffffffffffffffffffffffffffffffffff825416330361046e5782519182156120c057815183036120b357602092919284818080970195019360051b0101925b83810361206c575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a30192019161205e565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b60028101544310611bd4576004015469ffffffffffffffffffff16156120ef57565b60046040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c95760010190565b9095949391938460005260056020526040600020928451845560208501516001850155604085015160028501556003840160608601516121999073ffffffffffffffffffffffffffffffffffffffff1690565b8154608088015173ffffffffffffffffffffffffffffffffffffffff929092167fffff0000000000000000000000000000000000000000000000000000000000009091161760a091821b7dffffffffffffffffffff0000000000000000000000000000000000000000161790915585018051600486019991959069ffffffffffffffffffff168a547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001669ffffffffffffffffffff909116178a5560c08701998a516122789073ffffffffffffffffffffffffffffffffffffffff1690565b81547fffff0000000000000000000000000000000000000000ffffffffffffffffffff1660509190911b7dffffffffffffffffffffffffffffffffffffffff000000000000000000001617905560e087015173ffffffffffffffffffffffffffffffffffffffff166005820190612329919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61010087015173ffffffffffffffffffffffffffffffffffffffff16906006019061238e919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61239793612529565b6004546123a390612119565b6004558294516123c69073ffffffffffffffffffffffffffffffffffffffff1690565b915190516040805192835269ffffffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff909216917f8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea6591a3565b73ffffffffffffffffffffffffffffffffffffffff8293941692612474575b50500361244a57565b60046040517f3b8474be000000000000000000000000000000000000000000000000000000008152fd5b60059291831b8101915b8135808211851b9182526020809218526040600020910192828410156124a557929061247e565b509150503880612441565b6040519060208201907f4d2b1791000000000000000000000000000000000000000000000000000000008252602483015260248252606082019082821067ffffffffffffffff8311176102a7576020926000926040525190600254617530fa90600051911561251b57565b63e10bf1cc6000526004601cfd5b9291909280848103119015176125575760205263739094b1600c52600c1c6000526034600c20908154039055565b63ce3a3d376000526004601cfd5b600092913d15612573575050565b9091925060205263739094b1600c526000526034600c20546b3fffffffffffffffffffffff1690565b600092913d156125aa575050565b9091925060205263739094b1600c526000526034600c205460ff1c90565b6040516020810181811067ffffffffffffffff8211176102a75760405260008152906000368137565b906125fb826102cd565b6126086040519182610266565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061263682946102cd565b0190602036910137565b8051821015611d685760209160051b010190565b908151156127a5576000809280519061266c826125f1565b92612676836125f1565b955b83811061268757505050509190565b806126a861269760019386612640565b516000526005602052604060002090565b546126d8576126b78185612640565b516126c28288612640565b52826126ce828a612640565b5201925b92612678565b69ffffffffffffffffffff61270660046126f56126978589612640565b015469ffffffffffffffffffff1690565b1661273b576127158185612640565b516127208288612640565b5261273461272e828a612640565b60039052565b01926126d2565b600261274a6126978387612640565b015443111561277c5761275d8185612640565b516127688288612640565b52612734612776828a612640565b60029052565b6127868185612640565b516127918288612640565b5261273461279f828a612640565b60019052565b90506127af6125c8565b90610d9e6125c856fea2646970667358221220637ef5dab3f877f94aaa3a47dff24e5d03955b1e35519a927aad5c994df7ece964736f6c63430008130033"; + "0x608060405262002bf280380380620000178162000126565b928339810160a0828203126200010b5781516020808401519093916001600160401b03918281116200010b5784620000519185016200017f565b9062000060604085016200016a565b9260608501518181116200010b57866200007c9187016200017f565b9460808101519182116200010b57019480601f870112156200010b578551620000af620000a98262000152565b62000126565b96888089848152019260051b8201019283116200010b578801905b828210620000f157505050620000e19550620001e6565b6040516127b09081620004428239f35b815180151581036200010b578152908801908801620000ca565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b038111838210176200014c57604052565b62000110565b6001600160401b0381116200014c5760051b60200190565b51906001600160a01b03821682036200010b57565b9080601f830112156200010b578151906200019e620000a98362000152565b9182938184526020808095019260051b8201019283116200010b578301905b828210620001cc575050505090565b838091620001da846200016a565b815201910190620001bd565b600080546001600160a01b031916339081178255929695949392817f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768180a3816002556040519182527f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851160208093a18651878301979060051b810183013d1515895b811562000306575b5050506040519280840191818552518092526040840198925b828110620002e85750505050907f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d782620002d593620002db97980390a16001600160a01b031662000337565b62000390565b620002e66001600355565b565b83516001600160a01b03168a52988101989281019260010162000289565b9085826001829697989451600c1b550190838210156200032c5791509493929462000268565b509493929462000270565b6000546001600160a01b0390811633036200037f57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360015560405191168152a1565b6040516282b42960e81b8152600490fd5b60008054919290916001600160a01b031633036200037f5782519182156200043457815183036200042757602092919284818080970195019360051b0101925b838103620003df575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191620003d0565b63ff633a3890526004601cfd5b63df95788390526004601cfdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806304937320146102065780630d2a2d441461020157806313af4035146101fc5780632cc0f905146101f7578063328a7181146101f2578063367821f0146101ed578063461f3120146101a757806349ef8448146101e85780634b2ae980146101e3578063574983c8146101de5780635fd8c710146101d957806369cc6af4146101d45780636d82d9e0146101cf57806377cd38a4146101ca5780637f94f65d146101c557806380e1d302146101c057806384ab1d28146101bb5780638da5cb5b146101b65780638db564c2146101b15780639872dbfe146101ac57806398a26871146101a75780639eee8d4b146101a2578063ad8f2eed1461019d578063b0983d3914610198578063c52164c614610193578063c593dfd81461018e578063d1c0702814610189578063d4fac45d14610184578063d6e8b9731461017f578063f7d0e04b1461017a5763fb8c5ef00361000e576115d8565b611568565b6114bd565b6114a4565b611402565b610f65565b610f31565b610ef7565b610ea1565b610e61565b61093d565b610e43565b610e25565b610df1565b610dbb565b610da2565b610d51565b610d19565b610c08565b610bc8565b610b45565b610ae1565b610ab7565b610a20565b610882565b610651565b61058d565b610498565b61036b565b346102325760206003193601126102325760043560005260066020526020604060002054604051908152f35b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102a757604052565b610237565b60405190610120820182811067ffffffffffffffff8211176102a757604052565b67ffffffffffffffff81116102a75760051b60200190565b73ffffffffffffffffffffffffffffffffffffffff81160361023257565b81601f820112156102325780359161031a836102cd565b926103286040519485610266565b808452602092838086019260051b820101928311610232578301905b828210610352575050505090565b8380918335610360816102e5565b815201910190610344565b34610232576020806003193601126102325760043567ffffffffffffffff81116102325761039d903690600401610303565b9073ffffffffffffffffffffffffffffffffffffffff918260005416330361046e57805181830192849160051b830181013d1515855b811561043a575b50505060405192818401908285525180915260408401949160005b828110610424577f14a422d2412784a5749d03da98921fe468c98577b767851389a9f58ea5a363d786880387a1005b83518516875295810195928101926001016103f5565b90838260018298969499979951600c1b550190838210156104625791509593959492946103d3565b509593959492946103da565b60046040517f82b42900000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576004356104b5816102e5565b600090815473ffffffffffffffffffffffffffffffffffffffff808216330361046e577fffffffffffffffffffffffff0000000000000000000000000000000000000000921691829116178255337f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d768380a380f35b6064359069ffffffffffffffffffff8216820361023257565b6084359069ffffffffffffffffffff8216820361023257565b9181601f840112156102325782359167ffffffffffffffff8311610232576020808501948460051b01011161023257565b346102325760e0600319360112610232576004356105aa816102e5565b602435906105b7826102e5565b604435916105c4836102e5565b6105cc61052a565b916105d5610543565b67ffffffffffffffff9360a435858111610232576105f790369060040161055c565b92909160c435968711610232576106319761061961062198369060040161055c565b97909661193f565b6040519081529081906020820190565b0390f35b60643590811515820361023257565b3590811515820361023257565b346102325760a06003193601126102325760043561066e816102e5565b6024356bffffffffffffffffffffffff8116908181036102325760443590610695826102e5565b61069d610635565b6084359373ffffffffffffffffffffffffffffffffffffffff8087169033600c1b90861615610858576106e56106e18363cbc9d1c4600c526000526020600c205490565b1590565b61082e576b3fffffffffffffffffffffff61071683839060205263739094b1600c52600c1c6000526034600c205490565b16906a52b7d2dcc80cd2e400000061072e85846117e6565b1161080457826107ef976107a89661077a8961079f967f63d8d7d5e63e9840ec91a12a160d27b7cfab294f6ba070b7359692acfe6b03bf9d61076e6117f3565b806107f4575b506117e6565b9060ff1b91605f1b1717919060205263739094b1600c52600c1c6000526034600c2055565b3090339061182e565b6107b26001600355565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526bffffffffffffffffffffffff90911660208501523393918291820190565b0390a2005b6107fe9033612171565b38610774565b60046040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1578328e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6a3bc53e000000000000000000000000000000000000000000000000000000008152fd5b346102325760206003193601126102325760048035600090815260056020818152604092839020805460018201546002830154600384015497840154958401546006909401548751938452948301919091529481019490945273ffffffffffffffffffffffffffffffffffffffff808616606086015269ffffffffffffffffffff60a096871c8116608087015284169585019590955260509290921c841660c084015290831660e08301529190911661010082015261012090f35b34610232576020600319360112610232576020600435546040519015158152f35b90815180825260208080930193019160005b82811061097e575050505090565b835185529381019392810192600101610970565b906109a59060408352604083019061095e565b81810360209283015282518082529082019282019160009190825b8281106109cf57505050505090565b909192939485516004808210156109f4575081528201948201939291906001016109c0565b8660216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b34610232576020806003193601126102325760043567ffffffffffffffff8111610232573660238201121561023257806004013590610a5e826102cd565b91610a6c6040519384610266565b80835260248484019160051b8301019136831161023257602401905b828210610aa857610a9884612616565b9061063160405192839283610992565b81358152908401908401610a88565b34610232576020600319360112610232576020600435610ad6816102e5565b60405190600c1b8152f35b346102325760206003193601126102325760043573ffffffffffffffffffffffffffffffffffffffff60005416330361046e576020817f70fa43ca70216ad905ade86b9e650a691b2ce5a01980d0a81bdd8324141b851192600255604051908152a1005b3461023257600080600319360112610bc55773ffffffffffffffffffffffffffffffffffffffff815416330361046e57478180808084335af115610bb8576040805133815260208101929092527feaff4b37086828766ad3268786972c0cd24259d4c87a80f9d3963a3c3d999b0d91a180f35b63b12d13eb82526004601cfd5b80fd5b34610232576020600319360112610232576020610bfe600435610bea816102e5565b63cbc9d1c4600c526000526020600c205490565b6040519015158152f35b3461023257604060031936011261023257600435610c25816102e5565b602435801515908181036102325733600c1b610c5784829060205263739094b1600c52600c1c6000526034600c205490565b918215610cef57610ca6927f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff869260ff1b911617919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff6040519216825260208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2005b60046040517f87138d5c000000000000000000000000000000000000000000000000000000008152fd5b34610232576020600319360112610232576020610d496004356374dfee70600c52600c1c60005260206000205490565b604051908152f35b3461023257604060031936011261023257610019600435610d71816102e5565b60243590612171565b600319604091011261023257600435610d92816102e5565b90602435610d9f816102e5565b90565b34610232576020610bfe610db536610d7a565b9061255e565b3461023257602060031936011261023257602060405173ffffffffffffffffffffffffffffffffffffffff600435600c1c168152f35b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b34610232576000600319360112610232576020600454604051908152f35b34610232576000600319360112610232576020600254604051908152f35b34610232576040600319360112610232576020610d49602435610e83816102e5565b6004359060205263739094b1600c52600c1c6000526034600c205490565b3461023257610eaf36610d7a565b6000903d15610eda575b60208273ffffffffffffffffffffffffffffffffffffffff60405191168152f35b60205263739094b1600c525260206034600c2054605f1c38610eb9565b346102325760206003193601126102325760043567ffffffffffffffff811161023257610f2b61001991369060040161055c565b90611f17565b3461023257600060031936011261023257602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b346102325760a06003193601126102325760043560843560ff8116810361023257610f8e6117f3565b610fa2826000526005602052604060002090565b60048101805469ffffffffffffffffffff169269ffffffffffffffffffff918285169384156113c75760028101958654431161139d577f364537f14276f2a0ce9905588413f96454cbb8fb2e4f5308389307c1098bede89661123660058461115b61110998600061112d8d6112789d6110e560036110d59d019b6110a98d549e8f604051928391602083019573ffffffffffffffffffffffffffffffffffffffff602435921687917fffffffffffffffffffff00000000000000000000000000000000000000000000907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000603e959360601b16845260b01b166014830152601e8201520190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610266565b5190209560643560443588611d9c565b611122611109600689015473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b9b60a01c1690611d8f565b8a547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168b55965560019055565b019161117e611109845473ffffffffffffffffffffffffffffffffffffffff1690565b33146113585783546111a99060a01c69ffffffffffffffffffff165b69ffffffffffffffffffff1690565b6111cb6111c333600c1b6000526006602052604060002090565b9182546117e6565b90556112076111f76111f1855473ffffffffffffffffffffffffffffffffffffffff1690565b600c1b90565b6000526006602052604060002090565b6112128a82546117e6565b90555b855460501c73ffffffffffffffffffffffffffffffffffffffff1685611e8a565b81546112509060a01c69ffffffffffffffffffff1661119a565b80611293575b505050505473ffffffffffffffffffffffffffffffffffffffff9060501c1690565b60408051948552602085019290925292a26100196001600355565b6112b4611109835473ffffffffffffffffffffffffffffffffffffffff1690565b3314611345575061119a61130861133c94936113216112ea611334955473ffffffffffffffffffffffffffffffffffffffff1690565b61131a61119a611308855469ffffffffffffffffffff9060a01c1690565b60011c697fffffffffffffffffff1690565b9087611e8a565b5460a01c69ffffffffffffffffffff1690565b903390611e8a565b38808080611256565b915050611353913390611e8a565b61133c565b61137c8961137761119a875469ffffffffffffffffffff9060a01c1690565b6117e6565b6113966111c333600c1b6000526006602052604060002090565b9055611215565b60046040517ff6fafba0000000000000000000000000000000000000000000000000000000008152fd5b60046040517f63b4904e000000000000000000000000000000000000000000000000000000008152fd5b906020610d9f92818152019061095e565b346102325760406003193601126102325760043567ffffffffffffffff811161023257611433903690600401610303565b60243590611440826102e5565b60009181519161144f836125b3565b935b838110611466576040518061063187826113f1565b806114938473ffffffffffffffffffffffffffffffffffffffff61148c60019587612602565b5116612527565b61149d8288612602565b5201611451565b34610232576020610d496114b736610d7a565b90612527565b346102325760406003193601126102325767ffffffffffffffff600435818111610232576114ef903690600401610303565b906024359081116102325736602382011215610232578060040135611513816102cd565b916115216040519384610266565b81835260209160248385019160051b8301019136831161023257602401905b8282106115515761001985876116ed565b83809161155d84610644565b815201910190611540565b3461023257602060031936011261023257600435611585816102e5565b73ffffffffffffffffffffffffffffffffffffffff8060005416330361046e57816020917fe127cf589a3879da0156d4a24f43b44f65cfa3570de594806b0bfa2fcf06884f9360015560405191168152a1005b34610232576060600319360112610232576004356115f5816102e5565b60243560443567ffffffffffffffff8111610232577f2cd6435b1b961c13f55202979edd0765a809f69a539d8a477436c94c1211e43e9161164e6116406116d593369060040161055c565b906116496117f3565b611f17565b611658843361255e565b6116df575b61169933600c1b85836b3fffffffffffffffffffffff61169383859060205263739094b1600c52600c1c6000526034600c205490565b166124eb565b6116a4813386611e8a565b6040805173ffffffffffffffffffffffffffffffffffffffff95909516855260208501919091523393918291820190565b0390a26001600355005b6116e884611887565b61165d565b9060009073ffffffffffffffffffffffffffffffffffffffff825416330361046e578251918215611797578151830361178a57602092919284818080970195019360051b0101925b838103611743575050505050565b84809181600c63cbc9d1c48152825186528651918291205581517f5d6e86e5341d57a92c49934296c51542a25015c9b1782a1c2722a940131c3d9a8680a301920191611735565b63ff633a3890526004601cfd5b63df95788390526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600182018092116117e157565b6117a4565b919082018092116117e157565b600260035414611804576002600355565b60046040517fab143c06000000000000000000000000000000000000000000000000000000008152fd5b601c600060649281946020966040519860605260405260601b602c526f23b872dd000000000000000000000000600c525af13d15600160005114171615611879576000606052604052565b637939f4246000526004601cfd5b33600c1b6118ab82829060205263739094b1600c52600c1c6000526034600c205490565b908115610cef57827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6118f49316919060205263739094b1600c52600c1c6000526034600c2055565b73ffffffffffffffffffffffffffffffffffffffff60405191168152600060208201527fca585721b6b442dc9183932f7c84dc2880efb67c4da52cc06873e78971105d4960403392a2565b9294976119669073ffffffffffffffffffffffffffffffffffffffff9395986116496117f3565b16936119756106e1868461255e565b611c41576119838583612527565b9669ffffffffffffffffffff9687811693848a10611c1757600c1b976119aa6004546117d3565b9560026119c1886000526005602052604060002090565b0154431115611bed576002546119d790436117e6565b976119f88a8c9060205263739094b1600c52600c1c6000526034600c205490565b605f1c611a189073ffffffffffffffffffffffffffffffffffffffff1690565b611a206102ac565b8c8152602081018a9052604081019a909a5273ffffffffffffffffffffffffffffffffffffffff1660608a015269ffffffffffffffffffff16608089015260a0880192611a7990849069ffffffffffffffffffff169052565b73ffffffffffffffffffffffffffffffffffffffff1660c08801523360e088015273ffffffffffffffffffffffffffffffffffffffff88166101008801528315611afd575050611af09791611aeb913391611ae58a6374dfee70600c52600c1c60005260206000205490565b91611c88565b61220f565b90611afb6001600355565b565b819350809250611b2168056bc75e2d63100000925169ffffffffffffffffffff1690565b1611611b37575050611b329561220f565b611af0565b611b68611b63611b5433600c1b6000526006602052604060002090565b54670de0b6b3a7640000900490565b611d16565b81611b86611b80855169ffffffffffffffffffff1690565b92611c6b565b911611918215611bca575b5050611ba057611b329561220f565b60046040517f1c18f846000000000000000000000000000000000000000000000000000000008152fd5b5169d3c21bcecceda1000000925069ffffffffffffffffffff1616113880611b91565b60046040517fd0404f85000000000000000000000000000000000000000000000000000000008152fd5b60046040517f22bbb43c000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb2e532de000000000000000000000000000000000000000000000000000000008152fd5b90670de0b6b3a7640000918281029281840414901517156117e157565b73ffffffffffffffffffffffffffffffffffffffff8293941692611cda575b505003611cb057565b60046040517f3b8474be000000000000000000000000000000000000000000000000000000008152fd5b60059291831b8101915b8135808211851b918252602080921852604060002091019282841015611d0b579290611ce4565b509150503880611ca7565b6040519060208201907f4d2b1791000000000000000000000000000000000000000000000000000000008252602483015260248252606082019082821067ffffffffffffffff8311176102a7576020926000926040525190600154617530fa906000519115611d8157565b63e10bf1cc6000526004601cfd5b919082039182116117e157565b918254611e605760806020927f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1948452600094859384927b19457468657265756d205369676e6564204d6573736167653a0a3332845260ff603c600420996040519a865216875260405280606052105afa508051903d15611e53576060526040829052600c1b5415611e2b5750565b807f815e1d640000000000000000000000000000000000000000000000000000000060049252fd5b638baa579f90526004601cfd5b60046040517ff490a6ea000000000000000000000000000000000000000000000000000000008152fd5b60109260209260145260345260446000938480936fa9059cbb00000000000000000000000082525af13d156001835114171615611ec657603452565b6390b8ec1890526004601cfd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015611f125760051b0190565b611ed3565b6000905b828210611f38575010611f2a57565b63dfb035c96000526004601cfd5b90611f58611f47828585611f02565b356000526005602052604060002090565b611f61816121c0565b805490611f88611109600683015473ffffffffffffffffffffffffffffffffffffffff1690565b6b3fffffffffffffffffffffff611fb582859060205263739094b1600c52600c1c6000526034600c205490565b1690600493848401946a52b7d2dcc80cd2e4000000611feb611fe461119a895469ffffffffffffffffffff1690565b80966117e6565b11612149575060056120d8946120266001989795612067956111f1959060205263739094b1600c52600c1c6000526034600c20908154019055565b84547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000168555015473ffffffffffffffffffffffffffffffffffffffff1690565b61208561207e826000526006602052604060002090565b5460011c90565b68056bc75e2d63100000811161212e57506120ad6120bb916000526006602052604060002090565b68056bc75e2d631000009055565b5460501c73ffffffffffffffffffffffffffffffffffffffff1690565b7f830501e61b8b075e170b22a430e39454bdb12ed3e9620e586430b6ac00079da573ffffffffffffffffffffffffffffffffffffffff612119848888611f02565b60405190358152921691602090a20190611f1b565b90612143906000526006602052604060002090565b556120bb565b6040517ff3fb0eb9000000000000000000000000000000000000000000000000000000008152fd5b3381036121b2576374dfee70600c5280600052816020600020557f0b294da292f26e55fd442b5c0164fbb9013036ff00c5cfdde0efd01c1baaf632600080a3565b6385d1f7266000526004601cfd5b60028101544310611bed576004015469ffffffffffffffffffff16156113c757565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117e15760010190565b9095949391938460005260056020526040600020928451845560208501516001850155604085015160028501556003840160608601516122629073ffffffffffffffffffffffffffffffffffffffff1690565b8154608088015173ffffffffffffffffffffffffffffffffffffffff929092167fffff0000000000000000000000000000000000000000000000000000000000009091161760a091821b7dffffffffffffffffffff0000000000000000000000000000000000000000161790915585018051600486019991959069ffffffffffffffffffff168a547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001669ffffffffffffffffffff909116178a5560c08701998a516123419073ffffffffffffffffffffffffffffffffffffffff1690565b81547fffff0000000000000000000000000000000000000000ffffffffffffffffffff1660509190911b7dffffffffffffffffffffffffffffffffffffffff000000000000000000001617905560e087015173ffffffffffffffffffffffffffffffffffffffff1660058201906123f2919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b61010087015173ffffffffffffffffffffffffffffffffffffffff169060060190612457919073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b612460936124eb565b60045461246c906121e2565b60045582945161248f9073ffffffffffffffffffffffffffffffffffffffff1690565b915190516040805192835269ffffffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff909216917f8fb3989f70bd172a37d15b41b015e48ea09d59329638377304a4198cd0c4ea6591a3565b9291909280848103119015176125195760205263739094b1600c52600c1c6000526034600c20908154039055565b63ce3a3d376000526004601cfd5b600092913d15612535575050565b9091925060205263739094b1600c526000526034600c20546b3fffffffffffffffffffffff1690565b600092913d1561256c575050565b9091925060205263739094b1600c526000526034600c205460ff1c90565b6040516020810181811067ffffffffffffffff8211176102a75760405260008152906000368137565b906125bd826102cd565b6125ca6040519182610266565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06125f882946102cd565b0190602036910137565b8051821015611f125760209160051b010190565b90815115612767576000809280519061262e826125b3565b92612638836125b3565b955b83811061264957505050509190565b8061266a61265960019386612602565b516000526005602052604060002090565b5461269a576126798185612602565b516126848288612602565b5282612690828a612602565b5201925b9261263a565b69ffffffffffffffffffff6126c860046126b76126598589612602565b015469ffffffffffffffffffff1690565b166126fd576126d78185612602565b516126e28288612602565b526126f66126f0828a612602565b60039052565b0192612694565b600261270c6126598387612602565b015443111561273e5761271f8185612602565b5161272a8288612602565b526126f6612738828a612602565b60029052565b6127488185612602565b516127538288612602565b526126f6612761828a612602565b60019052565b905061277161258a565b90610d9f61258a56fea26469706673582212203e8aba08cc8e47b6111780acdb9c2bff6dec6f7ca5f953c7cbc481f238b3d8fd64736f6c63430008130033"; type P2PIXConstructorParams = | [signer?: Signer] diff --git a/src/types/hardhat.d.ts b/src/types/hardhat.d.ts index da4e298..20159f7 100644 --- a/src/types/hardhat.d.ts +++ b/src/types/hardhat.d.ts @@ -12,10 +12,18 @@ import * as Contracts from "."; declare module "hardhat/types/runtime" { interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory( + name: "BaseUtils", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "EventAndErrors", signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractFactory( + name: "OwnerSettings", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; getContractFactory( name: "Owned", signerOrOptions?: ethers.Signer | FactoryOptions @@ -57,11 +65,21 @@ declare module "hardhat/types/runtime" { signerOrOptions?: ethers.Signer | FactoryOptions ): Promise; + getContractAt( + name: "BaseUtils", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "EventAndErrors", address: string, signer?: ethers.Signer ): Promise; + getContractAt( + name: "OwnerSettings", + address: string, + signer?: ethers.Signer + ): Promise; getContractAt( name: "Owned", address: string, diff --git a/src/types/index.ts b/src/types/index.ts index 70aec47..7badac8 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,14 +1,20 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +import type * as core from "./core"; +export type { core }; import type * as lib from "./lib"; export type { lib }; import type * as p2PixSol from "./p2pix.sol"; export type { p2PixSol }; -export type { EventAndErrors } from "./EventAndErrors"; export type { Reputation } from "./Reputation"; export * as factories from "./factories"; -export { EventAndErrors__factory } from "./factories/EventAndErrors__factory"; +export type { BaseUtils } from "./core/BaseUtils"; +export { BaseUtils__factory } from "./factories/core/BaseUtils__factory"; +export type { EventAndErrors } from "./core/EventAndErrors"; +export { EventAndErrors__factory } from "./factories/core/EventAndErrors__factory"; +export type { OwnerSettings } from "./core/OwnerSettings"; +export { OwnerSettings__factory } from "./factories/core/OwnerSettings__factory"; export type { Owned } from "./lib/auth/Owned"; export { Owned__factory } from "./factories/lib/auth/Owned__factory"; export type { IReputation } from "./lib/interfaces/IReputation";