diff --git a/.eslintignore b/.eslintignore index 9b75c33f74..53d2118f17 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,5 @@ // files to ignore node_modules -src/assets/typechain-types /docker playwright.config.ts vitest.config.ts diff --git a/.prettierignore b/.prettierignore index 8e7db9cfde..8b13789179 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1 @@ -src/assets/typechain-types/ + diff --git a/package-lock.json b/package-lock.json index c290ccf200..00f634cf51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,6 @@ "@decent-org/fractal-ui": "^0.1.25", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/providers": "^5.7.2", "@fontsource/ibm-plex-mono": "^4.5.12", "@fontsource/ibm-plex-sans": "^4.5.13", "@fractal-framework/fractal-contracts": "^0.7.0", @@ -35,7 +33,6 @@ "classnames": "^2.3.1", "date-fns": "^2.29.3", "date-fns-tz": "^2.0.1", - "ethers": "^5.7.2", "evm-proxy-detection": "^1.1.0", "formik": "^2.2.9", "framer-motion": "^6.5.1", diff --git a/package.json b/package.json index 6006e15e64..c39ac6210e 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,6 @@ "@decent-org/fractal-ui": "^0.1.25", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/providers": "^5.7.2", "@fontsource/ibm-plex-mono": "^4.5.12", "@fontsource/ibm-plex-sans": "^4.5.13", "@fractal-framework/fractal-contracts": "^0.7.0", @@ -30,7 +28,6 @@ "classnames": "^2.3.1", "date-fns": "^2.29.3", "date-fns-tz": "^2.0.1", - "ethers": "^5.7.2", "evm-proxy-detection": "^1.1.0", "formik": "^2.2.9", "framer-motion": "^6.5.1", diff --git a/src/assets/abi/LockRelease.ts b/src/assets/abi/LockRelease.ts new file mode 100644 index 0000000000..7f98cb8f61 --- /dev/null +++ b/src/assets/abi/LockRelease.ts @@ -0,0 +1,583 @@ +export default [ + { + inputs: [ + { + internalType: 'address', + name: '_token', + type: 'address', + }, + { + internalType: 'address[]', + name: '_beneficiaries', + type: 'address[]', + }, + { + internalType: 'uint256[]', + name: '_amounts', + type: 'uint256[]', + }, + { + internalType: 'uint128', + name: '_start', + type: 'uint128', + }, + { + internalType: 'uint128', + name: '_duration', + type: 'uint128', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'DuplicateBeneficiary', + type: 'error', + }, + { + inputs: [], + name: 'InvalidAmount', + type: 'error', + }, + { + inputs: [], + name: 'InvalidArrayLengths', + type: 'error', + }, + { + inputs: [], + name: 'InvalidBeneficiary', + type: 'error', + }, + { + inputs: [], + name: 'InvalidShortString', + type: 'error', + }, + { + inputs: [], + name: 'InvalidToken', + type: 'error', + }, + { + inputs: [], + name: 'NothingToRelease', + type: 'error', + }, + { + inputs: [ + { + internalType: 'string', + name: 'str', + type: 'string', + }, + ], + name: 'StringTooLong', + type: 'error', + }, + { + inputs: [], + name: 'ZeroDuration', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'delegator', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'fromDelegate', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'toDelegate', + type: 'address', + }, + ], + name: 'DelegateChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'delegate', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'previousBalance', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'newBalance', + type: 'uint256', + }, + ], + name: 'DelegateVotesChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [], + name: 'EIP712DomainChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'token', + type: 'address', + }, + { + indexed: false, + internalType: 'address[]', + name: 'beneficiaries', + type: 'address[]', + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'amounts', + type: 'uint256[]', + }, + { + indexed: false, + internalType: 'uint128', + name: 'start', + type: 'uint128', + }, + { + indexed: false, + internalType: 'uint128', + name: 'duration', + type: 'uint128', + }, + ], + name: 'ScheduleStarted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beneficiary', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'TokensReleased', + type: 'event', + }, + { + inputs: [], + name: 'CLOCK_MODE', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'DOMAIN_SEPARATOR', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'clock', + outputs: [ + { + internalType: 'uint48', + name: '', + type: 'uint48', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + ], + name: 'delegate', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'delegatee', + type: 'address', + }, + { + internalType: 'uint256', + name: 'nonce', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'expiry', + type: 'uint256', + }, + { + internalType: 'uint8', + name: 'v', + type: 'uint8', + }, + { + internalType: 'bytes32', + name: 'r', + type: 'bytes32', + }, + { + internalType: 'bytes32', + name: 's', + type: 'bytes32', + }, + ], + name: 'delegateBySig', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'delegates', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'duration', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'eip712Domain', + outputs: [ + { + internalType: 'bytes1', + name: 'fields', + type: 'bytes1', + }, + { + internalType: 'string', + name: 'name', + type: 'string', + }, + { + internalType: 'string', + name: 'version', + type: 'string', + }, + { + internalType: 'uint256', + name: 'chainId', + type: 'uint256', + }, + { + internalType: 'address', + name: 'verifyingContract', + type: 'address', + }, + { + internalType: 'bytes32', + name: 'salt', + type: 'bytes32', + }, + { + internalType: 'uint256[]', + name: 'extensions', + type: 'uint256[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getBeneficiaries', + outputs: [ + { + internalType: 'address[]', + name: '', + type: 'address[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'timepoint', + type: 'uint256', + }, + ], + name: 'getPastTotalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + { + internalType: 'uint256', + name: '_blockNumber', + type: 'uint256', + }, + ], + name: 'getPastVotes', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_beneficiary', + type: 'address', + }, + ], + name: 'getPending', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_beneficiary', + type: 'address', + }, + ], + name: 'getReleasable', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_beneficiary', + type: 'address', + }, + ], + name: 'getReleased', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_beneficiary', + type: 'address', + }, + ], + name: 'getTotal', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_beneficiary', + type: 'address', + }, + ], + name: 'getTotalMatured', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'getVotes', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'nonces', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'release', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'start', + outputs: [ + { + internalType: 'uint128', + name: '', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'token', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, +]; diff --git a/src/assets/abi/MultiSend.ts b/src/assets/abi/MultiSend.ts new file mode 100644 index 0000000000..f9ceb556f8 --- /dev/null +++ b/src/assets/abi/MultiSend.ts @@ -0,0 +1,20 @@ +export default [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'bytes', + name: 'transactions', + type: 'bytes', + }, + ], + name: 'multiSend', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, +]; diff --git a/src/assets/abi/SafeL2.ts b/src/assets/abi/SafeL2.ts new file mode 100644 index 0000000000..95b0bf23e0 --- /dev/null +++ b/src/assets/abi/SafeL2.ts @@ -0,0 +1,1138 @@ +export default [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'AddedOwner', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'approvedHash', + type: 'bytes32', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'ApproveHash', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'handler', + type: 'address', + }, + ], + name: 'ChangedFallbackHandler', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'guard', + type: 'address', + }, + ], + name: 'ChangedGuard', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'threshold', + type: 'uint256', + }, + ], + name: 'ChangedThreshold', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'DisabledModule', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'EnabledModule', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'bytes32', + name: 'txHash', + type: 'bytes32', + }, + { + indexed: false, + internalType: 'uint256', + name: 'payment', + type: 'uint256', + }, + ], + name: 'ExecutionFailure', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'ExecutionFromModuleFailure', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'ExecutionFromModuleSuccess', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'bytes32', + name: 'txHash', + type: 'bytes32', + }, + { + indexed: false, + internalType: 'uint256', + name: 'payment', + type: 'uint256', + }, + ], + name: 'ExecutionSuccess', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'RemovedOwner', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'module', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + indexed: false, + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + indexed: false, + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + ], + name: 'SafeModuleTransaction', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + indexed: false, + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + indexed: false, + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + { + indexed: false, + internalType: 'uint256', + name: 'safeTxGas', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'baseGas', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'gasPrice', + type: 'uint256', + }, + { + indexed: false, + internalType: 'address', + name: 'gasToken', + type: 'address', + }, + { + indexed: false, + internalType: 'address payable', + name: 'refundReceiver', + type: 'address', + }, + { + indexed: false, + internalType: 'bytes', + name: 'signatures', + type: 'bytes', + }, + { + indexed: false, + internalType: 'bytes', + name: 'additionalInfo', + type: 'bytes', + }, + ], + name: 'SafeMultiSigTransaction', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'SafeReceived', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'initiator', + type: 'address', + }, + { + indexed: false, + internalType: 'address[]', + name: 'owners', + type: 'address[]', + }, + { + indexed: false, + internalType: 'uint256', + name: 'threshold', + type: 'uint256', + }, + { + indexed: false, + internalType: 'address', + name: 'initializer', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'fallbackHandler', + type: 'address', + }, + ], + name: 'SafeSetup', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'bytes32', + name: 'msgHash', + type: 'bytes32', + }, + ], + name: 'SignMsg', + type: 'event', + }, + { + stateMutability: 'nonpayable', + type: 'fallback', + }, + { + inputs: [], + name: 'VERSION', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: '_threshold', + type: 'uint256', + }, + ], + name: 'addOwnerWithThreshold', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'hashToApprove', + type: 'bytes32', + }, + ], + name: 'approveHash', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + name: 'approvedHashes', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_threshold', + type: 'uint256', + }, + ], + name: 'changeThreshold', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'dataHash', + type: 'bytes32', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'bytes', + name: 'signatures', + type: 'bytes', + }, + { + internalType: 'uint256', + name: 'requiredSignatures', + type: 'uint256', + }, + ], + name: 'checkNSignatures', + outputs: [], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: 'dataHash', + type: 'bytes32', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'bytes', + name: 'signatures', + type: 'bytes', + }, + ], + name: 'checkSignatures', + outputs: [], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'prevModule', + type: 'address', + }, + { + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'disableModule', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'domainSeparator', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'enableModule', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'safeTxGas', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'baseGas', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'gasPrice', + type: 'uint256', + }, + { + internalType: 'address', + name: 'gasToken', + type: 'address', + }, + { + internalType: 'address', + name: 'refundReceiver', + type: 'address', + }, + { + internalType: 'uint256', + name: '_nonce', + type: 'uint256', + }, + ], + name: 'encodeTransactionData', + outputs: [ + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'safeTxGas', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'baseGas', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'gasPrice', + type: 'uint256', + }, + { + internalType: 'address', + name: 'gasToken', + type: 'address', + }, + { + internalType: 'address payable', + name: 'refundReceiver', + type: 'address', + }, + { + internalType: 'bytes', + name: 'signatures', + type: 'bytes', + }, + ], + name: 'execTransaction', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + ], + name: 'execTransactionFromModule', + outputs: [ + { + internalType: 'bool', + name: 'success', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + ], + name: 'execTransactionFromModuleReturnData', + outputs: [ + { + internalType: 'bool', + name: 'success', + type: 'bool', + }, + { + internalType: 'bytes', + name: 'returnData', + type: 'bytes', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'getChainId', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'start', + type: 'address', + }, + { + internalType: 'uint256', + name: 'pageSize', + type: 'uint256', + }, + ], + name: 'getModulesPaginated', + outputs: [ + { + internalType: 'address[]', + name: 'array', + type: 'address[]', + }, + { + internalType: 'address', + name: 'next', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getOwners', + outputs: [ + { + internalType: 'address[]', + name: '', + type: 'address[]', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'offset', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'length', + type: 'uint256', + }, + ], + name: 'getStorageAt', + outputs: [ + { + internalType: 'bytes', + name: '', + type: 'bytes', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getThreshold', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + { + internalType: 'uint256', + name: 'safeTxGas', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'baseGas', + type: 'uint256', + }, + { + internalType: 'uint256', + name: 'gasPrice', + type: 'uint256', + }, + { + internalType: 'address', + name: 'gasToken', + type: 'address', + }, + { + internalType: 'address', + name: 'refundReceiver', + type: 'address', + }, + { + internalType: 'uint256', + name: '_nonce', + type: 'uint256', + }, + ], + name: 'getTransactionHash', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'module', + type: 'address', + }, + ], + name: 'isModuleEnabled', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'isOwner', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'nonce', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'prevOwner', + type: 'address', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'uint256', + name: '_threshold', + type: 'uint256', + }, + ], + name: 'removeOwner', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'enum Enum.Operation', + name: 'operation', + type: 'uint8', + }, + ], + name: 'requiredTxGas', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'handler', + type: 'address', + }, + ], + name: 'setFallbackHandler', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'guard', + type: 'address', + }, + ], + name: 'setGuard', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address[]', + name: '_owners', + type: 'address[]', + }, + { + internalType: 'uint256', + name: '_threshold', + type: 'uint256', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + { + internalType: 'address', + name: 'fallbackHandler', + type: 'address', + }, + { + internalType: 'address', + name: 'paymentToken', + type: 'address', + }, + { + internalType: 'uint256', + name: 'payment', + type: 'uint256', + }, + { + internalType: 'address payable', + name: 'paymentReceiver', + type: 'address', + }, + ], + name: 'setup', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + name: 'signedMessages', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'targetContract', + type: 'address', + }, + { + internalType: 'bytes', + name: 'calldataPayload', + type: 'bytes', + }, + ], + name: 'simulateAndRevert', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'prevOwner', + type: 'address', + }, + { + internalType: 'address', + name: 'oldOwner', + type: 'address', + }, + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'swapOwner', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + stateMutability: 'payable', + type: 'receive', + }, +]; diff --git a/src/assets/typechain-types/dcnt/DCNTToken.d.ts b/src/assets/typechain-types/dcnt/DCNTToken.d.ts deleted file mode 100644 index 1dc8d7c88e..0000000000 --- a/src/assets/typechain-types/dcnt/DCNTToken.d.ts +++ /dev/null @@ -1,1166 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface DCNTTokenInterface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "DOMAIN_SEPARATOR()": FunctionFragment; - "MINIMUM_MINT_INTERVAL()": FunctionFragment; - "MINT_CAP_BPS()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "burn(uint256)": FunctionFragment; - "checkpoints(address,uint32)": FunctionFragment; - "clock()": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "eip712Domain()": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getVotes(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "mint(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nextMint()": FunctionFragment; - "nonces(address)": FunctionFragment; - "numCheckpoints(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "MINIMUM_MINT_INTERVAL", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "MINT_CAP_BPS", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "burn", values: [BigNumberish]): string; - encodeFunctionData( - functionFragment: "checkpoints", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "mint", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nextMint", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "numCheckpoints", - values: [string] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "MINIMUM_MINT_INTERVAL", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "MINT_CAP_BPS", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "checkpoints", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nextMint", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "numCheckpoints", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - "EIP712DomainChanged()": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export type OwnershipTransferredEvent = TypedEvent< - [string, string] & { previousOwner: string; newOwner: string } ->; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class DCNTToken extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: DCNTTokenInterface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - MINIMUM_MINT_INTERVAL(overrides?: CallOverrides): Promise<[number]>; - - MINT_CAP_BPS(overrides?: CallOverrides): Promise<[number]>; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - dest: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nextMint(overrides?: CallOverrides): Promise<[BigNumber]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise<[number]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_MINT_INTERVAL(overrides?: CallOverrides): Promise; - - MINT_CAP_BPS(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - dest: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextMint(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints(account: string, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_MINT_INTERVAL(overrides?: CallOverrides): Promise; - - MINT_CAP_BPS(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn(amount: BigNumberish, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - mint( - dest: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextMint(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints(account: string, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_MINT_INTERVAL(overrides?: CallOverrides): Promise; - - MINT_CAP_BPS(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - dest: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextMint(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - MINIMUM_MINT_INTERVAL( - overrides?: CallOverrides - ): Promise; - - MINT_CAP_BPS(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - burn( - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes( - account: string, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - mint( - dest: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nextMint(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/EIP712.d.ts b/src/assets/typechain-types/dcnt/EIP712.d.ts deleted file mode 100644 index d5ec0d5a13..0000000000 --- a/src/assets/typechain-types/dcnt/EIP712.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface EIP712Interface extends ethers.utils.Interface { - functions: { - "eip712Domain()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - - events: { - "EIP712DomainChanged()": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; -} - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export class EIP712 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: EIP712Interface; - - functions: { - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - }; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - callStatic: { - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - }; - - filters: { - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - }; - - estimateGas: { - eip712Domain(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - eip712Domain(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/ERC20.d.ts b/src/assets/typechain-types/dcnt/ERC20.d.ts deleted file mode 100644 index 92b69660c5..0000000000 --- a/src/assets/typechain-types/dcnt/ERC20.d.ts +++ /dev/null @@ -1,441 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ERC20Interface extends ethers.utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class ERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ERC20Interface; - - functions: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/ERC20Permit.d.ts b/src/assets/typechain-types/dcnt/ERC20Permit.d.ts deleted file mode 100644 index 01ec0c726b..0000000000 --- a/src/assets/typechain-types/dcnt/ERC20Permit.d.ts +++ /dev/null @@ -1,608 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ERC20PermitInterface extends ethers.utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "eip712Domain()": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "EIP712DomainChanged()": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class ERC20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ERC20PermitInterface; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/ERC20Votes.d.ts b/src/assets/typechain-types/dcnt/ERC20Votes.d.ts deleted file mode 100644 index 525465d63a..0000000000 --- a/src/assets/typechain-types/dcnt/ERC20Votes.d.ts +++ /dev/null @@ -1,956 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ERC20VotesInterface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "DOMAIN_SEPARATOR()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "checkpoints(address,uint32)": FunctionFragment; - "clock()": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "eip712Domain()": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getVotes(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "numCheckpoints(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData( - functionFragment: "checkpoints", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "numCheckpoints", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "checkpoints", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "numCheckpoints", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - "EIP712DomainChanged()": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class ERC20Votes extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ERC20VotesInterface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise<[number]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints(account: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints(account: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes( - account: string, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/ERC20VotesLockable.d.ts b/src/assets/typechain-types/dcnt/ERC20VotesLockable.d.ts deleted file mode 100644 index cb92b5ba9e..0000000000 --- a/src/assets/typechain-types/dcnt/ERC20VotesLockable.d.ts +++ /dev/null @@ -1,1099 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ERC20VotesLockableInterface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "DOMAIN_SEPARATOR()": FunctionFragment; - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "checkpoints(address,uint32)": FunctionFragment; - "clock()": FunctionFragment; - "decimals()": FunctionFragment; - "decreaseAllowance(address,uint256)": FunctionFragment; - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "eip712Domain()": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getVotes(address)": FunctionFragment; - "increaseAllowance(address,uint256)": FunctionFragment; - "lock()": FunctionFragment; - "name()": FunctionFragment; - "nonces(address)": FunctionFragment; - "numCheckpoints(address)": FunctionFragment; - "owner()": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setUpLockedVotingPower(address)": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData( - functionFragment: "checkpoints", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData( - functionFragment: "decreaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - encodeFunctionData( - functionFragment: "increaseAllowance", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "lock", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "numCheckpoints", - values: [string] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setUpLockedVotingPower", - values: [string] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "checkpoints", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "decreaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "increaseAllowance", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "lock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "numCheckpoints", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setUpLockedVotingPower", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - "EIP712DomainChanged()": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export type OwnershipTransferredEvent = TypedEvent< - [string, string] & { previousOwner: string; newOwner: string } ->; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class ERC20VotesLockable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ERC20VotesLockableInterface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lock(overrides?: CallOverrides): Promise<[string]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise<[number]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setUpLockedVotingPower( - _lockAddress: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lock(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints(account: string, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setUpLockedVotingPower( - _lockAddress: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: CallOverrides - ): Promise; - - lock(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints(account: string, overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setUpLockedVotingPower( - _lockAddress: string, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lock(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setUpLockedVotingPower( - _lockAddress: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - checkpoints( - account: string, - pos: BigNumberish, - overrides?: CallOverrides - ): Promise; - - clock(overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - decreaseAllowance( - spender: string, - subtractedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes( - account: string, - overrides?: CallOverrides - ): Promise; - - increaseAllowance( - spender: string, - addedValue: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - lock(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - numCheckpoints( - account: string, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - setUpLockedVotingPower( - _lockAddress: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IERC20.d.ts b/src/assets/typechain-types/dcnt/IERC20.d.ts deleted file mode 100644 index adc03a1f46..0000000000 --- a/src/assets/typechain-types/dcnt/IERC20.d.ts +++ /dev/null @@ -1,324 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC20Interface extends ethers.utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class IERC20 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC20Interface; - - functions: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IERC20Metadata.d.ts b/src/assets/typechain-types/dcnt/IERC20Metadata.d.ts deleted file mode 100644 index eb1f4121f6..0000000000 --- a/src/assets/typechain-types/dcnt/IERC20Metadata.d.ts +++ /dev/null @@ -1,363 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC20MetadataInterface extends ethers.utils.Interface { - functions: { - "allowance(address,address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "decimals()": FunctionFragment; - "name()": FunctionFragment; - "symbol()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transfer(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "allowance", - values: [string, string] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; - encodeFunctionData(functionFragment: "decimals", values?: undefined): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transfer", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [string, string, BigNumberish] - ): string; - - decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber] & { - owner: string; - spender: string; - value: BigNumber; - } ->; - -export type TransferEvent = TypedEvent< - [string, string, BigNumber] & { from: string; to: string; value: BigNumber } ->; - -export class IERC20Metadata extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC20MetadataInterface; - - functions: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - decimals(overrides?: CallOverrides): Promise<[number]>; - - name(overrides?: CallOverrides): Promise<[string]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - Approval( - owner?: string | null, - spender?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { owner: string; spender: string; value: BigNumber } - >; - - "Transfer(address,address,uint256)"( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - - Transfer( - from?: string | null, - to?: string | null, - value?: null - ): TypedEventFilter< - [string, string, BigNumber], - { from: string; to: string; value: BigNumber } - >; - }; - - estimateGas: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf(account: string, overrides?: CallOverrides): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - allowance( - owner: string, - spender: string, - overrides?: CallOverrides - ): Promise; - - approve( - spender: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - balanceOf( - account: string, - overrides?: CallOverrides - ): Promise; - - decimals(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - symbol(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transfer( - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferFrom( - from: string, - to: string, - amount: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IERC20Permit.d.ts b/src/assets/typechain-types/dcnt/IERC20Permit.d.ts deleted file mode 100644 index 8caa795c93..0000000000 --- a/src/assets/typechain-types/dcnt/IERC20Permit.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC20PermitInterface extends ethers.utils.Interface { - functions: { - "DOMAIN_SEPARATOR()": FunctionFragment; - "nonces(address)": FunctionFragment; - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData( - functionFragment: "permit", - values: [ - string, - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; - - events: {}; -} - -export class IERC20Permit extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC20PermitInterface; - - functions: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - permit( - owner: string, - spender: string, - value: BigNumberish, - deadline: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IERC5267.d.ts b/src/assets/typechain-types/dcnt/IERC5267.d.ts deleted file mode 100644 index 04bf6be928..0000000000 --- a/src/assets/typechain-types/dcnt/IERC5267.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC5267Interface extends ethers.utils.Interface { - functions: { - "eip712Domain()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - - events: { - "EIP712DomainChanged()": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; -} - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export class IERC5267 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC5267Interface; - - functions: { - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - }; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - callStatic: { - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - }; - - filters: { - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - }; - - estimateGas: { - eip712Domain(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - eip712Domain(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IERC5805.d.ts b/src/assets/typechain-types/dcnt/IERC5805.d.ts deleted file mode 100644 index de9ef9a5f1..0000000000 --- a/src/assets/typechain-types/dcnt/IERC5805.d.ts +++ /dev/null @@ -1,366 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC5805Interface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "clock()": FunctionFragment; - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getVotes(address)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - - events: { - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; -} - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export class IERC5805 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC5805Interface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - }; - - filters: { - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - }; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes( - account: string, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IERC6372.d.ts b/src/assets/typechain-types/dcnt/IERC6372.d.ts deleted file mode 100644 index 349109451a..0000000000 --- a/src/assets/typechain-types/dcnt/IERC6372.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IERC6372Interface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "clock()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - - events: {}; -} - -export class IERC6372 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IERC6372Interface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/ILockRelease.d.ts b/src/assets/typechain-types/dcnt/ILockRelease.d.ts deleted file mode 100644 index b11b3329a7..0000000000 --- a/src/assets/typechain-types/dcnt/ILockRelease.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ILockReleaseInterface extends ethers.utils.Interface { - functions: { - "getBeneficiaries()": FunctionFragment; - "getPending(address)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "getBeneficiaries", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "getPending", values: [string]): string; - - decodeFunctionResult( - functionFragment: "getBeneficiaries", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getPending", data: BytesLike): Result; - - events: {}; -} - -export class ILockRelease extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ILockReleaseInterface; - - functions: { - getBeneficiaries(overrides?: CallOverrides): Promise<[string[]]>; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - }; - - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - callStatic: { - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/IVotes.d.ts b/src/assets/typechain-types/dcnt/IVotes.d.ts deleted file mode 100644 index 3e8e4dd709..0000000000 --- a/src/assets/typechain-types/dcnt/IVotes.d.ts +++ /dev/null @@ -1,337 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface IVotesInterface extends ethers.utils.Interface { - functions: { - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getVotes(address)": FunctionFragment; - }; - - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - - events: { - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; -} - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export class IVotes extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: IVotesInterface; - - functions: { - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - callStatic: { - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - }; - - filters: { - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - }; - - estimateGas: { - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes( - account: string, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/LockRelease.d.ts b/src/assets/typechain-types/dcnt/LockRelease.d.ts deleted file mode 100644 index a9c11a7908..0000000000 --- a/src/assets/typechain-types/dcnt/LockRelease.d.ts +++ /dev/null @@ -1,763 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface LockReleaseInterface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "DOMAIN_SEPARATOR()": FunctionFragment; - "clock()": FunctionFragment; - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "duration()": FunctionFragment; - "eip712Domain()": FunctionFragment; - "getBeneficiaries()": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getPending(address)": FunctionFragment; - "getReleasable(address)": FunctionFragment; - "getReleased(address)": FunctionFragment; - "getTotal(address)": FunctionFragment; - "getTotalMatured(address)": FunctionFragment; - "getVotes(address)": FunctionFragment; - "nonces(address)": FunctionFragment; - "release()": FunctionFragment; - "start()": FunctionFragment; - "token()": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData(functionFragment: "duration", values?: undefined): string; - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getBeneficiaries", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getPending", values: [string]): string; - encodeFunctionData( - functionFragment: "getReleasable", - values: [string] - ): string; - encodeFunctionData(functionFragment: "getReleased", values: [string]): string; - encodeFunctionData(functionFragment: "getTotal", values: [string]): string; - encodeFunctionData( - functionFragment: "getTotalMatured", - values: [string] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - encodeFunctionData(functionFragment: "release", values?: undefined): string; - encodeFunctionData(functionFragment: "start", values?: undefined): string; - encodeFunctionData(functionFragment: "token", values?: undefined): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "duration", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getBeneficiaries", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getPending", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getReleasable", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getReleased", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getTotal", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getTotalMatured", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "release", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "start", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; - - events: { - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - "EIP712DomainChanged()": EventFragment; - "ScheduleStarted(address,address[],uint256[],uint128,uint128)": EventFragment; - "TokensReleased(address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ScheduleStarted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TokensReleased"): EventFragment; -} - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export type ScheduleStartedEvent = TypedEvent< - [string, string[], BigNumber[], BigNumber, BigNumber] & { - token: string; - beneficiaries: string[]; - amounts: BigNumber[]; - start: BigNumber; - duration: BigNumber; - } ->; - -export type TokensReleasedEvent = TypedEvent< - [string, BigNumber] & { beneficiary: string; amount: BigNumber } ->; - -export class LockRelease extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: LockReleaseInterface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - duration(overrides?: CallOverrides): Promise<[BigNumber]>; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getBeneficiaries(overrides?: CallOverrides): Promise<[string[]]>; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - _account: string, - _blockNumber: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getReleasable( - _beneficiary: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getReleased( - _beneficiary: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getTotal( - _beneficiary: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getTotalMatured( - _beneficiary: string, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(_account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - release( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - start(overrides?: CallOverrides): Promise<[BigNumber]>; - - token(overrides?: CallOverrides): Promise<[string]>; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - duration(overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - _account: string, - _blockNumber: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleasable( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleased( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotal(_beneficiary: string, overrides?: CallOverrides): Promise; - - getTotalMatured( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getVotes(_account: string, overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - release( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - start(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - duration(overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - _account: string, - _blockNumber: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleasable( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleased( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotal( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotalMatured( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getVotes(_account: string, overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - release(overrides?: CallOverrides): Promise; - - start(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - }; - - filters: { - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - - "ScheduleStarted(address,address[],uint256[],uint128,uint128)"( - token?: null, - beneficiaries?: null, - amounts?: null, - start?: null, - duration?: null - ): TypedEventFilter< - [string, string[], BigNumber[], BigNumber, BigNumber], - { - token: string; - beneficiaries: string[]; - amounts: BigNumber[]; - start: BigNumber; - duration: BigNumber; - } - >; - - ScheduleStarted( - token?: null, - beneficiaries?: null, - amounts?: null, - start?: null, - duration?: null - ): TypedEventFilter< - [string, string[], BigNumber[], BigNumber, BigNumber], - { - token: string; - beneficiaries: string[]; - amounts: BigNumber[]; - start: BigNumber; - duration: BigNumber; - } - >; - - "TokensReleased(address,uint256)"( - beneficiary?: string | null, - amount?: null - ): TypedEventFilter< - [string, BigNumber], - { beneficiary: string; amount: BigNumber } - >; - - TokensReleased( - beneficiary?: string | null, - amount?: null - ): TypedEventFilter< - [string, BigNumber], - { beneficiary: string; amount: BigNumber } - >; - }; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - duration(overrides?: CallOverrides): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - _account: string, - _blockNumber: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleasable( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleased( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotal( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotalMatured( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getVotes(_account: string, overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - release( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - start(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - duration(overrides?: CallOverrides): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getBeneficiaries(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - _account: string, - _blockNumber: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPending( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleasable( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getReleased( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotal( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getTotalMatured( - _beneficiary: string, - overrides?: CallOverrides - ): Promise; - - getVotes( - _account: string, - overrides?: CallOverrides - ): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - - release( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - start(overrides?: CallOverrides): Promise; - - token(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/Ownable.d.ts b/src/assets/typechain-types/dcnt/Ownable.d.ts deleted file mode 100644 index 265dc3e883..0000000000 --- a/src/assets/typechain-types/dcnt/Ownable.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface OwnableInterface extends ethers.utils.Interface { - functions: { - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [string] - ): string; - - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export type OwnershipTransferredEvent = TypedEvent< - [string, string] & { previousOwner: string; newOwner: string } ->; - -export class Ownable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: OwnableInterface; - - functions: { - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - callStatic: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: string, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferred(address,address)"( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - - OwnershipTransferred( - previousOwner?: string | null, - newOwner?: string | null - ): TypedEventFilter< - [string, string], - { previousOwner: string; newOwner: string } - >; - }; - - estimateGas: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; - - populateTransaction: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - transferOwnership( - newOwner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/ShortStrings.d.ts b/src/assets/typechain-types/dcnt/ShortStrings.d.ts deleted file mode 100644 index 2b15ef2436..0000000000 --- a/src/assets/typechain-types/dcnt/ShortStrings.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface ShortStringsInterface extends ethers.utils.Interface { - functions: {}; - - events: {}; -} - -export class ShortStrings extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: ShortStringsInterface; - - functions: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/src/assets/typechain-types/dcnt/Votes.d.ts b/src/assets/typechain-types/dcnt/Votes.d.ts deleted file mode 100644 index 87779d4743..0000000000 --- a/src/assets/typechain-types/dcnt/Votes.d.ts +++ /dev/null @@ -1,464 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, - BaseContract, - ContractTransaction, - Overrides, - CallOverrides, -} from "ethers"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -import type { TypedEventFilter, TypedEvent, TypedListener } from "./common"; - -interface VotesInterface extends ethers.utils.Interface { - functions: { - "CLOCK_MODE()": FunctionFragment; - "DOMAIN_SEPARATOR()": FunctionFragment; - "clock()": FunctionFragment; - "delegate(address)": FunctionFragment; - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; - "delegates(address)": FunctionFragment; - "eip712Domain()": FunctionFragment; - "getPastTotalSupply(uint256)": FunctionFragment; - "getPastVotes(address,uint256)": FunctionFragment; - "getVotes(address)": FunctionFragment; - "nonces(address)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "CLOCK_MODE", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "DOMAIN_SEPARATOR", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "clock", values?: undefined): string; - encodeFunctionData(functionFragment: "delegate", values: [string]): string; - encodeFunctionData( - functionFragment: "delegateBySig", - values: [ - string, - BigNumberish, - BigNumberish, - BigNumberish, - BytesLike, - BytesLike - ] - ): string; - encodeFunctionData(functionFragment: "delegates", values: [string]): string; - encodeFunctionData( - functionFragment: "eip712Domain", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getPastTotalSupply", - values: [BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "getPastVotes", - values: [string, BigNumberish] - ): string; - encodeFunctionData(functionFragment: "getVotes", values: [string]): string; - encodeFunctionData(functionFragment: "nonces", values: [string]): string; - - decodeFunctionResult(functionFragment: "CLOCK_MODE", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "DOMAIN_SEPARATOR", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "clock", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "delegateBySig", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "eip712Domain", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastTotalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getPastVotes", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; - - events: { - "DelegateChanged(address,address,address)": EventFragment; - "DelegateVotesChanged(address,uint256,uint256)": EventFragment; - "EIP712DomainChanged()": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged"): EventFragment; -} - -export type DelegateChangedEvent = TypedEvent< - [string, string, string] & { - delegator: string; - fromDelegate: string; - toDelegate: string; - } ->; - -export type DelegateVotesChangedEvent = TypedEvent< - [string, BigNumber, BigNumber] & { - delegate: string; - previousBalance: BigNumber; - newBalance: BigNumber; - } ->; - -export type EIP712DomainChangedEvent = TypedEvent<[] & {}>; - -export class Votes extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - listeners, EventArgsObject>( - eventFilter?: TypedEventFilter - ): Array>; - off, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - on, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - once, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeListener, EventArgsObject>( - eventFilter: TypedEventFilter, - listener: TypedListener - ): this; - removeAllListeners, EventArgsObject>( - eventFilter: TypedEventFilter - ): this; - - listeners(eventName?: string): Array; - off(eventName: string, listener: Listener): this; - on(eventName: string, listener: Listener): this; - once(eventName: string, listener: Listener): this; - removeListener(eventName: string, listener: Listener): this; - removeAllListeners(eventName?: string): this; - - queryFilter, EventArgsObject>( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>>; - - interface: VotesInterface; - - functions: { - CLOCK_MODE(overrides?: CallOverrides): Promise<[string]>; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; - - clock(overrides?: CallOverrides): Promise<[number]>; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise<[string]>; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; - - nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; - }; - - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - - callStatic: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate(delegatee: string, overrides?: CallOverrides): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: CallOverrides - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain( - overrides?: CallOverrides - ): Promise< - [string, string, string, BigNumber, string, string, BigNumber[]] & { - fields: string; - name: string; - version: string; - chainId: BigNumber; - verifyingContract: string; - salt: string; - extensions: BigNumber[]; - } - >; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - }; - - filters: { - "DelegateChanged(address,address,address)"( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - DelegateChanged( - delegator?: string | null, - fromDelegate?: string | null, - toDelegate?: string | null - ): TypedEventFilter< - [string, string, string], - { delegator: string; fromDelegate: string; toDelegate: string } - >; - - "DelegateVotesChanged(address,uint256,uint256)"( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - DelegateVotesChanged( - delegate?: string | null, - previousBalance?: null, - newBalance?: null - ): TypedEventFilter< - [string, BigNumber, BigNumber], - { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } - >; - - "EIP712DomainChanged()"(): TypedEventFilter<[], {}>; - - EIP712DomainChanged(): TypedEventFilter<[], {}>; - }; - - estimateGas: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates(account: string, overrides?: CallOverrides): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes(account: string, overrides?: CallOverrides): Promise; - - nonces(owner: string, overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - CLOCK_MODE(overrides?: CallOverrides): Promise; - - DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; - - clock(overrides?: CallOverrides): Promise; - - delegate( - delegatee: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegateBySig( - delegatee: string, - nonce: BigNumberish, - expiry: BigNumberish, - v: BigNumberish, - r: BytesLike, - s: BytesLike, - overrides?: Overrides & { from?: string | Promise } - ): Promise; - - delegates( - account: string, - overrides?: CallOverrides - ): Promise; - - eip712Domain(overrides?: CallOverrides): Promise; - - getPastTotalSupply( - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getPastVotes( - account: string, - timepoint: BigNumberish, - overrides?: CallOverrides - ): Promise; - - getVotes( - account: string, - overrides?: CallOverrides - ): Promise; - - nonces( - owner: string, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/dcnt/common.d.ts b/src/assets/typechain-types/dcnt/common.d.ts deleted file mode 100644 index fc937825df..0000000000 --- a/src/assets/typechain-types/dcnt/common.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { EventFilter, Event } from "ethers"; -import { Result } from "@ethersproject/abi"; - -export interface TypedEventFilter<_EventArgsArray, _EventArgsObject> - extends EventFilter {} - -export interface TypedEvent extends Event { - args: EventArgs; -} - -export type TypedListener< - EventArgsArray extends Array, - EventArgsObject -> = ( - ...listenerArg: [ - ...EventArgsArray, - TypedEvent - ] -) => void; - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; -export type GetContractTypeFromFactory = F extends MinEthersFactory< - infer C, - any -> - ? C - : never; -export type GetARGsTypeFromFactory = F extends MinEthersFactory - ? Parameters - : never; diff --git a/src/assets/typechain-types/dcnt/factories/DCNTToken__factory.ts b/src/assets/typechain-types/dcnt/factories/DCNTToken__factory.ts deleted file mode 100644 index bb106532ac..0000000000 --- a/src/assets/typechain-types/dcnt/factories/DCNTToken__factory.ts +++ /dev/null @@ -1,885 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - Signer, - utils, - BigNumberish, - Contract, - ContractFactory, - Overrides, -} from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { DCNTToken, DCNTTokenInterface } from "../DCNTToken"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint256", - name: "_supply", - type: "uint256", - }, - { - internalType: "address", - name: "_owner", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [], - name: "MintExceedsMaximum", - type: "error", - }, - { - inputs: [], - name: "MintTooSoon", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MINIMUM_MINT_INTERVAL", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "MINT_CAP_BPS", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint32", - name: "pos", - type: "uint32", - }, - ], - name: "checkpoints", - outputs: [ - { - components: [ - { - internalType: "uint32", - name: "fromBlock", - type: "uint32", - }, - { - internalType: "uint224", - name: "votes", - type: "uint224", - }, - ], - internalType: "struct ERC20Votes.Checkpoint", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "dest", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "nextMint", - outputs: [ - { - internalType: "uint128", - name: "", - type: "uint128", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "numCheckpoints", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x6101606040523480156200001257600080fd5b506040516200609238038062006092833981810160405281019062000038919062000ee6565b6040518060400160405280600681526020017f446563656e740000000000000000000000000000000000000000000000000000815250806040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506040518060400160405280600681526020017f446563656e7400000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f44434e540000000000000000000000000000000000000000000000000000000081525081600390816200012291906200119d565b5080600490816200013491906200119d565b5050506200014d6005836200028360201b90919060201c565b61012081815250506200016b6006826200028360201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a08181525050620001aa620002db60201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff168152505050505062000208620001fc6200033860201b60201c565b6200034060201b60201c565b6200021a33836200040660201b60201c565b6301e1338063ffffffff1642620002329190620012b3565b600d60006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506200027b816200034060201b60201c565b505062001834565b6000602083511015620002a957620002a183620004bf60201b60201c565b9050620002d5565b82620002bb836200052c60201b60201c565b6000019081620002cc91906200119d565b5060ff60001b90505b92915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016200031d9594939291906200132b565b60405160208183030381529060405280519060200120905090565b600033905090565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6200041882826200053660201b60201c565b62000428620006a360201b60201c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1662000456620006c760201b60201c565b11156200049a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000491906200140f565b60405180910390fd5b620004b9600b620006d160201b620014471783620006e960201b60201c565b50505050565b600080829050601f815111156200050f57826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401620005069190620014af565b60405180910390fd5b8051816200051d9062001505565b60001c1760001b915050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620005a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200059f90620015c5565b60405180910390fd5b620005bc60008383620009ff60201b60201c565b8060026000828254620005d09190620012b3565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620006839190620015e7565b60405180910390a36200069f6000838362000a0460201b60201c565b5050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff905090565b6000600254905090565b60008183620006e19190620012b3565b905092915050565b6000806000858054905090506000808214620007b95762000714876001840362000a4f60201b60201c565b6040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681525050620007f5565b6040518060400160405280600063ffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152505b905080602001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1693506200082884868860201c565b92506000821180156200085b57506200084662000a6460201b60201c565b65ffffffffffff16816000015163ffffffff16145b15620008de57620008728362000a7c60201b60201c565b62000887886001850362000a4f60201b60201c565b60000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550620009f5565b86604051806040016040528062000912620008fe62000a6460201b60201c565b65ffffffffffff1662000aea60201b60201c565b63ffffffff1681526020016200092e8662000a7c60201b60201c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b5050935093915050565b505050565b62000a1783838362000b4060201b60201c565b62000a4a62000a2c8462000b4560201b60201c565b62000a3d8462000b4560201b60201c565b8362000bae60201b60201c565b505050565b60008260005281602060002001905092915050565b600062000a774362000dd160201b60201c565b905090565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff801682111562000ae2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad9906200167a565b60405180910390fd5b819050919050565b600063ffffffff801682111562000b38576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b2f9062001712565b60405180910390fd5b819050919050565b505050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801562000beb5750600081115b1562000dcc57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000cde5760008062000c85600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002062000e2960201b6200145d1785620006e960201b60201c565b915091508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405162000cd392919062001734565b60405180910390a250505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161462000dcb5760008062000d72600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020620006d160201b620014471785620006e960201b60201c565b915091508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405162000dc092919062001734565b60405180910390a250505b5b505050565b600065ffffffffffff801682111562000e21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000e1890620017d7565b60405180910390fd5b819050919050565b6000818362000e399190620017f9565b905092915050565b600080fd5b6000819050919050565b62000e5b8162000e46565b811462000e6757600080fd5b50565b60008151905062000e7b8162000e50565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000eae8262000e81565b9050919050565b62000ec08162000ea1565b811462000ecc57600080fd5b50565b60008151905062000ee08162000eb5565b92915050565b6000806040838503121562000f005762000eff62000e41565b5b600062000f108582860162000e6a565b925050602062000f238582860162000ecf565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000faf57607f821691505b60208210810362000fc55762000fc462000f67565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200102f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000ff0565b6200103b868362000ff0565b95508019841693508086168417925050509392505050565b6000819050919050565b60006200107e62001078620010728462000e46565b62001053565b62000e46565b9050919050565b6000819050919050565b6200109a836200105d565b620010b2620010a98262001085565b84845462000ffd565b825550505050565b600090565b620010c9620010ba565b620010d68184846200108f565b505050565b5b81811015620010fe57620010f2600082620010bf565b600181019050620010dc565b5050565b601f8211156200114d57620011178162000fcb565b620011228462000fe0565b8101602085101562001132578190505b6200114a620011418562000fe0565b830182620010db565b50505b505050565b600082821c905092915050565b6000620011726000198460080262001152565b1980831691505092915050565b60006200118d83836200115f565b9150826002028217905092915050565b620011a88262000f2d565b67ffffffffffffffff811115620011c457620011c362000f38565b5b620011d0825462000f96565b620011dd82828562001102565b600060209050601f83116001811462001215576000841562001200578287015190505b6200120c85826200117f565b8655506200127c565b601f198416620012258662000fcb565b60005b828110156200124f5784890151825560018201915060208501945060208101905062001228565b868310156200126f57848901516200126b601f8916826200115f565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620012c08262000e46565b9150620012cd8362000e46565b9250828201905080821115620012e857620012e762001284565b5b92915050565b6000819050919050565b6200130381620012ee565b82525050565b620013148162000e46565b82525050565b620013258162000ea1565b82525050565b600060a082019050620013426000830188620012f8565b620013516020830187620012f8565b620013606040830186620012f8565b6200136f606083018562001309565b6200137e60808301846200131a565b9695505050505050565b600082825260208201905092915050565b7f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60008201527f766572666c6f77696e6720766f74657300000000000000000000000000000000602082015250565b6000620013f760308362001388565b9150620014048262001399565b604082019050919050565b600060208201905081810360008301526200142a81620013e8565b9050919050565b60005b838110156200145157808201518184015260208101905062001434565b60008484015250505050565b6000601f19601f8301169050919050565b60006200147b8262000f2d565b62001487818562001388565b93506200149981856020860162001431565b620014a4816200145d565b840191505092915050565b60006020820190508181036000830152620014cb81846200146e565b905092915050565b600081519050919050565b6000819050602082019050919050565b6000620014fc8251620012ee565b80915050919050565b60006200151282620014d3565b826200151e84620014de565b90506200152b81620014ee565b925060208210156200156e57620015697fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080262000ff0565b831692505b5050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000620015ad601f8362001388565b9150620015ba8262001575565b602082019050919050565b60006020820190508181036000830152620015e0816200159e565b9050919050565b6000602082019050620015fe600083018462001309565b92915050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203260008201527f3234206269747300000000000000000000000000000000000000000000000000602082015250565b60006200166260278362001388565b91506200166f8262001604565b604082019050919050565b60006020820190508181036000830152620016958162001653565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203360008201527f3220626974730000000000000000000000000000000000000000000000000000602082015250565b6000620016fa60268362001388565b915062001707826200169c565b604082019050919050565b600060208201905081810360008301526200172d81620016eb565b9050919050565b60006040820190506200174b600083018562001309565b6200175a602083018462001309565b9392505050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203460008201527f3820626974730000000000000000000000000000000000000000000000000000602082015250565b6000620017bf60268362001388565b9150620017cc8262001761565b604082019050919050565b60006020820190508181036000830152620017f281620017b0565b9050919050565b6000620018068262000e46565b9150620018138362000e46565b92508282039050818111156200182e576200182d62001284565b5b92915050565b60805160a05160c05160e0516101005161012051610140516148036200188f6000396000610c3701526000610c03015260006120cd015260006120ac0152600061194a015260006119a0015260006119c901526148036000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a5780639ab24eb0116100ad578063cf6654431161007c578063cf6654431461060a578063d505accf14610628578063dd62ed3e14610644578063f1127ed814610674578063f2fde38b146106a4576101fb565b80639ab24eb01461055e578063a457c2d71461058e578063a9059cbb146105be578063c3cda520146105ee576101fb565b80638da5cb5b116100e95780638da5cb5b146104d45780638e539e8c146104f257806391ddadf41461052257806395d89b4114610540576101fb565b806370a0823114610446578063715018a6146104765780637ecebe001461048057806384b0196e146104b0576101fb565b80633a46b1a8116101925780634bf5d7e9116101615780634bf5d7e9146103ac578063587cde1e146103ca5780635c19a95c146103fa5780636fcfff4514610416576101fb565b80633a46b1a81461032657806340c10f191461035657806342966c681461037257806349779e9e1461038e576101fb565b806323b872dd116101ce57806323b872dd1461028a578063313ce567146102ba5780633644e515146102d857806339509351146102f6576101fb565b806306fdde0314610200578063095ea7b31461021e57806318160ddd1461024e57806318dc7fc91461026c575b600080fd5b6102086106c0565b6040516102159190613007565b60405180910390f35b610238600480360381019061023391906130c2565b610752565b604051610245919061311d565b60405180910390f35b610256610775565b6040516102639190613147565b60405180910390f35b61027461077f565b6040516102819190613181565b60405180910390f35b6102a4600480360381019061029f919061319c565b610787565b6040516102b1919061311d565b60405180910390f35b6102c26107b6565b6040516102cf919061320b565b60405180910390f35b6102e06107bf565b6040516102ed919061323f565b60405180910390f35b610310600480360381019061030b91906130c2565b6107ce565b60405161031d919061311d565b60405180910390f35b610340600480360381019061033b91906130c2565b610805565b60405161034d9190613147565b60405180910390f35b610370600480360381019061036b91906130c2565b6108a8565b005b61038c6004803603810190610387919061325a565b6109d3565b005b6103966109e0565b6040516103a3919061320b565b60405180910390f35b6103b46109e5565b6040516103c19190613007565b60405180910390f35b6103e460048036038101906103df9190613287565b610a73565b6040516103f191906132c3565b60405180910390f35b610414600480360381019061040f9190613287565b610adc565b005b610430600480360381019061042b9190613287565b610af0565b60405161043d9190613181565b60405180910390f35b610460600480360381019061045b9190613287565b610b44565b60405161046d9190613147565b60405180910390f35b61047e610b8c565b005b61049a60048036038101906104959190613287565b610ba0565b6040516104a79190613147565b60405180910390f35b6104b8610bf0565b6040516104cb97969594939291906133d7565b60405180910390f35b6104dc610cf2565b6040516104e991906132c3565b60405180910390f35b61050c6004803603810190610507919061325a565b610d1c565b6040516105199190613147565b60405180910390f35b61052a610d81565b604051610537919061347c565b60405180910390f35b610548610d91565b6040516105559190613007565b60405180910390f35b61057860048036038101906105739190613287565b610e23565b6040516105859190613147565b60405180910390f35b6105a860048036038101906105a391906130c2565b610f2b565b6040516105b5919061311d565b60405180910390f35b6105d860048036038101906105d391906130c2565b610fa2565b6040516105e5919061311d565b60405180910390f35b610608600480360381019061060391906134ef565b610fc5565b005b6106126110c9565b60405161061f91906135a7565b60405180910390f35b610642600480360381019061063d91906135c2565b6110eb565b005b61065e60048036038101906106599190613664565b61122d565b60405161066b9190613147565b60405180910390f35b61068e600480360381019061068991906136d0565b6112b4565b60405161069b9190613785565b60405180910390f35b6106be60048036038101906106b99190613287565b6113c4565b005b6060600380546106cf906137cf565b80601f01602080910402602001604051908101604052809291908181526020018280546106fb906137cf565b80156107485780601f1061071d57610100808354040283529160200191610748565b820191906000526020600020905b81548152906001019060200180831161072b57829003601f168201915b5050505050905090565b60008061075d611473565b905061076a81858561147b565b600191505092915050565b6000600254905090565b6301e1338081565b600080610792611473565b905061079f858285611644565b6107aa8585856116d0565b60019150509392505050565b60006012905090565b60006107c9611946565b905090565b6000806107d9611473565b90506107fa8185856107eb858961122d565b6107f5919061382f565b61147b565b600191505092915050565b600061080f610d81565b65ffffffffffff168210610858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084f906138af565b60405180910390fd5b6108a0600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020836119fd565b905092915050565b6108b0611b45565b61271060c860ff166108c0610775565b6108ca91906138cf565b6108d49190613940565b81111561090d576040517f8625244200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d60009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16421015610977576040517f8e41d37a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6301e1338063ffffffff164261098d919061382f565b600d60006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506109cf8282611bc3565b5050565b6109dd3382611c50565b50565b60c881565b6060436109f0610d81565b65ffffffffffff1614610a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2f906139bd565b60405180910390fd5b6040518060400160405280601d81526020017f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000815250905090565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610aed610ae7611473565b82611c6e565b50565b6000610b3d600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050611d88565b9050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610b94611b45565b610b9e6000611ddb565b565b6000610be9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611ea1565b9050919050565b600060608060008060006060610c3060057f0000000000000000000000000000000000000000000000000000000000000000611eaf90919063ffffffff16565b610c6460067f0000000000000000000000000000000000000000000000000000000000000000611eaf90919063ffffffff16565b46306000801b600067ffffffffffffffff811115610c8557610c846139dd565b5b604051908082528060200260200182016040528015610cb35781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610d26610d81565b65ffffffffffff168210610d6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d66906138af565b60405180910390fd5b610d7a600b836119fd565b9050919050565b6000610d8c43611f5f565b905090565b606060048054610da0906137cf565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcc906137cf565b8015610e195780601f10610dee57610100808354040283529160200191610e19565b820191906000526020600020905b815481529060010190602001808311610dfc57829003601f168201915b5050505050905090565b600080600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050905060008114610f0257600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001820381548110610ec757610ec6613a0c565b5b9060005260206000200160000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16610f05565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16915050919050565b600080610f36611473565b90506000610f44828661122d565b905083811015610f89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8090613aad565b60405180910390fd5b610f96828686840361147b565b60019250505092915050565b600080610fad611473565b9050610fba8185856116d0565b600191505092915050565b83421115611008576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fff90613b19565b60405180910390fd5b600061106a6110627fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf8989896040516020016110479493929190613b39565b60405160208183030381529060405280519060200120611fb4565b858585611fce565b905061107581611ff9565b86146110b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ad90613bca565b60405180910390fd5b6110c08188611c6e565b50505050505050565b600d60009054906101000a90046fffffffffffffffffffffffffffffffff1681565b8342111561112e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112590613c36565b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861115d8c611ff9565b8960405160200161117396959493929190613c56565b604051602081830303815290604052805190602001209050600061119682611fb4565b905060006111a682878787611fce565b90508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120d90613d03565b60405180910390fd5b6112218a8a8a61147b565b50505050505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6112bc612f39565b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208263ffffffff168154811061131357611312613a0c565b5b906000526020600020016040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681525050905092915050565b6113cc611b45565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361143b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143290613d95565b60405180910390fd5b61144481611ddb565b50565b60008183611455919061382f565b905092915050565b6000818361146b9190613db5565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036114ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e190613e5b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155090613eed565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116379190613147565b60405180910390a3505050565b6000611650848461122d565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146116ca57818110156116bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b390613f59565b60405180910390fd5b6116c9848484840361147b565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361173f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173690613feb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a59061407d565b60405180910390fd5b6117b9838383612057565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561183f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118369061410f565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161192d9190613147565b60405180910390a361194084848461205c565b50505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480156119c257507f000000000000000000000000000000000000000000000000000000000000000046145b156119ef577f000000000000000000000000000000000000000000000000000000000000000090506119fa565b6119f7612087565b90505b90565b600080838054905090506000808290506005831115611a73576000611a218461211d565b84611a2c9190613db5565b905085611a398883612216565b60000160009054906101000a900463ffffffff1663ffffffff161115611a6157809150611a71565b600181611a6e919061382f565b92505b505b5b80821015611ad3576000611a88838361222b565b905085611a958883612216565b60000160009054906101000a900463ffffffff1663ffffffff161115611abd57809150611acd565b600181611aca919061382f565b92505b50611a74565b60008114611b1957611ae88660018303612216565b60000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611b1c565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16935050505092915050565b611b4d611473565b73ffffffffffffffffffffffffffffffffffffffff16611b6b610cf2565b73ffffffffffffffffffffffffffffffffffffffff1614611bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb89061417b565b60405180910390fd5b565b611bcd8282612251565b611bd56123a7565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611bfb610775565b1115611c3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c339061420d565b60405180910390fd5b611c4a600b611447836123cb565b50505050565b611c5a82826126a6565b611c68600b61145d836123cb565b50505050565b6000611c7983610a73565b90506000611c8684610b44565b905082600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4611d82828483612873565b50505050565b600063ffffffff8016821115611dd3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dca9061429f565b60405180910390fd5b819050919050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b606060ff60001b8314611ecc57611ec583612a6c565b9050611f59565b818054611ed8906137cf565b80601f0160208091040260200160405190810160405280929190818152602001828054611f04906137cf565b8015611f515780601f10611f2657610100808354040283529160200191611f51565b820191906000526020600020905b815481529060010190602001808311611f3457829003601f168201915b505050505090505b92915050565b600065ffffffffffff8016821115611fac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa390614331565b60405180910390fd5b819050919050565b6000611fc7611fc1611946565b83612ae0565b9050919050565b6000806000611fdf87878787612b21565b91509150611fec81612c03565b8192505050949350505050565b600080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061204681611ea1565b915061205181612d69565b50919050565b505050565b612067838383612d7f565b61208261207384610a73565b61207c84610a73565b83612873565b505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004630604051602001612102959493929190614351565b60405160208183030381529060405280519060200120905090565b600080820361212f5760009050612211565b6000600161213c84612d84565b901c6001901b9050600181848161215657612155613911565b5b048201901c9050600181848161216f5761216e613911565b5b048201901c9050600181848161218857612187613911565b5b048201901c905060018184816121a1576121a0613911565b5b048201901c905060018184816121ba576121b9613911565b5b048201901c905060018184816121d3576121d2613911565b5b048201901c905060018184816121ec576121eb613911565b5b048201901c905061220d8182858161220757612206613911565b5b04612e65565b9150505b919050565b60008260005281602060002001905092915050565b6000600282841861223c9190613940565b828416612249919061382f565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036122c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b7906143f0565b60405180910390fd5b6122cc60008383612057565b80600260008282546122de919061382f565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161238f9190613147565b60405180910390a36123a36000838361205c565b5050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff905090565b6000806000858054905090506000808214612491576123ed8760018403612216565b6040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250506124cd565b6040518060400160405280600063ffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152505b905080602001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16935061250284868863ffffffff16565b925060008211801561252c5750612517610d81565b65ffffffffffff16816000015163ffffffff16145b1561259d5761253a83612e7e565b6125478860018503612216565b60000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555061269c565b8660405180604001604052806125c16125b4610d81565b65ffffffffffff16611d88565b63ffffffff1681526020016125d586612e7e565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b5050935093915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270c90614482565b60405180910390fd5b61272182600083612057565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156127a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279e90614514565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161285a9190613147565b60405180910390a361286e8360008461205c565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156128af5750600081115b15612a6757600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461298d57600080612936600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061145d856123cb565b915091508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612982929190614534565b60405180910390a250505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612a6657600080612a0f600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611447856123cb565b915091508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612a5b929190614534565b60405180910390a250505b5b505050565b60606000612a7983612ee9565b90506000602067ffffffffffffffff811115612a9857612a976139dd565b5b6040519080825280601f01601f191660200182016040528015612aca5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612b5c576000600391509150612bfa565b600060018787878760405160008152602001604052604051612b81949392919061455d565b6020604051602081039080840390855afa158015612ba3573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612bf157600060019250925050612bfa565b80600092509250505b94509492505050565b60006004811115612c1757612c166145a2565b5b816004811115612c2a57612c296145a2565b5b0315612d665760016004811115612c4457612c436145a2565b5b816004811115612c5757612c566145a2565b5b03612c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8e9061461d565b60405180910390fd5b60026004811115612cab57612caa6145a2565b5b816004811115612cbe57612cbd6145a2565b5b03612cfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cf590614689565b60405180910390fd5b60036004811115612d1257612d116145a2565b5b816004811115612d2557612d246145a2565b5b03612d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5c9061471b565b60405180910390fd5b5b50565b6001816000016000828254019250508190555050565b505050565b600080600090506000608084901c1115612da657608083901c92506080810190505b6000604084901c1115612dc157604083901c92506040810190505b6000602084901c1115612ddc57602083901c92506020810190505b6000601084901c1115612df757601083901c92506010810190505b6000600884901c1115612e1257600883901c92506008810190505b6000600484901c1115612e2d57600483901c92506004810190505b6000600284901c1115612e4857600283901c92506002810190505b6000600184901c1115612e5c576001810190505b80915050919050565b6000818310612e745781612e76565b825b905092915050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8016821115612ee1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ed8906147ad565b60405180910390fd5b819050919050565b60008060ff8360001c169050601f811115612f30576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b6040518060400160405280600063ffffffff16815260200160007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681525090565b600081519050919050565b600082825260208201905092915050565b60005b83811015612fb1578082015181840152602081019050612f96565b60008484015250505050565b6000601f19601f8301169050919050565b6000612fd982612f77565b612fe38185612f82565b9350612ff3818560208601612f93565b612ffc81612fbd565b840191505092915050565b600060208201905081810360008301526130218184612fce565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006130598261302e565b9050919050565b6130698161304e565b811461307457600080fd5b50565b60008135905061308681613060565b92915050565b6000819050919050565b61309f8161308c565b81146130aa57600080fd5b50565b6000813590506130bc81613096565b92915050565b600080604083850312156130d9576130d8613029565b5b60006130e785828601613077565b92505060206130f8858286016130ad565b9150509250929050565b60008115159050919050565b61311781613102565b82525050565b6000602082019050613132600083018461310e565b92915050565b6131418161308c565b82525050565b600060208201905061315c6000830184613138565b92915050565b600063ffffffff82169050919050565b61317b81613162565b82525050565b60006020820190506131966000830184613172565b92915050565b6000806000606084860312156131b5576131b4613029565b5b60006131c386828701613077565b93505060206131d486828701613077565b92505060406131e5868287016130ad565b9150509250925092565b600060ff82169050919050565b613205816131ef565b82525050565b600060208201905061322060008301846131fc565b92915050565b6000819050919050565b61323981613226565b82525050565b60006020820190506132546000830184613230565b92915050565b6000602082840312156132705761326f613029565b5b600061327e848285016130ad565b91505092915050565b60006020828403121561329d5761329c613029565b5b60006132ab84828501613077565b91505092915050565b6132bd8161304e565b82525050565b60006020820190506132d860008301846132b4565b92915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b613313816132de565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61334e8161308c565b82525050565b60006133608383613345565b60208301905092915050565b6000602082019050919050565b600061338482613319565b61338e8185613324565b935061339983613335565b8060005b838110156133ca5781516133b18882613354565b97506133bc8361336c565b92505060018101905061339d565b5085935050505092915050565b600060e0820190506133ec600083018a61330a565b81810360208301526133fe8189612fce565b905081810360408301526134128188612fce565b90506134216060830187613138565b61342e60808301866132b4565b61343b60a0830185613230565b81810360c083015261344d8184613379565b905098975050505050505050565b600065ffffffffffff82169050919050565b6134768161345b565b82525050565b6000602082019050613491600083018461346d565b92915050565b6134a0816131ef565b81146134ab57600080fd5b50565b6000813590506134bd81613497565b92915050565b6134cc81613226565b81146134d757600080fd5b50565b6000813590506134e9816134c3565b92915050565b60008060008060008060c0878903121561350c5761350b613029565b5b600061351a89828a01613077565b965050602061352b89828a016130ad565b955050604061353c89828a016130ad565b945050606061354d89828a016134ae565b935050608061355e89828a016134da565b92505060a061356f89828a016134da565b9150509295509295509295565b60006fffffffffffffffffffffffffffffffff82169050919050565b6135a18161357c565b82525050565b60006020820190506135bc6000830184613598565b92915050565b600080600080600080600060e0888a0312156135e1576135e0613029565b5b60006135ef8a828b01613077565b97505060206136008a828b01613077565b96505060406136118a828b016130ad565b95505060606136228a828b016130ad565b94505060806136338a828b016134ae565b93505060a06136448a828b016134da565b92505060c06136558a828b016134da565b91505092959891949750929550565b6000806040838503121561367b5761367a613029565b5b600061368985828601613077565b925050602061369a85828601613077565b9150509250929050565b6136ad81613162565b81146136b857600080fd5b50565b6000813590506136ca816136a4565b92915050565b600080604083850312156136e7576136e6613029565b5b60006136f585828601613077565b9250506020613706858286016136bb565b9150509250929050565b61371981613162565b82525050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b6137508161371f565b82525050565b60408201600082015161376c6000850182613710565b50602082015161377f6020850182613747565b50505050565b600060408201905061379a6000830184613756565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806137e757607f821691505b6020821081036137fa576137f96137a0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061383a8261308c565b91506138458361308c565b925082820190508082111561385d5761385c613800565b5b92915050565b7f4552433230566f7465733a20667574757265206c6f6f6b757000000000000000600082015250565b6000613899601983612f82565b91506138a482613863565b602082019050919050565b600060208201905081810360008301526138c88161388c565b9050919050565b60006138da8261308c565b91506138e58361308c565b92508282026138f38161308c565b9150828204841483151761390a57613909613800565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061394b8261308c565b91506139568361308c565b92508261396657613965613911565b5b828204905092915050565b7f4552433230566f7465733a2062726f6b656e20636c6f636b206d6f6465000000600082015250565b60006139a7601d83612f82565b91506139b282613971565b602082019050919050565b600060208201905081810360008301526139d68161399a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613a97602583612f82565b9150613aa282613a3b565b604082019050919050565b60006020820190508181036000830152613ac681613a8a565b9050919050565b7f4552433230566f7465733a207369676e61747572652065787069726564000000600082015250565b6000613b03601d83612f82565b9150613b0e82613acd565b602082019050919050565b60006020820190508181036000830152613b3281613af6565b9050919050565b6000608082019050613b4e6000830187613230565b613b5b60208301866132b4565b613b686040830185613138565b613b756060830184613138565b95945050505050565b7f4552433230566f7465733a20696e76616c6964206e6f6e636500000000000000600082015250565b6000613bb4601983612f82565b9150613bbf82613b7e565b602082019050919050565b60006020820190508181036000830152613be381613ba7565b9050919050565b7f45524332305065726d69743a206578706972656420646561646c696e65000000600082015250565b6000613c20601d83612f82565b9150613c2b82613bea565b602082019050919050565b60006020820190508181036000830152613c4f81613c13565b9050919050565b600060c082019050613c6b6000830189613230565b613c7860208301886132b4565b613c8560408301876132b4565b613c926060830186613138565b613c9f6080830185613138565b613cac60a0830184613138565b979650505050505050565b7f45524332305065726d69743a20696e76616c6964207369676e61747572650000600082015250565b6000613ced601e83612f82565b9150613cf882613cb7565b602082019050919050565b60006020820190508181036000830152613d1c81613ce0565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613d7f602683612f82565b9150613d8a82613d23565b604082019050919050565b60006020820190508181036000830152613dae81613d72565b9050919050565b6000613dc08261308c565b9150613dcb8361308c565b9250828203905081811115613de357613de2613800565b5b92915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613e45602483612f82565b9150613e5082613de9565b604082019050919050565b60006020820190508181036000830152613e7481613e38565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613ed7602283612f82565b9150613ee282613e7b565b604082019050919050565b60006020820190508181036000830152613f0681613eca565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000613f43601d83612f82565b9150613f4e82613f0d565b602082019050919050565b60006020820190508181036000830152613f7281613f36565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613fd5602583612f82565b9150613fe082613f79565b604082019050919050565b6000602082019050818103600083015261400481613fc8565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000614067602383612f82565b91506140728261400b565b604082019050919050565b600060208201905081810360008301526140968161405a565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006140f9602683612f82565b91506141048261409d565b604082019050919050565b60006020820190508181036000830152614128816140ec565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614165602083612f82565b91506141708261412f565b602082019050919050565b6000602082019050818103600083015261419481614158565b9050919050565b7f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60008201527f766572666c6f77696e6720766f74657300000000000000000000000000000000602082015250565b60006141f7603083612f82565b91506142028261419b565b604082019050919050565b60006020820190508181036000830152614226816141ea565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203360008201527f3220626974730000000000000000000000000000000000000000000000000000602082015250565b6000614289602683612f82565b91506142948261422d565b604082019050919050565b600060208201905081810360008301526142b88161427c565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203460008201527f3820626974730000000000000000000000000000000000000000000000000000602082015250565b600061431b602683612f82565b9150614326826142bf565b604082019050919050565b6000602082019050818103600083015261434a8161430e565b9050919050565b600060a0820190506143666000830188613230565b6143736020830187613230565b6143806040830186613230565b61438d6060830185613138565b61439a60808301846132b4565b9695505050505050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b60006143da601f83612f82565b91506143e5826143a4565b602082019050919050565b60006020820190508181036000830152614409816143cd565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061446c602183612f82565b915061447782614410565b604082019050919050565b6000602082019050818103600083015261449b8161445f565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006144fe602283612f82565b9150614509826144a2565b604082019050919050565b6000602082019050818103600083015261452d816144f1565b9050919050565b60006040820190506145496000830185613138565b6145566020830184613138565b9392505050565b60006080820190506145726000830187613230565b61457f60208301866131fc565b61458c6040830185613230565b6145996060830184613230565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614607601883612f82565b9150614612826145d1565b602082019050919050565b60006020820190508181036000830152614636816145fa565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000614673601f83612f82565b915061467e8261463d565b602082019050919050565b600060208201905081810360008301526146a281614666565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614705602283612f82565b9150614710826146a9565b604082019050919050565b60006020820190508181036000830152614734816146f8565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203260008201527f3234206269747300000000000000000000000000000000000000000000000000602082015250565b6000614797602783612f82565b91506147a28261473b565b604082019050919050565b600060208201905081810360008301526147c68161478a565b905091905056fea2646970667358221220c9b6258e45e7ffa55e65aa2cd7c847b2fec0be5af25509588fbf98ac49a1fcdf64736f6c63430008130033"; - -export class DCNTToken__factory extends ContractFactory { - constructor( - ...args: [signer: Signer] | ConstructorParameters - ) { - if (args.length === 1) { - super(_abi, _bytecode, args[0]); - } else { - super(...args); - } - } - - deploy( - _supply: BigNumberish, - _owner: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(_supply, _owner, overrides || {}) as Promise; - } - getDeployTransaction( - _supply: BigNumberish, - _owner: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(_supply, _owner, overrides || {}); - } - attach(address: string): DCNTToken { - return super.attach(address) as DCNTToken; - } - connect(signer: Signer): DCNTToken__factory { - return super.connect(signer) as DCNTToken__factory; - } - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): DCNTTokenInterface { - return new utils.Interface(_abi) as DCNTTokenInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): DCNTToken { - return new Contract(address, _abi, signerOrProvider) as DCNTToken; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/EIP712__factory.ts b/src/assets/typechain-types/dcnt/factories/EIP712__factory.ts deleted file mode 100644 index 6a722c88cc..0000000000 --- a/src/assets/typechain-types/dcnt/factories/EIP712__factory.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { EIP712, EIP712Interface } from "../EIP712"; - -const _abi = [ - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class EIP712__factory { - static readonly abi = _abi; - static createInterface(): EIP712Interface { - return new utils.Interface(_abi) as EIP712Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): EIP712 { - return new Contract(address, _abi, signerOrProvider) as EIP712; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/ERC20Permit__factory.ts b/src/assets/typechain-types/dcnt/factories/ERC20Permit__factory.ts deleted file mode 100644 index a6e5343b69..0000000000 --- a/src/assets/typechain-types/dcnt/factories/ERC20Permit__factory.ts +++ /dev/null @@ -1,433 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { ERC20Permit, ERC20PermitInterface } from "../ERC20Permit"; - -const _abi = [ - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ERC20Permit__factory { - static readonly abi = _abi; - static createInterface(): ERC20PermitInterface { - return new utils.Interface(_abi) as ERC20PermitInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ERC20Permit { - return new Contract(address, _abi, signerOrProvider) as ERC20Permit; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/ERC20VotesLockable__factory.ts b/src/assets/typechain-types/dcnt/factories/ERC20VotesLockable__factory.ts deleted file mode 100644 index 3f4c900a9a..0000000000 --- a/src/assets/typechain-types/dcnt/factories/ERC20VotesLockable__factory.ts +++ /dev/null @@ -1,782 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - ERC20VotesLockable, - ERC20VotesLockableInterface, -} from "../ERC20VotesLockable"; - -const _abi = [ - { - inputs: [], - name: "AlreadyInitialized", - type: "error", - }, - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint32", - name: "pos", - type: "uint32", - }, - ], - name: "checkpoints", - outputs: [ - { - components: [ - { - internalType: "uint32", - name: "fromBlock", - type: "uint32", - }, - { - internalType: "uint224", - name: "votes", - type: "uint224", - }, - ], - internalType: "struct ERC20Votes.Checkpoint", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "lock", - outputs: [ - { - internalType: "contract ILockRelease", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "numCheckpoints", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_lockAddress", - type: "address", - }, - ], - name: "setUpLockedVotingPower", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ERC20VotesLockable__factory { - static readonly abi = _abi; - static createInterface(): ERC20VotesLockableInterface { - return new utils.Interface(_abi) as ERC20VotesLockableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ERC20VotesLockable { - return new Contract(address, _abi, signerOrProvider) as ERC20VotesLockable; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/ERC20Votes__factory.ts b/src/assets/typechain-types/dcnt/factories/ERC20Votes__factory.ts deleted file mode 100644 index f919c9ef42..0000000000 --- a/src/assets/typechain-types/dcnt/factories/ERC20Votes__factory.ts +++ /dev/null @@ -1,696 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { ERC20Votes, ERC20VotesInterface } from "../ERC20Votes"; - -const _abi = [ - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint32", - name: "pos", - type: "uint32", - }, - ], - name: "checkpoints", - outputs: [ - { - components: [ - { - internalType: "uint32", - name: "fromBlock", - type: "uint32", - }, - { - internalType: "uint224", - name: "votes", - type: "uint224", - }, - ], - internalType: "struct ERC20Votes.Checkpoint", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "numCheckpoints", - outputs: [ - { - internalType: "uint32", - name: "", - type: "uint32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class ERC20Votes__factory { - static readonly abi = _abi; - static createInterface(): ERC20VotesInterface { - return new utils.Interface(_abi) as ERC20VotesInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ERC20Votes { - return new Contract(address, _abi, signerOrProvider) as ERC20Votes; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/ERC20__factory.ts b/src/assets/typechain-types/dcnt/factories/ERC20__factory.ts deleted file mode 100644 index ef405027aa..0000000000 --- a/src/assets/typechain-types/dcnt/factories/ERC20__factory.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { ERC20, ERC20Interface } from "../ERC20"; - -const _abi = [ - { - inputs: [ - { - internalType: "string", - name: "name_", - type: "string", - }, - { - internalType: "string", - name: "symbol_", - type: "string", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "subtractedValue", - type: "uint256", - }, - ], - name: "decreaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "addedValue", - type: "uint256", - }, - ], - name: "increaseAllowance", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339818101604052810190620000379190620001f6565b8160039081620000489190620004c6565b5080600490816200005a9190620004c6565b505050620005ad565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cc8262000081565b810181811067ffffffffffffffff82111715620000ee57620000ed62000092565b5b80604052505050565b60006200010362000063565b9050620001118282620000c1565b919050565b600067ffffffffffffffff82111562000134576200013362000092565b5b6200013f8262000081565b9050602081019050919050565b60005b838110156200016c5780820151818401526020810190506200014f565b60008484015250505050565b60006200018f620001898462000116565b620000f7565b905082815260208101848484011115620001ae57620001ad6200007c565b5b620001bb8482856200014c565b509392505050565b600082601f830112620001db57620001da62000077565b5b8151620001ed84826020860162000178565b91505092915050565b6000806040838503121562000210576200020f6200006d565b5b600083015167ffffffffffffffff81111562000231576200023062000072565b5b6200023f85828601620001c3565b925050602083015167ffffffffffffffff81111562000263576200026262000072565b5b6200027185828601620001c3565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ce57607f821691505b602082108103620002e457620002e362000286565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200034e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200030f565b6200035a86836200030f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003a7620003a16200039b8462000372565b6200037c565b62000372565b9050919050565b6000819050919050565b620003c38362000386565b620003db620003d282620003ae565b8484546200031c565b825550505050565b600090565b620003f2620003e3565b620003ff818484620003b8565b505050565b5b8181101562000427576200041b600082620003e8565b60018101905062000405565b5050565b601f82111562000476576200044081620002ea565b6200044b84620002ff565b810160208510156200045b578190505b620004736200046a85620002ff565b83018262000404565b50505b505050565b600082821c905092915050565b60006200049b600019846008026200047b565b1980831691505092915050565b6000620004b6838362000488565b9150826002028217905092915050565b620004d1826200027b565b67ffffffffffffffff811115620004ed57620004ec62000092565b5b620004f98254620002b5565b620005068282856200042b565b600060209050601f8311600181146200053e576000841562000529578287015190505b620005358582620004a8565b865550620005a5565b601f1984166200054e86620002ea565b60005b82811015620005785784890151825560018201915060208501945060208101905062000551565b8683101562000598578489015162000594601f89168262000488565b8355505b6001600288020188555050505b505050505050565b61122f80620005bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea2646970667358221220fdf476e2583d8caf4cdece2e219de3186064b0f77078f3e2440d96f5aa09c17664736f6c63430008130033"; - -export class ERC20__factory extends ContractFactory { - constructor( - ...args: [signer: Signer] | ConstructorParameters - ) { - if (args.length === 1) { - super(_abi, _bytecode, args[0]); - } else { - super(...args); - } - } - - deploy( - name_: string, - symbol_: string, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(name_, symbol_, overrides || {}) as Promise; - } - getDeployTransaction( - name_: string, - symbol_: string, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(name_, symbol_, overrides || {}); - } - attach(address: string): ERC20 { - return super.attach(address) as ERC20; - } - connect(signer: Signer): ERC20__factory { - return super.connect(signer) as ERC20__factory; - } - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ERC20Interface { - return new utils.Interface(_abi) as ERC20Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { - return new Contract(address, _abi, signerOrProvider) as ERC20; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IERC20Metadata__factory.ts b/src/assets/typechain-types/dcnt/factories/IERC20Metadata__factory.ts deleted file mode 100644 index f955c5c346..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IERC20Metadata__factory.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { - IERC20Metadata, - IERC20MetadataInterface, -} from "../IERC20Metadata"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [ - { - internalType: "uint8", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20Metadata__factory { - static readonly abi = _abi; - static createInterface(): IERC20MetadataInterface { - return new utils.Interface(_abi) as IERC20MetadataInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC20Metadata { - return new Contract(address, _abi, signerOrProvider) as IERC20Metadata; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IERC20Permit__factory.ts b/src/assets/typechain-types/dcnt/factories/IERC20Permit__factory.ts deleted file mode 100644 index ac8c447c41..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IERC20Permit__factory.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IERC20Permit, IERC20PermitInterface } from "../IERC20Permit"; - -const _abi = [ - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "permit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20Permit__factory { - static readonly abi = _abi; - static createInterface(): IERC20PermitInterface { - return new utils.Interface(_abi) as IERC20PermitInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC20Permit { - return new Contract(address, _abi, signerOrProvider) as IERC20Permit; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IERC20__factory.ts b/src/assets/typechain-types/dcnt/factories/IERC20__factory.ts deleted file mode 100644 index e660df20d8..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IERC20__factory.ts +++ /dev/null @@ -1,203 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IERC20, IERC20Interface } from "../IERC20"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "spender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Approval", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "spender", - type: "address", - }, - ], - name: "allowance", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "spender", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "approve", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transfer", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IERC20__factory { - static readonly abi = _abi; - static createInterface(): IERC20Interface { - return new utils.Interface(_abi) as IERC20Interface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { - return new Contract(address, _abi, signerOrProvider) as IERC20; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IERC5267__factory.ts b/src/assets/typechain-types/dcnt/factories/IERC5267__factory.ts deleted file mode 100644 index 2c73c5a37d..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IERC5267__factory.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IERC5267, IERC5267Interface } from "../IERC5267"; - -const _abi = [ - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IERC5267__factory { - static readonly abi = _abi; - static createInterface(): IERC5267Interface { - return new utils.Interface(_abi) as IERC5267Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC5267 { - return new Contract(address, _abi, signerOrProvider) as IERC5267; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IERC5805__factory.ts b/src/assets/typechain-types/dcnt/factories/IERC5805__factory.ts deleted file mode 100644 index 4742f1e2c2..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IERC5805__factory.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IERC5805, IERC5805Interface } from "../IERC5805"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IERC5805__factory { - static readonly abi = _abi; - static createInterface(): IERC5805Interface { - return new utils.Interface(_abi) as IERC5805Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC5805 { - return new Contract(address, _abi, signerOrProvider) as IERC5805; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IERC6372__factory.ts b/src/assets/typechain-types/dcnt/factories/IERC6372__factory.ts deleted file mode 100644 index 7606f26dc5..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IERC6372__factory.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IERC6372, IERC6372Interface } from "../IERC6372"; - -const _abi = [ - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IERC6372__factory { - static readonly abi = _abi; - static createInterface(): IERC6372Interface { - return new utils.Interface(_abi) as IERC6372Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC6372 { - return new Contract(address, _abi, signerOrProvider) as IERC6372; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/ILockRelease__factory.ts b/src/assets/typechain-types/dcnt/factories/ILockRelease__factory.ts deleted file mode 100644 index a39c76c749..0000000000 --- a/src/assets/typechain-types/dcnt/factories/ILockRelease__factory.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { ILockRelease, ILockReleaseInterface } from "../ILockRelease"; - -const _abi = [ - { - inputs: [], - name: "getBeneficiaries", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "getPending", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class ILockRelease__factory { - static readonly abi = _abi; - static createInterface(): ILockReleaseInterface { - return new utils.Interface(_abi) as ILockReleaseInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ILockRelease { - return new Contract(address, _abi, signerOrProvider) as ILockRelease; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/IVotes__factory.ts b/src/assets/typechain-types/dcnt/factories/IVotes__factory.ts deleted file mode 100644 index 8a715e4256..0000000000 --- a/src/assets/typechain-types/dcnt/factories/IVotes__factory.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { IVotes, IVotesInterface } from "../IVotes"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IVotes__factory { - static readonly abi = _abi; - static createInterface(): IVotesInterface { - return new utils.Interface(_abi) as IVotesInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IVotes { - return new Contract(address, _abi, signerOrProvider) as IVotes; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/LockRelease__factory.ts b/src/assets/typechain-types/dcnt/factories/LockRelease__factory.ts deleted file mode 100644 index f29b603535..0000000000 --- a/src/assets/typechain-types/dcnt/factories/LockRelease__factory.ts +++ /dev/null @@ -1,665 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - Signer, - utils, - BigNumberish, - Contract, - ContractFactory, - Overrides, -} from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { LockRelease, LockReleaseInterface } from "../LockRelease"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_token", - type: "address", - }, - { - internalType: "address[]", - name: "_beneficiaries", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_amounts", - type: "uint256[]", - }, - { - internalType: "uint128", - name: "_start", - type: "uint128", - }, - { - internalType: "uint128", - name: "_duration", - type: "uint128", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "DuplicateBeneficiary", - type: "error", - }, - { - inputs: [], - name: "InvalidAmount", - type: "error", - }, - { - inputs: [], - name: "InvalidArrayLengths", - type: "error", - }, - { - inputs: [], - name: "InvalidBeneficiary", - type: "error", - }, - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [], - name: "InvalidToken", - type: "error", - }, - { - inputs: [], - name: "NothingToRelease", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - inputs: [], - name: "ZeroDuration", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "token", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "beneficiaries", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256[]", - name: "amounts", - type: "uint256[]", - }, - { - indexed: false, - internalType: "uint128", - name: "start", - type: "uint128", - }, - { - indexed: false, - internalType: "uint128", - name: "duration", - type: "uint128", - }, - ], - name: "ScheduleStarted", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "beneficiary", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "TokensReleased", - type: "event", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "duration", - outputs: [ - { - internalType: "uint128", - name: "", - type: "uint128", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getBeneficiaries", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - { - internalType: "uint256", - name: "_blockNumber", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "getPending", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "getReleasable", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "getReleased", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "getTotal", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "getTotalMatured", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "release", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "start", - outputs: [ - { - internalType: "uint128", - name: "", - type: "uint128", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "token", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x6101606040523480156200001257600080fd5b5060405162005d2d38038062005d2d8339818101604052810190620000389190620016ad565b6040518060400160405280601181526020017f446563656e744c6f636b52656c656173650000000000000000000000000000008152506040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250620000ba6000836200057960201b90919060201c565b6101208181525050620000d86001826200057960201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a0818152505062000117620005d160201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603620001bb576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816fffffffffffffffffffffffffffffffff160362000208576040517f68d5686e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825184511462000244576040517fa9854bc900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84518161ffff16101562000460576000848261ffff168151811062000271576200027062001773565b5b6020026020010151905060008103620002b6576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000868361ffff1681518110620002d257620002d162001773565b5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160362000343576040517f5566df5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015414620003c0576040517f6af53bdc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052808381526020016000815250600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015590505062000440600082846200062e60201b60201c565b6200045281826200073460201b60201c565b826001019250505062000247565b5084600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600760006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555080600760106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555083600890805190602001906200052c929190620012b3565b507fd6697d621f0e47a60093036416dfef1069edf9cd30d274fd16510f95b9b503bb85858585856040516200056695949392919062001960565b60405180910390a1505050505062002267565b60006020835110156200059f5762000597836200086060201b60201c565b9050620005cb565b82620005b183620008cd60201b60201c565b6000019081620005c2919062001c0c565b5060ff60001b90505b92915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016200061395949392919062001d1f565b60405160208183030381529060405280519060200120905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036200069557620006926004620008d760201b62000f56176200068684620008ef60201b60201c565b6200095d60201b60201c565b50505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620006fc57620006f96004620009c560201b62000f6c17620006ed84620008ef60201b60201c565b6200095d60201b60201c565b50505b6200072f6200071184620009dd60201b60201c565b6200072284620009dd60201b60201c565b8362000a4660201b60201c565b505050565b60006200074783620009dd60201b60201c565b905081600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46200085b81836200084f8662000d0160201b60201c565b62000a4660201b60201c565b505050565b600080829050601f81511115620008b057826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401620008a7919062001dfa565b60405180910390fd5b805181620008be9062001e50565b60001c1760001b915050919050565b6000819050919050565b60008183620008e7919062001f17565b905092915050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff801682111562000955576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200094c9062001fe4565b60405180910390fd5b819050919050565b600080620009b96200098c6200097862000d9c60201b60201c565b65ffffffffffff1662000db460201b60201c565b620009a8620009a18862000e0a60201b60201c565b868860201c565b8762000e8060201b9092919060201c565b91509150935093915050565b60008183620009d5919062002006565b905092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801562000a835750600081115b1562000cfc57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000bc25760008062000b2d600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020620009c560201b62000f6c1762000b2186620008ef60201b60201c565b6200095d60201b60201c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405162000bb79291906200205d565b60405180910390a250505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161462000cfb5760008062000c66600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020620008d760201b62000f561762000c5a86620008ef60201b60201c565b6200095d60201b60201c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405162000cf09291906200205d565b60405180910390a250505b5b505050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015462000d9591906200208a565b9050919050565b600062000daf4362000ea560201b60201c565b905090565b600063ffffffff801682111562000e02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000df9906200213b565b60405180910390fd5b819050919050565b600080826000018054905090506000811462000e755762000e438360000160018362000e3791906200208a565b62000efd60201b60201c565b60000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1662000e78565b60005b915050919050565b60008062000e9985600001858562000f1260201b60201c565b91509150935093915050565b600065ffffffffffff801682111562000ef5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000eec90620021d3565b60405180910390fd5b819050919050565b60008260005281602060002001905092915050565b6000806000858054905090506000811115620011c357600062000f4a8760018462000f3e91906200208a565b62000efd60201b60201c565b6040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152505090508563ffffffff16816000015163ffffffff16111562001041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010389062002245565b60405180910390fd5b8563ffffffff16816000015163ffffffff1603620010d157846200107a886001856200106e91906200208a565b62000efd60201b60201c565b60000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550620011b1565b8660405180604001604052808863ffffffff168152602001877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b806020015185935093505050620012ab565b8560405180604001604052808763ffffffff168152602001867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550505060008492509250505b935093915050565b8280548282559060005260206000209081019282156200132f579160200282015b828111156200132e5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190620012d4565b5b5090506200133e919062001342565b5090565b5b808211156200135d57600081600090555060010162001343565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620013a28262001375565b9050919050565b620013b48162001395565b8114620013c057600080fd5b50565b600081519050620013d481620013a9565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200142a82620013df565b810181811067ffffffffffffffff821117156200144c576200144b620013f0565b5b80604052505050565b60006200146162001361565b90506200146f82826200141f565b919050565b600067ffffffffffffffff821115620014925762001491620013f0565b5b602082029050602081019050919050565b600080fd5b6000620014bf620014b98462001474565b62001455565b90508083825260208201905060208402830185811115620014e557620014e4620014a3565b5b835b81811015620015125780620014fd8882620013c3565b845260208401935050602081019050620014e7565b5050509392505050565b600082601f830112620015345762001533620013da565b5b815162001546848260208601620014a8565b91505092915050565b600067ffffffffffffffff8211156200156d576200156c620013f0565b5b602082029050602081019050919050565b6000819050919050565b62001593816200157e565b81146200159f57600080fd5b50565b600081519050620015b38162001588565b92915050565b6000620015d0620015ca846200154f565b62001455565b90508083825260208201905060208402830185811115620015f657620015f5620014a3565b5b835b818110156200162357806200160e8882620015a2565b845260208401935050602081019050620015f8565b5050509392505050565b600082601f830112620016455762001644620013da565b5b815162001657848260208601620015b9565b91505092915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b620016878162001660565b81146200169357600080fd5b50565b600081519050620016a7816200167c565b92915050565b600080600080600060a08688031215620016cc57620016cb6200136b565b5b6000620016dc88828901620013c3565b955050602086015167ffffffffffffffff8111156200170057620016ff62001370565b5b6200170e888289016200151c565b945050604086015167ffffffffffffffff81111562001732576200173162001370565b5b62001740888289016200162d565b9350506060620017538882890162001696565b9250506080620017668882890162001696565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b620017ad8162001395565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b620017ea8162001395565b82525050565b6000620017fe8383620017df565b60208301905092915050565b6000602082019050919050565b60006200182482620017b3565b620018308185620017be565b93506200183d83620017cf565b8060005b8381101562001874578151620018588882620017f0565b975062001865836200180a565b92505060018101905062001841565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b620018b8816200157e565b82525050565b6000620018cc8383620018ad565b60208301905092915050565b6000602082019050919050565b6000620018f28262001881565b620018fe81856200188c565b93506200190b836200189d565b8060005b8381101562001942578151620019268882620018be565b97506200193383620018d8565b9250506001810190506200190f565b5085935050505092915050565b6200195a8162001660565b82525050565b600060a082019050620019776000830188620017a2565b81810360208301526200198b818762001817565b90508181036040830152620019a18186620018e5565b9050620019b260608301856200194f565b620019c160808301846200194f565b9695505050505050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062001a1e57607f821691505b60208210810362001a345762001a33620019d6565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830262001a9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262001a5f565b62001aaa868362001a5f565b95508019841693508086168417925050509392505050565b6000819050919050565b600062001aed62001ae762001ae1846200157e565b62001ac2565b6200157e565b9050919050565b6000819050919050565b62001b098362001acc565b62001b2162001b188262001af4565b84845462001a6c565b825550505050565b600090565b62001b3862001b29565b62001b4581848462001afe565b505050565b5b8181101562001b6d5762001b6160008262001b2e565b60018101905062001b4b565b5050565b601f82111562001bbc5762001b868162001a3a565b62001b918462001a4f565b8101602085101562001ba1578190505b62001bb962001bb08562001a4f565b83018262001b4a565b50505b505050565b600082821c905092915050565b600062001be16000198460080262001bc1565b1980831691505092915050565b600062001bfc838362001bce565b9150826002028217905092915050565b62001c1782620019cb565b67ffffffffffffffff81111562001c335762001c32620013f0565b5b62001c3f825462001a05565b62001c4c82828562001b71565b600060209050601f83116001811462001c84576000841562001c6f578287015190505b62001c7b858262001bee565b86555062001ceb565b601f19841662001c948662001a3a565b60005b8281101562001cbe5784890151825560018201915060208501945060208101905062001c97565b8683101562001cde578489015162001cda601f89168262001bce565b8355505b6001600288020188555050505b505050505050565b6000819050919050565b62001d088162001cf3565b82525050565b62001d19816200157e565b82525050565b600060a08201905062001d36600083018862001cfd565b62001d45602083018762001cfd565b62001d54604083018662001cfd565b62001d63606083018562001d0e565b62001d726080830184620017a2565b9695505050505050565b600082825260208201905092915050565b60005b8381101562001dad57808201518184015260208101905062001d90565b60008484015250505050565b600062001dc682620019cb565b62001dd2818562001d7c565b935062001de481856020860162001d8d565b62001def81620013df565b840191505092915050565b6000602082019050818103600083015262001e16818462001db9565b905092915050565b600081519050919050565b6000819050602082019050919050565b600062001e47825162001cf3565b80915050919050565b600062001e5d8262001e1e565b8262001e698462001e29565b905062001e768162001e39565b9250602082101562001eb95762001eb47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080262001a5f565b831692505b5050919050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600062001f248262001ec0565b915062001f318362001ec0565b925082820190507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81111562001f685762001f6762001ee8565b5b92915050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203260008201527f3234206269747300000000000000000000000000000000000000000000000000602082015250565b600062001fcc60278362001d7c565b915062001fd98262001f6e565b604082019050919050565b6000602082019050818103600083015262001fff8162001fbd565b9050919050565b6000620020138262001ec0565b9150620020208362001ec0565b925082820390507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81111562002057576200205662001ee8565b5b92915050565b600060408201905062002074600083018562001d0e565b62002083602083018462001d0e565b9392505050565b600062002097826200157e565b9150620020a4836200157e565b9250828203905081811115620020bf57620020be62001ee8565b5b92915050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203360008201527f3220626974730000000000000000000000000000000000000000000000000000602082015250565b60006200212360268362001d7c565b91506200213082620020c5565b604082019050919050565b60006020820190508181036000830152620021568162002114565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203460008201527f3820626974730000000000000000000000000000000000000000000000000000602082015250565b6000620021bb60268362001d7c565b9150620021c8826200215d565b604082019050919050565b60006020820190508181036000830152620021ee81620021ac565b9050919050565b7f436865636b706f696e743a2064656372656173696e67206b6579730000000000600082015250565b60006200222d601b8362001d7c565b91506200223a82620021f5565b602082019050919050565b6000602082019050818103600083015262002260816200221e565b9050919050565b60805160a05160c05160e051610100516101205161014051613a6b620022c2600039600061070e015260006106da0152600061171a015260006116f901526000610f8601526000610fdc015260006110050152613a6b6000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638e539e8c116100b8578063be9a65551161007c578063be9a65551461036c578063c3cda5201461038a578063d086c254146103a6578063e252cdfc146103d6578063ebb6dad814610406578063fc0c546a1461043657610137565b80638e539e8c146102a0578063913b722c146102d057806391ddadf4146102ee5780639ab24eb01461030c578063b4d11f351461033c57610137565b8063587cde1e116100ff578063587cde1e146101f65780635c19a95c146102265780637ecebe001461024257806384b0196e1461027257806386d1a69f1461029657610137565b80630fb5a6b41461013c5780633644e5151461015a5780633a46b1a8146101785780634bf5d7e9146101a85780635421213e146101c6575b600080fd5b610144610454565b6040516101519190612810565b60405180910390f35b610162610476565b60405161016f9190612844565b60405180910390f35b610192600480360381019061018d91906128f8565b610485565b60405161019f9190612947565b60405180910390f35b6101b0610541565b6040516101bd91906129f2565b60405180910390f35b6101e060048036038101906101db9190612a14565b6105cf565b6040516101ed9190612947565b60405180910390f35b610210600480360381019061020b9190612a14565b6105f4565b60405161021d9190612a50565b60405180910390f35b610240600480360381019061023b9190612a14565b61065d565b005b61025c60048036038101906102579190612a14565b610677565b6040516102699190612947565b60405180910390f35b61027a6106c7565b60405161028d9796959493929190612b64565b60405180910390f35b61029e6107c9565b005b6102ba60048036038101906102b59190612be8565b61094e565b6040516102c79190612947565b60405180910390f35b6102d86109e2565b6040516102e59190612cd3565b60405180910390f35b6102f6610a70565b6040516103039190612d16565b60405180910390f35b61032660048036038101906103219190612a14565b610a80565b6040516103339190612947565b60405180910390f35b61035660048036038101906103519190612a14565b610b38565b6040516103639190612947565b60405180910390f35b610374610b84565b6040516103819190612810565b60405180910390f35b6103a4600480360381019061039f9190612d96565b610ba6565b005b6103c060048036038101906103bb9190612a14565b610caa565b6040516103cd9190612947565b60405180910390f35b6103f060048036038101906103eb9190612a14565b610d43565b6040516103fd9190612947565b60405180910390f35b610420600480360381019061041b9190612a14565b610ee4565b60405161042d9190612947565b60405180910390f35b61043e610f30565b60405161044b9190612a50565b60405180910390f35b600760109054906101000a90046fffffffffffffffffffffffffffffffff1681565b6000610480610f82565b905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a46b1a884846040518363ffffffff1660e01b81526004016104e4929190612e23565b602060405180830381865afa158015610501573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105259190612e61565b61052f8484611039565b6105399190612ebd565b905092915050565b60604361054c610a70565b65ffffffffffff1614610594576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058b90612f3d565b60405180910390fd5b6040518060400160405280601d81526020017f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000815250905090565b60006105da82610b38565b6105e383610d43565b6105ed9190612f5d565b9050919050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061066761110b565b90506106738183611113565b5050565b60006106c0600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611227565b9050919050565b60006060806000806000606061070760007f000000000000000000000000000000000000000000000000000000000000000061123590919063ffffffff16565b61073b60017f000000000000000000000000000000000000000000000000000000000000000061123590919063ffffffff16565b46306000801b600067ffffffffffffffff81111561075c5761075b612f91565b5b60405190808252806020026020018201604052801561078a5781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b60006107d4336105cf565b905060008103610810576040517fb10205ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015461085e9190612ebd565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506108b0336000836112e5565b6108fd3382600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661139f9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fc7798891864187665ac6dd119286e44ec13f014527aeeb2b8eb3fd413df93179826040516109439190612947565b60405180910390a250565b6000610958610a70565b65ffffffffffff1682106109a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109989061300c565b60405180910390fd5b6109bd6109ad83611425565b600461147890919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169050919050565b60606008805480602002602001604051908101604052809291908181526020018280548015610a6657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610a1c575b5050505050905090565b6000610a7b4361156e565b905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639ab24eb0836040518263ffffffff1660e01b8152600401610add9190612a50565b602060405180830381865afa158015610afa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1e9190612e61565b610b27836115c3565b610b319190612ebd565b9050919050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b600760009054906101000a90046fffffffffffffffffffffffffffffffff1681565b83421115610be9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be090613078565b60405180910390fd5b6000610c4b610c437fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf898989604051602001610c289493929190613098565b60405160208183030381529060405280519060200120611631565b85858561164b565b9050610c5681611676565b8614610c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8e90613129565b60405180910390fd5b610ca18188611113565b50505050505050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154610d3c9190612f5d565b9050919050565b6000600760009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16421015610d865760009050610edf565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050600760109054906101000a90046fffffffffffffffffffffffffffffffff16600760009054906101000a90046fffffffffffffffffffffffffffffffff16610e309190613149565b6fffffffffffffffffffffffffffffffff164210610e55578060000151915050610edf565b600760109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600760009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1642610ec29190612f5d565b8260000151610ed1919061318d565b610edb91906131fe565b9150505b919050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008183610f649190613257565b905092915050565b60008183610f7a91906132a7565b905092915050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015610ffe57507f000000000000000000000000000000000000000000000000000000000000000046145b1561102b577f00000000000000000000000000000000000000000000000000000000000000009050611036565b6110336116d4565b90505b90565b6000611043610a70565b65ffffffffffff16821061108c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110839061300c565b60405180910390fd5b6110e561109883611425565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061147890919063ffffffff16565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905092915050565b600033905090565b600061111e836105f4565b905081600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4611222818361121d8661176a565b611803565b505050565b600081600001549050919050565b606060ff60001b83146112525761124b83611a84565b90506112df565b81805461125e90613326565b80601f016020809104026020016040519081016040528092919081815260200182805461128a90613326565b80156112d75780601f106112ac576101008083540402835291602001916112d7565b820191906000526020600020905b8154815290600101906020018083116112ba57829003601f168201915b505050505090505b92915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036113325761132f6004610f5661132a84611af8565b611b63565b50505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361137f5761137c6004610f6c61137784611af8565b611b63565b50505b61139a61138b846105f4565b611394846105f4565b83611803565b505050565b6114208363a9059cbb60e01b84846040516024016113be929190612e23565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611bb3565b505050565b600063ffffffff8016821115611470576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611467906133c9565b60405180910390fd5b819050919050565b6000808360000180549050905060008082905060058311156114fa57600061149f84611c7b565b846114aa9190612f5d565b90506114b98760000182611d74565b60000160009054906101000a900463ffffffff1663ffffffff168663ffffffff1610156114e8578091506114f8565b6001816114f59190612ebd565b92505b505b600061150b87600001878585611d89565b90506000811461155f5761152e876000016001836115299190612f5d565b611d74565b60000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611562565b60005b94505050505092915050565b600065ffffffffffff80168211156115bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b29061345b565b60405180910390fd5b819050919050565b600061160c600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611dfc565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169050919050565b600061164461163e610f82565b83611e66565b9050919050565b600080600061165c87878787611ea7565b9150915061166981611f89565b8192505050949350505050565b600080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506116c381611227565b91506116ce816120ef565b50919050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000463060405160200161174f95949392919061347b565b60405160208183030381529060405280519060200120905090565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546117fc9190612f5d565b9050919050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561183f5750600081115b15611a7f57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611961576000806118ce600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020610f6c6118c986611af8565b611b63565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691508473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516119569291906134ce565b60405180910390a250505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611a7e576000806119eb600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020610f566119e686611af8565b611b63565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1691508373ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611a739291906134ce565b60405180910390a250505b5b505050565b60606000611a9183612105565b90506000602067ffffffffffffffff811115611ab057611aaf612f91565b5b6040519080825280601f01601f191660200182016040528015611ae25781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8016821115611b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5290613569565b60405180910390fd5b819050919050565b600080611ba7611b81611b74610a70565b65ffffffffffff16611425565b611b97611b8d88611dfc565b868863ffffffff16565b876121559092919063ffffffff16565b91509150935093915050565b6000611c15826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166121729092919063ffffffff16565b9050600081511480611c37575080806020019051810190611c3691906135c1565b5b611c76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6d90613660565b60405180910390fd5b505050565b6000808203611c8d5760009050611d6f565b60006001611c9a8461218a565b901c6001901b90506001818481611cb457611cb36131cf565b5b048201901c90506001818481611ccd57611ccc6131cf565b5b048201901c90506001818481611ce657611ce56131cf565b5b048201901c90506001818481611cff57611cfe6131cf565b5b048201901c90506001818481611d1857611d176131cf565b5b048201901c90506001818481611d3157611d306131cf565b5b048201901c90506001818481611d4a57611d496131cf565b5b048201901c9050611d6b81828581611d6557611d646131cf565b5b0461226b565b9150505b919050565b60008260005281602060002001905092915050565b60005b81831015611df1576000611da08484612284565b90508463ffffffff16611db38783611d74565b60000160009054906101000a900463ffffffff1663ffffffff161115611ddb57809250611deb565b600181611de89190612ebd565b93505b50611d8c565b819050949350505050565b6000808260000180549050905060008114611e5b57611e2a83600001600183611e259190612f5d565b611d74565b60000160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16611e5e565b60005b915050919050565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115611ee2576000600391509150611f80565b600060018787878760405160008152602001604052604051611f07949392919061368f565b6020604051602081039080840390855afa158015611f29573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611f7757600060019250925050611f80565b80600092509250505b94509492505050565b60006004811115611f9d57611f9c6136d4565b5b816004811115611fb057611faf6136d4565b5b03156120ec5760016004811115611fca57611fc96136d4565b5b816004811115611fdd57611fdc6136d4565b5b0361201d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120149061374f565b60405180910390fd5b60026004811115612031576120306136d4565b5b816004811115612044576120436136d4565b5b03612084576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161207b906137bb565b60405180910390fd5b60036004811115612098576120976136d4565b5b8160048111156120ab576120aa6136d4565b5b036120eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e29061384d565b60405180910390fd5b5b50565b6001816000016000828254019250508190555050565b60008060ff8360001c169050601f81111561214c576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b6000806121668560000185856122aa565b91509150935093915050565b60606121818484600085612630565b90509392505050565b600080600090506000608084901c11156121ac57608083901c92506080810190505b6000604084901c11156121c757604083901c92506040810190505b6000602084901c11156121e257602083901c92506020810190505b6000601084901c11156121fd57601083901c92506010810190505b6000600884901c111561221857600883901c92506008810190505b6000600484901c111561223357600483901c92506004810190505b6000600284901c111561224e57600283901c92506002810190505b6000600184901c1115612262576001810190505b80915050919050565b600081831061227a578161227c565b825b905092915050565b6000600282841861229591906131fe565b8284166122a29190612ebd565b905092915050565b60008060008580549050905060008111156125405760006122d7876001846122d29190612f5d565b611d74565b6040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152505090508563ffffffff16816000015163ffffffff1611156123cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c2906138b9565b60405180910390fd5b8563ffffffff16816000015163ffffffff160361244f57846123f9886001856123f49190612f5d565b611d74565b60000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555061252f565b8660405180604001604052808863ffffffff168152602001877bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16021790555050505b806020015185935093505050612628565b8560405180604001604052808763ffffffff168152602001867bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168152509080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550505060008492509250505b935093915050565b606082471015612675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161266c9061394b565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161269e91906139b2565b60006040518083038185875af1925050503d80600081146126db576040519150601f19603f3d011682016040523d82523d6000602084013e6126e0565b606091505b50915091506126f1878383876126fd565b92505050949350505050565b6060831561275f5760008351036127575761271785612772565b612756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161274d90613a15565b60405180910390fd5b5b82905061276a565b6127698383612795565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000825111156127a85781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127dc91906129f2565b60405180910390fd5b60006fffffffffffffffffffffffffffffffff82169050919050565b61280a816127e5565b82525050565b60006020820190506128256000830184612801565b92915050565b6000819050919050565b61283e8161282b565b82525050565b60006020820190506128596000830184612835565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061288f82612864565b9050919050565b61289f81612884565b81146128aa57600080fd5b50565b6000813590506128bc81612896565b92915050565b6000819050919050565b6128d5816128c2565b81146128e057600080fd5b50565b6000813590506128f2816128cc565b92915050565b6000806040838503121561290f5761290e61285f565b5b600061291d858286016128ad565b925050602061292e858286016128e3565b9150509250929050565b612941816128c2565b82525050565b600060208201905061295c6000830184612938565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561299c578082015181840152602081019050612981565b60008484015250505050565b6000601f19601f8301169050919050565b60006129c482612962565b6129ce818561296d565b93506129de81856020860161297e565b6129e7816129a8565b840191505092915050565b60006020820190508181036000830152612a0c81846129b9565b905092915050565b600060208284031215612a2a57612a2961285f565b5b6000612a38848285016128ad565b91505092915050565b612a4a81612884565b82525050565b6000602082019050612a656000830184612a41565b92915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b612aa081612a6b565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612adb816128c2565b82525050565b6000612aed8383612ad2565b60208301905092915050565b6000602082019050919050565b6000612b1182612aa6565b612b1b8185612ab1565b9350612b2683612ac2565b8060005b83811015612b57578151612b3e8882612ae1565b9750612b4983612af9565b925050600181019050612b2a565b5085935050505092915050565b600060e082019050612b79600083018a612a97565b8181036020830152612b8b81896129b9565b90508181036040830152612b9f81886129b9565b9050612bae6060830187612938565b612bbb6080830186612a41565b612bc860a0830185612835565b81810360c0830152612bda8184612b06565b905098975050505050505050565b600060208284031215612bfe57612bfd61285f565b5b6000612c0c848285016128e3565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c4a81612884565b82525050565b6000612c5c8383612c41565b60208301905092915050565b6000602082019050919050565b6000612c8082612c15565b612c8a8185612c20565b9350612c9583612c31565b8060005b83811015612cc6578151612cad8882612c50565b9750612cb883612c68565b925050600181019050612c99565b5085935050505092915050565b60006020820190508181036000830152612ced8184612c75565b905092915050565b600065ffffffffffff82169050919050565b612d1081612cf5565b82525050565b6000602082019050612d2b6000830184612d07565b92915050565b600060ff82169050919050565b612d4781612d31565b8114612d5257600080fd5b50565b600081359050612d6481612d3e565b92915050565b612d738161282b565b8114612d7e57600080fd5b50565b600081359050612d9081612d6a565b92915050565b60008060008060008060c08789031215612db357612db261285f565b5b6000612dc189828a016128ad565b9650506020612dd289828a016128e3565b9550506040612de389828a016128e3565b9450506060612df489828a01612d55565b9350506080612e0589828a01612d81565b92505060a0612e1689828a01612d81565b9150509295509295509295565b6000604082019050612e386000830185612a41565b612e456020830184612938565b9392505050565b600081519050612e5b816128cc565b92915050565b600060208284031215612e7757612e7661285f565b5b6000612e8584828501612e4c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ec8826128c2565b9150612ed3836128c2565b9250828201905080821115612eeb57612eea612e8e565b5b92915050565b7f566f7465733a2062726f6b656e20636c6f636b206d6f64650000000000000000600082015250565b6000612f2760188361296d565b9150612f3282612ef1565b602082019050919050565b60006020820190508181036000830152612f5681612f1a565b9050919050565b6000612f68826128c2565b9150612f73836128c2565b9250828203905081811115612f8b57612f8a612e8e565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f566f7465733a20667574757265206c6f6f6b7570000000000000000000000000600082015250565b6000612ff660148361296d565b915061300182612fc0565b602082019050919050565b6000602082019050818103600083015261302581612fe9565b9050919050565b7f566f7465733a207369676e617475726520657870697265640000000000000000600082015250565b600061306260188361296d565b915061306d8261302c565b602082019050919050565b6000602082019050818103600083015261309181613055565b9050919050565b60006080820190506130ad6000830187612835565b6130ba6020830186612a41565b6130c76040830185612938565b6130d46060830184612938565b95945050505050565b7f566f7465733a20696e76616c6964206e6f6e6365000000000000000000000000600082015250565b600061311360148361296d565b915061311e826130dd565b602082019050919050565b6000602082019050818103600083015261314281613106565b9050919050565b6000613154826127e5565b915061315f836127e5565b925082820190506fffffffffffffffffffffffffffffffff81111561318757613186612e8e565b5b92915050565b6000613198826128c2565b91506131a3836128c2565b92508282026131b1816128c2565b915082820484148315176131c8576131c7612e8e565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613209826128c2565b9150613214836128c2565b925082613224576132236131cf565b5b828204905092915050565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b60006132628261322f565b915061326d8361322f565b925082820190507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111156132a1576132a0612e8e565b5b92915050565b60006132b28261322f565b91506132bd8361322f565b925082820390507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8111156132f1576132f0612e8e565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061333e57607f821691505b602082108103613351576133506132f7565b5b50919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203360008201527f3220626974730000000000000000000000000000000000000000000000000000602082015250565b60006133b360268361296d565b91506133be82613357565b604082019050919050565b600060208201905081810360008301526133e2816133a6565b9050919050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203460008201527f3820626974730000000000000000000000000000000000000000000000000000602082015250565b600061344560268361296d565b9150613450826133e9565b604082019050919050565b6000602082019050818103600083015261347481613438565b9050919050565b600060a0820190506134906000830188612835565b61349d6020830187612835565b6134aa6040830186612835565b6134b76060830185612938565b6134c46080830184612a41565b9695505050505050565b60006040820190506134e36000830185612938565b6134f06020830184612938565b9392505050565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203260008201527f3234206269747300000000000000000000000000000000000000000000000000602082015250565b600061355360278361296d565b915061355e826134f7565b604082019050919050565b6000602082019050818103600083015261358281613546565b9050919050565b60008115159050919050565b61359e81613589565b81146135a957600080fd5b50565b6000815190506135bb81613595565b92915050565b6000602082840312156135d7576135d661285f565b5b60006135e5848285016135ac565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061364a602a8361296d565b9150613655826135ee565b604082019050919050565b600060208201905081810360008301526136798161363d565b9050919050565b61368981612d31565b82525050565b60006080820190506136a46000830187612835565b6136b16020830186613680565b6136be6040830185612835565b6136cb6060830184612835565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061373960188361296d565b915061374482613703565b602082019050919050565b600060208201905081810360008301526137688161372c565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006137a5601f8361296d565b91506137b08261376f565b602082019050919050565b600060208201905081810360008301526137d481613798565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061383760228361296d565b9150613842826137db565b604082019050919050565b600060208201905081810360008301526138668161382a565b9050919050565b7f436865636b706f696e743a2064656372656173696e67206b6579730000000000600082015250565b60006138a3601b8361296d565b91506138ae8261386d565b602082019050919050565b600060208201905081810360008301526138d281613896565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061393560268361296d565b9150613940826138d9565b604082019050919050565b6000602082019050818103600083015261396481613928565b9050919050565b600081519050919050565b600081905092915050565b600061398c8261396b565b6139968185613976565b93506139a681856020860161297e565b80840191505092915050565b60006139be8284613981565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006139ff601d8361296d565b9150613a0a826139c9565b602082019050919050565b60006020820190508181036000830152613a2e816139f2565b905091905056fea264697066735822122045b29433d5b47fd3bbd0539a5cabcb2d770fce83293c7e05b5d1643170f9661064736f6c63430008130033"; - -export class LockRelease__factory extends ContractFactory { - constructor( - ...args: [signer: Signer] | ConstructorParameters - ) { - if (args.length === 1) { - super(_abi, _bytecode, args[0]); - } else { - super(...args); - } - } - - deploy( - _token: string, - _beneficiaries: string[], - _amounts: BigNumberish[], - _start: BigNumberish, - _duration: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy( - _token, - _beneficiaries, - _amounts, - _start, - _duration, - overrides || {} - ) as Promise; - } - getDeployTransaction( - _token: string, - _beneficiaries: string[], - _amounts: BigNumberish[], - _start: BigNumberish, - _duration: BigNumberish, - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction( - _token, - _beneficiaries, - _amounts, - _start, - _duration, - overrides || {} - ); - } - attach(address: string): LockRelease { - return super.attach(address) as LockRelease; - } - connect(signer: Signer): LockRelease__factory { - return super.connect(signer) as LockRelease__factory; - } - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): LockReleaseInterface { - return new utils.Interface(_abi) as LockReleaseInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): LockRelease { - return new Contract(address, _abi, signerOrProvider) as LockRelease; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/Ownable__factory.ts b/src/assets/typechain-types/dcnt/factories/Ownable__factory.ts deleted file mode 100644 index df0453aa29..0000000000 --- a/src/assets/typechain-types/dcnt/factories/Ownable__factory.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { Ownable, OwnableInterface } from "../Ownable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class Ownable__factory { - static readonly abi = _abi; - static createInterface(): OwnableInterface { - return new utils.Interface(_abi) as OwnableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Ownable { - return new Contract(address, _abi, signerOrProvider) as Ownable; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/ShortStrings__factory.ts b/src/assets/typechain-types/dcnt/factories/ShortStrings__factory.ts deleted file mode 100644 index 4ae2a15b13..0000000000 --- a/src/assets/typechain-types/dcnt/factories/ShortStrings__factory.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { ShortStrings, ShortStringsInterface } from "../ShortStrings"; - -const _abi = [ - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, -]; - -const _bytecode = - "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207b070ef87ce2a8f6655559d6f80d60474a249a271498b7f3a2015ffd3f9e066a64736f6c63430008130033"; - -export class ShortStrings__factory extends ContractFactory { - constructor( - ...args: [signer: Signer] | ConstructorParameters - ) { - if (args.length === 1) { - super(_abi, _bytecode, args[0]); - } else { - super(...args); - } - } - - deploy( - overrides?: Overrides & { from?: string | Promise } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - getDeployTransaction( - overrides?: Overrides & { from?: string | Promise } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - attach(address: string): ShortStrings { - return super.attach(address) as ShortStrings; - } - connect(signer: Signer): ShortStrings__factory { - return super.connect(signer) as ShortStrings__factory; - } - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ShortStringsInterface { - return new utils.Interface(_abi) as ShortStringsInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ShortStrings { - return new Contract(address, _abi, signerOrProvider) as ShortStrings; - } -} diff --git a/src/assets/typechain-types/dcnt/factories/Votes__factory.ts b/src/assets/typechain-types/dcnt/factories/Votes__factory.ts deleted file mode 100644 index a67ad216b7..0000000000 --- a/src/assets/typechain-types/dcnt/factories/Votes__factory.ts +++ /dev/null @@ -1,325 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import { Provider } from "@ethersproject/providers"; -import type { Votes, VotesInterface } from "../Votes"; - -const _abi = [ - { - inputs: [], - name: "InvalidShortString", - type: "error", - }, - { - inputs: [ - { - internalType: "string", - name: "str", - type: "string", - }, - ], - name: "StringTooLong", - type: "error", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "fromDelegate", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "toDelegate", - type: "address", - }, - ], - name: "DelegateChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "delegate", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "previousBalance", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "newBalance", - type: "uint256", - }, - ], - name: "DelegateVotesChanged", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "EIP712DomainChanged", - type: "event", - }, - { - inputs: [], - name: "CLOCK_MODE", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "DOMAIN_SEPARATOR", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "clock", - outputs: [ - { - internalType: "uint48", - name: "", - type: "uint48", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - ], - name: "delegate", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatee", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiry", - type: "uint256", - }, - { - internalType: "uint8", - name: "v", - type: "uint8", - }, - { - internalType: "bytes32", - name: "r", - type: "bytes32", - }, - { - internalType: "bytes32", - name: "s", - type: "bytes32", - }, - ], - name: "delegateBySig", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "delegates", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "eip712Domain", - outputs: [ - { - internalType: "bytes1", - name: "fields", - type: "bytes1", - }, - { - internalType: "string", - name: "name", - type: "string", - }, - { - internalType: "string", - name: "version", - type: "string", - }, - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "verifyingContract", - type: "address", - }, - { - internalType: "bytes32", - name: "salt", - type: "bytes32", - }, - { - internalType: "uint256[]", - name: "extensions", - type: "uint256[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastTotalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "timepoint", - type: "uint256", - }, - ], - name: "getPastVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "getVotes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "nonces", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class Votes__factory { - static readonly abi = _abi; - static createInterface(): VotesInterface { - return new utils.Interface(_abi) as VotesInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): Votes { - return new Contract(address, _abi, signerOrProvider) as Votes; - } -} diff --git a/src/assets/typechain-types/dcnt/hardhat.d.ts b/src/assets/typechain-types/dcnt/hardhat.d.ts deleted file mode 100644 index 2c85abb48b..0000000000 --- a/src/assets/typechain-types/dcnt/hardhat.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { ethers } from "ethers"; -import { - FactoryOptions, - HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; - -import * as Contracts from "."; - -declare module "hardhat/types/runtime" { - interface HardhatEthersHelpers extends HardhatEthersHelpersBase { - getContractFactory( - name: "Ownable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IVotes", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Votes", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC5267", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC5805", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC6372", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20Permit", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20Votes", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Metadata", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Permit", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "EIP712", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ShortStrings", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "DCNTToken", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ILockRelease", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "LockRelease", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - - getContractAt( - name: "Ownable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IVotes", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Votes", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC5267", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC5805", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC6372", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20Permit", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20Votes", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Metadata", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Permit", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "EIP712", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ShortStrings", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "DCNTToken", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ILockRelease", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "LockRelease", - address: string, - signer?: ethers.Signer - ): Promise; - - // default types - getContractFactory( - name: string, - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - abi: any[], - bytecode: ethers.utils.BytesLike, - signer?: ethers.Signer - ): Promise; - getContractAt( - nameOrAbi: string | any[], - address: string, - signer?: ethers.Signer - ): Promise; - } -} diff --git a/src/assets/typechain-types/dcnt/index.ts b/src/assets/typechain-types/dcnt/index.ts deleted file mode 100644 index c66f7385e6..0000000000 --- a/src/assets/typechain-types/dcnt/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Ownable } from "./Ownable"; -export type { IVotes } from "./IVotes"; -export type { Votes } from "./Votes"; -export type { IERC5267 } from "./IERC5267"; -export type { IERC5805 } from "./IERC5805"; -export type { IERC6372 } from "./IERC6372"; -export type { ERC20 } from "./ERC20"; -export type { ERC20Permit } from "./ERC20Permit"; -export type { ERC20Votes } from "./ERC20Votes"; -export type { IERC20Metadata } from "./IERC20Metadata"; -export type { IERC20Permit } from "./IERC20Permit"; -export type { IERC20 } from "./IERC20"; -export type { EIP712 } from "./EIP712"; -export type { ShortStrings } from "./ShortStrings"; -export type { DCNTToken } from "./DCNTToken"; -export type { ILockRelease } from "./ILockRelease"; -export type { LockRelease } from "./LockRelease"; - -export { Ownable__factory } from "./factories/Ownable__factory"; -export { IVotes__factory } from "./factories/IVotes__factory"; -export { Votes__factory } from "./factories/Votes__factory"; -export { IERC5267__factory } from "./factories/IERC5267__factory"; -export { IERC5805__factory } from "./factories/IERC5805__factory"; -export { IERC6372__factory } from "./factories/IERC6372__factory"; -export { ERC20__factory } from "./factories/ERC20__factory"; -export { ERC20Permit__factory } from "./factories/ERC20Permit__factory"; -export { ERC20Votes__factory } from "./factories/ERC20Votes__factory"; -export { IERC20Metadata__factory } from "./factories/IERC20Metadata__factory"; -export { IERC20Permit__factory } from "./factories/IERC20Permit__factory"; -export { IERC20__factory } from "./factories/IERC20__factory"; -export { EIP712__factory } from "./factories/EIP712__factory"; -export { ShortStrings__factory } from "./factories/ShortStrings__factory"; -export { DCNTToken__factory } from "./factories/DCNTToken__factory"; -export { ILockRelease__factory } from "./factories/ILockRelease__factory"; -export { LockRelease__factory } from "./factories/LockRelease__factory"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/index.ts deleted file mode 100644 index 24cb2c9b9e..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as safeContracts from "./safe-contracts"; -export type { safeContracts }; -import type * as zodiac from "./zodiac"; -export type { zodiac }; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/GnosisSafe.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/GnosisSafe.ts deleted file mode 100644 index 633884a9e0..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/GnosisSafe.ts +++ /dev/null @@ -1,1679 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - 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 GnosisSafeInterface extends utils.Interface { - functions: { - "VERSION()": FunctionFragment; - "addOwnerWithThreshold(address,uint256)": FunctionFragment; - "approveHash(bytes32)": FunctionFragment; - "approvedHashes(address,bytes32)": FunctionFragment; - "changeThreshold(uint256)": FunctionFragment; - "checkNSignatures(bytes32,bytes,bytes,uint256)": FunctionFragment; - "checkSignatures(bytes32,bytes,bytes)": FunctionFragment; - "disableModule(address,address)": FunctionFragment; - "domainSeparator()": FunctionFragment; - "enableModule(address)": FunctionFragment; - "encodeTransactionData(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,uint256)": FunctionFragment; - "execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)": FunctionFragment; - "execTransactionFromModule(address,uint256,bytes,uint8)": FunctionFragment; - "execTransactionFromModuleReturnData(address,uint256,bytes,uint8)": FunctionFragment; - "getChainId()": FunctionFragment; - "getModulesPaginated(address,uint256)": FunctionFragment; - "getOwners()": FunctionFragment; - "getStorageAt(uint256,uint256)": FunctionFragment; - "getThreshold()": FunctionFragment; - "getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,uint256)": FunctionFragment; - "isModuleEnabled(address)": FunctionFragment; - "isOwner(address)": FunctionFragment; - "nonce()": FunctionFragment; - "removeOwner(address,address,uint256)": FunctionFragment; - "requiredTxGas(address,uint256,bytes,uint8)": FunctionFragment; - "setFallbackHandler(address)": FunctionFragment; - "setGuard(address)": FunctionFragment; - "setup(address[],uint256,address,bytes,address,address,uint256,address)": FunctionFragment; - "signedMessages(bytes32)": FunctionFragment; - "simulateAndRevert(address,bytes)": FunctionFragment; - "swapOwner(address,address,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "VERSION" - | "addOwnerWithThreshold" - | "approveHash" - | "approvedHashes" - | "changeThreshold" - | "checkNSignatures" - | "checkSignatures" - | "disableModule" - | "domainSeparator" - | "enableModule" - | "encodeTransactionData" - | "execTransaction" - | "execTransactionFromModule" - | "execTransactionFromModuleReturnData" - | "getChainId" - | "getModulesPaginated" - | "getOwners" - | "getStorageAt" - | "getThreshold" - | "getTransactionHash" - | "isModuleEnabled" - | "isOwner" - | "nonce" - | "removeOwner" - | "requiredTxGas" - | "setFallbackHandler" - | "setGuard" - | "setup" - | "signedMessages" - | "simulateAndRevert" - | "swapOwner" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "VERSION", values?: undefined): string; - encodeFunctionData( - functionFragment: "addOwnerWithThreshold", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approveHash", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approvedHashes", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "changeThreshold", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "checkNSignatures", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "checkSignatures", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "disableModule", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "domainSeparator", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "enableModule", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "encodeTransactionData", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransaction", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModule", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModuleReturnData", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getChainId", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getModulesPaginated", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "getOwners", values?: undefined): string; - encodeFunctionData( - functionFragment: "getStorageAt", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getThreshold", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getTransactionHash", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "isModuleEnabled", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "isOwner", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "nonce", values?: undefined): string; - encodeFunctionData( - functionFragment: "removeOwner", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "requiredTxGas", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setFallbackHandler", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setGuard", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setup", - values: [ - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "signedMessages", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "simulateAndRevert", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "swapOwner", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult(functionFragment: "VERSION", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "addOwnerWithThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "approveHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "approvedHashes", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "changeThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkNSignatures", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkSignatures", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "disableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "domainSeparator", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "enableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "encodeTransactionData", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransaction", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModuleReturnData", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getModulesPaginated", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getOwners", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getStorageAt", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTransactionHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isModuleEnabled", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonce", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredTxGas", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setFallbackHandler", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setGuard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setup", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "signedMessages", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "simulateAndRevert", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "swapOwner", data: BytesLike): Result; - - events: { - "AddedOwner(address)": EventFragment; - "ApproveHash(bytes32,address)": EventFragment; - "ChangedFallbackHandler(address)": EventFragment; - "ChangedGuard(address)": EventFragment; - "ChangedThreshold(uint256)": EventFragment; - "DisabledModule(address)": EventFragment; - "EnabledModule(address)": EventFragment; - "ExecutionFailure(bytes32,uint256)": EventFragment; - "ExecutionFromModuleFailure(address)": EventFragment; - "ExecutionFromModuleSuccess(address)": EventFragment; - "ExecutionSuccess(bytes32,uint256)": EventFragment; - "RemovedOwner(address)": EventFragment; - "SafeReceived(address,uint256)": EventFragment; - "SafeSetup(address,address[],uint256,address,address)": EventFragment; - "SignMsg(bytes32)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddedOwner"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApproveHash"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedFallbackHandler"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedGuard"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedThreshold"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DisabledModule"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EnabledModule"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFailure"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFromModuleFailure"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFromModuleSuccess"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionSuccess"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemovedOwner"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SafeReceived"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SafeSetup"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SignMsg"): EventFragment; -} - -export interface AddedOwnerEventObject { - owner: string; -} -export type AddedOwnerEvent = TypedEvent<[string], AddedOwnerEventObject>; - -export type AddedOwnerEventFilter = TypedEventFilter; - -export interface ApproveHashEventObject { - approvedHash: string; - owner: string; -} -export type ApproveHashEvent = TypedEvent< - [string, string], - ApproveHashEventObject ->; - -export type ApproveHashEventFilter = TypedEventFilter; - -export interface ChangedFallbackHandlerEventObject { - handler: string; -} -export type ChangedFallbackHandlerEvent = TypedEvent< - [string], - ChangedFallbackHandlerEventObject ->; - -export type ChangedFallbackHandlerEventFilter = - TypedEventFilter; - -export interface ChangedGuardEventObject { - guard: string; -} -export type ChangedGuardEvent = TypedEvent<[string], ChangedGuardEventObject>; - -export type ChangedGuardEventFilter = TypedEventFilter; - -export interface ChangedThresholdEventObject { - threshold: BigNumber; -} -export type ChangedThresholdEvent = TypedEvent< - [BigNumber], - ChangedThresholdEventObject ->; - -export type ChangedThresholdEventFilter = - TypedEventFilter; - -export interface DisabledModuleEventObject { - module: string; -} -export type DisabledModuleEvent = TypedEvent< - [string], - DisabledModuleEventObject ->; - -export type DisabledModuleEventFilter = TypedEventFilter; - -export interface EnabledModuleEventObject { - module: string; -} -export type EnabledModuleEvent = TypedEvent<[string], EnabledModuleEventObject>; - -export type EnabledModuleEventFilter = TypedEventFilter; - -export interface ExecutionFailureEventObject { - txHash: string; - payment: BigNumber; -} -export type ExecutionFailureEvent = TypedEvent< - [string, BigNumber], - ExecutionFailureEventObject ->; - -export type ExecutionFailureEventFilter = - TypedEventFilter; - -export interface ExecutionFromModuleFailureEventObject { - module: string; -} -export type ExecutionFromModuleFailureEvent = TypedEvent< - [string], - ExecutionFromModuleFailureEventObject ->; - -export type ExecutionFromModuleFailureEventFilter = - TypedEventFilter; - -export interface ExecutionFromModuleSuccessEventObject { - module: string; -} -export type ExecutionFromModuleSuccessEvent = TypedEvent< - [string], - ExecutionFromModuleSuccessEventObject ->; - -export type ExecutionFromModuleSuccessEventFilter = - TypedEventFilter; - -export interface ExecutionSuccessEventObject { - txHash: string; - payment: BigNumber; -} -export type ExecutionSuccessEvent = TypedEvent< - [string, BigNumber], - ExecutionSuccessEventObject ->; - -export type ExecutionSuccessEventFilter = - TypedEventFilter; - -export interface RemovedOwnerEventObject { - owner: string; -} -export type RemovedOwnerEvent = TypedEvent<[string], RemovedOwnerEventObject>; - -export type RemovedOwnerEventFilter = TypedEventFilter; - -export interface SafeReceivedEventObject { - sender: string; - value: BigNumber; -} -export type SafeReceivedEvent = TypedEvent< - [string, BigNumber], - SafeReceivedEventObject ->; - -export type SafeReceivedEventFilter = TypedEventFilter; - -export interface SafeSetupEventObject { - initiator: string; - owners: string[]; - threshold: BigNumber; - initializer: string; - fallbackHandler: string; -} -export type SafeSetupEvent = TypedEvent< - [string, string[], BigNumber, string, string], - SafeSetupEventObject ->; - -export type SafeSetupEventFilter = TypedEventFilter; - -export interface SignMsgEventObject { - msgHash: string; -} -export type SignMsgEvent = TypedEvent<[string], SignMsgEventObject>; - -export type SignMsgEventFilter = TypedEventFilter; - -export interface GnosisSafe extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GnosisSafeInterface; - - 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: { - VERSION(overrides?: CallOverrides): Promise<[string]>; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise<[string]>; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - getOwners(overrides?: CallOverrides): Promise<[string[]]>; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - getThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - nonce(overrides?: CallOverrides): Promise<[BigNumber]>; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { success: boolean; returnData: string }>; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AddedOwner(address)"(owner?: null): AddedOwnerEventFilter; - AddedOwner(owner?: null): AddedOwnerEventFilter; - - "ApproveHash(bytes32,address)"( - approvedHash?: PromiseOrValue | null, - owner?: PromiseOrValue | null - ): ApproveHashEventFilter; - ApproveHash( - approvedHash?: PromiseOrValue | null, - owner?: PromiseOrValue | null - ): ApproveHashEventFilter; - - "ChangedFallbackHandler(address)"( - handler?: null - ): ChangedFallbackHandlerEventFilter; - ChangedFallbackHandler(handler?: null): ChangedFallbackHandlerEventFilter; - - "ChangedGuard(address)"(guard?: null): ChangedGuardEventFilter; - ChangedGuard(guard?: null): ChangedGuardEventFilter; - - "ChangedThreshold(uint256)"(threshold?: null): ChangedThresholdEventFilter; - ChangedThreshold(threshold?: null): ChangedThresholdEventFilter; - - "DisabledModule(address)"(module?: null): DisabledModuleEventFilter; - DisabledModule(module?: null): DisabledModuleEventFilter; - - "EnabledModule(address)"(module?: null): EnabledModuleEventFilter; - EnabledModule(module?: null): EnabledModuleEventFilter; - - "ExecutionFailure(bytes32,uint256)"( - txHash?: null, - payment?: null - ): ExecutionFailureEventFilter; - ExecutionFailure( - txHash?: null, - payment?: null - ): ExecutionFailureEventFilter; - - "ExecutionFromModuleFailure(address)"( - module?: PromiseOrValue | null - ): ExecutionFromModuleFailureEventFilter; - ExecutionFromModuleFailure( - module?: PromiseOrValue | null - ): ExecutionFromModuleFailureEventFilter; - - "ExecutionFromModuleSuccess(address)"( - module?: PromiseOrValue | null - ): ExecutionFromModuleSuccessEventFilter; - ExecutionFromModuleSuccess( - module?: PromiseOrValue | null - ): ExecutionFromModuleSuccessEventFilter; - - "ExecutionSuccess(bytes32,uint256)"( - txHash?: null, - payment?: null - ): ExecutionSuccessEventFilter; - ExecutionSuccess( - txHash?: null, - payment?: null - ): ExecutionSuccessEventFilter; - - "RemovedOwner(address)"(owner?: null): RemovedOwnerEventFilter; - RemovedOwner(owner?: null): RemovedOwnerEventFilter; - - "SafeReceived(address,uint256)"( - sender?: PromiseOrValue | null, - value?: null - ): SafeReceivedEventFilter; - SafeReceived( - sender?: PromiseOrValue | null, - value?: null - ): SafeReceivedEventFilter; - - "SafeSetup(address,address[],uint256,address,address)"( - initiator?: PromiseOrValue | null, - owners?: null, - threshold?: null, - initializer?: null, - fallbackHandler?: null - ): SafeSetupEventFilter; - SafeSetup( - initiator?: PromiseOrValue | null, - owners?: null, - threshold?: null, - initializer?: null, - fallbackHandler?: null - ): SafeSetupEventFilter; - - "SignMsg(bytes32)"( - msgHash?: PromiseOrValue | null - ): SignMsgEventFilter; - SignMsg(msgHash?: PromiseOrValue | null): SignMsgEventFilter; - }; - - estimateGas: { - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/GnosisSafeL2.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/GnosisSafeL2.ts deleted file mode 100644 index 83ac3c6841..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/GnosisSafeL2.ts +++ /dev/null @@ -1,1773 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - 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 GnosisSafeL2Interface extends utils.Interface { - functions: { - "VERSION()": FunctionFragment; - "addOwnerWithThreshold(address,uint256)": FunctionFragment; - "approveHash(bytes32)": FunctionFragment; - "approvedHashes(address,bytes32)": FunctionFragment; - "changeThreshold(uint256)": FunctionFragment; - "checkNSignatures(bytes32,bytes,bytes,uint256)": FunctionFragment; - "checkSignatures(bytes32,bytes,bytes)": FunctionFragment; - "disableModule(address,address)": FunctionFragment; - "domainSeparator()": FunctionFragment; - "enableModule(address)": FunctionFragment; - "encodeTransactionData(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,uint256)": FunctionFragment; - "execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)": FunctionFragment; - "execTransactionFromModule(address,uint256,bytes,uint8)": FunctionFragment; - "execTransactionFromModuleReturnData(address,uint256,bytes,uint8)": FunctionFragment; - "getChainId()": FunctionFragment; - "getModulesPaginated(address,uint256)": FunctionFragment; - "getOwners()": FunctionFragment; - "getStorageAt(uint256,uint256)": FunctionFragment; - "getThreshold()": FunctionFragment; - "getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,uint256)": FunctionFragment; - "isModuleEnabled(address)": FunctionFragment; - "isOwner(address)": FunctionFragment; - "nonce()": FunctionFragment; - "removeOwner(address,address,uint256)": FunctionFragment; - "requiredTxGas(address,uint256,bytes,uint8)": FunctionFragment; - "setFallbackHandler(address)": FunctionFragment; - "setGuard(address)": FunctionFragment; - "setup(address[],uint256,address,bytes,address,address,uint256,address)": FunctionFragment; - "signedMessages(bytes32)": FunctionFragment; - "simulateAndRevert(address,bytes)": FunctionFragment; - "swapOwner(address,address,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "VERSION" - | "addOwnerWithThreshold" - | "approveHash" - | "approvedHashes" - | "changeThreshold" - | "checkNSignatures" - | "checkSignatures" - | "disableModule" - | "domainSeparator" - | "enableModule" - | "encodeTransactionData" - | "execTransaction" - | "execTransactionFromModule" - | "execTransactionFromModuleReturnData" - | "getChainId" - | "getModulesPaginated" - | "getOwners" - | "getStorageAt" - | "getThreshold" - | "getTransactionHash" - | "isModuleEnabled" - | "isOwner" - | "nonce" - | "removeOwner" - | "requiredTxGas" - | "setFallbackHandler" - | "setGuard" - | "setup" - | "signedMessages" - | "simulateAndRevert" - | "swapOwner" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "VERSION", values?: undefined): string; - encodeFunctionData( - functionFragment: "addOwnerWithThreshold", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approveHash", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approvedHashes", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "changeThreshold", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "checkNSignatures", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "checkSignatures", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "disableModule", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "domainSeparator", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "enableModule", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "encodeTransactionData", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransaction", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModule", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModuleReturnData", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getChainId", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getModulesPaginated", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "getOwners", values?: undefined): string; - encodeFunctionData( - functionFragment: "getStorageAt", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getThreshold", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getTransactionHash", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "isModuleEnabled", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "isOwner", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "nonce", values?: undefined): string; - encodeFunctionData( - functionFragment: "removeOwner", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "requiredTxGas", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setFallbackHandler", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setGuard", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setup", - values: [ - PromiseOrValue[], - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "signedMessages", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "simulateAndRevert", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "swapOwner", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult(functionFragment: "VERSION", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "addOwnerWithThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "approveHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "approvedHashes", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "changeThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkNSignatures", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkSignatures", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "disableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "domainSeparator", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "enableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "encodeTransactionData", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransaction", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModuleReturnData", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getModulesPaginated", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getOwners", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getStorageAt", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTransactionHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isModuleEnabled", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "nonce", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeOwner", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "requiredTxGas", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setFallbackHandler", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setGuard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setup", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "signedMessages", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "simulateAndRevert", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "swapOwner", data: BytesLike): Result; - - events: { - "AddedOwner(address)": EventFragment; - "ApproveHash(bytes32,address)": EventFragment; - "ChangedFallbackHandler(address)": EventFragment; - "ChangedGuard(address)": EventFragment; - "ChangedThreshold(uint256)": EventFragment; - "DisabledModule(address)": EventFragment; - "EnabledModule(address)": EventFragment; - "ExecutionFailure(bytes32,uint256)": EventFragment; - "ExecutionFromModuleFailure(address)": EventFragment; - "ExecutionFromModuleSuccess(address)": EventFragment; - "ExecutionSuccess(bytes32,uint256)": EventFragment; - "RemovedOwner(address)": EventFragment; - "SafeModuleTransaction(address,address,uint256,bytes,uint8)": EventFragment; - "SafeMultiSigTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,bytes)": EventFragment; - "SafeReceived(address,uint256)": EventFragment; - "SafeSetup(address,address[],uint256,address,address)": EventFragment; - "SignMsg(bytes32)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddedOwner"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApproveHash"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedFallbackHandler"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedGuard"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedThreshold"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DisabledModule"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EnabledModule"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFailure"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFromModuleFailure"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFromModuleSuccess"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionSuccess"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemovedOwner"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SafeModuleTransaction"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SafeMultiSigTransaction"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SafeReceived"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SafeSetup"): EventFragment; - getEvent(nameOrSignatureOrTopic: "SignMsg"): EventFragment; -} - -export interface AddedOwnerEventObject { - owner: string; -} -export type AddedOwnerEvent = TypedEvent<[string], AddedOwnerEventObject>; - -export type AddedOwnerEventFilter = TypedEventFilter; - -export interface ApproveHashEventObject { - approvedHash: string; - owner: string; -} -export type ApproveHashEvent = TypedEvent< - [string, string], - ApproveHashEventObject ->; - -export type ApproveHashEventFilter = TypedEventFilter; - -export interface ChangedFallbackHandlerEventObject { - handler: string; -} -export type ChangedFallbackHandlerEvent = TypedEvent< - [string], - ChangedFallbackHandlerEventObject ->; - -export type ChangedFallbackHandlerEventFilter = - TypedEventFilter; - -export interface ChangedGuardEventObject { - guard: string; -} -export type ChangedGuardEvent = TypedEvent<[string], ChangedGuardEventObject>; - -export type ChangedGuardEventFilter = TypedEventFilter; - -export interface ChangedThresholdEventObject { - threshold: BigNumber; -} -export type ChangedThresholdEvent = TypedEvent< - [BigNumber], - ChangedThresholdEventObject ->; - -export type ChangedThresholdEventFilter = - TypedEventFilter; - -export interface DisabledModuleEventObject { - module: string; -} -export type DisabledModuleEvent = TypedEvent< - [string], - DisabledModuleEventObject ->; - -export type DisabledModuleEventFilter = TypedEventFilter; - -export interface EnabledModuleEventObject { - module: string; -} -export type EnabledModuleEvent = TypedEvent<[string], EnabledModuleEventObject>; - -export type EnabledModuleEventFilter = TypedEventFilter; - -export interface ExecutionFailureEventObject { - txHash: string; - payment: BigNumber; -} -export type ExecutionFailureEvent = TypedEvent< - [string, BigNumber], - ExecutionFailureEventObject ->; - -export type ExecutionFailureEventFilter = - TypedEventFilter; - -export interface ExecutionFromModuleFailureEventObject { - module: string; -} -export type ExecutionFromModuleFailureEvent = TypedEvent< - [string], - ExecutionFromModuleFailureEventObject ->; - -export type ExecutionFromModuleFailureEventFilter = - TypedEventFilter; - -export interface ExecutionFromModuleSuccessEventObject { - module: string; -} -export type ExecutionFromModuleSuccessEvent = TypedEvent< - [string], - ExecutionFromModuleSuccessEventObject ->; - -export type ExecutionFromModuleSuccessEventFilter = - TypedEventFilter; - -export interface ExecutionSuccessEventObject { - txHash: string; - payment: BigNumber; -} -export type ExecutionSuccessEvent = TypedEvent< - [string, BigNumber], - ExecutionSuccessEventObject ->; - -export type ExecutionSuccessEventFilter = - TypedEventFilter; - -export interface RemovedOwnerEventObject { - owner: string; -} -export type RemovedOwnerEvent = TypedEvent<[string], RemovedOwnerEventObject>; - -export type RemovedOwnerEventFilter = TypedEventFilter; - -export interface SafeModuleTransactionEventObject { - module: string; - to: string; - value: BigNumber; - data: string; - operation: number; -} -export type SafeModuleTransactionEvent = TypedEvent< - [string, string, BigNumber, string, number], - SafeModuleTransactionEventObject ->; - -export type SafeModuleTransactionEventFilter = - TypedEventFilter; - -export interface SafeMultiSigTransactionEventObject { - to: string; - value: BigNumber; - data: string; - operation: number; - safeTxGas: BigNumber; - baseGas: BigNumber; - gasPrice: BigNumber; - gasToken: string; - refundReceiver: string; - signatures: string; - additionalInfo: string; -} -export type SafeMultiSigTransactionEvent = TypedEvent< - [ - string, - BigNumber, - string, - number, - BigNumber, - BigNumber, - BigNumber, - string, - string, - string, - string - ], - SafeMultiSigTransactionEventObject ->; - -export type SafeMultiSigTransactionEventFilter = - TypedEventFilter; - -export interface SafeReceivedEventObject { - sender: string; - value: BigNumber; -} -export type SafeReceivedEvent = TypedEvent< - [string, BigNumber], - SafeReceivedEventObject ->; - -export type SafeReceivedEventFilter = TypedEventFilter; - -export interface SafeSetupEventObject { - initiator: string; - owners: string[]; - threshold: BigNumber; - initializer: string; - fallbackHandler: string; -} -export type SafeSetupEvent = TypedEvent< - [string, string[], BigNumber, string, string], - SafeSetupEventObject ->; - -export type SafeSetupEventFilter = TypedEventFilter; - -export interface SignMsgEventObject { - msgHash: string; -} -export type SignMsgEvent = TypedEvent<[string], SignMsgEventObject>; - -export type SignMsgEventFilter = TypedEventFilter; - -export interface GnosisSafeL2 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GnosisSafeL2Interface; - - 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: { - VERSION(overrides?: CallOverrides): Promise<[string]>; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise<[string]>; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise<[BigNumber]>; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - getOwners(overrides?: CallOverrides): Promise<[string[]]>; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - getThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - nonce(overrides?: CallOverrides): Promise<[BigNumber]>; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { success: boolean; returnData: string }>; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AddedOwner(address)"(owner?: null): AddedOwnerEventFilter; - AddedOwner(owner?: null): AddedOwnerEventFilter; - - "ApproveHash(bytes32,address)"( - approvedHash?: PromiseOrValue | null, - owner?: PromiseOrValue | null - ): ApproveHashEventFilter; - ApproveHash( - approvedHash?: PromiseOrValue | null, - owner?: PromiseOrValue | null - ): ApproveHashEventFilter; - - "ChangedFallbackHandler(address)"( - handler?: null - ): ChangedFallbackHandlerEventFilter; - ChangedFallbackHandler(handler?: null): ChangedFallbackHandlerEventFilter; - - "ChangedGuard(address)"(guard?: null): ChangedGuardEventFilter; - ChangedGuard(guard?: null): ChangedGuardEventFilter; - - "ChangedThreshold(uint256)"(threshold?: null): ChangedThresholdEventFilter; - ChangedThreshold(threshold?: null): ChangedThresholdEventFilter; - - "DisabledModule(address)"(module?: null): DisabledModuleEventFilter; - DisabledModule(module?: null): DisabledModuleEventFilter; - - "EnabledModule(address)"(module?: null): EnabledModuleEventFilter; - EnabledModule(module?: null): EnabledModuleEventFilter; - - "ExecutionFailure(bytes32,uint256)"( - txHash?: null, - payment?: null - ): ExecutionFailureEventFilter; - ExecutionFailure( - txHash?: null, - payment?: null - ): ExecutionFailureEventFilter; - - "ExecutionFromModuleFailure(address)"( - module?: PromiseOrValue | null - ): ExecutionFromModuleFailureEventFilter; - ExecutionFromModuleFailure( - module?: PromiseOrValue | null - ): ExecutionFromModuleFailureEventFilter; - - "ExecutionFromModuleSuccess(address)"( - module?: PromiseOrValue | null - ): ExecutionFromModuleSuccessEventFilter; - ExecutionFromModuleSuccess( - module?: PromiseOrValue | null - ): ExecutionFromModuleSuccessEventFilter; - - "ExecutionSuccess(bytes32,uint256)"( - txHash?: null, - payment?: null - ): ExecutionSuccessEventFilter; - ExecutionSuccess( - txHash?: null, - payment?: null - ): ExecutionSuccessEventFilter; - - "RemovedOwner(address)"(owner?: null): RemovedOwnerEventFilter; - RemovedOwner(owner?: null): RemovedOwnerEventFilter; - - "SafeModuleTransaction(address,address,uint256,bytes,uint8)"( - module?: null, - to?: null, - value?: null, - data?: null, - operation?: null - ): SafeModuleTransactionEventFilter; - SafeModuleTransaction( - module?: null, - to?: null, - value?: null, - data?: null, - operation?: null - ): SafeModuleTransactionEventFilter; - - "SafeMultiSigTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,bytes)"( - to?: null, - value?: null, - data?: null, - operation?: null, - safeTxGas?: null, - baseGas?: null, - gasPrice?: null, - gasToken?: null, - refundReceiver?: null, - signatures?: null, - additionalInfo?: null - ): SafeMultiSigTransactionEventFilter; - SafeMultiSigTransaction( - to?: null, - value?: null, - data?: null, - operation?: null, - safeTxGas?: null, - baseGas?: null, - gasPrice?: null, - gasToken?: null, - refundReceiver?: null, - signatures?: null, - additionalInfo?: null - ): SafeMultiSigTransactionEventFilter; - - "SafeReceived(address,uint256)"( - sender?: PromiseOrValue | null, - value?: null - ): SafeReceivedEventFilter; - SafeReceived( - sender?: PromiseOrValue | null, - value?: null - ): SafeReceivedEventFilter; - - "SafeSetup(address,address[],uint256,address,address)"( - initiator?: PromiseOrValue | null, - owners?: null, - threshold?: null, - initializer?: null, - fallbackHandler?: null - ): SafeSetupEventFilter; - SafeSetup( - initiator?: PromiseOrValue | null, - owners?: null, - threshold?: null, - initializer?: null, - fallbackHandler?: null - ): SafeSetupEventFilter; - - "SignMsg(bytes32)"( - msgHash?: PromiseOrValue | null - ): SignMsgEventFilter; - SignMsg(msgHash?: PromiseOrValue | null): SignMsgEventFilter; - }; - - estimateGas: { - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - VERSION(overrides?: CallOverrides): Promise; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approveHash( - hashToApprove: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approvedHashes( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkNSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - requiredSignatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkSignatures( - dataHash: PromiseOrValue, - data: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - domainSeparator(overrides?: CallOverrides): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - encodeTransactionData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getChainId(overrides?: CallOverrides): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - getTransactionHash( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - _nonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - nonce(overrides?: CallOverrides): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - requiredTxGas( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setup( - _owners: PromiseOrValue[], - _threshold: PromiseOrValue, - to: PromiseOrValue, - data: PromiseOrValue, - fallbackHandler: PromiseOrValue, - paymentToken: PromiseOrValue, - payment: PromiseOrValue, - paymentReceiver: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - signedMessages( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/FallbackManager.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/FallbackManager.ts deleted file mode 100644 index 009f51707d..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/FallbackManager.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - 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 FallbackManagerInterface extends utils.Interface { - functions: { - "setFallbackHandler(address)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "setFallbackHandler"): FunctionFragment; - - encodeFunctionData( - functionFragment: "setFallbackHandler", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "setFallbackHandler", - data: BytesLike - ): Result; - - events: { - "ChangedFallbackHandler(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ChangedFallbackHandler"): EventFragment; -} - -export interface ChangedFallbackHandlerEventObject { - handler: string; -} -export type ChangedFallbackHandlerEvent = TypedEvent< - [string], - ChangedFallbackHandlerEventObject ->; - -export type ChangedFallbackHandlerEventFilter = - TypedEventFilter; - -export interface FallbackManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: FallbackManagerInterface; - - 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: { - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - setFallbackHandler( - handler: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "ChangedFallbackHandler(address)"( - handler?: null - ): ChangedFallbackHandlerEventFilter; - ChangedFallbackHandler(handler?: null): ChangedFallbackHandlerEventFilter; - }; - - estimateGas: { - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - setFallbackHandler( - handler: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard.ts deleted file mode 100644 index d89ae86600..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* 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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../../common"; - -export interface GuardInterface extends utils.Interface { - functions: { - "checkAfterExecution(bytes32,bool)": FunctionFragment; - "checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "checkAfterExecution" | "checkTransaction" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "checkAfterExecution", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "checkTransaction", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "checkAfterExecution", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkTransaction", - data: BytesLike - ): Result; - - events: {}; -} - -export interface Guard extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GuardInterface; - - 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: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager.ts deleted file mode 100644 index b068341ed7..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - 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 GuardManagerInterface extends utils.Interface { - functions: { - "setGuard(address)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "setGuard"): FunctionFragment; - - encodeFunctionData( - functionFragment: "setGuard", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "setGuard", data: BytesLike): Result; - - events: { - "ChangedGuard(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ChangedGuard"): EventFragment; -} - -export interface ChangedGuardEventObject { - guard: string; -} -export type ChangedGuardEvent = TypedEvent<[string], ChangedGuardEventObject>; - -export type ChangedGuardEventFilter = TypedEventFilter; - -export interface GuardManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GuardManagerInterface; - - 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: { - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - setGuard( - guard: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "ChangedGuard(address)"(guard?: null): ChangedGuardEventFilter; - ChangedGuard(guard?: null): ChangedGuardEventFilter; - }; - - estimateGas: { - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - setGuard( - guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/index.ts deleted file mode 100644 index a6d98388c5..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Guard } from "./Guard"; -export type { GuardManager } from "./GuardManager"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/ModuleManager.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/ModuleManager.ts deleted file mode 100644 index 96a34c9056..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/ModuleManager.ts +++ /dev/null @@ -1,407 +0,0 @@ -/* 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 ModuleManagerInterface extends utils.Interface { - functions: { - "disableModule(address,address)": FunctionFragment; - "enableModule(address)": FunctionFragment; - "execTransactionFromModule(address,uint256,bytes,uint8)": FunctionFragment; - "execTransactionFromModuleReturnData(address,uint256,bytes,uint8)": FunctionFragment; - "getModulesPaginated(address,uint256)": FunctionFragment; - "isModuleEnabled(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "disableModule" - | "enableModule" - | "execTransactionFromModule" - | "execTransactionFromModuleReturnData" - | "getModulesPaginated" - | "isModuleEnabled" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "disableModule", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "enableModule", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModule", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModuleReturnData", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getModulesPaginated", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "isModuleEnabled", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "disableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "enableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModuleReturnData", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getModulesPaginated", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isModuleEnabled", - data: BytesLike - ): Result; - - events: { - "DisabledModule(address)": EventFragment; - "EnabledModule(address)": EventFragment; - "ExecutionFromModuleFailure(address)": EventFragment; - "ExecutionFromModuleSuccess(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "DisabledModule"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EnabledModule"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFromModuleFailure"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ExecutionFromModuleSuccess"): EventFragment; -} - -export interface DisabledModuleEventObject { - module: string; -} -export type DisabledModuleEvent = TypedEvent< - [string], - DisabledModuleEventObject ->; - -export type DisabledModuleEventFilter = TypedEventFilter; - -export interface EnabledModuleEventObject { - module: string; -} -export type EnabledModuleEvent = TypedEvent<[string], EnabledModuleEventObject>; - -export type EnabledModuleEventFilter = TypedEventFilter; - -export interface ExecutionFromModuleFailureEventObject { - module: string; -} -export type ExecutionFromModuleFailureEvent = TypedEvent< - [string], - ExecutionFromModuleFailureEventObject ->; - -export type ExecutionFromModuleFailureEventFilter = - TypedEventFilter; - -export interface ExecutionFromModuleSuccessEventObject { - module: string; -} -export type ExecutionFromModuleSuccessEvent = TypedEvent< - [string], - ExecutionFromModuleSuccessEventObject ->; - -export type ExecutionFromModuleSuccessEventFilter = - TypedEventFilter; - -export interface ModuleManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ModuleManagerInterface; - - 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: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { success: boolean; returnData: string }>; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "DisabledModule(address)"(module?: null): DisabledModuleEventFilter; - DisabledModule(module?: null): DisabledModuleEventFilter; - - "EnabledModule(address)"(module?: null): EnabledModuleEventFilter; - EnabledModule(module?: null): EnabledModuleEventFilter; - - "ExecutionFromModuleFailure(address)"( - module?: PromiseOrValue | null - ): ExecutionFromModuleFailureEventFilter; - ExecutionFromModuleFailure( - module?: PromiseOrValue | null - ): ExecutionFromModuleFailureEventFilter; - - "ExecutionFromModuleSuccess(address)"( - module?: PromiseOrValue | null - ): ExecutionFromModuleSuccessEventFilter; - ExecutionFromModuleSuccess( - module?: PromiseOrValue | null - ): ExecutionFromModuleSuccessEventFilter; - }; - - estimateGas: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/OwnerManager.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/OwnerManager.ts deleted file mode 100644 index 24ac7e3c13..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/OwnerManager.ts +++ /dev/null @@ -1,356 +0,0 @@ -/* 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 OwnerManagerInterface extends utils.Interface { - functions: { - "addOwnerWithThreshold(address,uint256)": FunctionFragment; - "changeThreshold(uint256)": FunctionFragment; - "getOwners()": FunctionFragment; - "getThreshold()": FunctionFragment; - "isOwner(address)": FunctionFragment; - "removeOwner(address,address,uint256)": FunctionFragment; - "swapOwner(address,address,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "addOwnerWithThreshold" - | "changeThreshold" - | "getOwners" - | "getThreshold" - | "isOwner" - | "removeOwner" - | "swapOwner" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "addOwnerWithThreshold", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "changeThreshold", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "getOwners", values?: undefined): string; - encodeFunctionData( - functionFragment: "getThreshold", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "isOwner", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "removeOwner", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "swapOwner", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "addOwnerWithThreshold", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "changeThreshold", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getOwners", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getThreshold", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeOwner", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "swapOwner", data: BytesLike): Result; - - events: { - "AddedOwner(address)": EventFragment; - "ChangedThreshold(uint256)": EventFragment; - "RemovedOwner(address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AddedOwner"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedThreshold"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RemovedOwner"): EventFragment; -} - -export interface AddedOwnerEventObject { - owner: string; -} -export type AddedOwnerEvent = TypedEvent<[string], AddedOwnerEventObject>; - -export type AddedOwnerEventFilter = TypedEventFilter; - -export interface ChangedThresholdEventObject { - threshold: BigNumber; -} -export type ChangedThresholdEvent = TypedEvent< - [BigNumber], - ChangedThresholdEventObject ->; - -export type ChangedThresholdEventFilter = - TypedEventFilter; - -export interface RemovedOwnerEventObject { - owner: string; -} -export type RemovedOwnerEvent = TypedEvent<[string], RemovedOwnerEventObject>; - -export type RemovedOwnerEventFilter = TypedEventFilter; - -export interface OwnerManager extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: OwnerManagerInterface; - - 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: { - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getOwners(overrides?: CallOverrides): Promise<[string[]]>; - - getThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AddedOwner(address)"(owner?: null): AddedOwnerEventFilter; - AddedOwner(owner?: null): AddedOwnerEventFilter; - - "ChangedThreshold(uint256)"(threshold?: null): ChangedThresholdEventFilter; - ChangedThreshold(threshold?: null): ChangedThresholdEventFilter; - - "RemovedOwner(address)"(owner?: null): RemovedOwnerEventFilter; - RemovedOwner(owner?: null): RemovedOwnerEventFilter; - }; - - estimateGas: { - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - addOwnerWithThreshold( - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - changeThreshold( - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getOwners(overrides?: CallOverrides): Promise; - - getThreshold(overrides?: CallOverrides): Promise; - - isOwner( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - removeOwner( - prevOwner: PromiseOrValue, - owner: PromiseOrValue, - _threshold: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - swapOwner( - prevOwner: PromiseOrValue, - oldOwner: PromiseOrValue, - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/index.ts deleted file mode 100644 index 16453f096d..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/base/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as guardManagerSol from "./GuardManager.sol"; -export type { guardManagerSol }; -export type { FallbackManager } from "./FallbackManager"; -export type { ModuleManager } from "./ModuleManager"; -export type { OwnerManager } from "./OwnerManager"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.ts deleted file mode 100644 index 64235d72a3..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, BigNumber, Signer, utils } from "ethers"; -import type { EventFragment } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface EtherPaymentFallbackInterface extends utils.Interface { - functions: {}; - - events: { - "SafeReceived(address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "SafeReceived"): EventFragment; -} - -export interface SafeReceivedEventObject { - sender: string; - value: BigNumber; -} -export type SafeReceivedEvent = TypedEvent< - [string, BigNumber], - SafeReceivedEventObject ->; - -export type SafeReceivedEventFilter = TypedEventFilter; - -export interface EtherPaymentFallback extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: EtherPaymentFallbackInterface; - - 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: {}; - - callStatic: {}; - - filters: { - "SafeReceived(address,uint256)"( - sender?: PromiseOrValue | null, - value?: null - ): SafeReceivedEventFilter; - SafeReceived( - sender?: PromiseOrValue | null, - value?: null - ): SafeReceivedEventFilter; - }; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.ts deleted file mode 100644 index bdcccc17ca..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/StorageAccessible.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* 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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface StorageAccessibleInterface extends utils.Interface { - functions: { - "getStorageAt(uint256,uint256)": FunctionFragment; - "simulateAndRevert(address,bytes)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "getStorageAt" | "simulateAndRevert" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "getStorageAt", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "simulateAndRevert", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "getStorageAt", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "simulateAndRevert", - data: BytesLike - ): Result; - - events: {}; -} - -export interface StorageAccessible extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: StorageAccessibleInterface; - - 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: { - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - getStorageAt( - offset: PromiseOrValue, - length: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateAndRevert( - targetContract: PromiseOrValue, - calldataPayload: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/index.ts deleted file mode 100644 index 832e54c3f8..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/common/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { EtherPaymentFallback } from "./EtherPaymentFallback"; -export type { StorageAccessible } from "./StorageAccessible"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/index.ts deleted file mode 100644 index a0cdedb49b..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as base from "./base"; -export type { base }; -import type * as common from "./common"; -export type { common }; -import type * as interfaces from "./interfaces"; -export type { interfaces }; -import type * as libraries from "./libraries"; -export type { libraries }; -import type * as proxies from "./proxies"; -export type { proxies }; -export type { GnosisSafe } from "./GnosisSafe"; -export type { GnosisSafeL2 } from "./GnosisSafeL2"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.ts deleted file mode 100644 index 010603d4eb..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/IERC165.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface IERC165Interface extends utils.Interface { - functions: { - "supportsInterface(bytes4)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "supportsInterface"): FunctionFragment; - - encodeFunctionData( - functionFragment: "supportsInterface", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "supportsInterface", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IERC165 extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IERC165Interface; - - 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: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.ts deleted file mode 100644 index 1da5c89960..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface ISignatureValidatorInterface extends utils.Interface { - functions: { - "isValidSignature(bytes,bytes)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "isValidSignature"): FunctionFragment; - - encodeFunctionData( - functionFragment: "isValidSignature", - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "isValidSignature", - data: BytesLike - ): Result; - - events: {}; -} - -export interface ISignatureValidator extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ISignatureValidatorInterface; - - 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: { - isValidSignature( - _data: PromiseOrValue, - _signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - }; - - isValidSignature( - _data: PromiseOrValue, - _signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - isValidSignature( - _data: PromiseOrValue, - _signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - isValidSignature( - _data: PromiseOrValue, - _signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - isValidSignature( - _data: PromiseOrValue, - _signature: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/index.ts deleted file mode 100644 index 09828777b5..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IERC165 } from "./IERC165"; -export type { ISignatureValidator } from "./ISignatureValidator"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.ts deleted file mode 100644 index 7f4539a3d6..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - ContractTransaction, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface MultiSendInterface extends utils.Interface { - functions: { - "multiSend(bytes)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "multiSend"): FunctionFragment; - - encodeFunctionData( - functionFragment: "multiSend", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "multiSend", data: BytesLike): Result; - - events: {}; -} - -export interface MultiSend extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: MultiSendInterface; - - 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: { - multiSend( - transactions: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - multiSend( - transactions: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - multiSend( - transactions: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - multiSend( - transactions: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - multiSend( - transactions: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/libraries/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/libraries/index.ts deleted file mode 100644 index 985dd86119..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/libraries/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { MultiSend } from "./MultiSend"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy.ts deleted file mode 100644 index cb62306c72..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseContract, Signer, utils } from "ethers"; - -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../../common"; - -export interface GnosisSafeProxyInterface extends utils.Interface { - functions: {}; - - events: {}; -} - -export interface GnosisSafeProxy extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GnosisSafeProxyInterface; - - 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: {}; - - callStatic: {}; - - filters: {}; - - estimateGas: {}; - - populateTransaction: {}; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy.ts deleted file mode 100644 index 29bc75ab55..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BytesLike, - CallOverrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../../common"; - -export interface IProxyInterface extends utils.Interface { - functions: { - "masterCopy()": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "masterCopy"): FunctionFragment; - - encodeFunctionData( - functionFragment: "masterCopy", - values?: undefined - ): string; - - decodeFunctionResult(functionFragment: "masterCopy", data: BytesLike): Result; - - events: {}; -} - -export interface IProxy extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IProxyInterface; - - 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: { - masterCopy(overrides?: CallOverrides): Promise<[string]>; - }; - - masterCopy(overrides?: CallOverrides): Promise; - - callStatic: { - masterCopy(overrides?: CallOverrides): Promise; - }; - - filters: {}; - - estimateGas: { - masterCopy(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - masterCopy(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/index.ts deleted file mode 100644 index 816a57dcb3..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { GnosisSafeProxy } from "./GnosisSafeProxy"; -export type { IProxy } from "./IProxy"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.ts deleted file mode 100644 index d7b2626213..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* 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 GnosisSafeProxyFactoryInterface extends utils.Interface { - functions: { - "calculateCreateProxyWithNonceAddress(address,bytes,uint256)": FunctionFragment; - "createProxy(address,bytes)": FunctionFragment; - "createProxyWithCallback(address,bytes,uint256,address)": FunctionFragment; - "createProxyWithNonce(address,bytes,uint256)": FunctionFragment; - "proxyCreationCode()": FunctionFragment; - "proxyRuntimeCode()": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "calculateCreateProxyWithNonceAddress" - | "createProxy" - | "createProxyWithCallback" - | "createProxyWithNonce" - | "proxyCreationCode" - | "proxyRuntimeCode" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "calculateCreateProxyWithNonceAddress", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "createProxy", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "createProxyWithCallback", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "createProxyWithNonce", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "proxyCreationCode", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "proxyRuntimeCode", - values?: undefined - ): string; - - decodeFunctionResult( - functionFragment: "calculateCreateProxyWithNonceAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "createProxy", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "createProxyWithCallback", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "createProxyWithNonce", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "proxyCreationCode", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "proxyRuntimeCode", - data: BytesLike - ): Result; - - events: { - "ProxyCreation(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ProxyCreation"): EventFragment; -} - -export interface ProxyCreationEventObject { - proxy: string; - singleton: string; -} -export type ProxyCreationEvent = TypedEvent< - [string, string], - ProxyCreationEventObject ->; - -export type ProxyCreationEventFilter = TypedEventFilter; - -export interface GnosisSafeProxyFactory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GnosisSafeProxyFactoryInterface; - - 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: { - calculateCreateProxyWithNonceAddress( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxy( - singleton: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithCallback( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - callback: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithNonce( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - proxyCreationCode(overrides?: CallOverrides): Promise<[string]>; - - proxyRuntimeCode(overrides?: CallOverrides): Promise<[string]>; - }; - - calculateCreateProxyWithNonceAddress( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxy( - singleton: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithCallback( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - callback: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithNonce( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - proxyCreationCode(overrides?: CallOverrides): Promise; - - proxyRuntimeCode(overrides?: CallOverrides): Promise; - - callStatic: { - calculateCreateProxyWithNonceAddress( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - createProxy( - singleton: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - createProxyWithCallback( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - callback: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - createProxyWithNonce( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - proxyCreationCode(overrides?: CallOverrides): Promise; - - proxyRuntimeCode(overrides?: CallOverrides): Promise; - }; - - filters: { - "ProxyCreation(address,address)"( - proxy?: null, - singleton?: null - ): ProxyCreationEventFilter; - ProxyCreation(proxy?: null, singleton?: null): ProxyCreationEventFilter; - }; - - estimateGas: { - calculateCreateProxyWithNonceAddress( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxy( - singleton: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithCallback( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - callback: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithNonce( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - proxyCreationCode(overrides?: CallOverrides): Promise; - - proxyRuntimeCode(overrides?: CallOverrides): Promise; - }; - - populateTransaction: { - calculateCreateProxyWithNonceAddress( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxy( - singleton: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithCallback( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - callback: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - createProxyWithNonce( - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - proxyCreationCode(overrides?: CallOverrides): Promise; - - proxyRuntimeCode(overrides?: CallOverrides): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.ts deleted file mode 100644 index 76240bffdf..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* 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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface IProxyCreationCallbackInterface extends utils.Interface { - functions: { - "proxyCreated(address,address,bytes,uint256)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "proxyCreated"): FunctionFragment; - - encodeFunctionData( - functionFragment: "proxyCreated", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "proxyCreated", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IProxyCreationCallback extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IProxyCreationCallbackInterface; - - 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: { - proxyCreated( - proxy: PromiseOrValue, - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - proxyCreated( - proxy: PromiseOrValue, - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - proxyCreated( - proxy: PromiseOrValue, - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - proxyCreated( - proxy: PromiseOrValue, - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - proxyCreated( - proxy: PromiseOrValue, - _singleton: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/index.ts deleted file mode 100644 index 08037755a2..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts/proxies/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as gnosisSafeProxySol from "./GnosisSafeProxy.sol"; -export type { gnosisSafeProxySol }; -export type { GnosisSafeProxyFactory } from "./GnosisSafeProxyFactory"; -export type { IProxyCreationCallback } from "./IProxyCreationCallback"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/index.ts deleted file mode 100644 index a11e4ca299..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/safe-contracts/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/core/Module.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/core/Module.ts deleted file mode 100644 index 317b2f06a8..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/core/Module.ts +++ /dev/null @@ -1,413 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - 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 ModuleInterface extends utils.Interface { - functions: { - "avatar()": FunctionFragment; - "getGuard()": FunctionFragment; - "guard()": FunctionFragment; - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setAvatar(address)": FunctionFragment; - "setGuard(address)": FunctionFragment; - "setTarget(address)": FunctionFragment; - "setUp(bytes)": FunctionFragment; - "target()": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "avatar" - | "getGuard" - | "guard" - | "owner" - | "renounceOwnership" - | "setAvatar" - | "setGuard" - | "setTarget" - | "setUp" - | "target" - | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "avatar", values?: undefined): string; - encodeFunctionData(functionFragment: "getGuard", values?: undefined): string; - encodeFunctionData(functionFragment: "guard", values?: undefined): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setAvatar", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setGuard", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setTarget", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "setUp", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "target", values?: undefined): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "avatar", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getGuard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "guard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setAvatar", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setGuard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setTarget", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "setUp", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "target", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "AvatarSet(address,address)": EventFragment; - "ChangedGuard(address)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "TargetSet(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "AvatarSet"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ChangedGuard"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "TargetSet"): EventFragment; -} - -export interface AvatarSetEventObject { - previousAvatar: string; - newAvatar: string; -} -export type AvatarSetEvent = TypedEvent<[string, string], AvatarSetEventObject>; - -export type AvatarSetEventFilter = TypedEventFilter; - -export interface ChangedGuardEventObject { - guard: string; -} -export type ChangedGuardEvent = TypedEvent<[string], ChangedGuardEventObject>; - -export type ChangedGuardEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface TargetSetEventObject { - previousTarget: string; - newTarget: string; -} -export type TargetSetEvent = TypedEvent<[string, string], TargetSetEventObject>; - -export type TargetSetEventFilter = TypedEventFilter; - -export interface Module extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ModuleInterface; - - 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: { - avatar(overrides?: CallOverrides): Promise<[string]>; - - getGuard(overrides?: CallOverrides): Promise<[string] & { _guard: string }>; - - guard(overrides?: CallOverrides): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAvatar( - _avatar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTarget( - _target: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - target(overrides?: CallOverrides): Promise<[string]>; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - avatar(overrides?: CallOverrides): Promise; - - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAvatar( - _avatar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTarget( - _target: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - target(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - avatar(overrides?: CallOverrides): Promise; - - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setAvatar( - _avatar: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setTarget( - _target: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - target(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "AvatarSet(address,address)"( - previousAvatar?: PromiseOrValue | null, - newAvatar?: PromiseOrValue | null - ): AvatarSetEventFilter; - AvatarSet( - previousAvatar?: PromiseOrValue | null, - newAvatar?: PromiseOrValue | null - ): AvatarSetEventFilter; - - "ChangedGuard(address)"(guard?: null): ChangedGuardEventFilter; - ChangedGuard(guard?: null): ChangedGuardEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - - "TargetSet(address,address)"( - previousTarget?: PromiseOrValue | null, - newTarget?: PromiseOrValue | null - ): TargetSetEventFilter; - TargetSet( - previousTarget?: PromiseOrValue | null, - newTarget?: PromiseOrValue | null - ): TargetSetEventFilter; - }; - - estimateGas: { - avatar(overrides?: CallOverrides): Promise; - - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAvatar( - _avatar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTarget( - _target: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - target(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - avatar(overrides?: CallOverrides): Promise; - - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setAvatar( - _avatar: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setTarget( - _target: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - target(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/core/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/core/index.ts deleted file mode 100644 index 96ff7cbafa..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/core/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { Module } from "./Module"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.ts deleted file mode 100644 index b977b0769f..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/FactoryFriendly.ts +++ /dev/null @@ -1,211 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - 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 FactoryFriendlyInterface extends utils.Interface { - functions: { - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setUp(bytes)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "owner" - | "renounceOwnership" - | "setUp" - | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setUp", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setUp", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface FactoryFriendly extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: FactoryFriendlyInterface; - - 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: { - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setUp( - initializeParams: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.ts deleted file mode 100644 index 6d43e5fdc8..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* 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 ModuleProxyFactoryInterface extends utils.Interface { - functions: { - "deployModule(address,bytes,uint256)": FunctionFragment; - }; - - getFunction(nameOrSignatureOrTopic: "deployModule"): FunctionFragment; - - encodeFunctionData( - functionFragment: "deployModule", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "deployModule", - data: BytesLike - ): Result; - - events: { - "ModuleProxyCreation(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ModuleProxyCreation"): EventFragment; -} - -export interface ModuleProxyCreationEventObject { - proxy: string; - masterCopy: string; -} -export type ModuleProxyCreationEvent = TypedEvent< - [string, string], - ModuleProxyCreationEventObject ->; - -export type ModuleProxyCreationEventFilter = - TypedEventFilter; - -export interface ModuleProxyFactory extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: ModuleProxyFactoryInterface; - - 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: { - deployModule( - masterCopy: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - deployModule( - masterCopy: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - deployModule( - masterCopy: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "ModuleProxyCreation(address,address)"( - proxy?: PromiseOrValue | null, - masterCopy?: PromiseOrValue | null - ): ModuleProxyCreationEventFilter; - ModuleProxyCreation( - proxy?: PromiseOrValue | null, - masterCopy?: PromiseOrValue | null - ): ModuleProxyCreationEventFilter; - }; - - estimateGas: { - deployModule( - masterCopy: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - deployModule( - masterCopy: PromiseOrValue, - initializer: PromiseOrValue, - saltNonce: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/index.ts deleted file mode 100644 index 7ff32777a6..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/factory/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { FactoryFriendly } from "./FactoryFriendly"; -export type { ModuleProxyFactory } from "./ModuleProxyFactory"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/BaseGuard.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/BaseGuard.ts deleted file mode 100644 index c2082af4e4..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/BaseGuard.ts +++ /dev/null @@ -1,246 +0,0 @@ -/* 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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface BaseGuardInterface extends utils.Interface { - functions: { - "checkAfterExecution(bytes32,bool)": FunctionFragment; - "checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "checkAfterExecution" - | "checkTransaction" - | "supportsInterface" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "checkAfterExecution", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "checkTransaction", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "supportsInterface", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "checkAfterExecution", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkTransaction", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "supportsInterface", - data: BytesLike - ): Result; - - events: {}; -} - -export interface BaseGuard extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: BaseGuardInterface; - - 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: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/Guardable.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/Guardable.ts deleted file mode 100644 index d608a61771..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/Guardable.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - 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 GuardableInterface extends utils.Interface { - functions: { - "getGuard()": FunctionFragment; - "guard()": FunctionFragment; - "owner()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "setGuard(address)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "getGuard" - | "guard" - | "owner" - | "renounceOwnership" - | "setGuard" - | "transferOwnership" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "getGuard", values?: undefined): string; - encodeFunctionData(functionFragment: "guard", values?: undefined): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "setGuard", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "getGuard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "guard", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "setGuard", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - - events: { - "ChangedGuard(address)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "ChangedGuard"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface ChangedGuardEventObject { - guard: string; -} -export type ChangedGuardEvent = TypedEvent<[string], ChangedGuardEventObject>; - -export type ChangedGuardEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface Guardable extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: GuardableInterface; - - 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: { - getGuard(overrides?: CallOverrides): Promise<[string] & { _guard: string }>; - - guard(overrides?: CallOverrides): Promise<[string]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "ChangedGuard(address)"(guard?: null): ChangedGuardEventFilter; - ChangedGuard(guard?: null): ChangedGuardEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - getGuard(overrides?: CallOverrides): Promise; - - guard(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setGuard( - _guard: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/index.ts deleted file mode 100644 index 04cd84be78..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/guard/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { BaseGuard } from "./BaseGuard"; -export type { Guardable } from "./Guardable"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/index.ts deleted file mode 100644 index 2c279a5661..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as core from "./core"; -export type { core }; -import type * as factory from "./factory"; -export type { factory }; -import type * as guard from "./guard"; -export type { guard }; -import type * as interfaces from "./interfaces"; -export type { interfaces }; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/IAvatar.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/IAvatar.ts deleted file mode 100644 index 216414f350..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/IAvatar.ts +++ /dev/null @@ -1,334 +0,0 @@ -/* 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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface IAvatarInterface extends utils.Interface { - functions: { - "disableModule(address,address)": FunctionFragment; - "enableModule(address)": FunctionFragment; - "execTransactionFromModule(address,uint256,bytes,uint8)": FunctionFragment; - "execTransactionFromModuleReturnData(address,uint256,bytes,uint8)": FunctionFragment; - "getModulesPaginated(address,uint256)": FunctionFragment; - "isModuleEnabled(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "disableModule" - | "enableModule" - | "execTransactionFromModule" - | "execTransactionFromModuleReturnData" - | "getModulesPaginated" - | "isModuleEnabled" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "disableModule", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "enableModule", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModule", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "execTransactionFromModuleReturnData", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "getModulesPaginated", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "isModuleEnabled", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "disableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "enableModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModule", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "execTransactionFromModuleReturnData", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getModulesPaginated", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "isModuleEnabled", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IAvatar extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IAvatarInterface; - - 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: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - }; - - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - callStatic: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean, string] & { success: boolean; returnData: string }>; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string[], string] & { array: string[]; next: string }>; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - populateTransaction: { - disableModule( - prevModule: PromiseOrValue, - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - enableModule( - module: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModule( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - execTransactionFromModuleReturnData( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getModulesPaginated( - start: PromiseOrValue, - pageSize: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isModuleEnabled( - module: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/IGuard.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/IGuard.ts deleted file mode 100644 index 24af6e3863..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/IGuard.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* 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 } from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "../../../../common"; - -export interface IGuardInterface extends utils.Interface { - functions: { - "checkAfterExecution(bytes32,bool)": FunctionFragment; - "checkTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes,address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: "checkAfterExecution" | "checkTransaction" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "checkAfterExecution", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "checkTransaction", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - - decodeFunctionResult( - functionFragment: "checkAfterExecution", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "checkTransaction", - data: BytesLike - ): Result; - - events: {}; -} - -export interface IGuard extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: IGuardInterface; - - 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: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: {}; - - estimateGas: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - checkAfterExecution( - txHash: PromiseOrValue, - success: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - checkTransaction( - to: PromiseOrValue, - value: PromiseOrValue, - data: PromiseOrValue, - operation: PromiseOrValue, - safeTxGas: PromiseOrValue, - baseGas: PromiseOrValue, - gasPrice: PromiseOrValue, - gasToken: PromiseOrValue, - refundReceiver: PromiseOrValue, - signatures: PromiseOrValue, - msgSender: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/index.ts deleted file mode 100644 index 138771f9ce..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { IAvatar } from "./IAvatar"; -export type { IGuard } from "./IGuard"; diff --git a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/index.ts b/src/assets/typechain-types/usul/@gnosis.pm/zodiac/index.ts deleted file mode 100644 index a11e4ca299..0000000000 --- a/src/assets/typechain-types/usul/@gnosis.pm/zodiac/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type * as contracts from "./contracts"; -export type { contracts }; diff --git a/src/assets/typechain-types/usul/common.ts b/src/assets/typechain-types/usul/common.ts deleted file mode 100644 index 4c90b08bb4..0000000000 --- a/src/assets/typechain-types/usul/common.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { Listener } from "@ethersproject/providers"; -import type { Event, EventFilter } from "ethers"; - -export interface TypedEvent< - TArgsArray extends Array = any, - TArgsObject = any -> extends Event { - args: TArgsArray & TArgsObject; -} - -export interface TypedEventFilter<_TEvent extends TypedEvent> - extends EventFilter {} - -export interface TypedListener { - (...listenerArg: [...__TypechainArgsArray, TEvent]): void; -} - -type __TypechainArgsArray = T extends TypedEvent ? U : never; - -export interface OnEvent { - ( - eventFilter: TypedEventFilter, - listener: TypedListener - ): TRes; - (eventName: string, listener: Listener): TRes; -} - -export type MinEthersFactory = { - deploy(...a: ARGS[]): Promise; -}; - -export type GetContractTypeFromFactory = F extends MinEthersFactory< - infer C, - any -> - ? C - : never; - -export type GetARGsTypeFromFactory = F extends MinEthersFactory - ? Parameters - : never; - -export type PromiseOrValue = T | Promise; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/index.ts deleted file mode 100644 index 6493208a34..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as safeContracts from "./safe-contracts"; -export * as zodiac from "./zodiac"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/GnosisSafeL2__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/GnosisSafeL2__factory.ts deleted file mode 100644 index 9ae66f1889..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/GnosisSafeL2__factory.ts +++ /dev/null @@ -1,1199 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; -import type { - GnosisSafeL2, - GnosisSafeL2Interface, -} from "../../../../@gnosis.pm/safe-contracts/contracts/GnosisSafeL2"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "AddedOwner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "approvedHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "ApproveHash", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "handler", - type: "address", - }, - ], - name: "ChangedFallbackHandler", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "ChangedGuard", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "threshold", - type: "uint256", - }, - ], - name: "ChangedThreshold", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "DisabledModule", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "EnabledModule", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "payment", - type: "uint256", - }, - ], - name: "ExecutionFailure", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "ExecutionFromModuleFailure", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "ExecutionFromModuleSuccess", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "payment", - type: "uint256", - }, - ], - name: "ExecutionSuccess", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "RemovedOwner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - indexed: false, - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "SafeModuleTransaction", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - indexed: false, - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - indexed: false, - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "gasToken", - type: "address", - }, - { - indexed: false, - internalType: "address payable", - name: "refundReceiver", - type: "address", - }, - { - indexed: false, - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - { - indexed: false, - internalType: "bytes", - name: "additionalInfo", - type: "bytes", - }, - ], - name: "SafeMultiSigTransaction", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "SafeReceived", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "initiator", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "owners", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256", - name: "threshold", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "initializer", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "fallbackHandler", - type: "address", - }, - ], - name: "SafeSetup", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "msgHash", - type: "bytes32", - }, - ], - name: "SignMsg", - type: "event", - }, - { - stateMutability: "nonpayable", - type: "fallback", - }, - { - inputs: [], - name: "VERSION", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "addOwnerWithThreshold", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "hashToApprove", - type: "bytes32", - }, - ], - name: "approveHash", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "approvedHashes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "changeThreshold", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "dataHash", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - { - internalType: "uint256", - name: "requiredSignatures", - type: "uint256", - }, - ], - name: "checkNSignatures", - outputs: [], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "dataHash", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - ], - name: "checkSignatures", - outputs: [], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevModule", - type: "address", - }, - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "disableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "domainSeparator", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "enableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address", - name: "refundReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "encodeTransactionData", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address payable", - name: "refundReceiver", - type: "address", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - ], - name: "execTransaction", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModule", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModuleReturnData", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - { - internalType: "bytes", - name: "returnData", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getChainId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "start", - type: "address", - }, - { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, - ], - name: "getModulesPaginated", - outputs: [ - { - internalType: "address[]", - name: "array", - type: "address[]", - }, - { - internalType: "address", - name: "next", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getOwners", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "offset", - type: "uint256", - }, - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "getStorageAt", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getThreshold", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address", - name: "refundReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "getTransactionHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "isModuleEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "isOwner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "nonce", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevOwner", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "removeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "requiredTxGas", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "handler", - type: "address", - }, - ], - name: "setFallbackHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "setGuard", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_owners", - type: "address[]", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "address", - name: "fallbackHandler", - type: "address", - }, - { - internalType: "address", - name: "paymentToken", - type: "address", - }, - { - internalType: "uint256", - name: "payment", - type: "uint256", - }, - { - internalType: "address payable", - name: "paymentReceiver", - type: "address", - }, - ], - name: "setup", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "signedMessages", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "targetContract", - type: "address", - }, - { - internalType: "bytes", - name: "calldataPayload", - type: "bytes", - }, - ], - name: "simulateAndRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevOwner", - type: "address", - }, - { - internalType: "address", - name: "oldOwner", - type: "address", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "swapOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b50600160048190555061631b80620000296000396000f3fe6080604052600436106101dc5760003560e01c8063affed0e011610102578063e19a9dd911610095578063f08a032311610064578063f08a0323146107de578063f698da2514610807578063f8dc5dd914610832578063ffa1ad741461085b57610231565b8063e19a9dd914610724578063e318b52b1461074d578063e75235b814610776578063e86637db146107a157610231565b8063cc2f8452116100d1578063cc2f845214610657578063d4d9bdcd14610695578063d8d11f78146106be578063e009cfde146106fb57610231565b8063affed0e01461059d578063b4faba09146105c8578063b63e800d146105f1578063c4ca3a9c1461061a57610231565b80635624b25b1161017a5780636a761202116101495780636a761202146104dc5780637d8329741461050c578063934f3a1114610549578063a0e67e2b1461057257610231565b80635624b25b146104105780635ae6bd371461044d578063610b59251461048a578063694e80c3146104b357610231565b80632f54bf6e116101b65780632f54bf6e1461032d5780633408e4701461036a578063468721a7146103955780635229073f146103d257610231565b80630d582f131461029e57806312fb68e0146102c75780632d9ad53d146102f057610231565b36610231573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d346040516102279190615825565b60405180910390a2005b34801561023d57600080fd5b5060007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061027257600080f35b36600080373360601b365260008060143601600080855af13d6000803e80610299573d6000fd5b3d6000f35b3480156102aa57600080fd5b506102c560048036038101906102c091906142c5565b610886565b005b3480156102d357600080fd5b506102ee60048036038101906102e991906147db565b610c00565b005b3480156102fc57600080fd5b5061031760048036038101906103129190614116565b611207565b604051610324919061528b565b60405180910390f35b34801561033957600080fd5b50610354600480360381019061034f9190614116565b6112d9565b604051610361919061528b565b60405180910390f35b34801561037657600080fd5b5061037f6113ab565b60405161038c9190615825565b60405180910390f35b3480156103a157600080fd5b506103bc60048036038101906103b791906145a9565b6113b8565b6040516103c9919061528b565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f491906145a9565b61140f565b6040516104079291906152a6565b60405180910390f35b34801561041c57600080fd5b50610437600480360381019061043291906148d4565b611445565b604051610444919061546a565b60405180910390f35b34801561045957600080fd5b50610474600480360381019061046f9190614723565b6114dd565b6040516104819190615825565b60405180910390f35b34801561049657600080fd5b506104b160048036038101906104ac9190614116565b6114f5565b005b3480156104bf57600080fd5b506104da60048036038101906104d591906148a7565b61180b565b005b6104f660048036038101906104f1919061438d565b6118df565b604051610503919061528b565b60405180910390f35b34801561051857600080fd5b50610533600480360381019061052e9190614229565b61197f565b6040516105409190615825565b60405180910390f35b34801561055557600080fd5b50610570600480360381019061056b9190614750565b6119a4565b005b34801561057e57600080fd5b50610587611a00565b6040516105949190615239565b60405180910390f35b3480156105a957600080fd5b506105b2611bb8565b6040516105bf9190615825565b60405180910390f35b3480156105d457600080fd5b506105ef60048036038101906105ea9190614269565b611bbe565b005b3480156105fd57600080fd5b506106186004803603810190610613919061462c565b611be0565b005b34801561062657600080fd5b50610641600480360381019061063c9190614305565b611d33565b60405161064e9190615825565b60405180910390f35b34801561066357600080fd5b5061067e600480360381019061067991906142c5565b611dff565b60405161068c92919061525b565b60405180910390f35b3480156106a157600080fd5b506106bc60048036038101906106b79190614723565b612000565b005b3480156106ca57600080fd5b506106e560048036038101906106e091906144a9565b61216c565b6040516106f291906152d6565b60405180910390f35b34801561070757600080fd5b50610722600480360381019061071d9190614143565b612199565b005b34801561073057600080fd5b5061074b60048036038101906107469190614116565b6124ae565b005b34801561075957600080fd5b50610774600480360381019061076f9190614183565b61251c565b005b34801561078257600080fd5b5061078b612a96565b6040516107989190615825565b60405180910390f35b3480156107ad57600080fd5b506107c860048036038101906107c391906144a9565b612aa0565b6040516107d5919061546a565b60405180910390f35b3480156107ea57600080fd5b5061080560048036038101906108009190614116565b612b62565b005b34801561081357600080fd5b5061081c612bad565b60405161082991906152d6565b60405180910390f35b34801561083e57600080fd5b50610859600480360381019061085491906141d6565b612c09565b005b34801561086757600080fd5b50610870612f9b565b60405161087d91906154c3565b60405180910390f35b61088e612fd4565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156108f85750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561093057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61096f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610966906155c5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3490615765565b60405180910390fd5b60026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060036000815480929190610bad90615c7a565b91905055507f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2682604051610be19190614fd0565b60405180910390a18060045414610bfc57610bfb8161180b565b5b5050565b610c1460418261304490919063ffffffff16565b82511015610c57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4e906157e5565b60405180910390fd5b6000808060008060005b868110156111fb57610c738882613089565b80945081955082965050505060008460ff161415610edd578260001c9450610ca560418861304490919063ffffffff16565b8260001c1015610cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce1906157a5565b60405180910390fd5b8751610d0360208460001c6130b890919063ffffffff16565b1115610d44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3b90615585565b60405180910390fd5b60006020838a01015190508851610d7a82610d6c60208760001c6130b890919063ffffffff16565b6130b890919063ffffffff16565b1115610dbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db2906154e5565b60405180910390fd5b60606020848b010190506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b8d846040518363ffffffff1660e01b8152600401610e2792919061548c565b60206040518083038186803b158015610e3f57600080fd5b505afa158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e77919061487a565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610ed6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecd90615525565b60405180910390fd5b50506110a6565b60018460ff161415610fbe578260001c94508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610f7a57506000600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c81526020019081526020016000205414155b610fb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb090615745565b60405180910390fd5b6110a5565b601e8460ff1611156110525760018a604051602001610fdd9190614f8f565b604051602081830303815290604052805190602001206004866110009190615a97565b85856040516000815260200160405260405161101f9493929190615425565b6020604051602081039080840390855afa158015611041573d6000803e3d6000fd5b5050506020604051035194506110a4565b60018a858585604051600081526020016040526040516110759493929190615425565b6020604051602081039080840390855afa158015611097573d6000803e3d6000fd5b5050506020604051035194505b5b5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1611801561116d5750600073ffffffffffffffffffffffffffffffffffffffff16600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156111a65750600173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b6111e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dc90615505565b60405180910390fd5b84955080806111f390615c7a565b915050610c61565b50505050505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600173ffffffffffffffffffffffffffffffffffffffff16141580156112d25750600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156113a45750600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000804690508091505090565b60007fb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e33868686866040516113f1959493929190614feb565b60405180910390a1611405858585856130e0565b9050949350505050565b6000606061141f868686866113b8565b915060405160203d0181016040523d81523d6000602083013e8091505094509492505050565b606060006020836114569190615a09565b67ffffffffffffffff81111561146f5761146e615d9d565b5b6040519080825280601f01601f1916602001820160405280156114a15781602001600182028036833780820191505090505b50905060005b838110156114d2578085015480602083026020850101525080806114ca90615c7a565b9150506114a7565b508091505092915050565b60076020528060005260406000206000915090505481565b6114fd612fd4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156115675750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d906157c5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166b90615785565b60405180910390fd5b60016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f8440816040516118009190614fd0565b60405180910390a150565b611813612fd4565b600354811115611858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184f90615565565b60405180910390fd5b600181101561189c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611893906156e5565b60405180910390fd5b806004819055507f610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c936004546040516118d49190615825565b60405180910390a150565b60006060600554336004546040516020016118fc93929190615840565b60405160208183030381529060405290507f66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed8d8d8d8d8d8d8d8d8d8d8d8c6040516119529c9b9a99989796959493929190615129565b60405180910390a161196d8d8d8d8d8d8d8d8d8d8d8d613293565b9150509b9a5050505050505050505050565b6008602052816000526040600020602052806000526040600020600091509150505481565b60006004549050600081116119ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e590615685565b60405180910390fd5b6119fa84848484610c00565b50505050565b6060600060035467ffffffffffffffff811115611a2057611a1f615d9d565b5b604051908082528060200260200182016040528015611a4e5781602001602082028036833780820191505090505b50905060008060026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611baf5780838381518110611b0057611aff615d6e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508180611ba790615c7a565b925050611ab8565b82935050505090565b60055481565b600080825160208401855af4806000523d6020523d600060403e60403d016000fd5b611c2b8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505089613654565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611c6957611c6884613a62565b5b611cb78787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613a91565b6000821115611cd157611ccf82600060018685613c66565b505b3373ffffffffffffffffffffffffffffffffffffffff167f141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a88b8b8b8b89604051611d1f9594939291906151eb565b60405180910390a250505050505050505050565b6000805a9050611d8a878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050865a613e06565b611d9357600080fd5b60005a82611da19190615a63565b905080604051602001611db49190614fb5565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df691906154c3565b60405180910390fd5b606060008267ffffffffffffffff811115611e1d57611e1c615d9d565b5b604051908082528060200260200182016040528015611e4b5781602001602082028036833780820191505090505b509150600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611f1e5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015611f2957508482105b15611ff15780848381518110611f4257611f41615d6e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508180611fe990615c7a565b925050611eb4565b80925081845250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156120cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c690615545565b60405180910390fd5b6001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16817ff2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c60405160405180910390a350565b60006121818c8c8c8c8c8c8c8c8c8c8c612aa0565b8051906020012090509b9a5050505050505050505050565b6121a1612fd4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561220b5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b61224a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612241906157c5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612317576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230e90615625565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276816040516124a29190614fd0565b60405180910390a15050565b6124b6612fd4565b60007f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b90508181557f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2826040516125109190614fd0565b60405180910390a15050565b612524612fd4565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561258e5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156125c657503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b612605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125fc906155c5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ca90615765565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561273d5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61277c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612773906155c5565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612849576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284090615805565b60405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051612a529190614fd0565b60405180910390a17f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2681604051612a899190614fd0565b60405180910390a1505050565b6000600454905090565b606060007fbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d860001b8d8d8d8d604051612ada929190614f76565b60405180910390208c8c8c8c8c8c8c604051602001612b039b9a999897969594939291906152f1565b604051602081830303815290604052805190602001209050601960f81b600160f81b612b2d612bad565b83604051602001612b419493929190614f28565b6040516020818303038152906040529150509b9a5050505050505050505050565b612b6a612fd4565b612b7381613a62565b7f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b081604051612ba29190614fd0565b60405180910390a150565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b612bdb6113ab565b30604051602001612bee939291906153ee565b60405160208183030381529060405280519060200120905090565b612c11612fd4565b806001600354612c219190615a63565b1015612c62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c5990615565565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015612ccc5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b612d0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d02906155c5565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dcf90615805565b60405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060036000815480929190612f4790615c1f565b91905055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051612f7b9190614fd0565b60405180910390a18060045414612f9657612f958161180b565b5b505050565b6040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613042576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161303990615725565b60405180910390fd5b565b6000808314156130575760009050613083565b600082846130659190615a09565b905082848261307491906159d8565b1461307e57600080fd5b809150505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b60008082846130c79190615982565b9050838110156130d657600080fd5b8091505092915050565b6000600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156131ab5750600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b6131ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131e190615705565b60405180910390fd5b6131f7858585855a613e06565b90508015613247573373ffffffffffffffffffffffffffffffffffffffff167f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb860405160405180910390a261328b565b3373ffffffffffffffffffffffffffffffffffffffff167facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd37560405160405180910390a25b949350505050565b60008060006132ad8e8e8e8e8e8e8e8e8e8e600554612aa0565b9050600560008154809291906132c290615c7a565b9190505550808051906020012091506132dc8282866119a4565b5060006132e7613e60565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461339f578073ffffffffffffffffffffffffffffffffffffffff166375f0bb528f8f8f8f8f8f8f8f8f8f8f336040518d63ffffffff1660e01b815260040161336c9c9b9a9998979695949392919061506e565b600060405180830381600087803b15801561338657600080fd5b505af115801561339a573d6000803e3d6000fd5b505050505b6101f46133da6109c48b6133b39190615982565b603f60408d6133c29190615a09565b6133cc91906159d8565b613e9190919063ffffffff16565b6133e49190615982565b5a1015613426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161341d906156c5565b60405180910390fd5b60005a90506134988f8f8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e60008d14613484578e613493565b6109c45a6134929190615a63565b5b613e06565b93506134ad5a82613eab90919063ffffffff16565b905083806134bc575060008a14155b806134c8575060008814155b613507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134fe906156a5565b60405180910390fd5b6000808911156135215761351e828b8b8b8b613c66565b90505b8415613565577f442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e84826040516135589291906153c5565b60405180910390a161359f565b7f23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d2384826040516135969291906153c5565b60405180910390a15b5050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613643578073ffffffffffffffffffffffffffffffffffffffff16639327136883856040518363ffffffff1660e01b815260040161361092919061539c565b600060405180830381600087803b15801561362a57600080fd5b505af115801561363e573d6000803e3d6000fd5b505050505b50509b9a5050505050505050505050565b600060045414613699576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613690906155a5565b60405180910390fd5b81518111156136dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136d490615565565b60405180910390fd5b6001811015613721576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613718906156e5565b60405180910390fd5b60006001905060005b83518110156139ce57600084828151811061374857613747615d6e565b5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156137bc5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156137f457503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561382c57508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61386b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613862906155c5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613939576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161393090615765565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508092505080806139c690615c7a565b91505061372a565b506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550825160038190555081600481905550505050565b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b90508181555050565b600073ffffffffffffffffffffffffffffffffffffffff1660016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613b60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b5790615665565b60405180910390fd5b6001806000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613c6257613c228260008360015a613e06565b613c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613c58906155e5565b60405180910390fd5b5b5050565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613ca35782613ca5565b325b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613d8a57613d0f3a8610613cec573a613cee565b855b613d01888a6130b890919063ffffffff16565b61304490919063ffffffff16565b91508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050613d85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d7c90615605565b60405180910390fd5b613dfc565b613daf85613da1888a6130b890919063ffffffff16565b61304490919063ffffffff16565b9150613dbc848284613ed4565b613dfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613df290615645565b60405180910390fd5b5b5095945050505050565b6000600180811115613e1b57613e1a615d3f565b5b836001811115613e2e57613e2d615d3f565b5b1415613e47576000808551602087018986f49050613e57565b600080855160208701888a87f190505b95945050505050565b6000807f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b9050805491505090565b600081831015613ea15781613ea3565b825b905092915050565b600082821115613eba57600080fd5b60008284613ec89190615a63565b90508091505092915050565b60008063a9059cbb8484604051602401613eef929190615045565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050602060008251602084016000896127105a03f13d60008114613f5f5760208114613f675760009350613f72565b819350613f72565b600051158215171593505b5050509392505050565b6000613f8f613f8a8461589c565b615877565b905082815260208101848484011115613fab57613faa615ddb565b5b613fb6848285615bdd565b509392505050565b600081359050613fcd81616262565b92915050565b600081359050613fe281616279565b92915050565b60008083601f840112613ffe57613ffd615dd1565b5b8235905067ffffffffffffffff81111561401b5761401a615dcc565b5b60208301915083602082028301111561403757614036615dd6565b5b9250929050565b60008135905061404d81616290565b92915050565b600081519050614062816162a7565b92915050565b60008083601f84011261407e5761407d615dd1565b5b8235905067ffffffffffffffff81111561409b5761409a615dcc565b5b6020830191508360018202830111156140b7576140b6615dd6565b5b9250929050565b600082601f8301126140d3576140d2615dd1565b5b81356140e3848260208601613f7c565b91505092915050565b6000813590506140fb816162be565b92915050565b600081359050614110816162ce565b92915050565b60006020828403121561412c5761412b615de5565b5b600061413a84828501613fbe565b91505092915050565b6000806040838503121561415a57614159615de5565b5b600061416885828601613fbe565b925050602061417985828601613fbe565b9150509250929050565b60008060006060848603121561419c5761419b615de5565b5b60006141aa86828701613fbe565b93505060206141bb86828701613fbe565b92505060406141cc86828701613fbe565b9150509250925092565b6000806000606084860312156141ef576141ee615de5565b5b60006141fd86828701613fbe565b935050602061420e86828701613fbe565b925050604061421f86828701614101565b9150509250925092565b600080604083850312156142405761423f615de5565b5b600061424e85828601613fbe565b925050602061425f8582860161403e565b9150509250929050565b600080604083850312156142805761427f615de5565b5b600061428e85828601613fbe565b925050602083013567ffffffffffffffff8111156142af576142ae615de0565b5b6142bb858286016140be565b9150509250929050565b600080604083850312156142dc576142db615de5565b5b60006142ea85828601613fbe565b92505060206142fb85828601614101565b9150509250929050565b60008060008060006080868803121561432157614320615de5565b5b600061432f88828901613fbe565b955050602061434088828901614101565b945050604086013567ffffffffffffffff81111561436157614360615de0565b5b61436d88828901614068565b93509350506060614380888289016140ec565b9150509295509295909350565b60008060008060008060008060008060006101408c8e0312156143b3576143b2615de5565b5b60006143c18e828f01613fbe565b9b505060206143d28e828f01614101565b9a505060408c013567ffffffffffffffff8111156143f3576143f2615de0565b5b6143ff8e828f01614068565b995099505060606144128e828f016140ec565b97505060806144238e828f01614101565b96505060a06144348e828f01614101565b95505060c06144458e828f01614101565b94505060e06144568e828f01613fbe565b9350506101006144688e828f01613fd3565b9250506101208c013567ffffffffffffffff81111561448a57614489615de0565b5b6144968e828f016140be565b9150509295989b509295989b9093969950565b60008060008060008060008060008060006101408c8e0312156144cf576144ce615de5565b5b60006144dd8e828f01613fbe565b9b505060206144ee8e828f01614101565b9a505060408c013567ffffffffffffffff81111561450f5761450e615de0565b5b61451b8e828f01614068565b9950995050606061452e8e828f016140ec565b975050608061453f8e828f01614101565b96505060a06145508e828f01614101565b95505060c06145618e828f01614101565b94505060e06145728e828f01613fbe565b9350506101006145848e828f01613fbe565b9250506101206145968e828f01614101565b9150509295989b509295989b9093969950565b600080600080608085870312156145c3576145c2615de5565b5b60006145d187828801613fbe565b94505060206145e287828801614101565b935050604085013567ffffffffffffffff81111561460357614602615de0565b5b61460f878288016140be565b9250506060614620878288016140ec565b91505092959194509250565b6000806000806000806000806000806101008b8d0312156146505761464f615de5565b5b60008b013567ffffffffffffffff81111561466e5761466d615de0565b5b61467a8d828e01613fe8565b9a509a5050602061468d8d828e01614101565b985050604061469e8d828e01613fbe565b97505060608b013567ffffffffffffffff8111156146bf576146be615de0565b5b6146cb8d828e01614068565b965096505060806146de8d828e01613fbe565b94505060a06146ef8d828e01613fbe565b93505060c06147008d828e01614101565b92505060e06147118d828e01613fd3565b9150509295989b9194979a5092959850565b60006020828403121561473957614738615de5565b5b60006147478482850161403e565b91505092915050565b60008060006060848603121561476957614768615de5565b5b60006147778682870161403e565b935050602084013567ffffffffffffffff81111561479857614797615de0565b5b6147a4868287016140be565b925050604084013567ffffffffffffffff8111156147c5576147c4615de0565b5b6147d1868287016140be565b9150509250925092565b600080600080608085870312156147f5576147f4615de5565b5b60006148038782880161403e565b945050602085013567ffffffffffffffff81111561482457614823615de0565b5b614830878288016140be565b935050604085013567ffffffffffffffff81111561485157614850615de0565b5b61485d878288016140be565b925050606061486e87828801614101565b91505092959194509250565b6000602082840312156148905761488f615de5565b5b600061489e84828501614053565b91505092915050565b6000602082840312156148bd576148bc615de5565b5b60006148cb84828501614101565b91505092915050565b600080604083850312156148eb576148ea615de5565b5b60006148f985828601614101565b925050602061490a85828601614101565b9150509250929050565b6000614920838361493b565b60208301905092915050565b61493581615add565b82525050565b61494481615acb565b82525050565b61495381615acb565b82525050565b60006149658385615922565b9350614970826158cd565b8060005b858110156149a957614986828461596b565b6149908882614914565b975061499b83615908565b925050600181019050614974565b5085925050509392505050565b60006149c1826158e7565b6149cb8185615922565b93506149d6836158d7565b8060005b83811015614a075781516149ee8882614914565b97506149f983615915565b9250506001810190506149da565b5085935050505092915050565b614a1d81615aef565b82525050565b614a34614a2f82615afb565b615cc3565b82525050565b614a4381615b27565b82525050565b614a5a614a5582615b27565b615ccd565b82525050565b6000614a6c8385615933565b9350614a79838584615bdd565b614a8283615dea565b840190509392505050565b6000614a998385615944565b9350614aa6838584615bdd565b82840190509392505050565b6000614abd826158f2565b614ac78185615933565b9350614ad7818560208601615bec565b614ae081615dea565b840191505092915050565b614af481615ba7565b82525050565b614b0381615bcb565b82525050565b6000614b14826158fd565b614b1e818561594f565b9350614b2e818560208601615bec565b614b3781615dea565b840191505092915050565b6000614b4f60058361594f565b9150614b5a82615dfb565b602082019050919050565b6000614b7260058361594f565b9150614b7d82615e24565b602082019050919050565b6000614b95601c83615960565b9150614ba082615e4d565b601c82019050919050565b6000614bb860058361594f565b9150614bc382615e76565b602082019050919050565b6000614bdb60058361594f565b9150614be682615e9f565b602082019050919050565b6000614bfe60058361594f565b9150614c0982615ec8565b602082019050919050565b6000614c2160058361594f565b9150614c2c82615ef1565b602082019050919050565b6000614c4460058361594f565b9150614c4f82615f1a565b602082019050919050565b6000614c6760058361594f565b9150614c7282615f43565b602082019050919050565b6000614c8a60058361594f565b9150614c9582615f6c565b602082019050919050565b6000614cad60058361594f565b9150614cb882615f95565b602082019050919050565b6000614cd060058361594f565b9150614cdb82615fbe565b602082019050919050565b6000614cf360058361594f565b9150614cfe82615fe7565b602082019050919050565b6000614d1660058361594f565b9150614d2182616010565b602082019050919050565b6000614d3960058361594f565b9150614d4482616039565b602082019050919050565b6000614d5c60058361594f565b9150614d6782616062565b602082019050919050565b6000614d7f60058361594f565b9150614d8a8261608b565b602082019050919050565b6000614da260058361594f565b9150614dad826160b4565b602082019050919050565b6000614dc560058361594f565b9150614dd0826160dd565b602082019050919050565b6000614de860058361594f565b9150614df382616106565b602082019050919050565b6000614e0b60058361594f565b9150614e168261612f565b602082019050919050565b6000614e2e60058361594f565b9150614e3982616158565b602082019050919050565b6000614e5160058361594f565b9150614e5c82616181565b602082019050919050565b6000614e7460058361594f565b9150614e7f826161aa565b602082019050919050565b6000614e9760058361594f565b9150614ea2826161d3565b602082019050919050565b6000614eba60058361594f565b9150614ec5826161fc565b602082019050919050565b6000614edd60058361594f565b9150614ee882616225565b602082019050919050565b614efc81615b90565b82525050565b614f13614f0e82615b90565b615cd7565b82525050565b614f2281615b9a565b82525050565b6000614f348287614a23565b600182019150614f448286614a23565b600182019150614f548285614a49565b602082019150614f648284614a49565b60208201915081905095945050505050565b6000614f83828486614a8d565b91508190509392505050565b6000614f9a82614b88565b9150614fa68284614a49565b60208201915081905092915050565b6000614fc18284614f02565b60208201915081905092915050565b6000602082019050614fe5600083018461494a565b92915050565b600060a082019050615000600083018861494a565b61500d602083018761494a565b61501a6040830186614ef3565b818103606083015261502c8185614ab2565b905061503b6080830184614afa565b9695505050505050565b600060408201905061505a600083018561494a565b6150676020830184614ef3565b9392505050565b600061016082019050615084600083018f61494a565b615091602083018e614ef3565b81810360408301526150a4818c8e614a60565b90506150b3606083018b614afa565b6150c0608083018a614ef3565b6150cd60a0830189614ef3565b6150da60c0830188614ef3565b6150e760e083018761494a565b6150f561010083018661492c565b8181036101208301526151088185614ab2565b905061511861014083018461494a565b9d9c50505050505050505050505050565b60006101608201905061513f600083018f61494a565b61514c602083018e614ef3565b818103604083015261515f818c8e614a60565b905061516e606083018b614afa565b61517b608083018a614ef3565b61518860a0830189614ef3565b61519560c0830188614ef3565b6151a260e083018761494a565b6151b061010083018661492c565b8181036101208301526151c38185614ab2565b90508181036101408301526151d88184614ab2565b90509d9c50505050505050505050505050565b60006080820190508181036000830152615206818789614959565b90506152156020830186614ef3565b615222604083018561494a565b61522f606083018461494a565b9695505050505050565b6000602082019050818103600083015261525381846149b6565b905092915050565b6000604082019050818103600083015261527581856149b6565b9050615284602083018461494a565b9392505050565b60006020820190506152a06000830184614a14565b92915050565b60006040820190506152bb6000830185614a14565b81810360208301526152cd8184614ab2565b90509392505050565b60006020820190506152eb6000830184614a3a565b92915050565b600061016082019050615307600083018e614a3a565b615314602083018d61494a565b615321604083018c614ef3565b61532e606083018b614a3a565b61533b608083018a614afa565b61534860a0830189614ef3565b61535560c0830188614ef3565b61536260e0830187614ef3565b61537061010083018661494a565b61537e61012083018561494a565b61538c610140830184614ef3565b9c9b505050505050505050505050565b60006040820190506153b16000830185614a3a565b6153be6020830184614a14565b9392505050565b60006040820190506153da6000830185614a3a565b6153e76020830184614ef3565b9392505050565b60006060820190506154036000830186614a3a565b6154106020830185614ef3565b61541d6040830184614aeb565b949350505050565b600060808201905061543a6000830187614a3a565b6154476020830186614f19565b6154546040830185614a3a565b6154616060830184614a3a565b95945050505050565b600060208201905081810360008301526154848184614ab2565b905092915050565b600060408201905081810360008301526154a68185614ab2565b905081810360208301526154ba8184614ab2565b90509392505050565b600060208201905081810360008301526154dd8184614b09565b905092915050565b600060208201905081810360008301526154fe81614b42565b9050919050565b6000602082019050818103600083015261551e81614b65565b9050919050565b6000602082019050818103600083015261553e81614bab565b9050919050565b6000602082019050818103600083015261555e81614bce565b9050919050565b6000602082019050818103600083015261557e81614bf1565b9050919050565b6000602082019050818103600083015261559e81614c14565b9050919050565b600060208201905081810360008301526155be81614c37565b9050919050565b600060208201905081810360008301526155de81614c5a565b9050919050565b600060208201905081810360008301526155fe81614c7d565b9050919050565b6000602082019050818103600083015261561e81614ca0565b9050919050565b6000602082019050818103600083015261563e81614cc3565b9050919050565b6000602082019050818103600083015261565e81614ce6565b9050919050565b6000602082019050818103600083015261567e81614d09565b9050919050565b6000602082019050818103600083015261569e81614d2c565b9050919050565b600060208201905081810360008301526156be81614d4f565b9050919050565b600060208201905081810360008301526156de81614d72565b9050919050565b600060208201905081810360008301526156fe81614d95565b9050919050565b6000602082019050818103600083015261571e81614db8565b9050919050565b6000602082019050818103600083015261573e81614ddb565b9050919050565b6000602082019050818103600083015261575e81614dfe565b9050919050565b6000602082019050818103600083015261577e81614e21565b9050919050565b6000602082019050818103600083015261579e81614e44565b9050919050565b600060208201905081810360008301526157be81614e67565b9050919050565b600060208201905081810360008301526157de81614e8a565b9050919050565b600060208201905081810360008301526157fe81614ead565b9050919050565b6000602082019050818103600083015261581e81614ed0565b9050919050565b600060208201905061583a6000830184614ef3565b92915050565b60006060820190506158556000830186614ef3565b615862602083018561494a565b61586f6040830184614ef3565b949350505050565b6000615881615892565b905061588d8282615c49565b919050565b6000604051905090565b600067ffffffffffffffff8211156158b7576158b6615d9d565b5b6158c082615dea565b9050602081019050919050565b6000819050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061597a6020840184613fbe565b905092915050565b600061598d82615b90565b915061599883615b90565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156159cd576159cc615ce1565b5b828201905092915050565b60006159e382615b90565b91506159ee83615b90565b9250826159fe576159fd615d10565b5b828204905092915050565b6000615a1482615b90565b9150615a1f83615b90565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615a5857615a57615ce1565b5b828202905092915050565b6000615a6e82615b90565b9150615a7983615b90565b925082821015615a8c57615a8b615ce1565b5b828203905092915050565b6000615aa282615b9a565b9150615aad83615b9a565b925082821015615ac057615abf615ce1565b5b828203905092915050565b6000615ad682615b70565b9050919050565b6000615ae882615b70565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050615b6b8261624e565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000615bb282615bb9565b9050919050565b6000615bc482615b70565b9050919050565b6000615bd682615b5d565b9050919050565b82818337600083830152505050565b60005b83811015615c0a578082015181840152602081019050615bef565b83811115615c19576000848401525b50505050565b6000615c2a82615b90565b91506000821415615c3e57615c3d615ce1565b5b600182039050919050565b615c5282615dea565b810181811067ffffffffffffffff82111715615c7157615c70615d9d565b5b80604052505050565b6000615c8582615b90565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615cb857615cb7615ce1565b5b600182019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4753303233000000000000000000000000000000000000000000000000000000600082015250565b7f4753303236000000000000000000000000000000000000000000000000000000600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f4753303234000000000000000000000000000000000000000000000000000000600082015250565b7f4753303330000000000000000000000000000000000000000000000000000000600082015250565b7f4753323031000000000000000000000000000000000000000000000000000000600082015250565b7f4753303232000000000000000000000000000000000000000000000000000000600082015250565b7f4753323030000000000000000000000000000000000000000000000000000000600082015250565b7f4753323033000000000000000000000000000000000000000000000000000000600082015250565b7f4753303030000000000000000000000000000000000000000000000000000000600082015250565b7f4753303131000000000000000000000000000000000000000000000000000000600082015250565b7f4753313033000000000000000000000000000000000000000000000000000000600082015250565b7f4753303132000000000000000000000000000000000000000000000000000000600082015250565b7f4753313030000000000000000000000000000000000000000000000000000000600082015250565b7f4753303031000000000000000000000000000000000000000000000000000000600082015250565b7f4753303133000000000000000000000000000000000000000000000000000000600082015250565b7f4753303130000000000000000000000000000000000000000000000000000000600082015250565b7f4753323032000000000000000000000000000000000000000000000000000000600082015250565b7f4753313034000000000000000000000000000000000000000000000000000000600082015250565b7f4753303331000000000000000000000000000000000000000000000000000000600082015250565b7f4753303235000000000000000000000000000000000000000000000000000000600082015250565b7f4753323034000000000000000000000000000000000000000000000000000000600082015250565b7f4753313032000000000000000000000000000000000000000000000000000000600082015250565b7f4753303231000000000000000000000000000000000000000000000000000000600082015250565b7f4753313031000000000000000000000000000000000000000000000000000000600082015250565b7f4753303230000000000000000000000000000000000000000000000000000000600082015250565b7f4753323035000000000000000000000000000000000000000000000000000000600082015250565b6002811061625f5761625e615d3f565b5b50565b61626b81615acb565b811461627657600080fd5b50565b61628281615add565b811461628d57600080fd5b50565b61629981615b27565b81146162a457600080fd5b50565b6162b081615b31565b81146162bb57600080fd5b50565b600281106162cb57600080fd5b50565b6162d781615b90565b81146162e257600080fd5b5056fea2646970667358221220d3badd10a9198834822163b1a6ba38f8c2633075bf3c5d349965fbfbc51ec39564736f6c63430008060033"; - -type GnosisSafeL2ConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: GnosisSafeL2ConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class GnosisSafeL2__factory extends ContractFactory { - constructor(...args: GnosisSafeL2ConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): GnosisSafeL2 { - return super.attach(address) as GnosisSafeL2; - } - override connect(signer: Signer): GnosisSafeL2__factory { - return super.connect(signer) as GnosisSafeL2__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): GnosisSafeL2Interface { - return new utils.Interface(_abi) as GnosisSafeL2Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): GnosisSafeL2 { - return new Contract(address, _abi, signerOrProvider) as GnosisSafeL2; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/GnosisSafe__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/GnosisSafe__factory.ts deleted file mode 100644 index d8837e6d57..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/GnosisSafe__factory.ts +++ /dev/null @@ -1,1094 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../common"; -import type { - GnosisSafe, - GnosisSafeInterface, -} from "../../../../@gnosis.pm/safe-contracts/contracts/GnosisSafe"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "AddedOwner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "approvedHash", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "ApproveHash", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "handler", - type: "address", - }, - ], - name: "ChangedFallbackHandler", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "ChangedGuard", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "threshold", - type: "uint256", - }, - ], - name: "ChangedThreshold", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "DisabledModule", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "EnabledModule", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "payment", - type: "uint256", - }, - ], - name: "ExecutionFailure", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "ExecutionFromModuleFailure", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "ExecutionFromModuleSuccess", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "uint256", - name: "payment", - type: "uint256", - }, - ], - name: "ExecutionSuccess", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "RemovedOwner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "SafeReceived", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "initiator", - type: "address", - }, - { - indexed: false, - internalType: "address[]", - name: "owners", - type: "address[]", - }, - { - indexed: false, - internalType: "uint256", - name: "threshold", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "initializer", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "fallbackHandler", - type: "address", - }, - ], - name: "SafeSetup", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "msgHash", - type: "bytes32", - }, - ], - name: "SignMsg", - type: "event", - }, - { - stateMutability: "nonpayable", - type: "fallback", - }, - { - inputs: [], - name: "VERSION", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "addOwnerWithThreshold", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "hashToApprove", - type: "bytes32", - }, - ], - name: "approveHash", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "approvedHashes", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "changeThreshold", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "dataHash", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - { - internalType: "uint256", - name: "requiredSignatures", - type: "uint256", - }, - ], - name: "checkNSignatures", - outputs: [], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "dataHash", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - ], - name: "checkSignatures", - outputs: [], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevModule", - type: "address", - }, - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "disableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "domainSeparator", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "enableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address", - name: "refundReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "encodeTransactionData", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address payable", - name: "refundReceiver", - type: "address", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - ], - name: "execTransaction", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModule", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModuleReturnData", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - { - internalType: "bytes", - name: "returnData", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getChainId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "start", - type: "address", - }, - { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, - ], - name: "getModulesPaginated", - outputs: [ - { - internalType: "address[]", - name: "array", - type: "address[]", - }, - { - internalType: "address", - name: "next", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getOwners", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "offset", - type: "uint256", - }, - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "getStorageAt", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getThreshold", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address", - name: "refundReceiver", - type: "address", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, - ], - name: "getTransactionHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "isModuleEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "isOwner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "nonce", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevOwner", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "removeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "requiredTxGas", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "handler", - type: "address", - }, - ], - name: "setFallbackHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "setGuard", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_owners", - type: "address[]", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "address", - name: "fallbackHandler", - type: "address", - }, - { - internalType: "address", - name: "paymentToken", - type: "address", - }, - { - internalType: "uint256", - name: "payment", - type: "uint256", - }, - { - internalType: "address payable", - name: "paymentReceiver", - type: "address", - }, - ], - name: "setup", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "signedMessages", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "targetContract", - type: "address", - }, - { - internalType: "bytes", - name: "calldataPayload", - type: "bytes", - }, - ], - name: "simulateAndRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevOwner", - type: "address", - }, - { - internalType: "address", - name: "oldOwner", - type: "address", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "swapOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - stateMutability: "payable", - type: "receive", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b5060016004819055506160d180620000296000396000f3fe6080604052600436106101dc5760003560e01c8063affed0e011610102578063e19a9dd911610095578063f08a032311610064578063f08a0323146107de578063f698da2514610807578063f8dc5dd914610832578063ffa1ad741461085b57610231565b8063e19a9dd914610724578063e318b52b1461074d578063e75235b814610776578063e86637db146107a157610231565b8063cc2f8452116100d1578063cc2f845214610657578063d4d9bdcd14610695578063d8d11f78146106be578063e009cfde146106fb57610231565b8063affed0e01461059d578063b4faba09146105c8578063b63e800d146105f1578063c4ca3a9c1461061a57610231565b80635624b25b1161017a5780636a761202116101495780636a761202146104dc5780637d8329741461050c578063934f3a1114610549578063a0e67e2b1461057257610231565b80635624b25b146104105780635ae6bd371461044d578063610b59251461048a578063694e80c3146104b357610231565b80632f54bf6e116101b65780632f54bf6e1461032d5780633408e4701461036a578063468721a7146103955780635229073f146103d257610231565b80630d582f131461029e57806312fb68e0146102c75780632d9ad53d146102f057610231565b36610231573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d346040516102279190615612565b60405180910390a2005b34801561023d57600080fd5b5060007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061027257600080f35b36600080373360601b365260008060143601600080855af13d6000803e80610299573d6000fd5b3d6000f35b3480156102aa57600080fd5b506102c560048036038101906102c091906141ce565b610886565b005b3480156102d357600080fd5b506102ee60048036038101906102e991906146e4565b610c00565b005b3480156102fc57600080fd5b506103176004803603810190610312919061401f565b611207565b6040516103249190615078565b60405180910390f35b34801561033957600080fd5b50610354600480360381019061034f919061401f565b6112d9565b6040516103619190615078565b60405180910390f35b34801561037657600080fd5b5061037f6113ab565b60405161038c9190615612565b60405180910390f35b3480156103a157600080fd5b506103bc60048036038101906103b791906144b2565b6113b8565b6040516103c99190615078565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f491906144b2565b61156b565b604051610407929190615093565b60405180910390f35b34801561041c57600080fd5b50610437600480360381019061043291906147dd565b6115a1565b6040516104449190615257565b60405180910390f35b34801561045957600080fd5b50610474600480360381019061046f919061462c565b611639565b6040516104819190615612565b60405180910390f35b34801561049657600080fd5b506104b160048036038101906104ac919061401f565b611651565b005b3480156104bf57600080fd5b506104da60048036038101906104d591906147b0565b611967565b005b6104f660048036038101906104f19190614296565b611a3b565b6040516105039190615078565b60405180910390f35b34801561051857600080fd5b50610533600480360381019061052e9190614132565b611dfc565b6040516105409190615612565b60405180910390f35b34801561055557600080fd5b50610570600480360381019061056b9190614659565b611e21565b005b34801561057e57600080fd5b50610587611e7d565b6040516105949190615026565b60405180910390f35b3480156105a957600080fd5b506105b2612035565b6040516105bf9190615612565b60405180910390f35b3480156105d457600080fd5b506105ef60048036038101906105ea9190614172565b61203b565b005b3480156105fd57600080fd5b5061061860048036038101906106139190614535565b61205d565b005b34801561062657600080fd5b50610641600480360381019061063c919061420e565b6121b0565b60405161064e9190615612565b60405180910390f35b34801561066357600080fd5b5061067e600480360381019061067991906141ce565b61227c565b60405161068c929190615048565b60405180910390f35b3480156106a157600080fd5b506106bc60048036038101906106b7919061462c565b61247d565b005b3480156106ca57600080fd5b506106e560048036038101906106e091906143b2565b6125e9565b6040516106f291906150c3565b60405180910390f35b34801561070757600080fd5b50610722600480360381019061071d919061404c565b612616565b005b34801561073057600080fd5b5061074b6004803603810190610746919061401f565b61292b565b005b34801561075957600080fd5b50610774600480360381019061076f919061408c565b612999565b005b34801561078257600080fd5b5061078b612f13565b6040516107989190615612565b60405180910390f35b3480156107ad57600080fd5b506107c860048036038101906107c391906143b2565b612f1d565b6040516107d59190615257565b60405180910390f35b3480156107ea57600080fd5b506108056004803603810190610800919061401f565b612fdf565b005b34801561081357600080fd5b5061081c61302a565b60405161082991906150c3565b60405180910390f35b34801561083e57600080fd5b50610859600480360381019061085491906140df565b613086565b005b34801561086757600080fd5b50610870613418565b60405161087d91906152b0565b60405180910390f35b61088e613451565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156108f85750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561093057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61096f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610966906153b2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3490615552565b60405180910390fd5b60026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060036000815480929190610bad90615a30565b91905055507f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2682604051610be19190614ed9565b60405180910390a18060045414610bfc57610bfb81611967565b5b5050565b610c146041826134c190919063ffffffff16565b82511015610c57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4e906155d2565b60405180910390fd5b6000808060008060005b868110156111fb57610c738882613506565b80945081955082965050505060008460ff161415610edd578260001c9450610ca56041886134c190919063ffffffff16565b8260001c1015610cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce190615592565b60405180910390fd5b8751610d0360208460001c61353590919063ffffffff16565b1115610d44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3b90615372565b60405180910390fd5b60006020838a01015190508851610d7a82610d6c60208760001c61353590919063ffffffff16565b61353590919063ffffffff16565b1115610dbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db2906152d2565b60405180910390fd5b60606020848b010190506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b8d846040518363ffffffff1660e01b8152600401610e27929190615279565b60206040518083038186803b158015610e3f57600080fd5b505afa158015610e53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e779190614783565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610ed6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecd90615312565b60405180910390fd5b50506110a6565b60018460ff161415610fbe578260001c94508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610f7a57506000600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c81526020019081526020016000205414155b610fb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb090615532565b60405180910390fd5b6110a5565b601e8460ff1611156110525760018a604051602001610fdd9190614e98565b60405160208183030381529060405280519060200120600486611000919061584d565b85856040516000815260200160405260405161101f9493929190615212565b6020604051602081039080840390855afa158015611041573d6000803e3d6000fd5b5050506020604051035194506110a4565b60018a858585604051600081526020016040526040516110759493929190615212565b6020604051602081039080840390855afa158015611097573d6000803e3d6000fd5b5050506020604051035194505b5b5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1611801561116d5750600073ffffffffffffffffffffffffffffffffffffffff16600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156111a65750600173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b6111e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dc906152f2565b60405180910390fd5b84955080806111f390615a30565b915050610c61565b50505050505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600173ffffffffffffffffffffffffffffffffffffffff16141580156112d25750600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156113a45750600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000804690508091505090565b6000600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156114835750600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b6114c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b9906154f2565b60405180910390fd5b6114cf858585855a61355d565b9050801561151f573373ffffffffffffffffffffffffffffffffffffffff167f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb860405160405180910390a2611563565b3373ffffffffffffffffffffffffffffffffffffffff167facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd37560405160405180910390a25b949350505050565b6000606061157b868686866113b8565b915060405160203d0181016040523d81523d6000602083013e8091505094509492505050565b606060006020836115b291906157bf565b67ffffffffffffffff8111156115cb576115ca615b53565b5b6040519080825280601f01601f1916602001820160405280156115fd5781602001600182028036833780820191505090505b50905060005b8381101561162e5780850154806020830260208501015250808061162690615a30565b915050611603565b508091505092915050565b60076020528060005260406000206000915090505481565b611659613451565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156116c35750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b611702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f9906155b2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c790615572565b60405180910390fd5b60016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f84408160405161195c9190614ed9565b60405180910390a150565b61196f613451565b6003548111156119b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ab90615352565b60405180910390fd5b60018110156119f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ef906154d2565b60405180910390fd5b806004819055507f610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c93600454604051611a309190615612565b60405180910390a150565b6000806000611a558e8e8e8e8e8e8e8e8e8e600554612f1d565b905060056000815480929190611a6a90615a30565b919050555080805190602001209150611a84828286611e21565b506000611a8f6135b7565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611b47578073ffffffffffffffffffffffffffffffffffffffff166375f0bb528f8f8f8f8f8f8f8f8f8f8f336040518d63ffffffff1660e01b8152600401611b149c9b9a99989796959493929190614f1d565b600060405180830381600087803b158015611b2e57600080fd5b505af1158015611b42573d6000803e3d6000fd5b505050505b6101f4611b826109c48b611b5b9190615738565b603f60408d611b6a91906157bf565b611b74919061578e565b6135e890919063ffffffff16565b611b8c9190615738565b5a1015611bce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc5906154b2565b60405180910390fd5b60005a9050611c408f8f8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e60008d14611c2c578e611c3b565b6109c45a611c3a9190615819565b5b61355d565b9350611c555a8261360290919063ffffffff16565b90508380611c64575060008a14155b80611c70575060008814155b611caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca690615492565b60405180910390fd5b600080891115611cc957611cc6828b8b8b8b61362b565b90505b8415611d0d577f442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e8482604051611d009291906151b2565b60405180910390a1611d47565b7f23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d238482604051611d3e9291906151b2565b60405180910390a15b5050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611deb578073ffffffffffffffffffffffffffffffffffffffff16639327136883856040518363ffffffff1660e01b8152600401611db8929190615189565b600060405180830381600087803b158015611dd257600080fd5b505af1158015611de6573d6000803e3d6000fd5b505050505b50509b9a5050505050505050505050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000600454905060008111611e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6290615472565b60405180910390fd5b611e7784848484610c00565b50505050565b6060600060035467ffffffffffffffff811115611e9d57611e9c615b53565b5b604051908082528060200260200182016040528015611ecb5781602001602082028036833780820191505090505b50905060008060026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461202c5780838381518110611f7d57611f7c615b24565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050818061202490615a30565b925050611f35565b82935050505090565b60055481565b600080825160208401855af4806000523d6020523d600060403e60403d016000fd5b6120a88a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050896137cb565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146120e6576120e584613bd9565b5b6121348787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613c08565b600082111561214e5761214c8260006001868561362b565b505b3373ffffffffffffffffffffffffffffffffffffffff167f141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a88b8b8b8b8960405161219c959493929190614fd8565b60405180910390a250505050505050505050565b6000805a9050612207878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050865a61355d565b61221057600080fd5b60005a8261221e9190615819565b9050806040516020016122319190614ebe565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227391906152b0565b60405180910390fd5b606060008267ffffffffffffffff81111561229a57612299615b53565b5b6040519080825280602002602001820160405280156122c85781602001602082028036833780820191505090505b509150600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561239b5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156123a657508482105b1561246e57808483815181106123bf576123be615b24565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050818061246690615a30565b925050612331565b80925081845250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561254c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254390615332565b60405180910390fd5b6001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16817ff2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c60405160405180910390a350565b60006125fe8c8c8c8c8c8c8c8c8c8c8c612f1d565b8051906020012090509b9a5050505050505050505050565b61261e613451565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156126885750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6126c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126be906155b2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612794576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278b90615412565b60405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace40542768160405161291f9190614ed9565b60405180910390a15050565b612933613451565b60007f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b90508181557f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa28260405161298d9190614ed9565b60405180910390a15050565b6129a1613451565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015612a0b5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015612a4357503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b612a82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a79906153b2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b4790615552565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015612bba5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b612bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bf0906153b2565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612cc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cbd906155f2565b60405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051612ecf9190614ed9565b60405180910390a17f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2681604051612f069190614ed9565b60405180910390a1505050565b6000600454905090565b606060007fbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d860001b8d8d8d8d604051612f57929190614e7f565b60405180910390208c8c8c8c8c8c8c604051602001612f809b9a999897969594939291906150de565b604051602081830303815290604052805190602001209050601960f81b600160f81b612faa61302a565b83604051602001612fbe9493929190614e31565b6040516020818303038152906040529150509b9a5050505050505050505050565b612fe7613451565b612ff081613bd9565b7f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b08160405161301f9190614ed9565b60405180910390a150565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b6130586113ab565b3060405160200161306b939291906151db565b60405160208183030381529060405280519060200120905090565b61308e613451565b80600160035461309e9190615819565b10156130df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130d690615352565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156131495750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b613188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161317f906153b2565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161324c906155f2565b60405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360008154809291906133c4906159d5565b91905055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf826040516133f89190614ed9565b60405180910390a180600454146134135761341281611967565b5b505050565b6040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146134bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134b690615512565b60405180910390fd5b565b6000808314156134d45760009050613500565b600082846134e291906157bf565b90508284826134f1919061578e565b146134fb57600080fd5b809150505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b60008082846135449190615738565b90508381101561355357600080fd5b8091505092915050565b600060018081111561357257613571615af5565b5b83600181111561358557613584615af5565b5b141561359e576000808551602087018986f490506135ae565b600080855160208701888a87f190505b95945050505050565b6000807f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b9050805491505090565b6000818310156135f857816135fa565b825b905092915050565b60008282111561361157600080fd5b6000828461361f9190615819565b90508091505092915050565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613668578261366a565b325b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561374f576136d43a86106136b1573a6136b3565b855b6136c6888a61353590919063ffffffff16565b6134c190919063ffffffff16565b91508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505061374a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613741906153f2565b60405180910390fd5b6137c1565b61377485613766888a61353590919063ffffffff16565b6134c190919063ffffffff16565b9150613781848284613ddd565b6137c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137b790615432565b60405180910390fd5b5b5095945050505050565b600060045414613810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161380790615392565b60405180910390fd5b8151811115613854576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161384b90615352565b60405180910390fd5b6001811015613898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161388f906154d2565b60405180910390fd5b60006001905060005b8351811015613b455760008482815181106138bf576138be615b24565b5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156139335750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561396b57503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156139a357508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6139e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016139d9906153b2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613ab0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613aa790615552565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550809250508080613b3d90615a30565b9150506138a1565b506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550825160038190555081600481905550505050565b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b90508181555050565b600073ffffffffffffffffffffffffffffffffffffffff1660016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613cd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613cce90615452565b60405180910390fd5b6001806000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613dd957613d998260008360015a61355d565b613dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613dcf906153d2565b60405180910390fd5b5b5050565b60008063a9059cbb8484604051602401613df8929190614ef4565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050602060008251602084016000896127105a03f13d60008114613e685760208114613e705760009350613e7b565b819350613e7b565b600051158215171593505b5050509392505050565b6000613e98613e9384615652565b61562d565b905082815260208101848484011115613eb457613eb3615b91565b5b613ebf848285615993565b509392505050565b600081359050613ed681616018565b92915050565b600081359050613eeb8161602f565b92915050565b60008083601f840112613f0757613f06615b87565b5b8235905067ffffffffffffffff811115613f2457613f23615b82565b5b602083019150836020820283011115613f4057613f3f615b8c565b5b9250929050565b600081359050613f5681616046565b92915050565b600081519050613f6b8161605d565b92915050565b60008083601f840112613f8757613f86615b87565b5b8235905067ffffffffffffffff811115613fa457613fa3615b82565b5b602083019150836001820283011115613fc057613fbf615b8c565b5b9250929050565b600082601f830112613fdc57613fdb615b87565b5b8135613fec848260208601613e85565b91505092915050565b60008135905061400481616074565b92915050565b60008135905061401981616084565b92915050565b60006020828403121561403557614034615b9b565b5b600061404384828501613ec7565b91505092915050565b6000806040838503121561406357614062615b9b565b5b600061407185828601613ec7565b925050602061408285828601613ec7565b9150509250929050565b6000806000606084860312156140a5576140a4615b9b565b5b60006140b386828701613ec7565b93505060206140c486828701613ec7565b92505060406140d586828701613ec7565b9150509250925092565b6000806000606084860312156140f8576140f7615b9b565b5b600061410686828701613ec7565b935050602061411786828701613ec7565b92505060406141288682870161400a565b9150509250925092565b6000806040838503121561414957614148615b9b565b5b600061415785828601613ec7565b925050602061416885828601613f47565b9150509250929050565b6000806040838503121561418957614188615b9b565b5b600061419785828601613ec7565b925050602083013567ffffffffffffffff8111156141b8576141b7615b96565b5b6141c485828601613fc7565b9150509250929050565b600080604083850312156141e5576141e4615b9b565b5b60006141f385828601613ec7565b92505060206142048582860161400a565b9150509250929050565b60008060008060006080868803121561422a57614229615b9b565b5b600061423888828901613ec7565b95505060206142498882890161400a565b945050604086013567ffffffffffffffff81111561426a57614269615b96565b5b61427688828901613f71565b9350935050606061428988828901613ff5565b9150509295509295909350565b60008060008060008060008060008060006101408c8e0312156142bc576142bb615b9b565b5b60006142ca8e828f01613ec7565b9b505060206142db8e828f0161400a565b9a505060408c013567ffffffffffffffff8111156142fc576142fb615b96565b5b6143088e828f01613f71565b9950995050606061431b8e828f01613ff5565b975050608061432c8e828f0161400a565b96505060a061433d8e828f0161400a565b95505060c061434e8e828f0161400a565b94505060e061435f8e828f01613ec7565b9350506101006143718e828f01613edc565b9250506101208c013567ffffffffffffffff81111561439357614392615b96565b5b61439f8e828f01613fc7565b9150509295989b509295989b9093969950565b60008060008060008060008060008060006101408c8e0312156143d8576143d7615b9b565b5b60006143e68e828f01613ec7565b9b505060206143f78e828f0161400a565b9a505060408c013567ffffffffffffffff81111561441857614417615b96565b5b6144248e828f01613f71565b995099505060606144378e828f01613ff5565b97505060806144488e828f0161400a565b96505060a06144598e828f0161400a565b95505060c061446a8e828f0161400a565b94505060e061447b8e828f01613ec7565b93505061010061448d8e828f01613ec7565b92505061012061449f8e828f0161400a565b9150509295989b509295989b9093969950565b600080600080608085870312156144cc576144cb615b9b565b5b60006144da87828801613ec7565b94505060206144eb8782880161400a565b935050604085013567ffffffffffffffff81111561450c5761450b615b96565b5b61451887828801613fc7565b925050606061452987828801613ff5565b91505092959194509250565b6000806000806000806000806000806101008b8d03121561455957614558615b9b565b5b60008b013567ffffffffffffffff81111561457757614576615b96565b5b6145838d828e01613ef1565b9a509a505060206145968d828e0161400a565b98505060406145a78d828e01613ec7565b97505060608b013567ffffffffffffffff8111156145c8576145c7615b96565b5b6145d48d828e01613f71565b965096505060806145e78d828e01613ec7565b94505060a06145f88d828e01613ec7565b93505060c06146098d828e0161400a565b92505060e061461a8d828e01613edc565b9150509295989b9194979a5092959850565b60006020828403121561464257614641615b9b565b5b600061465084828501613f47565b91505092915050565b60008060006060848603121561467257614671615b9b565b5b600061468086828701613f47565b935050602084013567ffffffffffffffff8111156146a1576146a0615b96565b5b6146ad86828701613fc7565b925050604084013567ffffffffffffffff8111156146ce576146cd615b96565b5b6146da86828701613fc7565b9150509250925092565b600080600080608085870312156146fe576146fd615b9b565b5b600061470c87828801613f47565b945050602085013567ffffffffffffffff81111561472d5761472c615b96565b5b61473987828801613fc7565b935050604085013567ffffffffffffffff81111561475a57614759615b96565b5b61476687828801613fc7565b92505060606147778782880161400a565b91505092959194509250565b60006020828403121561479957614798615b9b565b5b60006147a784828501613f5c565b91505092915050565b6000602082840312156147c6576147c5615b9b565b5b60006147d48482850161400a565b91505092915050565b600080604083850312156147f4576147f3615b9b565b5b60006148028582860161400a565b92505060206148138582860161400a565b9150509250929050565b60006148298383614844565b60208301905092915050565b61483e81615893565b82525050565b61484d81615881565b82525050565b61485c81615881565b82525050565b600061486e83856156d8565b935061487982615683565b8060005b858110156148b25761488f8284615721565b614899888261481d565b97506148a4836156be565b92505060018101905061487d565b5085925050509392505050565b60006148ca8261569d565b6148d481856156d8565b93506148df8361568d565b8060005b838110156149105781516148f7888261481d565b9750614902836156cb565b9250506001810190506148e3565b5085935050505092915050565b614926816158a5565b82525050565b61493d614938826158b1565b615a79565b82525050565b61494c816158dd565b82525050565b61496361495e826158dd565b615a83565b82525050565b600061497583856156e9565b9350614982838584615993565b61498b83615ba0565b840190509392505050565b60006149a283856156fa565b93506149af838584615993565b82840190509392505050565b60006149c6826156a8565b6149d081856156e9565b93506149e08185602086016159a2565b6149e981615ba0565b840191505092915050565b6149fd8161595d565b82525050565b614a0c81615981565b82525050565b6000614a1d826156b3565b614a278185615705565b9350614a378185602086016159a2565b614a4081615ba0565b840191505092915050565b6000614a58600583615705565b9150614a6382615bb1565b602082019050919050565b6000614a7b600583615705565b9150614a8682615bda565b602082019050919050565b6000614a9e601c83615716565b9150614aa982615c03565b601c82019050919050565b6000614ac1600583615705565b9150614acc82615c2c565b602082019050919050565b6000614ae4600583615705565b9150614aef82615c55565b602082019050919050565b6000614b07600583615705565b9150614b1282615c7e565b602082019050919050565b6000614b2a600583615705565b9150614b3582615ca7565b602082019050919050565b6000614b4d600583615705565b9150614b5882615cd0565b602082019050919050565b6000614b70600583615705565b9150614b7b82615cf9565b602082019050919050565b6000614b93600583615705565b9150614b9e82615d22565b602082019050919050565b6000614bb6600583615705565b9150614bc182615d4b565b602082019050919050565b6000614bd9600583615705565b9150614be482615d74565b602082019050919050565b6000614bfc600583615705565b9150614c0782615d9d565b602082019050919050565b6000614c1f600583615705565b9150614c2a82615dc6565b602082019050919050565b6000614c42600583615705565b9150614c4d82615def565b602082019050919050565b6000614c65600583615705565b9150614c7082615e18565b602082019050919050565b6000614c88600583615705565b9150614c9382615e41565b602082019050919050565b6000614cab600583615705565b9150614cb682615e6a565b602082019050919050565b6000614cce600583615705565b9150614cd982615e93565b602082019050919050565b6000614cf1600583615705565b9150614cfc82615ebc565b602082019050919050565b6000614d14600583615705565b9150614d1f82615ee5565b602082019050919050565b6000614d37600583615705565b9150614d4282615f0e565b602082019050919050565b6000614d5a600583615705565b9150614d6582615f37565b602082019050919050565b6000614d7d600583615705565b9150614d8882615f60565b602082019050919050565b6000614da0600583615705565b9150614dab82615f89565b602082019050919050565b6000614dc3600583615705565b9150614dce82615fb2565b602082019050919050565b6000614de6600583615705565b9150614df182615fdb565b602082019050919050565b614e0581615946565b82525050565b614e1c614e1782615946565b615a8d565b82525050565b614e2b81615950565b82525050565b6000614e3d828761492c565b600182019150614e4d828661492c565b600182019150614e5d8285614952565b602082019150614e6d8284614952565b60208201915081905095945050505050565b6000614e8c828486614996565b91508190509392505050565b6000614ea382614a91565b9150614eaf8284614952565b60208201915081905092915050565b6000614eca8284614e0b565b60208201915081905092915050565b6000602082019050614eee6000830184614853565b92915050565b6000604082019050614f096000830185614853565b614f166020830184614dfc565b9392505050565b600061016082019050614f33600083018f614853565b614f40602083018e614dfc565b8181036040830152614f53818c8e614969565b9050614f62606083018b614a03565b614f6f608083018a614dfc565b614f7c60a0830189614dfc565b614f8960c0830188614dfc565b614f9660e0830187614853565b614fa4610100830186614835565b818103610120830152614fb781856149bb565b9050614fc7610140830184614853565b9d9c50505050505050505050505050565b60006080820190508181036000830152614ff3818789614862565b90506150026020830186614dfc565b61500f6040830185614853565b61501c6060830184614853565b9695505050505050565b6000602082019050818103600083015261504081846148bf565b905092915050565b6000604082019050818103600083015261506281856148bf565b90506150716020830184614853565b9392505050565b600060208201905061508d600083018461491d565b92915050565b60006040820190506150a8600083018561491d565b81810360208301526150ba81846149bb565b90509392505050565b60006020820190506150d86000830184614943565b92915050565b6000610160820190506150f4600083018e614943565b615101602083018d614853565b61510e604083018c614dfc565b61511b606083018b614943565b615128608083018a614a03565b61513560a0830189614dfc565b61514260c0830188614dfc565b61514f60e0830187614dfc565b61515d610100830186614853565b61516b610120830185614853565b615179610140830184614dfc565b9c9b505050505050505050505050565b600060408201905061519e6000830185614943565b6151ab602083018461491d565b9392505050565b60006040820190506151c76000830185614943565b6151d46020830184614dfc565b9392505050565b60006060820190506151f06000830186614943565b6151fd6020830185614dfc565b61520a60408301846149f4565b949350505050565b60006080820190506152276000830187614943565b6152346020830186614e22565b6152416040830185614943565b61524e6060830184614943565b95945050505050565b6000602082019050818103600083015261527181846149bb565b905092915050565b6000604082019050818103600083015261529381856149bb565b905081810360208301526152a781846149bb565b90509392505050565b600060208201905081810360008301526152ca8184614a12565b905092915050565b600060208201905081810360008301526152eb81614a4b565b9050919050565b6000602082019050818103600083015261530b81614a6e565b9050919050565b6000602082019050818103600083015261532b81614ab4565b9050919050565b6000602082019050818103600083015261534b81614ad7565b9050919050565b6000602082019050818103600083015261536b81614afa565b9050919050565b6000602082019050818103600083015261538b81614b1d565b9050919050565b600060208201905081810360008301526153ab81614b40565b9050919050565b600060208201905081810360008301526153cb81614b63565b9050919050565b600060208201905081810360008301526153eb81614b86565b9050919050565b6000602082019050818103600083015261540b81614ba9565b9050919050565b6000602082019050818103600083015261542b81614bcc565b9050919050565b6000602082019050818103600083015261544b81614bef565b9050919050565b6000602082019050818103600083015261546b81614c12565b9050919050565b6000602082019050818103600083015261548b81614c35565b9050919050565b600060208201905081810360008301526154ab81614c58565b9050919050565b600060208201905081810360008301526154cb81614c7b565b9050919050565b600060208201905081810360008301526154eb81614c9e565b9050919050565b6000602082019050818103600083015261550b81614cc1565b9050919050565b6000602082019050818103600083015261552b81614ce4565b9050919050565b6000602082019050818103600083015261554b81614d07565b9050919050565b6000602082019050818103600083015261556b81614d2a565b9050919050565b6000602082019050818103600083015261558b81614d4d565b9050919050565b600060208201905081810360008301526155ab81614d70565b9050919050565b600060208201905081810360008301526155cb81614d93565b9050919050565b600060208201905081810360008301526155eb81614db6565b9050919050565b6000602082019050818103600083015261560b81614dd9565b9050919050565b60006020820190506156276000830184614dfc565b92915050565b6000615637615648565b905061564382826159ff565b919050565b6000604051905090565b600067ffffffffffffffff82111561566d5761566c615b53565b5b61567682615ba0565b9050602081019050919050565b6000819050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006157306020840184613ec7565b905092915050565b600061574382615946565b915061574e83615946565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561578357615782615a97565b5b828201905092915050565b600061579982615946565b91506157a483615946565b9250826157b4576157b3615ac6565b5b828204905092915050565b60006157ca82615946565b91506157d583615946565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561580e5761580d615a97565b5b828202905092915050565b600061582482615946565b915061582f83615946565b92508282101561584257615841615a97565b5b828203905092915050565b600061585882615950565b915061586383615950565b92508282101561587657615875615a97565b5b828203905092915050565b600061588c82615926565b9050919050565b600061589e82615926565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600081905061592182616004565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006159688261596f565b9050919050565b600061597a82615926565b9050919050565b600061598c82615913565b9050919050565b82818337600083830152505050565b60005b838110156159c05780820151818401526020810190506159a5565b838111156159cf576000848401525b50505050565b60006159e082615946565b915060008214156159f4576159f3615a97565b5b600182039050919050565b615a0882615ba0565b810181811067ffffffffffffffff82111715615a2757615a26615b53565b5b80604052505050565b6000615a3b82615946565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615a6e57615a6d615a97565b5b600182019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4753303233000000000000000000000000000000000000000000000000000000600082015250565b7f4753303236000000000000000000000000000000000000000000000000000000600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f4753303234000000000000000000000000000000000000000000000000000000600082015250565b7f4753303330000000000000000000000000000000000000000000000000000000600082015250565b7f4753323031000000000000000000000000000000000000000000000000000000600082015250565b7f4753303232000000000000000000000000000000000000000000000000000000600082015250565b7f4753323030000000000000000000000000000000000000000000000000000000600082015250565b7f4753323033000000000000000000000000000000000000000000000000000000600082015250565b7f4753303030000000000000000000000000000000000000000000000000000000600082015250565b7f4753303131000000000000000000000000000000000000000000000000000000600082015250565b7f4753313033000000000000000000000000000000000000000000000000000000600082015250565b7f4753303132000000000000000000000000000000000000000000000000000000600082015250565b7f4753313030000000000000000000000000000000000000000000000000000000600082015250565b7f4753303031000000000000000000000000000000000000000000000000000000600082015250565b7f4753303133000000000000000000000000000000000000000000000000000000600082015250565b7f4753303130000000000000000000000000000000000000000000000000000000600082015250565b7f4753323032000000000000000000000000000000000000000000000000000000600082015250565b7f4753313034000000000000000000000000000000000000000000000000000000600082015250565b7f4753303331000000000000000000000000000000000000000000000000000000600082015250565b7f4753303235000000000000000000000000000000000000000000000000000000600082015250565b7f4753323034000000000000000000000000000000000000000000000000000000600082015250565b7f4753313032000000000000000000000000000000000000000000000000000000600082015250565b7f4753303231000000000000000000000000000000000000000000000000000000600082015250565b7f4753313031000000000000000000000000000000000000000000000000000000600082015250565b7f4753303230000000000000000000000000000000000000000000000000000000600082015250565b7f4753323035000000000000000000000000000000000000000000000000000000600082015250565b6002811061601557616014615af5565b5b50565b61602181615881565b811461602c57600080fd5b50565b61603881615893565b811461604357600080fd5b50565b61604f816158dd565b811461605a57600080fd5b50565b616066816158e7565b811461607157600080fd5b50565b6002811061608157600080fd5b50565b61608d81615946565b811461609857600080fd5b5056fea2646970667358221220633874c875167e39187d16d15adce987379e0abad2bae4ade06dae436263cf7e64736f6c63430008060033"; - -type GnosisSafeConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: GnosisSafeConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class GnosisSafe__factory extends ContractFactory { - constructor(...args: GnosisSafeConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): GnosisSafe { - return super.attach(address) as GnosisSafe; - } - override connect(signer: Signer): GnosisSafe__factory { - return super.connect(signer) as GnosisSafe__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): GnosisSafeInterface { - return new utils.Interface(_abi) as GnosisSafeInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): GnosisSafe { - return new Contract(address, _abi, signerOrProvider) as GnosisSafe; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/FallbackManager__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/FallbackManager__factory.ts deleted file mode 100644 index 85f1d26705..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/FallbackManager__factory.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - FallbackManager, - FallbackManagerInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/base/FallbackManager"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "handler", - type: "address", - }, - ], - name: "ChangedFallbackHandler", - type: "event", - }, - { - stateMutability: "nonpayable", - type: "fallback", - }, - { - inputs: [ - { - internalType: "address", - name: "handler", - type: "address", - }, - ], - name: "setFallbackHandler", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b50610303806100206000396000f3fe608060405234801561001057600080fd5b506004361061002f5760003560e01c8063f08a03231461009057610030565b5b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061006457600080f35b36600080373360601b365260008060143601600080855af13d6000803e8061008b573d6000fd5b3d6000f35b6100aa60048036038101906100a591906101ab565b6100ac565b005b6100b46100f7565b6100bd81610167565b7f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b0816040516100ec919061020a565b60405180910390a150565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015c90610225565b60405180910390fd5b565b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b90508181555050565b6000813590506101a5816102b6565b92915050565b6000602082840312156101c1576101c0610288565b5b60006101cf84828501610196565b91505092915050565b6101e181610256565b82525050565b60006101f4600583610245565b91506101ff8261028d565b602082019050919050565b600060208201905061021f60008301846101d8565b92915050565b6000602082019050818103600083015261023e816101e7565b9050919050565b600082825260208201905092915050565b600061026182610268565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f4753303331000000000000000000000000000000000000000000000000000000600082015250565b6102bf81610256565b81146102ca57600080fd5b5056fea2646970667358221220acce74a7277c06c05be0458e5b73e7429d361786ceff17e3542a9059e5cdb03d64736f6c63430008060033"; - -type FallbackManagerConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: FallbackManagerConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class FallbackManager__factory extends ContractFactory { - constructor(...args: FallbackManagerConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): FallbackManager { - return super.attach(address) as FallbackManager; - } - override connect(signer: Signer): FallbackManager__factory { - return super.connect(signer) as FallbackManager__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): FallbackManagerInterface { - return new utils.Interface(_abi) as FallbackManagerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): FallbackManager { - return new Contract(address, _abi, signerOrProvider) as FallbackManager; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager__factory.ts deleted file mode 100644 index 9f40c75acc..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager__factory.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../../common"; -import type { - GuardManager, - GuardManagerInterface, -} from "../../../../../../@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/GuardManager"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "ChangedGuard", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "setGuard", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b50610297806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e19a9dd914610030575b600080fd5b61004a6004803603810190610045919061013f565b61004c565b005b6100546100ba565b60007f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b90508181557f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2826040516100ae919061019e565b60405180910390a15050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610128576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011f906101b9565b60405180910390fd5b565b6000813590506101398161024a565b92915050565b6000602082840312156101555761015461021c565b5b60006101638482850161012a565b91505092915050565b610175816101ea565b82525050565b60006101886005836101d9565b915061019382610221565b602082019050919050565b60006020820190506101b3600083018461016c565b92915050565b600060208201905081810360008301526101d28161017b565b9050919050565b600082825260208201905092915050565b60006101f5826101fc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f4753303331000000000000000000000000000000000000000000000000000000600082015250565b610253816101ea565b811461025e57600080fd5b5056fea264697066735822122036882f183534afb9e4b55421bb6bd751f7f43e643b078a857bd45fadf70bd94064736f6c63430008060033"; - -type GuardManagerConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: GuardManagerConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class GuardManager__factory extends ContractFactory { - constructor(...args: GuardManagerConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): GuardManager { - return super.attach(address) as GuardManager; - } - override connect(signer: Signer): GuardManager__factory { - return super.connect(signer) as GuardManager__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): GuardManagerInterface { - return new utils.Interface(_abi) as GuardManagerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): GuardManager { - return new Contract(address, _abi, signerOrProvider) as GuardManager; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard__factory.ts deleted file mode 100644 index 957f14d2b3..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard__factory.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - Guard, - GuardInterface, -} from "../../../../../../@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/Guard"; - -const _abi = [ - { - inputs: [ - { - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - name: "checkAfterExecution", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address payable", - name: "refundReceiver", - type: "address", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - { - internalType: "address", - name: "msgSender", - type: "address", - }, - ], - name: "checkTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class Guard__factory { - static readonly abi = _abi; - static createInterface(): GuardInterface { - return new utils.Interface(_abi) as GuardInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): Guard { - return new Contract(address, _abi, signerOrProvider) as Guard; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/index.ts deleted file mode 100644 index 3b256fbd76..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/GuardManager.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { Guard__factory } from "./Guard__factory"; -export { GuardManager__factory } from "./GuardManager__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/ModuleManager__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/ModuleManager__factory.ts deleted file mode 100644 index 0c0cf21052..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/ModuleManager__factory.ts +++ /dev/null @@ -1,267 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - ModuleManager, - ModuleManagerInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/base/ModuleManager"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "DisabledModule", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "EnabledModule", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "ExecutionFromModuleFailure", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "ExecutionFromModuleSuccess", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "prevModule", - type: "address", - }, - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "disableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "enableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModule", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModuleReturnData", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - { - internalType: "bytes", - name: "returnData", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "start", - type: "address", - }, - { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, - ], - name: "getModulesPaginated", - outputs: [ - { - internalType: "address[]", - name: "array", - type: "address[]", - }, - { - internalType: "address", - name: "next", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "isModuleEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b50611588806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80632d9ad53d14610067578063468721a7146100975780635229073f146100c7578063610b5925146100f8578063cc2f845214610114578063e009cfde14610145575b600080fd5b610081600480360381019061007c9190610db5565b610161565b60405161008e91906110bb565b60405180910390f35b6100b160048036038101906100ac9190610e62565b610232565b6040516100be91906110bb565b60405180910390f35b6100e160048036038101906100dc9190610e62565b6103e4565b6040516100ef9291906110d6565b60405180910390f35b610112600480360381019061010d9190610db5565b61041a565b005b61012e60048036038101906101299190610e22565b61072c565b60405161013c92919061108b565b60405180910390f35b61015f600480360381019061015a9190610de2565b61092b565b005b60008173ffffffffffffffffffffffffffffffffffffffff16600173ffffffffffffffffffffffffffffffffffffffff161415801561022b5750600073ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156102fc5750600073ffffffffffffffffffffffffffffffffffffffff166000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b61033b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161033290611126565b60405180910390fd5b610348858585855a610c3c565b90508015610398573373ffffffffffffffffffffffffffffffffffffffff167f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb860405160405180910390a26103dc565b3373ffffffffffffffffffffffffffffffffffffffff167facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd37560405160405180910390a25b949350505050565b600060606103f486868686610232565b915060405160203d0181016040523d81523d6000602083013e8091505094509492505050565b610422610c96565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561048c5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6104cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c290611186565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058f90611166565b60405180910390fd5b600080600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600080600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f8440816040516107219190611070565b60405180910390a150565b606060008267ffffffffffffffff81111561074a576107496113f3565b5b6040519080825280602002602001820160405280156107785781602001602082028036833780820191505090505b5091506000808060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561084a5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561085557508482105b1561091c578084838151811061086e5761086d6113c4565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081806109149061131d565b9250506107e0565b80925081845250509250929050565b610933610c96565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561099d5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d390611186565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610aa8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9f90611106565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace405427681604051610c309190611070565b60405180910390a15050565b6000600180811115610c5157610c50611395565b5b836001811115610c6457610c63611395565b5b1415610c7d576000808551602087018986f49050610c8d565b600080855160208701888a87f190505b95945050505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfb90611146565b60405180910390fd5b565b6000610d19610d14846111cb565b6111a6565b905082815260208101848484011115610d3557610d34611427565b5b610d408482856112aa565b509392505050565b600081359050610d5781611514565b92915050565b600082601f830112610d7257610d71611422565b5b8135610d82848260208601610d06565b91505092915050565b600081359050610d9a8161152b565b92915050565b600081359050610daf8161153b565b92915050565b600060208284031215610dcb57610dca611431565b5b6000610dd984828501610d48565b91505092915050565b60008060408385031215610df957610df8611431565b5b6000610e0785828601610d48565b9250506020610e1885828601610d48565b9150509250929050565b60008060408385031215610e3957610e38611431565b5b6000610e4785828601610d48565b9250506020610e5885828601610da0565b9150509250929050565b60008060008060808587031215610e7c57610e7b611431565b5b6000610e8a87828801610d48565b9450506020610e9b87828801610da0565b935050604085013567ffffffffffffffff811115610ebc57610ebb61142c565b5b610ec887828801610d5d565b9250506060610ed987828801610d8b565b91505092959194509250565b6000610ef18383610efd565b60208301905092915050565b610f0681611262565b82525050565b610f1581611262565b82525050565b6000610f268261120c565b610f30818561122f565b9350610f3b836111fc565b8060005b83811015610f6c578151610f538882610ee5565b9750610f5e83611222565b925050600181019050610f3f565b5085935050505092915050565b610f8281611274565b82525050565b6000610f9382611217565b610f9d8185611240565b9350610fad8185602086016112b9565b610fb681611436565b840191505092915050565b6000610fce600583611251565b9150610fd982611447565b602082019050919050565b6000610ff1600583611251565b9150610ffc82611470565b602082019050919050565b6000611014600583611251565b915061101f82611499565b602082019050919050565b6000611037600583611251565b9150611042826114c2565b602082019050919050565b600061105a600583611251565b9150611065826114eb565b602082019050919050565b60006020820190506110856000830184610f0c565b92915050565b600060408201905081810360008301526110a58185610f1b565b90506110b46020830184610f0c565b9392505050565b60006020820190506110d06000830184610f79565b92915050565b60006040820190506110eb6000830185610f79565b81810360208301526110fd8184610f88565b90509392505050565b6000602082019050818103600083015261111f81610fc1565b9050919050565b6000602082019050818103600083015261113f81610fe4565b9050919050565b6000602082019050818103600083015261115f81611007565b9050919050565b6000602082019050818103600083015261117f8161102a565b9050919050565b6000602082019050818103600083015261119f8161104d565b9050919050565b60006111b06111c1565b90506111bc82826112ec565b919050565b6000604051905090565b600067ffffffffffffffff8211156111e6576111e56113f3565b5b6111ef82611436565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600061126d82611280565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156112d75780820151818401526020810190506112bc565b838111156112e6576000848401525b50505050565b6112f582611436565b810181811067ffffffffffffffff82111715611314576113136113f3565b5b80604052505050565b6000611328826112a0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561135b5761135a611366565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4753313033000000000000000000000000000000000000000000000000000000600082015250565b7f4753313034000000000000000000000000000000000000000000000000000000600082015250565b7f4753303331000000000000000000000000000000000000000000000000000000600082015250565b7f4753313032000000000000000000000000000000000000000000000000000000600082015250565b7f4753313031000000000000000000000000000000000000000000000000000000600082015250565b61151d81611262565b811461152857600080fd5b50565b6002811061153857600080fd5b50565b611544816112a0565b811461154f57600080fd5b5056fea26469706673582212206c856797e0231443cfad56fc27b9c42c92c3f0331574afa19316ee7533063a4f64736f6c63430008060033"; - -type ModuleManagerConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ModuleManagerConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ModuleManager__factory extends ContractFactory { - constructor(...args: ModuleManagerConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): ModuleManager { - return super.attach(address) as ModuleManager; - } - override connect(signer: Signer): ModuleManager__factory { - return super.connect(signer) as ModuleManager__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ModuleManagerInterface { - return new utils.Interface(_abi) as ModuleManagerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ModuleManager { - return new Contract(address, _abi, signerOrProvider) as ModuleManager; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/OwnerManager__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/OwnerManager__factory.ts deleted file mode 100644 index 783a1165e6..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/OwnerManager__factory.ts +++ /dev/null @@ -1,224 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - OwnerManager, - OwnerManagerInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/base/OwnerManager"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "AddedOwner", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "threshold", - type: "uint256", - }, - ], - name: "ChangedThreshold", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "RemovedOwner", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "addOwnerWithThreshold", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "changeThreshold", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getOwners", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getThreshold", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "isOwner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevOwner", - type: "address", - }, - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "_threshold", - type: "uint256", - }, - ], - name: "removeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "prevOwner", - type: "address", - }, - { - internalType: "address", - name: "oldOwner", - type: "address", - }, - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "swapOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b506118f0806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063a0e67e2b1161005b578063a0e67e2b146100ea578063e318b52b14610108578063e75235b814610124578063f8dc5dd9146101425761007d565b80630d582f13146100825780632f54bf6e1461009e578063694e80c3146100ce575b600080fd5b61009c600480360381019061009791906112a7565b61015e565b005b6100b860048036038101906100b391906111d4565b6104d4565b6040516100c591906114d5565b60405180910390f35b6100e860048036038101906100e391906112e7565b6105a5565b005b6100f2610679565b6040516100ff91906114b3565b60405180910390f35b610122600480360381019061011d9190611201565b61082f565b005b61012c610da3565b60405161013991906115b0565b60405180910390f35b61015c60048036038101906101579190611254565b610dad565b005b61016661113a565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156101d05750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561020857503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b610247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023e90611510565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030b90611570565b60405180910390fd5b600080600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600080600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000815480929190610481906116bb565b91905055507f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea26826040516104b59190611498565b60405180910390a180600254146104d0576104cf816105a5565b5b5050565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561059e5750600073ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6105ad61113a565b6001548111156105f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e9906114f0565b60405180910390fd5b6001811015610636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062d90611530565b60405180910390fd5b806002819055507f610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c9360025460405161066e91906115b0565b60405180910390a150565b6060600060015467ffffffffffffffff81111561069957610698611762565b5b6040519080825280602002602001820160405280156106c75781602001602082028036833780820191505090505b509050600080806000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610826578083838151811061077857610777611733565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050818061081e906116bb565b925050610730565b82935050505090565b61083761113a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156108a15750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156108d957503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b610918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090f90611510565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dc90611570565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015610a4f5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b610a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8590611510565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5190611590565b60405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051610d5f9190611498565b60405180910390a17f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2681604051610d969190611498565b60405180910390a1505050565b6000600254905090565b610db561113a565b8060018054610dc49190611615565b1015610e05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfc906114f0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015610e6f5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b610eae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea590611510565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7190611590565b60405180910390fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160008154809291906110e690611691565b91905055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf8260405161111a9190611498565b60405180910390a1806002541461113557611134816105a5565b5b505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119f90611550565b60405180910390fd5b565b6000813590506111b98161188c565b92915050565b6000813590506111ce816118a3565b92915050565b6000602082840312156111ea576111e9611791565b5b60006111f8848285016111aa565b91505092915050565b60008060006060848603121561121a57611219611791565b5b6000611228868287016111aa565b9350506020611239868287016111aa565b925050604061124a868287016111aa565b9150509250925092565b60008060006060848603121561126d5761126c611791565b5b600061127b868287016111aa565b935050602061128c868287016111aa565b925050604061129d868287016111bf565b9150509250925092565b600080604083850312156112be576112bd611791565b5b60006112cc858286016111aa565b92505060206112dd858286016111bf565b9150509250929050565b6000602082840312156112fd576112fc611791565b5b600061130b848285016111bf565b91505092915050565b6000611320838361132c565b60208301905092915050565b61133581611649565b82525050565b61134481611649565b82525050565b6000611355826115db565b61135f81856115f3565b935061136a836115cb565b8060005b8381101561139b5781516113828882611314565b975061138d836115e6565b92505060018101905061136e565b5085935050505092915050565b6113b18161165b565b82525050565b60006113c4600583611604565b91506113cf82611796565b602082019050919050565b60006113e7600583611604565b91506113f2826117bf565b602082019050919050565b600061140a600583611604565b9150611415826117e8565b602082019050919050565b600061142d600583611604565b915061143882611811565b602082019050919050565b6000611450600583611604565b915061145b8261183a565b602082019050919050565b6000611473600583611604565b915061147e82611863565b602082019050919050565b61149281611687565b82525050565b60006020820190506114ad600083018461133b565b92915050565b600060208201905081810360008301526114cd818461134a565b905092915050565b60006020820190506114ea60008301846113a8565b92915050565b60006020820190508181036000830152611509816113b7565b9050919050565b60006020820190508181036000830152611529816113da565b9050919050565b60006020820190508181036000830152611549816113fd565b9050919050565b6000602082019050818103600083015261156981611420565b9050919050565b6000602082019050818103600083015261158981611443565b9050919050565b600060208201905081810360008301526115a981611466565b9050919050565b60006020820190506115c56000830184611489565b92915050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061162082611687565b915061162b83611687565b92508282101561163e5761163d611704565b5b828203905092915050565b600061165482611667565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061169c82611687565b915060008214156116b0576116af611704565b5b600182039050919050565b60006116c682611687565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156116f9576116f8611704565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b7f4753323031000000000000000000000000000000000000000000000000000000600082015250565b7f4753323033000000000000000000000000000000000000000000000000000000600082015250565b7f4753323032000000000000000000000000000000000000000000000000000000600082015250565b7f4753303331000000000000000000000000000000000000000000000000000000600082015250565b7f4753323034000000000000000000000000000000000000000000000000000000600082015250565b7f4753323035000000000000000000000000000000000000000000000000000000600082015250565b61189581611649565b81146118a057600080fd5b50565b6118ac81611687565b81146118b757600080fd5b5056fea2646970667358221220b742c29301c34459e56eef13d3b06b81ee5a380ac65e4f68dd195db0bb61c07464736f6c63430008060033"; - -type OwnerManagerConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: OwnerManagerConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class OwnerManager__factory extends ContractFactory { - constructor(...args: OwnerManagerConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): OwnerManager { - return super.attach(address) as OwnerManager; - } - override connect(signer: Signer): OwnerManager__factory { - return super.connect(signer) as OwnerManager__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): OwnerManagerInterface { - return new utils.Interface(_abi) as OwnerManagerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): OwnerManager { - return new Contract(address, _abi, signerOrProvider) as OwnerManager; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/index.ts deleted file mode 100644 index fe9144d755..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/base/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as guardManagerSol from "./GuardManager.sol"; -export { FallbackManager__factory } from "./FallbackManager__factory"; -export { ModuleManager__factory } from "./ModuleManager__factory"; -export { OwnerManager__factory } from "./OwnerManager__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback__factory.ts deleted file mode 100644 index d98f3b9d6b..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback__factory.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - EtherPaymentFallback, - EtherPaymentFallbackInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/common/EtherPaymentFallback"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "SafeReceived", - type: "event", - }, - { - stateMutability: "payable", - type: "receive", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b5060c18061001f6000396000f3fe6080604052366056573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d34604051604c91906068565b60405180910390a2005b600080fd5b6062816081565b82525050565b6000602082019050607b6000830184605b565b92915050565b600081905091905056fea2646970667358221220d5dbadbb79ff4748482c8538eefc841055c5bbbed4462c6c75a9e4b2a299f52564736f6c63430008060033"; - -type EtherPaymentFallbackConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: EtherPaymentFallbackConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class EtherPaymentFallback__factory extends ContractFactory { - constructor(...args: EtherPaymentFallbackConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): EtherPaymentFallback { - return super.attach(address) as EtherPaymentFallback; - } - override connect(signer: Signer): EtherPaymentFallback__factory { - return super.connect(signer) as EtherPaymentFallback__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): EtherPaymentFallbackInterface { - return new utils.Interface(_abi) as EtherPaymentFallbackInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): EtherPaymentFallback { - return new Contract( - address, - _abi, - signerOrProvider - ) as EtherPaymentFallback; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/StorageAccessible__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/StorageAccessible__factory.ts deleted file mode 100644 index 7b16a75d28..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/StorageAccessible__factory.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - StorageAccessible, - StorageAccessibleInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/common/StorageAccessible"; - -const _abi = [ - { - inputs: [ - { - internalType: "uint256", - name: "offset", - type: "uint256", - }, - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "getStorageAt", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "targetContract", - type: "address", - }, - { - internalType: "bytes", - name: "calldataPayload", - type: "bytes", - }, - ], - name: "simulateAndRevert", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b5061057d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635624b25b1461003b578063b4faba091461006b575b600080fd5b61005560048036038101906100509190610237565b610087565b60405161006291906102b0565b60405180910390f35b610085600480360381019061008091906101db565b61011f565b005b606060006020836100989190610344565b67ffffffffffffffff8111156100b1576100b06104c5565b5b6040519080825280601f01601f1916602001820160405280156100e35781602001600182028036833780820191505090505b50905060005b838110156101145780850154806020830260208501015250808061010c9061044d565b9150506100e9565b508091505092915050565b600080825160208401855af4806000523d6020523d600060403e60403d016000fd5b600061015461014f846102f7565b6102d2565b9050828152602081018484840111156101705761016f6104f9565b5b61017b8482856103da565b509392505050565b60008135905061019281610519565b92915050565b600082601f8301126101ad576101ac6104f4565b5b81356101bd848260208601610141565b91505092915050565b6000813590506101d581610530565b92915050565b600080604083850312156101f2576101f1610503565b5b600061020085828601610183565b925050602083013567ffffffffffffffff811115610221576102206104fe565b5b61022d85828601610198565b9150509250929050565b6000806040838503121561024e5761024d610503565b5b600061025c858286016101c6565b925050602061026d858286016101c6565b9150509250929050565b600061028282610328565b61028c8185610333565b935061029c8185602086016103e9565b6102a581610508565b840191505092915050565b600060208201905081810360008301526102ca8184610277565b905092915050565b60006102dc6102ed565b90506102e8828261041c565b919050565b6000604051905090565b600067ffffffffffffffff821115610312576103116104c5565b5b61031b82610508565b9050602081019050919050565b600081519050919050565b600082825260208201905092915050565b600061034f826103d0565b915061035a836103d0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561039357610392610496565b5b828202905092915050565b60006103a9826103b0565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156104075780820151818401526020810190506103ec565b83811115610416576000848401525b50505050565b61042582610508565b810181811067ffffffffffffffff82111715610444576104436104c5565b5b80604052505050565b6000610458826103d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561048b5761048a610496565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b6105228161039e565b811461052d57600080fd5b50565b610539816103d0565b811461054457600080fd5b5056fea26469706673582212207ef36a2a872da9655ee8bbdeea3ca9b4f8c4909d91ce6fa3ac31351577a14d4a64736f6c63430008060033"; - -type StorageAccessibleConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: StorageAccessibleConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class StorageAccessible__factory extends ContractFactory { - constructor(...args: StorageAccessibleConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): StorageAccessible { - return super.attach(address) as StorageAccessible; - } - override connect(signer: Signer): StorageAccessible__factory { - return super.connect(signer) as StorageAccessible__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): StorageAccessibleInterface { - return new utils.Interface(_abi) as StorageAccessibleInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): StorageAccessible { - return new Contract(address, _abi, signerOrProvider) as StorageAccessible; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/index.ts deleted file mode 100644 index c29eaa02c3..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/common/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { EtherPaymentFallback__factory } from "./EtherPaymentFallback__factory"; -export { StorageAccessible__factory } from "./StorageAccessible__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/index.ts deleted file mode 100644 index 0b330a85f8..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as base from "./base"; -export * as common from "./common"; -export * as interfaces from "./interfaces"; -export * as libraries from "./libraries"; -export * as proxies from "./proxies"; -export { GnosisSafe__factory } from "./GnosisSafe__factory"; -export { GnosisSafeL2__factory } from "./GnosisSafeL2__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/IERC165__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/IERC165__factory.ts deleted file mode 100644 index c21486c351..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/IERC165__factory.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IERC165, - IERC165Interface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/interfaces/IERC165"; - -const _abi = [ - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IERC165__factory { - static readonly abi = _abi; - static createInterface(): IERC165Interface { - return new utils.Interface(_abi) as IERC165Interface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IERC165 { - return new Contract(address, _abi, signerOrProvider) as IERC165; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator__factory.ts deleted file mode 100644 index ed36de83d8..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator__factory.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - ISignatureValidator, - ISignatureValidatorInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/interfaces/ISignatureValidator"; - -const _abi = [ - { - inputs: [ - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - { - internalType: "bytes", - name: "_signature", - type: "bytes", - }, - ], - name: "isValidSignature", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class ISignatureValidator__factory { - static readonly abi = _abi; - static createInterface(): ISignatureValidatorInterface { - return new utils.Interface(_abi) as ISignatureValidatorInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ISignatureValidator { - return new Contract(address, _abi, signerOrProvider) as ISignatureValidator; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/index.ts deleted file mode 100644 index 71ac33dc7a..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IERC165__factory } from "./IERC165__factory"; -export { ISignatureValidator__factory } from "./ISignatureValidator__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend__factory.ts deleted file mode 100644 index dc0ad6233e..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend__factory.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - MultiSend, - MultiSendInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/libraries/MultiSend"; - -const _abi = [ - { - inputs: [], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [ - { - internalType: "bytes", - name: "transactions", - type: "bytes", - }, - ], - name: "multiSend", - outputs: [], - stateMutability: "payable", - type: "function", - }, -]; - -const _bytecode = - "0x60a060405234801561001057600080fd5b503073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505060805160601c6103d66100656000396000604101526103d66000f3fe60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b61003d600480360381019061003891906101ca565b61003f565b005b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614156100ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100c590610236565b60405180910390fd5b805160205b81811015610155578083015160f81c6001820184015160601c601583018501516035840186015160558501870160008560008114610118576001811461012857610133565b6000808585888a5af19150610133565b6000808585895af491505b50600081141561014257600080fd5b82605501870196505050505050506100d3565b505050565b600061016d6101688461027b565b610256565b90508281526020810184848401111561018957610188610331565b5b6101948482856102bd565b509392505050565b600082601f8301126101b1576101b061032c565b5b81356101c184826020860161015a565b91505092915050565b6000602082840312156101e0576101df61033b565b5b600082013567ffffffffffffffff8111156101fe576101fd610336565b5b61020a8482850161019c565b91505092915050565b60006102206030836102ac565b915061022b82610351565b604082019050919050565b6000602082019050818103600083015261024f81610213565b9050919050565b6000610260610271565b905061026c82826102cc565b919050565b6000604051905090565b600067ffffffffffffffff821115610296576102956102fd565b5b61029f82610340565b9050602081019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6102d582610340565b810181811067ffffffffffffffff821117156102f4576102f36102fd565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4d756c746953656e642073686f756c64206f6e6c792062652063616c6c65642060008201527f7669612064656c656761746563616c6c0000000000000000000000000000000060208201525056fea2646970667358221220856dda3f30193d6600383a158d37e8d7c6bcf7ac459dbaea7ea6cc663a2fd2fc64736f6c63430008060033"; - -type MultiSendConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: MultiSendConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class MultiSend__factory extends ContractFactory { - constructor(...args: MultiSendConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): MultiSend { - return super.attach(address) as MultiSend; - } - override connect(signer: Signer): MultiSend__factory { - return super.connect(signer) as MultiSend__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): MultiSendInterface { - return new utils.Interface(_abi) as MultiSendInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): MultiSend { - return new Contract(address, _abi, signerOrProvider) as MultiSend; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/libraries/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/libraries/index.ts deleted file mode 100644 index 59e595652e..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/libraries/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { MultiSend__factory } from "./MultiSend__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy__factory.ts deleted file mode 100644 index 80f8fca151..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy__factory.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../../common"; -import type { - GnosisSafeProxy, - GnosisSafeProxyInterface, -} from "../../../../../../@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/GnosisSafeProxy"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "_singleton", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - stateMutability: "payable", - type: "fallback", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b506040516102d43803806102d4833981810160405281019061003291906100fd565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100999061014d565b60405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061021b565b6000815190506100f781610204565b92915050565b600060208284031215610113576101126101b0565b5b6000610121848285016100e8565b91505092915050565b600061013760228361016d565b9150610142826101b5565b604082019050919050565b600060208201905081810360008301526101668161012a565b9050919050565b600082825260208201905092915050565b600061018982610190565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f496e76616c69642073696e676c65746f6e20616464726573732070726f76696460008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b61020d8161017e565b811461021857600080fd5b50565b60ab806102296000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220947a2711a30de0a675858b6b570c8cbc1c80a779f44ff1fe058c651a55fa146d64736f6c63430008060033"; - -type GnosisSafeProxyConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: GnosisSafeProxyConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class GnosisSafeProxy__factory extends ContractFactory { - constructor(...args: GnosisSafeProxyConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - _singleton: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy( - _singleton, - overrides || {} - ) as Promise; - } - override getDeployTransaction( - _singleton: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(_singleton, overrides || {}); - } - override attach(address: string): GnosisSafeProxy { - return super.attach(address) as GnosisSafeProxy; - } - override connect(signer: Signer): GnosisSafeProxy__factory { - return super.connect(signer) as GnosisSafeProxy__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): GnosisSafeProxyInterface { - return new utils.Interface(_abi) as GnosisSafeProxyInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): GnosisSafeProxy { - return new Contract(address, _abi, signerOrProvider) as GnosisSafeProxy; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy__factory.ts deleted file mode 100644 index 4af04a7b2d..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy__factory.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IProxy, - IProxyInterface, -} from "../../../../../../@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/IProxy"; - -const _abi = [ - { - inputs: [], - name: "masterCopy", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IProxy__factory { - static readonly abi = _abi; - static createInterface(): IProxyInterface { - return new utils.Interface(_abi) as IProxyInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IProxy { - return new Contract(address, _abi, signerOrProvider) as IProxy; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/index.ts deleted file mode 100644 index cf12fd8aac..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxy.sol/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { GnosisSafeProxy__factory } from "./GnosisSafeProxy__factory"; -export { IProxy__factory } from "./IProxy__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory__factory.ts deleted file mode 100644 index fccce42ca1..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory__factory.ts +++ /dev/null @@ -1,228 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - GnosisSafeProxyFactory, - GnosisSafeProxyFactoryInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "contract GnosisSafeProxy", - name: "proxy", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "singleton", - type: "address", - }, - ], - name: "ProxyCreation", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_singleton", - type: "address", - }, - { - internalType: "bytes", - name: "initializer", - type: "bytes", - }, - { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, - ], - name: "calculateCreateProxyWithNonceAddress", - outputs: [ - { - internalType: "contract GnosisSafeProxy", - name: "proxy", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "singleton", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "createProxy", - outputs: [ - { - internalType: "contract GnosisSafeProxy", - name: "proxy", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_singleton", - type: "address", - }, - { - internalType: "bytes", - name: "initializer", - type: "bytes", - }, - { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, - { - internalType: "contract IProxyCreationCallback", - name: "callback", - type: "address", - }, - ], - name: "createProxyWithCallback", - outputs: [ - { - internalType: "contract GnosisSafeProxy", - name: "proxy", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_singleton", - type: "address", - }, - { - internalType: "bytes", - name: "initializer", - type: "bytes", - }, - { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, - ], - name: "createProxyWithNonce", - outputs: [ - { - internalType: "contract GnosisSafeProxy", - name: "proxy", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "proxyCreationCode", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "proxyRuntimeCode", - outputs: [ - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - stateMutability: "pure", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b506112ff806100206000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c80631688f0b9146200006f5780632500510e14620000a557806353e5d93514620000db57806361b69abd14620000fd578063addacc0f1462000133578063d18af54d1462000155575b600080fd5b6200008d6004803603810190620000879190620007f6565b6200018b565b6040516200009c919062000b6b565b60405180910390f35b620000c36004803603810190620000bd919062000710565b62000206565b604051620000d2919062000b6b565b60405180910390f35b620000e5620002bb565b604051620000f4919062000b47565b60405180910390f35b6200011b600480360381019062000115919062000790565b620002e8565b6040516200012a919062000b6b565b60405180910390f35b6200013d6200038e565b6040516200014c919062000b47565b60405180910390f35b6200017360048036038101906200016d919062000871565b620003bb565b60405162000182919062000b6b565b60405180910390f35b60006200019a848484620004b1565b9050600083511115620001c45760008060008551602087016000865af11415620001c357600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358185604051620001f792919062000b88565b60405180910390a19392505050565b6000620002598585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084620004b1565b9050806040516020016200026e919062000add565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002b2919062000c09565b60405180910390fd5b606060405180602001620002cf90620005d3565b6020820181038252601f19601f82011660405250905090565b600082604051620002f990620005d3565b62000305919062000b2a565b604051809103906000f08015801562000322573d6000803e3d6000fd5b5090506000825111156200034d5760008060008451602086016000865af114156200034c57600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e23581846040516200038092919062000b88565b60405180910390a192915050565b606060405180602001620003a290620005e1565b6020820181038252601f19601f82011660405250905090565b6000808383604051602001620003d392919062000afa565b6040516020818303038152906040528051906020012060001c9050620003fb8686836200018b565b9150600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614620004a8578273ffffffffffffffffffffffffffffffffffffffff16631e52b518838888886040518563ffffffff1660e01b815260040162000473949392919062000bb5565b600060405180830381600087803b1580156200048e57600080fd5b505af1158015620004a3573d6000803e3d6000fd5b505050505b50949350505050565b600080838051906020012083604051602001620004d092919062000a81565b604051602081830303815290604052805190602001209050600060405180602001620004fc90620005d3565b6020820181038252601f19601f820116604052508673ffffffffffffffffffffffffffffffffffffffff166040516020016200053a92919062000ab1565b6040516020818303038152906040529050818151826020016000f59250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620005ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005c19062000c2d565b60405180910390fd5b50509392505050565b6102d48062000f4b83390190565b60ab806200121f83390190565b600062000605620005ff8462000c78565b62000c4f565b90508281526020810184848401111562000624576200062362000ea6565b5b6200063184828562000d9d565b509392505050565b6000813590506200064a8162000efc565b92915050565b60008083601f84011262000669576200066862000e9c565b5b8235905067ffffffffffffffff81111562000689576200068862000e97565b5b602083019150836001820283011115620006a857620006a762000ea1565b5b9250929050565b600082601f830112620006c757620006c662000e9c565b5b8135620006d9848260208601620005ee565b91505092915050565b600081359050620006f38162000f16565b92915050565b6000813590506200070a8162000f30565b92915050565b600080600080606085870312156200072d576200072c62000eb0565b5b60006200073d8782880162000639565b945050602085013567ffffffffffffffff81111562000761576200076062000eab565b5b6200076f8782880162000650565b935093505060406200078487828801620006f9565b91505092959194509250565b60008060408385031215620007aa57620007a962000eb0565b5b6000620007ba8582860162000639565b925050602083013567ffffffffffffffff811115620007de57620007dd62000eab565b5b620007ec85828601620006af565b9150509250929050565b60008060006060848603121562000812576200081162000eb0565b5b6000620008228682870162000639565b935050602084013567ffffffffffffffff81111562000846576200084562000eab565b5b6200085486828701620006af565b92505060406200086786828701620006f9565b9150509250925092565b600080600080608085870312156200088e576200088d62000eb0565b5b60006200089e8782880162000639565b945050602085013567ffffffffffffffff811115620008c257620008c162000eab565b5b620008d087828801620006af565b9350506040620008e387828801620006f9565b9250506060620008f687828801620006e2565b91505092959194509250565b6200090d8162000cf1565b82525050565b62000928620009228262000d05565b62000e40565b82525050565b60006200093b8262000cae565b62000947818562000cc4565b93506200095981856020860162000dac565b620009648162000eb5565b840191505092915050565b60006200097c8262000cae565b62000988818562000cd5565b93506200099a81856020860162000dac565b80840191505092915050565b620009b18162000d4d565b82525050565b620009cc620009c68262000d4d565b62000e2c565b82525050565b620009e7620009e18262000d75565b62000e18565b82525050565b6000620009fa8262000cb9565b62000a06818562000ce0565b935062000a1881856020860162000dac565b62000a238162000eb5565b840191505092915050565b600062000a3d60138362000ce0565b915062000a4a8262000ed3565b602082019050919050565b62000a608162000d43565b82525050565b62000a7b62000a758262000d43565b62000e5e565b82525050565b600062000a8f828562000913565b60208201915062000aa1828462000a66565b6020820191508190509392505050565b600062000abf82856200096f565b915062000acd828462000a66565b6020820191508190509392505050565b600062000aeb8284620009b7565b60148201915081905092915050565b600062000b08828562000a66565b60208201915062000b1a8284620009d2565b6014820191508190509392505050565b600060208201905062000b41600083018462000902565b92915050565b6000602082019050818103600083015262000b6381846200092e565b905092915050565b600060208201905062000b826000830184620009a6565b92915050565b600060408201905062000b9f6000830185620009a6565b62000bae602083018462000902565b9392505050565b600060808201905062000bcc6000830187620009a6565b62000bdb602083018662000902565b818103604083015262000bef81856200092e565b905062000c00606083018462000a55565b95945050505050565b6000602082019050818103600083015262000c258184620009ed565b905092915050565b6000602082019050818103600083015262000c488162000a2e565b9050919050565b600062000c5b62000c6e565b905062000c69828262000de2565b919050565b6000604051905090565b600067ffffffffffffffff82111562000c965762000c9562000e68565b5b62000ca18262000eb5565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600062000cfe8262000d23565b9050919050565b6000819050919050565b600062000d1c8262000cf1565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600062000d5a8262000d61565b9050919050565b600062000d6e8262000d23565b9050919050565b600062000d828262000d89565b9050919050565b600062000d968262000d23565b9050919050565b82818337600083830152505050565b60005b8381101562000dcc57808201518184015260208101905062000daf565b8381111562000ddc576000848401525b50505050565b62000ded8262000eb5565b810181811067ffffffffffffffff8211171562000e0f5762000e0e62000e68565b5b80604052505050565b600062000e258262000e4a565b9050919050565b600062000e398262000e4a565b9050919050565b6000819050919050565b600062000e578262000ec6565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f437265617465322063616c6c206661696c656400000000000000000000000000600082015250565b62000f078162000cf1565b811462000f1357600080fd5b50565b62000f218162000d0f565b811462000f2d57600080fd5b50565b62000f3b8162000d43565b811462000f4757600080fd5b5056fe608060405234801561001057600080fd5b506040516102d43803806102d4833981810160405281019061003291906100fd565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100999061014d565b60405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061021b565b6000815190506100f781610204565b92915050565b600060208284031215610113576101126101b0565b5b6000610121848285016100e8565b91505092915050565b600061013760228361016d565b9150610142826101b5565b604082019050919050565b600060208201905081810360008301526101668161012a565b9050919050565b600082825260208201905092915050565b600061018982610190565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f496e76616c69642073696e676c65746f6e20616464726573732070726f76696460008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b61020d8161017e565b811461021857600080fd5b50565b60ab806102296000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220947a2711a30de0a675858b6b570c8cbc1c80a779f44ff1fe058c651a55fa146d64736f6c63430008060033608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220947a2711a30de0a675858b6b570c8cbc1c80a779f44ff1fe058c651a55fa146d64736f6c63430008060033a2646970667358221220e026723b6865b358cadbf16de03ff130cfd03657b6d050d60234498e49c400bf64736f6c63430008060033"; - -type GnosisSafeProxyFactoryConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: GnosisSafeProxyFactoryConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class GnosisSafeProxyFactory__factory extends ContractFactory { - constructor(...args: GnosisSafeProxyFactoryConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): GnosisSafeProxyFactory { - return super.attach(address) as GnosisSafeProxyFactory; - } - override connect(signer: Signer): GnosisSafeProxyFactory__factory { - return super.connect(signer) as GnosisSafeProxyFactory__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): GnosisSafeProxyFactoryInterface { - return new utils.Interface(_abi) as GnosisSafeProxyFactoryInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): GnosisSafeProxyFactory { - return new Contract( - address, - _abi, - signerOrProvider - ) as GnosisSafeProxyFactory; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback__factory.ts deleted file mode 100644 index 1dae6f50dd..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback__factory.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IProxyCreationCallback, - IProxyCreationCallbackInterface, -} from "../../../../../@gnosis.pm/safe-contracts/contracts/proxies/IProxyCreationCallback"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract GnosisSafeProxy", - name: "proxy", - type: "address", - }, - { - internalType: "address", - name: "_singleton", - type: "address", - }, - { - internalType: "bytes", - name: "initializer", - type: "bytes", - }, - { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, - ], - name: "proxyCreated", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IProxyCreationCallback__factory { - static readonly abi = _abi; - static createInterface(): IProxyCreationCallbackInterface { - return new utils.Interface(_abi) as IProxyCreationCallbackInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IProxyCreationCallback { - return new Contract( - address, - _abi, - signerOrProvider - ) as IProxyCreationCallback; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/index.ts deleted file mode 100644 index 21a3c2ac4a..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts/proxies/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as gnosisSafeProxySol from "./GnosisSafeProxy.sol"; -export { GnosisSafeProxyFactory__factory } from "./GnosisSafeProxyFactory__factory"; -export { IProxyCreationCallback__factory } from "./IProxyCreationCallback__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/index.ts deleted file mode 100644 index 6397da096a..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/core/Module__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/core/Module__factory.ts deleted file mode 100644 index f18506c189..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/core/Module__factory.ts +++ /dev/null @@ -1,230 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - Module, - ModuleInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/core/Module"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousAvatar", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newAvatar", - type: "address", - }, - ], - name: "AvatarSet", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "ChangedGuard", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousTarget", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newTarget", - type: "address", - }, - ], - name: "TargetSet", - type: "event", - }, - { - inputs: [], - name: "avatar", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getGuard", - outputs: [ - { - internalType: "address", - name: "_guard", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guard", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_avatar", - type: "address", - }, - ], - name: "setAvatar", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guard", - type: "address", - }, - ], - name: "setGuard", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - ], - name: "setTarget", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "initializeParams", - type: "bytes", - }, - ], - name: "setUp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "target", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class Module__factory { - static readonly abi = _abi; - static createInterface(): ModuleInterface { - return new utils.Interface(_abi) as ModuleInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): Module { - return new Contract(address, _abi, signerOrProvider) as Module; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/core/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/core/index.ts deleted file mode 100644 index 0302395349..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/core/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { Module__factory } from "./Module__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/FactoryFriendly__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/FactoryFriendly__factory.ts deleted file mode 100644 index 4af0cd8cd9..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/FactoryFriendly__factory.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - FactoryFriendly, - FactoryFriendlyInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/factory/FactoryFriendly"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "initializeParams", - type: "bytes", - }, - ], - name: "setUp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class FactoryFriendly__factory { - static readonly abi = _abi; - static createInterface(): FactoryFriendlyInterface { - return new utils.Interface(_abi) as FactoryFriendlyInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): FactoryFriendly { - return new Contract(address, _abi, signerOrProvider) as FactoryFriendly; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory__factory.ts deleted file mode 100644 index 88a56f04fe..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory__factory.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - ModuleProxyFactory, - ModuleProxyFactoryInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/factory/ModuleProxyFactory"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "proxy", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "masterCopy", - type: "address", - }, - ], - name: "ModuleProxyCreation", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "masterCopy", - type: "address", - }, - { - internalType: "bytes", - name: "initializer", - type: "bytes", - }, - { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, - ], - name: "deployModule", - outputs: [ - { - internalType: "address", - name: "proxy", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b5061096d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f1ab873c14610030575b600080fd5b61004a6004803603810190610045919061035e565b610060565b6040516100579190610575565b60405180910390f35b600061009b84848051906020012084604051602001610080929190610501565b604051602081830303815290604052805190602001206101ac565b905060008173ffffffffffffffffffffffffffffffffffffffff16846040516100c4919061052d565b6000604051808303816000865af19150503d8060008114610101576040519150601f19603f3d011682016040523d82523d6000602084013e610106565b606091505b505090508061014a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610141906105b0565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f2150ada912bf189ed721c44211199e270903fc88008c2a1e1e889ef30fe67c5f60405160405180910390a3509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561021d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021490610590565b60405180910390fd5b6000836040516020016102309190610544565b6040516020818303038152906040529050828151602083016000f59150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156102bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102b4906105d0565b60405180910390fd5b5092915050565b60006102d76102d284610615565b6105f0565b9050828152602081018484840111156102f3576102f261079d565b5b6102fe8482856106be565b509392505050565b60008135905061031581610909565b92915050565b600082601f8301126103305761032f610798565b5b81356103408482602086016102c4565b91505092915050565b60008135905061035881610920565b92915050565b600080600060608486031215610377576103766107a7565b5b600061038586828701610306565b935050602084013567ffffffffffffffff8111156103a6576103a56107a2565b5b6103b28682870161031b565b92505060406103c386828701610349565b9150509250925092565b6103d681610678565b82525050565b6103ed6103e882610678565b610731565b82525050565b6104046103ff8261068a565b610743565b82525050565b600061041582610646565b61041f8185610651565b935061042f8185602086016106cd565b80840191505092915050565b600061044860248361065c565b9150610453826107ca565b604082019050919050565b600061046b600f8361066d565b915061047682610819565b600f82019050919050565b600061048e60238361065c565b915061049982610842565b604082019050919050565b60006104b160228361065c565b91506104bc82610891565b604082019050919050565b60006104d460138361066d565b91506104df826108e0565b601382019050919050565b6104fb6104f6826106b4565b61075f565b82525050565b600061050d82856103f3565b60208201915061051d82846104ea565b6020820191508190509392505050565b6000610539828461040a565b915081905092915050565b600061054f826104c7565b915061055b82846103dc565b60148201915061056a8261045e565b915081905092915050565b600060208201905061058a60008301846103cd565b92915050565b600060208201905081810360008301526105a98161043b565b9050919050565b600060208201905081810360008301526105c981610481565b9050919050565b600060208201905081810360008301526105e9816104a4565b9050919050565b60006105fa61060b565b90506106068282610700565b919050565b6000604051905090565b600067ffffffffffffffff8211156106305761062f610769565b5b610639826107ac565b9050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061068382610694565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156106eb5780820151818401526020810190506106d0565b838111156106fa576000848401525b50505050565b610709826107ac565b810181811067ffffffffffffffff8211171561072857610727610769565b5b80604052505050565b600061073c8261074d565b9050919050565b6000819050919050565b6000610758826107bd565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f63726561746550726f78793a20616464726573732063616e206e6f742062652060008201527f7a65726f00000000000000000000000000000000000000000000000000000000602082015250565b7f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000600082015250565b7f6465706c6f794d6f64756c653a20696e697469616c697a6174696f6e2066616960008201527f6c65640000000000000000000000000000000000000000000000000000000000602082015250565b7f63726561746550726f78793a206164647265737320616c72656164792074616b60008201527f656e000000000000000000000000000000000000000000000000000000000000602082015250565b7f602d8060093d393df3363d3d373d3d3d363d7300000000000000000000000000600082015250565b61091281610678565b811461091d57600080fd5b50565b610929816106b4565b811461093457600080fd5b5056fea26469706673582212201989268a475e3b4ae1d323f393ba1263660b49e063da86cae9f5b8fe366fd8da64736f6c63430008060033"; - -type ModuleProxyFactoryConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: ModuleProxyFactoryConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class ModuleProxyFactory__factory extends ContractFactory { - constructor(...args: ModuleProxyFactoryConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): ModuleProxyFactory { - return super.attach(address) as ModuleProxyFactory; - } - override connect(signer: Signer): ModuleProxyFactory__factory { - return super.connect(signer) as ModuleProxyFactory__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): ModuleProxyFactoryInterface { - return new utils.Interface(_abi) as ModuleProxyFactoryInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): ModuleProxyFactory { - return new Contract(address, _abi, signerOrProvider) as ModuleProxyFactory; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/index.ts deleted file mode 100644 index 0ebe5f4ca4..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/factory/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { FactoryFriendly__factory } from "./FactoryFriendly__factory"; -export { ModuleProxyFactory__factory } from "./ModuleProxyFactory__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/BaseGuard__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/BaseGuard__factory.ts deleted file mode 100644 index 79295a46d8..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/BaseGuard__factory.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - BaseGuard, - BaseGuardInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/guard/BaseGuard"; - -const _abi = [ - { - inputs: [ - { - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - name: "checkAfterExecution", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address payable", - name: "refundReceiver", - type: "address", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - { - internalType: "address", - name: "msgSender", - type: "address", - }, - ], - name: "checkTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "pure", - type: "function", - }, -]; - -export class BaseGuard__factory { - static readonly abi = _abi; - static createInterface(): BaseGuardInterface { - return new utils.Interface(_abi) as BaseGuardInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): BaseGuard { - return new Contract(address, _abi, signerOrProvider) as BaseGuard; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/Guardable__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/Guardable__factory.ts deleted file mode 100644 index 3628c7ecf5..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/Guardable__factory.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; -import type { Provider, TransactionRequest } from "@ethersproject/providers"; -import type { PromiseOrValue } from "../../../../../common"; -import type { - Guardable, - GuardableInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/guard/Guardable"; - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "guard", - type: "address", - }, - ], - name: "ChangedGuard", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - inputs: [], - name: "getGuard", - outputs: [ - { - internalType: "address", - name: "_guard", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "guard", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_guard", - type: "address", - }, - ], - name: "setGuard", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -const _bytecode = - "0x608060405234801561001057600080fd5b50610927806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a6146100675780637ceab3b1146100715780638da5cb5b1461008f578063c9106389146100ad578063e19a9dd9146100cb578063f2fde38b146100e7575b600080fd5b61006f610103565b005b61007961018b565b604051610086919061070c565b60405180910390f35b6100976101b1565b6040516100a4919061070c565b60405180910390f35b6100b56101db565b6040516100c2919061070c565b60405180910390f35b6100e560048036038101906100e0919061062b565b610205565b005b61010160048036038101906100fc919061062b565b61043b565b005b61010b610533565b73ffffffffffffffffffffffffffffffffffffffff166101296101b1565b73ffffffffffffffffffffffffffffffffffffffff161461017f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017690610762565b60405180910390fd5b610189600061053b565b565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61020d610533565b73ffffffffffffffffffffffffffffffffffffffff1661022b6101b1565b73ffffffffffffffffffffffffffffffffffffffff1614610281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027890610762565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461039e578073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77fe6d7a83a000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161030e9190610727565b60206040518083038186803b15801561032657600080fd5b505afa15801561033a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035e9190610658565b61039d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161039490610782565b60405180910390fd5b5b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051610430919061070c565b60405180910390a150565b610443610533565b73ffffffffffffffffffffffffffffffffffffffff166104616101b1565b73ffffffffffffffffffffffffffffffffffffffff16146104b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ae90610762565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051e90610742565b60405180910390fd5b6105308161053b565b50565b600033905090565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081359050610610816108c3565b92915050565b600081519050610625816108da565b92915050565b6000602082840312156106415761064061081d565b5b600061064f84828501610601565b91505092915050565b60006020828403121561066e5761066d61081d565b5b600061067c84828501610616565b91505092915050565b61068e816107b3565b82525050565b61069d816107d1565b82525050565b60006106b06026836107a2565b91506106bb82610822565b604082019050919050565b60006106d36020836107a2565b91506106de82610871565b602082019050919050565b60006106f66020836107a2565b91506107018261089a565b602082019050919050565b60006020820190506107216000830184610685565b92915050565b600060208201905061073c6000830184610694565b92915050565b6000602082019050818103600083015261075b816106a3565b9050919050565b6000602082019050818103600083015261077b816106c6565b9050919050565b6000602082019050818103600083015261079b816106e9565b9050919050565b600082825260208201905092915050565b60006107be826107fd565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f477561726420646f6573206e6f7420696d706c656d656e742049455243313635600082015250565b6108cc816107b3565b81146108d757600080fd5b50565b6108e3816107c5565b81146108ee57600080fd5b5056fea26469706673582212205fee5048ca84de2a390ba6fb7bb96536525c48ba8d6264f81a13feedc2674bff64736f6c63430008060033"; - -type GuardableConstructorParams = - | [signer?: Signer] - | ConstructorParameters; - -const isSuperArgs = ( - xs: GuardableConstructorParams -): xs is ConstructorParameters => xs.length > 1; - -export class Guardable__factory extends ContractFactory { - constructor(...args: GuardableConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; - } - override getDeployTransaction( - overrides?: Overrides & { from?: PromiseOrValue } - ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); - } - override attach(address: string): Guardable { - return super.attach(address) as Guardable; - } - override connect(signer: Signer): Guardable__factory { - return super.connect(signer) as Guardable__factory; - } - - static readonly bytecode = _bytecode; - static readonly abi = _abi; - static createInterface(): GuardableInterface { - return new utils.Interface(_abi) as GuardableInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): Guardable { - return new Contract(address, _abi, signerOrProvider) as Guardable; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/index.ts deleted file mode 100644 index e34adf8a98..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/guard/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { BaseGuard__factory } from "./BaseGuard__factory"; -export { Guardable__factory } from "./Guardable__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/index.ts deleted file mode 100644 index aacf235b21..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as core from "./core"; -export * as factory from "./factory"; -export * as guard from "./guard"; -export * as interfaces from "./interfaces"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/IAvatar__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/IAvatar__factory.ts deleted file mode 100644 index cc69097d06..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/IAvatar__factory.ts +++ /dev/null @@ -1,178 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IAvatar, - IAvatarInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/interfaces/IAvatar"; - -const _abi = [ - { - inputs: [ - { - internalType: "address", - name: "prevModule", - type: "address", - }, - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "disableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "enableModule", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModule", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - ], - name: "execTransactionFromModuleReturnData", - outputs: [ - { - internalType: "bool", - name: "success", - type: "bool", - }, - { - internalType: "bytes", - name: "returnData", - type: "bytes", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "start", - type: "address", - }, - { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, - ], - name: "getModulesPaginated", - outputs: [ - { - internalType: "address[]", - name: "array", - type: "address[]", - }, - { - internalType: "address", - name: "next", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "module", - type: "address", - }, - ], - name: "isModuleEnabled", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, -]; - -export class IAvatar__factory { - static readonly abi = _abi; - static createInterface(): IAvatarInterface { - return new utils.Interface(_abi) as IAvatarInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IAvatar { - return new Contract(address, _abi, signerOrProvider) as IAvatar; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/IGuard__factory.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/IGuard__factory.ts deleted file mode 100644 index f66f0a410c..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/IGuard__factory.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { - IGuard, - IGuardInterface, -} from "../../../../../@gnosis.pm/zodiac/contracts/interfaces/IGuard"; - -const _abi = [ - { - inputs: [ - { - internalType: "bytes32", - name: "txHash", - type: "bytes32", - }, - { - internalType: "bool", - name: "success", - type: "bool", - }, - ], - name: "checkAfterExecution", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "enum Enum.Operation", - name: "operation", - type: "uint8", - }, - { - internalType: "uint256", - name: "safeTxGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "baseGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "gasPrice", - type: "uint256", - }, - { - internalType: "address", - name: "gasToken", - type: "address", - }, - { - internalType: "address payable", - name: "refundReceiver", - type: "address", - }, - { - internalType: "bytes", - name: "signatures", - type: "bytes", - }, - { - internalType: "address", - name: "msgSender", - type: "address", - }, - ], - name: "checkTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class IGuard__factory { - static readonly abi = _abi; - static createInterface(): IGuardInterface { - return new utils.Interface(_abi) as IGuardInterface; - } - static connect(address: string, signerOrProvider: Signer | Provider): IGuard { - return new Contract(address, _abi, signerOrProvider) as IGuard; - } -} diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/index.ts deleted file mode 100644 index 23c5c0042a..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/contracts/interfaces/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export { IAvatar__factory } from "./IAvatar__factory"; -export { IGuard__factory } from "./IGuard__factory"; diff --git a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/index.ts b/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/index.ts deleted file mode 100644 index 6397da096a..0000000000 --- a/src/assets/typechain-types/usul/factories/@gnosis.pm/zodiac/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as contracts from "./contracts"; diff --git a/src/assets/typechain-types/usul/factories/index.ts b/src/assets/typechain-types/usul/factories/index.ts deleted file mode 100644 index 5e162a079d..0000000000 --- a/src/assets/typechain-types/usul/factories/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * as gnosisPm from "./@gnosis.pm"; diff --git a/src/assets/typechain-types/usul/hardhat.d.ts b/src/assets/typechain-types/usul/hardhat.d.ts deleted file mode 100644 index 4e96f74360..0000000000 --- a/src/assets/typechain-types/usul/hardhat.d.ts +++ /dev/null @@ -1,501 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { ethers } from "ethers"; -import { - FactoryOptions, - HardhatEthersHelpers as HardhatEthersHelpersBase, -} from "@nomiclabs/hardhat-ethers/types"; - -import * as Contracts from "."; - -declare module "hardhat/types/runtime" { - interface HardhatEthersHelpers extends HardhatEthersHelpersBase { - getContractFactory( - name: "FallbackManager", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Guard", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GuardManager", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ModuleManager", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OwnerManager", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "EtherPaymentFallback", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "StorageAccessible", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GnosisSafe", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GnosisSafeL2", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC165", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ISignatureValidator", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MultiSend", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GnosisSafeProxy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IProxy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GnosisSafeProxyFactory", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IProxyCreationCallback", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Module", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "FactoryFriendly", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ModuleProxyFactory", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BaseGuard", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Guardable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IAvatar", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IGuard", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OwnableUpgradeable", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20Permit", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Permit", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "ERC20Votes", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20Metadata", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC20", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC721", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IERC165", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BaseStrategy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "FactoryFriendly", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BaseMember", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BaseQuorumFixed", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BaseQuorumPercent", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "BaseTokenVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IProposal", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "IStrategy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "CompToken", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "GovernanceToken", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MockContract", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MockInterface", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "TestStrategy", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "Usul", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MemberLinearVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "MemberNFTSingleVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "NFTLinearVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OZLinearVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "OZSingleVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - name: "SimpleMemberVoting", - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - - getContractAt( - name: "FallbackManager", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Guard", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GuardManager", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ModuleManager", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OwnerManager", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "EtherPaymentFallback", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "StorageAccessible", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GnosisSafe", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GnosisSafeL2", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC165", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ISignatureValidator", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MultiSend", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GnosisSafeProxy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IProxy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GnosisSafeProxyFactory", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IProxyCreationCallback", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Module", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "FactoryFriendly", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ModuleProxyFactory", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BaseGuard", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Guardable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IAvatar", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IGuard", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OwnableUpgradeable", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20Permit", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Permit", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "ERC20Votes", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20Metadata", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC20", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC721", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IERC165", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BaseStrategy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "FactoryFriendly", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BaseMember", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BaseQuorumFixed", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BaseQuorumPercent", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "BaseTokenVoting", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IProposal", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "IStrategy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "CompToken", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "GovernanceToken", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MockContract", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MockInterface", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "TestStrategy", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "Usul", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MemberLinearVoting", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "MemberNFTSingleVoting", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "NFTLinearVoting", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OZLinearVoting", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "OZSingleVoting", - address: string, - signer?: ethers.Signer - ): Promise; - getContractAt( - name: "SimpleMemberVoting", - address: string, - signer?: ethers.Signer - ): Promise; - - // default types - getContractFactory( - name: string, - signerOrOptions?: ethers.Signer | FactoryOptions - ): Promise; - getContractFactory( - abi: any[], - bytecode: ethers.utils.BytesLike, - signer?: ethers.Signer - ): Promise; - getContractAt( - nameOrAbi: string | any[], - address: string, - signer?: ethers.Signer - ): Promise; - } -} diff --git a/src/assets/typechain-types/usul/index.ts b/src/assets/typechain-types/usul/index.ts deleted file mode 100644 index a4c88c9167..0000000000 --- a/src/assets/typechain-types/usul/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export type { MultiSend } from "./@gnosis.pm/safe-contracts/contracts/libraries/MultiSend"; -export { MultiSend__factory } from "./factories/@gnosis.pm/safe-contracts/contracts/libraries/MultiSend__factory"; diff --git a/src/components/DaoCreator/constants.ts b/src/components/DaoCreator/constants.ts index 196ad440ed..c6e3c96e0d 100644 --- a/src/components/DaoCreator/constants.ts +++ b/src/components/DaoCreator/constants.ts @@ -24,13 +24,13 @@ export const initialState: CreatorFormState = { tokenSymbol: '', tokenAllocations: [ { - address: '', + address: undefined, amount: { value: '', }, }, ], - tokenImportAddress: '', + tokenImportAddress: undefined, parentAllocationAmount: { value: '', }, @@ -38,7 +38,7 @@ export const initialState: CreatorFormState = { erc721Token: { nfts: [ { - tokenAddress: '', + tokenAddress: undefined, tokenWeight: { value: '', }, diff --git a/src/components/DaoCreator/formComponents/AzoriusNFTDetail.tsx b/src/components/DaoCreator/formComponents/AzoriusNFTDetail.tsx index 2e1cdf6485..efe0946401 100644 --- a/src/components/DaoCreator/formComponents/AzoriusNFTDetail.tsx +++ b/src/components/DaoCreator/formComponents/AzoriusNFTDetail.tsx @@ -1,10 +1,9 @@ import { Flex, Box, Text } from '@chakra-ui/react'; -import { ethers } from 'ethers'; import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { erc721Abi, isAddress } from 'viem'; +import { erc721Abi, isAddress, getContract } from 'viem'; +import useContractClient from '../../../hooks/utils/useContractClient'; import useDisplayName from '../../../hooks/utils/useDisplayName'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; import { BigIntValuePair, ERC721TokenConfig } from '../../../types'; import { BarLoader } from '../../ui/loaders/BarLoader'; @@ -25,8 +24,8 @@ export default function AzoriusNFTDetail({ const [tokenDetails, setTokenDetails] = useState(); const { t } = useTranslation('daoCreate'); - const provider = useEthersProvider(); const { displayName } = useDisplayName(tokenDetails?.address, true); + const { walletOrPublicClient } = useContractClient(); useEffect(() => { const loadNFTDetails = async () => { @@ -36,9 +35,16 @@ export default function AzoriusNFTDetail({ setLoading(true); try { - if (nft.tokenAddress && isAddress(nft.tokenAddress)) { - const tokenContract = new ethers.Contract(nft.tokenAddress, erc721Abi, provider); - const [name, symbol] = await Promise.all([tokenContract.name(), tokenContract.symbol()]); + if (nft.tokenAddress && isAddress(nft.tokenAddress) && !!walletOrPublicClient) { + const tokenContract = getContract({ + address: nft.tokenAddress, + abi: erc721Abi, + client: walletOrPublicClient, + }); + const [name, symbol] = await Promise.all([ + tokenContract.read.name(), + tokenContract.read.symbol(), + ]); setTokenDetails({ name, symbol, @@ -54,7 +60,7 @@ export default function AzoriusNFTDetail({ }; loadNFTDetails(); - }, [hasAddressError, nft, provider]); + }, [hasAddressError, nft, walletOrPublicClient]); const showData = !!tokenDetails && !loading && !hasAddressError; diff --git a/src/components/DaoCreator/formComponents/AzoriusTokenDetails.tsx b/src/components/DaoCreator/formComponents/AzoriusTokenDetails.tsx index ffc2e2add8..d418136c9a 100644 --- a/src/components/DaoCreator/formComponents/AzoriusTokenDetails.tsx +++ b/src/components/DaoCreator/formComponents/AzoriusTokenDetails.tsx @@ -1,12 +1,11 @@ import { Box, Flex, Input, RadioGroup, Text } from '@chakra-ui/react'; import { LabelWrapper } from '@decent-org/fractal-ui'; -import { ethers } from 'ethers'; import { useCallback, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { erc20Abi, isAddress, zeroAddress } from 'viem'; +import { erc20Abi, isAddress, zeroAddress, getContract } from 'viem'; import { BACKGROUND_SEMI_TRANSPARENT } from '../../../constants/common'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { createAccountSubstring } from '../../../hooks/utils/useDisplayName'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; import { TokenCreationType, ICreationStepProps } from '../../../types'; import SupportTooltip from '../../ui/badges/SupportTooltip'; import ContentBoxTitle from '../../ui/containers/ContentBox/ContentBoxTitle'; @@ -41,23 +40,29 @@ export function AzoriusTokenDetails(props: ICreationStepProps) { } = props; const { t } = useTranslation('daoCreate'); - const provider = useEthersProvider(); const { checkVotesToken } = usePrepareFormData(); const [isImportedVotesToken, setIsImportedVotesToken] = useState(false); + const { walletOrPublicClient } = useContractClient(); const updateImportFields = useCallback(async () => { const importAddress = values.erc20Token.tokenImportAddress; const importError = errors?.erc20Token?.tokenImportAddress; - if (importAddress && !importError && isAddress(importAddress)) { + if (importAddress && !importError && isAddress(importAddress) && !!walletOrPublicClient) { const isVotesToken = await checkVotesToken(importAddress); - const tokenContract = new ethers.Contract(importAddress, erc20Abi, provider); - const name: string = await tokenContract.name(); - const symbol: string = await tokenContract.symbol(); - const decimals: number = await tokenContract.decimals(); + const tokenContract = getContract({ + address: importAddress, + abi: erc20Abi, + client: walletOrPublicClient, + }); + const name: string = await tokenContract.read.name(); + const symbol: string = await tokenContract.read.symbol(); + const decimals: number = await tokenContract.read.decimals(); // @dev: this turns "total supply" into the human-readable form (without decimals) - const totalSupply: number = (await tokenContract.totalSupply()) / 10 ** decimals; + const totalSupply: number = Number( + (await tokenContract.read.totalSupply()) / BigInt(10 ** decimals), + ); setFieldValue( 'erc20Token.tokenSupply', @@ -83,7 +88,7 @@ export function AzoriusTokenDetails(props: ICreationStepProps) { checkVotesToken, errors?.erc20Token?.tokenImportAddress, setFieldValue, - provider, + walletOrPublicClient, values.erc20Token.tokenImportAddress, ]); diff --git a/src/components/DaoCreator/hooks/usePrepareFormData.ts b/src/components/DaoCreator/hooks/usePrepareFormData.ts index 851415239c..635541d7a5 100644 --- a/src/components/DaoCreator/hooks/usePrepareFormData.ts +++ b/src/components/DaoCreator/hooks/usePrepareFormData.ts @@ -1,8 +1,7 @@ -import { IVotes__factory } from '@fractal-framework/fractal-contracts'; - import { useCallback } from 'react'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; +import { getContract, Address } from 'viem'; +import useContractClient from '../../../hooks/utils/useContractClient'; +import { useFractal } from '../../../providers/App/AppProvider'; import { SafeMultisigDAO, DAOFreezeGuardConfig, @@ -17,53 +16,56 @@ import { couldBeENS } from '../../../utils/url'; type FreezeGuardConfigParam = { freezeGuard?: DAOFreezeGuardConfig }; export function usePrepareFormData() { - const signer = useEthersSigner(); - const provider = useEthersProvider(); - // Helper function to prepare freezeGuard data + const { publicClient } = useContractClient(); + const { baseContracts } = useFractal(); const prepareFreezeGuardData = useCallback( async ( freezeGuard: DAOFreezeGuardConfig, ): Promise => { - if (provider) { + if (publicClient) { return { executionPeriod: await getEstimatedNumberOfBlocks( freezeGuard.executionPeriod.bigintValue!, - provider, + publicClient, ), timelockPeriod: await getEstimatedNumberOfBlocks( freezeGuard.timelockPeriod.bigintValue!, - provider, + publicClient, ), freezeVotesThreshold: freezeGuard.freezeVotesThreshold.bigintValue!, freezeProposalPeriod: await getEstimatedNumberOfBlocks( freezeGuard.freezeProposalPeriod.bigintValue!, - provider, + publicClient, ), freezePeriod: await getEstimatedNumberOfBlocks( freezeGuard.freezePeriod.bigintValue!, - provider, + publicClient, ), }; } }, - [provider], + [publicClient], ); const checkVotesToken = useCallback( - async (address: string) => { - if (provider) { + async (address: Address) => { + if (publicClient && baseContracts) { try { - const votesContract = IVotes__factory.connect(address, provider); - await votesContract.delegates('0x0000000000000000000000000000000000000001'); - await votesContract.getVotes('0x0000000000000000000000000000000000000001'); + const votesContract = getContract({ + address, + client: publicClient, + abi: baseContracts.votesTokenMasterCopyContract.asPublic.abi, + }); + await votesContract.read.delegates(['0x0000000000000000000000000000000000000001']); + await votesContract.read.getVotes(['0x0000000000000000000000000000000000000001']); return true; } catch (error) { return false; } } }, - [provider], + [publicClient, baseContracts], ); const prepareMultisigFormData = useCallback( @@ -75,7 +77,7 @@ export function usePrepareFormData() { const resolvedAddresses = await Promise.all( trustedAddresses.map(async inputValue => { if (couldBeENS(inputValue)) { - const resolvedAddress = await signer!.resolveName(inputValue); + const resolvedAddress = await publicClient!.getEnsAddress({ name: inputValue }); return resolvedAddress; } return inputValue; @@ -91,7 +93,7 @@ export function usePrepareFormData() { ...rest, }; }, - [signer, prepareFreezeGuardData], + [publicClient, prepareFreezeGuardData], ); const prepareAzoriusERC20FormData = useCallback( @@ -110,12 +112,12 @@ export function usePrepareFormData() { }: AzoriusERC20DAO & FreezeGuardConfigParam): Promise< AzoriusERC20DAO | undefined > => { - if (provider) { + if (publicClient) { const resolvedTokenAllocations = await Promise.all( tokenAllocations.map(async allocation => { let address = allocation.address; if (couldBeENS(address)) { - address = await signer!.resolveName(allocation.address); + address = await publicClient!.getEnsAddress({ name: allocation.address || '' }); } return { amount: allocation.amount.bigintValue!, address: address }; }), @@ -134,9 +136,12 @@ export function usePrepareFormData() { tokenSupply: tokenSupply.bigintValue!, parentAllocationAmount: parentAllocationAmount?.bigintValue!, quorumPercentage: quorumPercentage.bigintValue!, - timelock: await getEstimatedNumberOfBlocks(timelock.bigintValue!, provider), - executionPeriod: await getEstimatedNumberOfBlocks(executionPeriod.bigintValue!, provider), - votingPeriod: await getEstimatedNumberOfBlocks(votingPeriod.bigintValue!, provider), + timelock: await getEstimatedNumberOfBlocks(timelock.bigintValue!, publicClient), + executionPeriod: await getEstimatedNumberOfBlocks( + executionPeriod.bigintValue!, + publicClient, + ), + votingPeriod: await getEstimatedNumberOfBlocks(votingPeriod.bigintValue!, publicClient), tokenAllocations: resolvedTokenAllocations, tokenImportAddress, tokenCreationType, @@ -147,7 +152,7 @@ export function usePrepareFormData() { }; } }, - [signer, checkVotesToken, provider, prepareFreezeGuardData], + [checkVotesToken, publicClient, prepareFreezeGuardData], ); const prepareAzoriusERC721FormData = useCallback( @@ -163,7 +168,7 @@ export function usePrepareFormData() { }: AzoriusERC721DAO & FreezeGuardConfigParam): Promise< AzoriusERC721DAO | undefined > => { - if (provider) { + if (publicClient) { let freezeGuardData; if (freezeGuard) { freezeGuardData = await prepareFreezeGuardData(freezeGuard); @@ -173,7 +178,7 @@ export function usePrepareFormData() { nfts.map(async nft => { let address = nft.tokenAddress; if (couldBeENS(address)) { - address = await signer!.resolveName(nft.tokenAddress); + address = await publicClient!.getEnsAddress({ name: nft.tokenAddress || '' }); } return { tokenAddress: address, @@ -184,9 +189,12 @@ export function usePrepareFormData() { return { quorumPercentage: quorumPercentage.bigintValue!, - timelock: await getEstimatedNumberOfBlocks(timelock.bigintValue!, provider), - executionPeriod: await getEstimatedNumberOfBlocks(executionPeriod.bigintValue!, provider), - votingPeriod: await getEstimatedNumberOfBlocks(votingPeriod.bigintValue!, provider), + timelock: await getEstimatedNumberOfBlocks(timelock.bigintValue!, publicClient), + executionPeriod: await getEstimatedNumberOfBlocks( + executionPeriod.bigintValue!, + publicClient, + ), + votingPeriod: await getEstimatedNumberOfBlocks(votingPeriod.bigintValue!, publicClient), nfts: resolvedNFTs, quorumThreshold: quorumThreshold.bigintValue!, ...freezeGuardData, @@ -194,7 +202,7 @@ export function usePrepareFormData() { }; } }, - [prepareFreezeGuardData, provider, signer], + [prepareFreezeGuardData, publicClient], ); return { prepareMultisigFormData, diff --git a/src/components/Proposals/MultisigProposalDetails/TxActions.tsx b/src/components/Proposals/MultisigProposalDetails/TxActions.tsx index 263b9ee51d..2d8f421a6d 100644 --- a/src/components/Proposals/MultisigProposalDetails/TxActions.tsx +++ b/src/components/Proposals/MultisigProposalDetails/TxActions.tsx @@ -1,17 +1,16 @@ import { Box, Button, Text, Flex } from '@chakra-ui/react'; import { Check } from '@decent-org/fractal-ui'; -import { TypedDataSigner } from '@ethersproject/abstract-signer'; import { SafeMultisigTransactionWithTransfersResponse } from '@safe-global/safe-service-client'; -import { Signer } from 'ethers'; import { useTranslation } from 'react-i18next'; -import { GnosisSafeL2__factory } from '../../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; +import { Address, getContract } from 'viem'; +import { useSignTypedData } from 'wagmi'; import { BACKGROUND_SEMI_TRANSPARENT } from '../../../constants/common'; import { buildSafeTransaction, buildSignatureBytes, EIP712_SAFE_TX_TYPE } from '../../../helpers'; import { logError } from '../../../helpers/errorLogging'; import { useSafeMultisigProposals } from '../../../hooks/DAO/loaders/governance/useSafeMultisigProposals'; import useSafeContracts from '../../../hooks/safe/useSafeContracts'; import { useAsyncRequest } from '../../../hooks/utils/useAsyncRequest'; -import useSignerOrProvider from '../../../hooks/utils/useSignerOrProvider'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { useTransaction } from '../../../hooks/utils/useTransaction'; import { useFractal } from '../../../providers/App/AppProvider'; import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI'; @@ -26,12 +25,13 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) { guardContracts: { freezeGuardContractAddress }, readOnly: { user }, } = useFractal(); - const signerOrProvider = useSignerOrProvider(); const safeAPI = useSafeAPI(); const { chain } = useNetworkConfig(); const { t } = useTranslation(['proposal', 'common', 'transaction']); + const { walletClient } = useContractClient(); + const { signTypedDataAsync } = useSignTypedData(); const [asyncRequest, asyncRequestPending] = useAsyncRequest(); const [contractCall, contractCallPending] = useTransaction(); const loadSafeMultisigProposals = useSafeMultisigProposals(); @@ -43,21 +43,24 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) { if (!multisigTx) return null; const signTransaction = async () => { - if (!signerOrProvider || !safe?.address) { + if (!walletClient || !safe?.address) { return; } try { const safeTx = buildSafeTransaction({ ...multisigTx, - }); + } as any); // Have to use any because type of multisigTx based on SafeMultisigTransactionWithTransfersResponse where to is string but here we need Address type asyncRequest({ asyncFunc: () => - (signerOrProvider as Signer & TypedDataSigner)._signTypedData( - { verifyingContract: safe.address, chainId: chain.id }, - EIP712_SAFE_TX_TYPE, - safeTx, - ), + signTypedDataAsync({ + domain: { verifyingContract: safe.address as Address, chainId: chain.id }, + types: EIP712_SAFE_TX_TYPE, + primaryType: 'SafeTx', + message: { + ...safeTx, + }, + }), failedMessage: t('failedSign'), pendingMessage: t('pendingSign'), successMessage: t('successSign'), @@ -73,24 +76,32 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) { const timelockTransaction = async () => { try { - if (!multisigTx.confirmations || !baseContracts || !freezeGuardContractAddress) { + if ( + !multisigTx.confirmations || + !baseContracts || + !freezeGuardContractAddress || + !walletClient + ) { return; } const safeTx = buildSafeTransaction({ ...multisigTx, - }); + } as any); const signatures = buildSignatureBytes( multisigTx.confirmations.map(confirmation => ({ - signer: confirmation.owner, + signer: confirmation.owner as Address, data: confirmation.signature, })), ); - const freezeGuard = baseContracts.multisigFreezeGuardMasterCopyContract.asSigner.attach( - freezeGuardContractAddress, - ); + const freezeGuard = getContract({ + address: freezeGuardContractAddress, + abi: baseContracts.multisigFreezeGuardMasterCopyContract.asPublic.abi, + client: walletClient, + }); + contractCall({ contractFn: () => - freezeGuard.timelockTransaction( + freezeGuard.write.timelockTransaction([ safeTx.to, safeTx.value, safeTx.data, @@ -102,7 +113,7 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) { safeTx.refundReceiver, signatures, safeTx.nonce, - ), + ]), failedMessage: t('failedExecute', { ns: 'transaction' }), pendingMessage: t('pendingExecute', { ns: 'transaction' }), successMessage: t('successExecute', { ns: 'transaction' }), @@ -117,22 +128,26 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) { const executeTransaction = async () => { try { - if (!signerOrProvider || !safe?.address || !multisigTx.confirmations) { + if (!walletClient || !safe?.address || !multisigTx.confirmations || !baseContracts) { return; } - const safeContract = GnosisSafeL2__factory.connect(safe.address, signerOrProvider); + const safeContract = getContract({ + address: safe.address as Address, + abi: baseContracts.safeSingletonContract.asPublic.abi, + client: walletClient, + }); const safeTx = buildSafeTransaction({ ...multisigTx, - }); + } as any); const signatures = buildSignatureBytes( multisigTx.confirmations.map(confirmation => ({ - signer: confirmation.owner, + signer: confirmation.owner as Address, data: confirmation.signature, })), ); contractCall({ contractFn: () => - safeContract.execTransaction( + safeContract.write.execTransaction([ safeTx.to, safeTx.value, safeTx.data, @@ -143,7 +158,7 @@ export function TxActions({ proposal }: { proposal: MultisigProposal }) { safeTx.gasToken, safeTx.refundReceiver, signatures, - ), + ]), failedMessage: t('failedExecute', { ns: 'transaction' }), pendingMessage: t('pendingExecute', { ns: 'transaction' }), successMessage: t('successExecute', { ns: 'transaction' }), diff --git a/src/components/Proposals/ProposalSummary.tsx b/src/components/Proposals/ProposalSummary.tsx index 1c0c5f307a..f7e1ee74d9 100644 --- a/src/components/Proposals/ProposalSummary.tsx +++ b/src/components/Proposals/ProposalSummary.tsx @@ -4,9 +4,11 @@ import { format } from 'date-fns'; import { formatInTimeZone } from 'date-fns-tz'; import { useMemo, useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { getContract } from 'viem'; import { BACKGROUND_SEMI_TRANSPARENT } from '../../constants/common'; import useSafeContracts from '../../hooks/safe/useSafeContracts'; import useBlockTimestamp from '../../hooks/utils/useBlockTimestamp'; +import useContractClient from '../../hooks/utils/useContractClient'; import { useFractal } from '../../providers/App/AppProvider'; import { AzoriusGovernance, AzoriusProposal, GovernanceType } from '../../types'; import { DEFAULT_DATE_TIME_FORMAT } from '../../utils/numberFormats'; @@ -37,6 +39,7 @@ export default function ProposalSummary({ }, } = useFractal(); const baseContracts = useSafeContracts(); + const { walletOrPublicClient } = useContractClient(); const azoriusGovernance = governance as AzoriusGovernance; const { votesToken, type, erc721Tokens, votingStrategy } = azoriusGovernance; const { t } = useTranslation(['proposal', 'common', 'navigation']); @@ -61,11 +64,16 @@ export default function ProposalSummary({ useEffect(() => { async function loadProposalVotingWeight() { - if (address && baseContracts && votesToken) { - const tokenContract = baseContracts.votesTokenMasterCopyContract.asProvider.attach( - votesToken.address, - ); - const pastVotingWeight = (await tokenContract.getPastVotes(address, startBlock)).toBigInt(); + if (address && baseContracts && votesToken && walletOrPublicClient) { + const tokenContract = getContract({ + address: votesToken.address, + abi: baseContracts.votesTokenMasterCopyContract.asPublic.abi, + client: walletOrPublicClient, + }); + const pastVotingWeight = (await tokenContract.read.getPastVotes([ + address, + startBlock, + ])) as bigint; setProposalsERC20VotingWeight( (pastVotingWeight / votesTokenDecimalsDenominator).toString(), ); @@ -73,7 +81,14 @@ export default function ProposalSummary({ } loadProposalVotingWeight(); - }, [address, startBlock, votesTokenDecimalsDenominator, baseContracts, votesToken]); + }, [ + address, + startBlock, + votesTokenDecimalsDenominator, + baseContracts, + votesToken, + walletOrPublicClient, + ]); const isERC20 = type === GovernanceType.AZORIUS_ERC20; const isERC721 = type === GovernanceType.AZORIUS_ERC721; diff --git a/src/components/Proposals/ProposalVotes/context/VoteContext.tsx b/src/components/Proposals/ProposalVotes/context/VoteContext.tsx index 443b95e08c..e51f6c87c0 100644 --- a/src/components/Proposals/ProposalVotes/context/VoteContext.tsx +++ b/src/components/Proposals/ProposalVotes/context/VoteContext.tsx @@ -1,7 +1,9 @@ import { useContext, useCallback, useEffect, useState, createContext, ReactNode } from 'react'; +import { getContract } from 'viem'; import useSnapshotProposal from '../../../../hooks/DAO/loaders/snapshot/useSnapshotProposal'; import useUserERC721VotingTokens from '../../../../hooks/DAO/proposal/useUserERC721VotingTokens'; import useSafeContracts from '../../../../hooks/safe/useSafeContracts'; +import useContractClient from '../../../../hooks/utils/useContractClient'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalProposal, @@ -56,6 +58,7 @@ export function VoteContextProvider({ governanceContracts: { ozLinearVotingContractAddress }, } = useFractal(); const baseContracts = useSafeContracts(); + const { walletOrPublicClient } = useContractClient(); const { loadVotingWeight } = useSnapshotProposal(proposal as SnapshotProposal); const { remainingTokenIds, getUserERC721VotingTokens } = useUserERC721VotingTokens( @@ -90,7 +93,7 @@ export function VoteContextProvider({ async (refetchUserTokens?: boolean) => { setCanVoteLoading(true); let newCanVote = false; - if (user.address) { + if (user.address && walletOrPublicClient) { if (isSnapshotProposal) { const votingWeightData = await loadVotingWeight(); newCanVote = votingWeightData.votingWeight >= 1; @@ -99,14 +102,17 @@ export function VoteContextProvider({ ozLinearVotingContractAddress && baseContracts ) { - const ozLinearVotingContract = - baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); + const ozLinearVotingContract = getContract({ + abi: baseContracts.linearVotingMasterCopyContract.asPublic.abi, + address: ozLinearVotingContractAddress, + client: walletOrPublicClient, + }); + newCanVote = - ( - await ozLinearVotingContract.getVotingWeight(user.address, proposal.proposalId) - ).toBigInt() > 0n && !hasVoted; + ((await ozLinearVotingContract.read.getVotingWeight([ + user.address, + proposal.proposalId, + ])) as bigint) > 0n && !hasVoted; } else if (type === GovernanceType.AZORIUS_ERC721) { if (refetchUserTokens) { await getUserERC721VotingTokens(); @@ -137,6 +143,7 @@ export function VoteContextProvider({ proposal?.proposalId, baseContracts, ozLinearVotingContractAddress, + walletOrPublicClient, ], ); useEffect(() => { diff --git a/src/components/pages/DAOTreasury/components/Assets.tsx b/src/components/pages/DAOTreasury/components/Assets.tsx index 3a6bd5a19c..95a97b97b8 100644 --- a/src/components/pages/DAOTreasury/components/Assets.tsx +++ b/src/components/pages/DAOTreasury/components/Assets.tsx @@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next'; import { zeroAddress } from 'viem'; import useLidoStaking from '../../../../hooks/stake/lido/useLidoStaking'; import { useCanUserCreateProposal } from '../../../../hooks/utils/useCanUserSubmitProposal'; -import useSignerOrProvider from '../../../../hooks/utils/useSignerOrProvider'; import { useFractal } from '../../../../providers/App/AppProvider'; import { useNetworkConfig } from '../../../../providers/NetworkConfig/NetworkConfigProvider'; import { formatPercentage, formatUSD } from '../../../../utils/numberFormats'; @@ -240,7 +239,6 @@ export function Assets() { }; // --- Lido Claim ETH button setup --- - const signerOrProvider = useSignerOrProvider(); const [isLidoClaimable, setIsLidoClaimable] = useState(false); const lidoWithdrawelNFT = assetsNonFungible.find( asset => asset.address === staking.lido?.withdrawalQueueContractAddress, @@ -248,16 +246,11 @@ export function Assets() { const showClaimETHButton = canUserCreateProposal && staking.lido && lidoWithdrawelNFT; useEffect(() => { const getLidoClaimableStatus = async () => { - if ( - !staking.lido?.withdrawalQueueContractAddress || - !lidoWithdrawelNFT || - !signerOrProvider - ) { + if (!staking.lido?.withdrawalQueueContractAddress || !lidoWithdrawelNFT) { return; } const withdrawalQueueContract = getWithdrawalQueueContract( staking.lido.withdrawalQueueContractAddress, - signerOrProvider, ); const claimableStatus = ( await withdrawalQueueContract.getWithdrawalStatus([lidoWithdrawelNFT!.id]) @@ -268,7 +261,7 @@ export function Assets() { }; getLidoClaimableStatus(); - }, [staking, isLidoClaimable, signerOrProvider, lidoWithdrawelNFT]); + }, [staking, isLidoClaimable, lidoWithdrawelNFT]); const handleClickClaimButton = () => { handleClaimUnstakedETH(BigInt(lidoWithdrawelNFT!.id)); }; diff --git a/src/components/pages/DAOTreasury/hooks/useSendAssets.ts b/src/components/pages/DAOTreasury/hooks/useSendAssets.ts index 44da8363f7..e54824f402 100644 --- a/src/components/pages/DAOTreasury/hooks/useSendAssets.ts +++ b/src/components/pages/DAOTreasury/hooks/useSendAssets.ts @@ -1,7 +1,7 @@ import { SafeBalanceUsdResponse } from '@safe-global/safe-service-client'; -import { ethers } from 'ethers'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { erc20Abi, encodeFunctionData, Address } from 'viem'; import useSubmitProposal from '../../../../hooks/DAO/proposal/useSubmitProposal'; import { ProposalExecuteData } from '../../../../types'; import { formatCoin } from '../../../../utils/numberFormats'; @@ -14,7 +14,7 @@ const useSendAssets = ({ }: { transferAmount: bigint; asset: SafeBalanceUsdResponse; - destinationAddress: string; + destinationAddress: Address; nonce: number | undefined; }) => { const { submitProposal } = useSubmitProposal(); @@ -30,12 +30,12 @@ const useSendAssets = ({ asset?.token?.symbol, ); - const funcSignature = 'function transfer(address to, uint256 value)'; const calldatas = [ - new ethers.utils.Interface([funcSignature]).encodeFunctionData('transfer', [ - destinationAddress, - transferAmount, - ]), + encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [destinationAddress, transferAmount], + }), ]; const proposalData: ProposalExecuteData = { diff --git a/src/components/pages/DaoDashboard/Info/InfoGovernance.tsx b/src/components/pages/DaoDashboard/Info/InfoGovernance.tsx index a2362e67f4..8a7cad02e9 100644 --- a/src/components/pages/DaoDashboard/Info/InfoGovernance.tsx +++ b/src/components/pages/DaoDashboard/Info/InfoGovernance.tsx @@ -2,10 +2,11 @@ import { Box, Flex, Text } from '@chakra-ui/react'; import { Govern } from '@decent-org/fractal-ui'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; import useSafeContracts from '../../../../hooks/safe/useSafeContracts'; import { useTimeHelpers } from '../../../../hooks/utils/useTimeHelpers'; import { useFractal } from '../../../../providers/App/AppProvider'; -import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider'; import { AzoriusGovernance, FreezeGuardType } from '../../../../types'; import { blocksToSeconds } from '../../../../utils/contract'; import { BarLoader } from '../../../ui/loaders/BarLoader'; @@ -18,7 +19,7 @@ export function InfoGovernance() { guardContracts: { freezeGuardType, freezeGuardContractAddress }, readOnly: { dao }, } = useFractal(); - const provider = useEthersProvider(); + const publicClient = usePublicClient(); const { getTimeDuration } = useTimeHelpers(); const baseContracts = useSafeContracts(); const [timelockPeriod, setTimelockPeriod] = useState(); @@ -26,18 +27,23 @@ export function InfoGovernance() { useEffect(() => { const setTimelockInfo = async () => { const formatBlocks = async (blocks: number): Promise => { - if (provider) { - return getTimeDuration(await blocksToSeconds(blocks, provider)); + if (publicClient) { + return getTimeDuration(await blocksToSeconds(blocks, publicClient)); } }; if (freezeGuardType == FreezeGuardType.MULTISIG) { - if (freezeGuardContractAddress && baseContracts) { - const freezeGuardContract = - baseContracts.multisigFreezeGuardMasterCopyContract.asProvider.attach( - freezeGuardContractAddress, - ); - setTimelockPeriod(await formatBlocks(await freezeGuardContract.timelockPeriod())); - setExecutionPeriod(await formatBlocks(await freezeGuardContract.executionPeriod())); + if (freezeGuardContractAddress && baseContracts && publicClient) { + const freezeGuardContract = getContract({ + address: freezeGuardContractAddress, + abi: baseContracts.multisigFreezeGuardMasterCopyContract.asPublic.abi, + client: publicClient, + }); + setTimelockPeriod( + await formatBlocks(Number(await freezeGuardContract.read.timelockPeriod([]))), + ); + setExecutionPeriod( + await formatBlocks(Number(await freezeGuardContract.read.executionPeriod([]))), + ); } } else if (dao?.isAzorius) { const azoriusGovernance = governance as AzoriusGovernance; @@ -64,7 +70,7 @@ export function InfoGovernance() { governance, freezeGuardContractAddress, freezeGuardType, - provider, + publicClient, timelockPeriod, dao, ]); diff --git a/src/components/pages/DaoHierarchy/DaoNode.tsx b/src/components/pages/DaoHierarchy/DaoNode.tsx index 65d330bd33..30f3946321 100644 --- a/src/components/pages/DaoHierarchy/DaoNode.tsx +++ b/src/components/pages/DaoHierarchy/DaoNode.tsx @@ -1,6 +1,6 @@ import { Box } from '@chakra-ui/react'; -import { utils } from 'ethers'; import { useEffect, useState } from 'react'; +import { getAddress } from 'viem'; import { useLoadDAONode } from '../../../hooks/DAO/loaders/useLoadDAONode'; import { useLoadDAOData } from '../../../hooks/DAO/useDAOData'; import { useFractal } from '../../../providers/App/AppProvider'; @@ -39,7 +39,7 @@ export function DaoNode({ useEffect(() => { if (daoAddress) { - loadDao(utils.getAddress(daoAddress)).then(_node => { + loadDao(getAddress(daoAddress)).then(_node => { const errorNode = _node as WithError; if (!errorNode.error) { // calculates the total number of descendants below the given node diff --git a/src/components/pages/DaoHierarchy/useFetchNodes.tsx b/src/components/pages/DaoHierarchy/useFetchNodes.tsx index ef4ad4d74b..55d75fece2 100644 --- a/src/components/pages/DaoHierarchy/useFetchNodes.tsx +++ b/src/components/pages/DaoHierarchy/useFetchNodes.tsx @@ -1,10 +1,11 @@ import { useQuery } from '@apollo/client'; import { useCallback, useEffect, useState } from 'react'; -import { getAddress, zeroAddress } from 'viem'; +import { Address, getAddress, getContract, zeroAddress } from 'viem'; import { DAOQueryDocument } from '../../../../.graphclient'; import { logError } from '../../../helpers/errorLogging'; import { useFractalModules } from '../../../hooks/DAO/loaders/useFractalModules'; import { useAsyncRetry } from '../../../hooks/utils/useAsyncRetry'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { useFractal } from '../../../providers/App/AppProvider'; import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI'; import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider'; @@ -13,6 +14,7 @@ import { getAzoriusModuleFromModules } from '../../../utils'; export function useFetchNodes(address?: string) { const [childNodes, setChildNodes] = useState(); + const { walletOrPublicClient } = useContractClient(); const { node: { safe, nodeHierarchy }, @@ -37,35 +39,44 @@ export function useFetchNodes(address?: string) { const getDAOOwner = useCallback( async (safeInfo?: Partial) => { - if (safeInfo && safeInfo.guard && baseContracts) { + if (safeInfo && safeInfo.guard && baseContracts && walletOrPublicClient) { const { multisigFreezeGuardMasterCopyContract, azoriusFreezeGuardMasterCopyContract, fractalAzoriusMasterCopyContract, } = baseContracts; if (safeInfo.guard !== zeroAddress) { - const guard = multisigFreezeGuardMasterCopyContract.asProvider.attach(safeInfo.guard); - const guardOwner = await guard.owner(); + const guard = getContract({ + abi: multisigFreezeGuardMasterCopyContract.asPublic.abi, + address: safeInfo.guard as Address, + client: walletOrPublicClient, + }); + const guardOwner = await guard.read.owner(); if (guardOwner !== safeInfo.address) { return guardOwner; } } else { - const modules = await lookupModules(safeInfo.modules || []); - if (!modules) return; + const modules = await lookupModules((safeInfo.modules as Address[]) || []); + if (!modules || !walletOrPublicClient) return; const azoriusModule = getAzoriusModuleFromModules(modules); if ( azoriusModule && azoriusFreezeGuardMasterCopyContract && fractalAzoriusMasterCopyContract ) { - const azoriusContract = fractalAzoriusMasterCopyContract?.asProvider.attach( - azoriusModule.moduleAddress, - ); - const azoriusGuardAddress = await azoriusContract.getGuard(); + const azoriusContract = getContract({ + abi: fractalAzoriusMasterCopyContract.asPublic.abi, + address: azoriusModule.moduleAddress as Address, + client: walletOrPublicClient, + }); + const azoriusGuardAddress = await azoriusContract.read.getGuard(); if (azoriusGuardAddress !== zeroAddress) { - const guard = - azoriusFreezeGuardMasterCopyContract.asProvider.attach(azoriusGuardAddress); - const guardOwner = await guard.owner(); + const guard = getContract({ + abi: azoriusFreezeGuardMasterCopyContract.asPublic.abi, + address: azoriusGuardAddress as Address, + client: walletOrPublicClient, + }); + const guardOwner = await guard.read.owner(); if (guardOwner !== safeInfo.address) { return guardOwner; } @@ -75,7 +86,7 @@ export function useFetchNodes(address?: string) { } return undefined; }, - [baseContracts, lookupModules], + [baseContracts, lookupModules, walletOrPublicClient], ); const fetchDAOInfo = useCallback( diff --git a/src/components/pages/DaoSettings/components/Metadata/index.tsx b/src/components/pages/DaoSettings/components/Metadata/index.tsx index e1b754b371..b1f7058099 100644 --- a/src/components/pages/DaoSettings/components/Metadata/index.tsx +++ b/src/components/pages/DaoSettings/components/Metadata/index.tsx @@ -2,6 +2,7 @@ import { Flex, Text, Button, Divider } from '@chakra-ui/react'; import { useState, useEffect, ChangeEventHandler } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; +import { encodeFunctionData } from 'viem'; import { SettingsSection } from '..'; import { DAO_ROUTES } from '../../../../../constants/routes'; import useSubmitProposal from '../../../../../hooks/DAO/proposal/useSubmitProposal'; @@ -70,10 +71,14 @@ export default function MetadataContainer() { description: '', documentationUrl: '', }, - targets: [fractalRegistryContract.asProvider.address], + targets: [fractalRegistryContract.asPublic.address], values: [0n], calldatas: [ - fractalRegistryContract.asProvider.interface.encodeFunctionData('updateDAOName', [name]), + encodeFunctionData({ + functionName: 'updateDAOName', + abi: fractalRegistryContract.asPublic.abi, + args: [name], + }), ], }; @@ -98,13 +103,14 @@ export default function MetadataContainer() { description: '', documentationUrl: '', }, - targets: [keyValuePairsContract.asProvider.address], + targets: [keyValuePairsContract.asPublic.address], values: [0n], calldatas: [ - keyValuePairsContract.asProvider.interface.encodeFunctionData('updateValues', [ - ['snapshotURL'], - [snapshotURL], - ]), + encodeFunctionData({ + functionName: 'updateValues', + abi: keyValuePairsContract.asPublic.abi, + args: [['snapshotURL'], [snapshotURL]], + }), ], }; diff --git a/src/components/pages/DaoSettings/components/Signers/hooks/useAddSigner.ts b/src/components/pages/DaoSettings/components/Signers/hooks/useAddSigner.ts index 2a436f6a11..465796801c 100644 --- a/src/components/pages/DaoSettings/components/Signers/hooks/useAddSigner.ts +++ b/src/components/pages/DaoSettings/components/Signers/hooks/useAddSigner.ts @@ -1,5 +1,6 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { Address, encodeFunctionData } from 'viem'; import useSubmitProposal from '../../../../../../hooks/DAO/proposal/useSubmitProposal'; import { useFractal } from '../../../../../../providers/App/AppProvider'; import { ProposalExecuteData } from '../../../../../../types'; @@ -19,7 +20,7 @@ const useAddSigner = () => { newSigner: string; threshold: number; nonce: number; - daoAddress: string | null; + daoAddress: Address | null; close: () => void; }) => { if (!baseContracts) { @@ -27,18 +28,18 @@ const useAddSigner = () => { } const { safeSingletonContract } = baseContracts; const description = 'Add Signer'; - const calldatas = [ - safeSingletonContract.asSigner.interface.encodeFunctionData('addOwnerWithThreshold', [ - newSigner, - BigInt(threshold), - ]), + encodeFunctionData({ + abi: safeSingletonContract.asWallet.abi, + args: [newSigner, BigInt(threshold)], + functionName: 'addOwnerWithThreshold', + }), ]; const proposalData: ProposalExecuteData = { targets: [daoAddress!], values: [0n], - calldatas: calldatas, + calldatas, metaData: { title: 'Add Signer', description: description, diff --git a/src/components/pages/DaoSettings/components/Signers/hooks/useRemoveSigner.ts b/src/components/pages/DaoSettings/components/Signers/hooks/useRemoveSigner.ts index 763f1162bd..5e9453591d 100644 --- a/src/components/pages/DaoSettings/components/Signers/hooks/useRemoveSigner.ts +++ b/src/components/pages/DaoSettings/components/Signers/hooks/useRemoveSigner.ts @@ -1,5 +1,6 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { encodeFunctionData, Address } from 'viem'; import useSubmitProposal from '../../../../../../hooks/DAO/proposal/useSubmitProposal'; import { useFractal } from '../../../../../../providers/App/AppProvider'; import { ProposalExecuteData } from '../../../../../../types'; @@ -29,15 +30,15 @@ const useRemoveSigner = ({ const description = 'Remove Signers'; const calldatas = [ - safeSingletonContract.asProvider.interface.encodeFunctionData('removeOwner', [ - prevSigner, - signerToRemove, - BigInt(threshold), - ]), + encodeFunctionData({ + abi: safeSingletonContract.asPublic.abi, + functionName: 'removeOwner', + args: [prevSigner, signerToRemove, BigInt(threshold)], + }), ]; const proposalData: ProposalExecuteData = { - targets: [daoAddress!], + targets: [daoAddress! as Address], values: [0n], calldatas: calldatas, metaData: { diff --git a/src/components/pages/DaoSettings/components/Signers/modals/AddSignerModal.tsx b/src/components/pages/DaoSettings/components/Signers/modals/AddSignerModal.tsx index b6496b550b..0af0a06ada 100644 --- a/src/components/pages/DaoSettings/components/Signers/modals/AddSignerModal.tsx +++ b/src/components/pages/DaoSettings/components/Signers/modals/AddSignerModal.tsx @@ -14,10 +14,11 @@ import { LabelWrapper } from '@decent-org/fractal-ui'; import { Field, FieldAttributes, Formik } from 'formik'; import { useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Address } from 'viem'; +import { usePublicClient } from 'wagmi'; import * as Yup from 'yup'; import { useValidationAddress } from '../../../../../../hooks/schemas/common/useValidationAddress'; import { useFractal } from '../../../../../../providers/App/AppProvider'; -import { useEthersSigner } from '../../../../../../providers/Ethers/hooks/useEthersSigner'; import { couldBeENS } from '../../../../../../utils/url'; import SupportTooltip from '../../../../../ui/badges/SupportTooltip'; import { CustomNonceInput } from '../../../../../ui/forms/CustomNonceInput'; @@ -37,29 +38,29 @@ function AddSignerModal({ node: { daoAddress, safe }, } = useFractal(); const { t } = useTranslation(['modals', 'common']); - const signer = useEthersSigner(); const { addressValidationTest, newSignerValidationTest } = useValidationAddress(); const tooltipContainer = useRef(null); const addSigner = useAddSigner(); + const publicClient = usePublicClient(); const onSubmit = useCallback( - async (values: { address: string; threshold: number; nonce: number }) => { + async (values: { address: Address; threshold: number; nonce: number }) => { const { address, nonce, threshold } = values; - let validAddress = address; - if (couldBeENS(validAddress)) { - validAddress = await signer!.resolveName(address); + let validAddress: Address | null = address; + if (couldBeENS(validAddress) && publicClient) { + validAddress = await publicClient.getEnsAddress({ name: address }); } await addSigner({ - newSigner: validAddress, + newSigner: validAddress || address, threshold: threshold, nonce: nonce, - daoAddress: daoAddress, + daoAddress: daoAddress as Address, close: close, }); }, - [addSigner, close, daoAddress, signer], + [addSigner, close, daoAddress, publicClient], ); const addSignerValidationSchema = Yup.object().shape({ @@ -75,7 +76,7 @@ function AddSignerModal({ i + 1), diff --git a/src/components/ui/forms/ABISelector.tsx b/src/components/ui/forms/ABISelector.tsx index 653460fec6..97298880f2 100644 --- a/src/components/ui/forms/ABISelector.tsx +++ b/src/components/ui/forms/ABISelector.tsx @@ -1,9 +1,9 @@ import { Select, Text } from '@chakra-ui/react'; import axios from 'axios'; -import { isAddress } from 'ethers/lib/utils'; import detectProxyTarget from 'evm-proxy-detection'; import { useMemo, useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { isAddress } from 'viem'; import { useEnsAddress, usePublicClient } from 'wagmi'; import { logError } from '../../../helpers/errorLogging'; import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider'; diff --git a/src/components/ui/icons/FavoriteIcon.tsx b/src/components/ui/icons/FavoriteIcon.tsx index 30be0950de..c3bdeb1f74 100644 --- a/src/components/ui/icons/FavoriteIcon.tsx +++ b/src/components/ui/icons/FavoriteIcon.tsx @@ -1,8 +1,8 @@ import { Box, BoxProps, IconButton, Tooltip } from '@chakra-ui/react'; import { StarGoldSolid, StarOutline } from '@decent-org/fractal-ui'; -import { utils } from 'ethers'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; +import { getAddress } from 'viem'; import { useAccountFavorites } from '../../../hooks/DAO/loaders/useFavorites'; interface Props extends BoxProps { @@ -12,7 +12,7 @@ interface Props extends BoxProps { export default function FavoriteIcon({ safeAddress, ...rest }: Props) { const { favoritesList, toggleFavorite } = useAccountFavorites(); const isFavorite = useMemo( - () => (!!safeAddress ? favoritesList.includes(utils.getAddress(safeAddress)) : false), + () => (!!safeAddress ? favoritesList.includes(getAddress(safeAddress)) : false), [favoritesList, safeAddress], ); const { t } = useTranslation(); diff --git a/src/components/ui/menus/ManageDAO/ManageDAOMenu.tsx b/src/components/ui/menus/ManageDAO/ManageDAOMenu.tsx index 58dbf794f8..0c7f7a2efd 100644 --- a/src/components/ui/menus/ManageDAO/ManageDAOMenu.tsx +++ b/src/components/ui/menus/ManageDAO/ManageDAOMenu.tsx @@ -1,7 +1,7 @@ import { VEllipsis } from '@decent-org/fractal-ui'; -import { ERC20FreezeVoting, MultisigFreezeVoting } from '@fractal-framework/fractal-contracts'; import { useMemo, useCallback, useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; +import { Address, getContract } from 'viem'; import { DAO_ROUTES } from '../../../../constants/routes'; import { isWithinFreezePeriod, @@ -12,6 +12,7 @@ import useClawBack from '../../../../hooks/DAO/useClawBack'; import useSafeContracts from '../../../../hooks/safe/useSafeContracts'; import useBlockTimestamp from '../../../../hooks/utils/useBlockTimestamp'; import { useCanUserCreateProposal } from '../../../../hooks/utils/useCanUserSubmitProposal'; +import useContractClient from '../../../../hooks/utils/useContractClient'; import { useMasterCopy } from '../../../../hooks/utils/useMasterCopy'; import { useFractal } from '../../../../providers/App/AppProvider'; import { useNetworkConfig } from '../../../../providers/NetworkConfig/NetworkConfigProvider'; @@ -28,7 +29,7 @@ import { useFractalModal } from '../../modals/useFractalModal'; import { OptionMenu } from '../OptionMenu'; interface IManageDAOMenu { - parentAddress?: string | null; + parentAddress?: Address | null; fractalNode?: FractalNode; freezeGuard?: FreezeGuard; guardContracts?: FractalGuardContracts; @@ -66,6 +67,7 @@ export function ManageDAOMenu({ parentAddress, childSafeInfo: fractalNode, }); + const { walletClient } = useContractClient(); useEffect(() => { const loadGovernanceType = async () => { @@ -74,27 +76,23 @@ export function ManageDAOMenu({ // are the same - we can simply grab governance type from global scope and avoid double-fetching setGovernanceType(type); } else { - if (fractalNode?.fractalModules && baseContracts) { + if (fractalNode?.fractalModules && baseContracts && walletClient) { let result = GovernanceType.MULTISIG; const azoriusModule = getAzoriusModuleFromModules(fractalNode?.fractalModules); const { fractalAzoriusMasterCopyContract } = baseContracts; if (!!azoriusModule) { - const azoriusContract = { - asProvider: fractalAzoriusMasterCopyContract.asProvider.attach( - azoriusModule.moduleAddress, - ), - asSigner: fractalAzoriusMasterCopyContract.asSigner.attach( - azoriusModule.moduleAddress, - ), - }; + const azoriusContract = getContract({ + abi: fractalAzoriusMasterCopyContract.asWallet.abi, + address: azoriusModule.moduleAddress, + client: walletClient, + }); // @dev assumes the first strategy is the voting contract - const votingContractAddress = ( - await azoriusContract.asProvider.getStrategies( - '0x0000000000000000000000000000000000000001', - 0, - ) - )[1]; + const votingContractAddresses = (await azoriusContract.read.getStrategies([ + '0x0000000000000000000000000000000000000001', + 0, + ])) as Address[]; + const votingContractAddress = votingContractAddresses[1]; const masterCopyData = await getZodiacModuleProxyMasterCopyData(votingContractAddress); if (masterCopyData.isOzLinearVoting) { @@ -110,7 +108,15 @@ export function ManageDAOMenu({ }; loadGovernanceType(); - }, [fractalNode, safe, safeAddress, type, getZodiacModuleProxyMasterCopyData, baseContracts]); + }, [ + fractalNode, + safe, + safeAddress, + type, + getZodiacModuleProxyMasterCopyData, + baseContracts, + walletClient, + ]); const { addressPrefix } = useNetworkConfig(); const handleNavigateToSettings = useCallback(() => { @@ -125,35 +131,35 @@ export function ManageDAOMenu({ () => ({ optionKey: 'optionInitiateFreeze', onClick: () => { - const freezeVotingContract = - baseContracts!.freezeMultisigVotingMasterCopyContract.asSigner.attach( - guardContracts!.freezeVotingContractAddress!, - ); + const freezeVotingContract = getContract({ + abi: baseContracts!.freezeMultisigVotingMasterCopyContract.asPublic.abi, + address: guardContracts!.freezeVotingContractAddress!, + client: walletClient!, + }); const freezeVotingType = guardContracts!.freezeVotingType; if (freezeVotingContract) { if ( freezeVotingType === FreezeVotingType.MULTISIG || freezeVotingType === FreezeVotingType.ERC20 ) { - return ( - freezeVotingContract as ERC20FreezeVoting | MultisigFreezeVoting - ).castFreezeVote(); + return freezeVotingContract.write.castFreezeVote([]); } else if (freezeVotingType === FreezeVotingType.ERC721) { getUserERC721VotingTokens(undefined, parentAddress).then(tokensInfo => { - const freezeERC721VotingContract = - baseContracts!.freezeERC721VotingMasterCopyContract.asSigner.attach( - guardContracts!.freezeVotingContractAddress!, - ); - return freezeERC721VotingContract!['castFreezeVote(address[],uint256[])']( + const freezeERC721VotingContract = getContract({ + address: guardContracts!.freezeVotingContractAddress!, + abi: baseContracts!.freezeERC721VotingMasterCopyContract!.asWallet.abi, + client: walletClient!, + }); + return freezeERC721VotingContract!.write['castFreezeVote(address[],uint256[])']([ tokensInfo.totalVotingTokenAddresses, tokensInfo.totalVotingTokenIds, - ); + ]); }); } } }, }), - [baseContracts, guardContracts, getUserERC721VotingTokens, parentAddress], + [baseContracts, guardContracts, getUserERC721VotingTokens, parentAddress, walletClient], ); const options = useMemo(() => { diff --git a/src/components/ui/modals/DelegateModal.tsx b/src/components/ui/modals/DelegateModal.tsx index c281d2ecf2..b51ffac8c0 100644 --- a/src/components/ui/modals/DelegateModal.tsx +++ b/src/components/ui/modals/DelegateModal.tsx @@ -2,15 +2,15 @@ import { Box, Button, Divider, Flex, SimpleGrid, Spacer, Text } from '@chakra-ui import { LabelWrapper } from '@decent-org/fractal-ui'; import { Field, FieldAttributes, Formik } from 'formik'; import { useTranslation } from 'react-i18next'; -import { zeroAddress } from 'viem'; +import { zeroAddress, Address, getContract } from 'viem'; import * as Yup from 'yup'; -import { LockRelease__factory } from '../../../assets/typechain-types/dcnt'; +import LockReleaseABI from '../../../assets/abi/LockRelease'; import useDelegateVote from '../../../hooks/DAO/useDelegateVote'; import useSafeContracts from '../../../hooks/safe/useSafeContracts'; import { useValidationAddress } from '../../../hooks/schemas/common/useValidationAddress'; +import useContractClient from '../../../hooks/utils/useContractClient'; import useDisplayName from '../../../hooks/utils/useDisplayName'; import { useFractal } from '../../../providers/App/AppProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; import { AzoriusGovernance, DecentGovernance } from '../../../types'; import { formatCoin } from '../../../utils/numberFormats'; import { couldBeENS } from '../../../utils/url'; @@ -28,8 +28,8 @@ export function DelegateModal({ close }: { close: Function }) { } = useFractal(); const baseContracts = useSafeContracts(); + const { publicClient, walletClient } = useContractClient(); - const signer = useEthersSigner(); const azoriusGovernance = governance as AzoriusGovernance; const decentGovernance = azoriusGovernance as DecentGovernance; const delegateeDisplayName = useDisplayName(azoriusGovernance?.votesToken?.delegatee); @@ -38,36 +38,47 @@ export function DelegateModal({ close }: { close: Function }) { const { addressValidationTest } = useValidationAddress(); const submitDelegation = async (values: { address: string }) => { - if (!votesTokenContractAddress || !baseContracts) return; - let validAddress = values.address; + if (!votesTokenContractAddress || !baseContracts || !publicClient || !walletClient) return; + let validAddress: Address | null = values.address as Address; if (couldBeENS(validAddress)) { - validAddress = await signer!.resolveName(values.address); + validAddress = await publicClient.getEnsAddress({ name: values.address }); } - const votingTokenContract = - baseContracts.votesERC20WrapperMasterCopyContract.asSigner.attach(votesTokenContractAddress); - delegateVote({ - delegatee: validAddress, - votingTokenContract, - successCallback: () => { - close(); - }, + const votingTokenContract = getContract({ + abi: baseContracts.votesERC20WrapperMasterCopyContract.asPublic.abi, + address: votesTokenContractAddress, + client: walletClient, }); + if (validAddress) { + delegateVote({ + delegatee: validAddress, + votingTokenContract, + successCallback: () => { + close(); + }, + }); + } }; const submitLockedDelegation = async (values: { address: string }) => { - if (!lockReleaseContractAddress || !baseContracts || !signer) return; - let validAddress = values.address; + if (!lockReleaseContractAddress || !baseContracts || !publicClient || !walletClient) return; + let validAddress: Address | null = values.address as Address; if (couldBeENS(validAddress)) { - validAddress = await signer!.resolveName(values.address); + validAddress = await publicClient.getEnsAddress({ name: values.address }); + } + if (validAddress) { + const lockReleaseContract = getContract({ + address: lockReleaseContractAddress, + client: walletClient, + abi: LockReleaseABI, + }); + delegateVote({ + delegatee: validAddress, + votingTokenContract: lockReleaseContract, + successCallback: async () => { + await loadReadOnlyValues(); + close(); + }, + }); } - const lockReleaseContract = LockRelease__factory.connect(lockReleaseContractAddress, signer); - delegateVote({ - delegatee: validAddress, - votingTokenContract: lockReleaseContract, - successCallback: async () => { - await loadReadOnlyValues(); - close(); - }, - }); }; const delegationValidationSchema = Yup.object().shape({ diff --git a/src/components/ui/modals/ForkProposalTemplateModal.tsx b/src/components/ui/modals/ForkProposalTemplateModal.tsx index 71b86644d5..0d83b75d6d 100644 --- a/src/components/ui/modals/ForkProposalTemplateModal.tsx +++ b/src/components/ui/modals/ForkProposalTemplateModal.tsx @@ -6,7 +6,7 @@ import { DAO_ROUTES } from '../../../constants/routes'; import { useIsSafe } from '../../../hooks/safe/useIsSafe'; import { validateAddress } from '../../../hooks/schemas/common/useValidationAddress'; import { useCanUserCreateProposal } from '../../../hooks/utils/useCanUserSubmitProposal'; -import useSignerOrProvider from '../../../hooks/utils/useSignerOrProvider'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { useFractal } from '../../../providers/App/AppProvider'; import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider'; import { ProposalTemplate } from '../../../types/proposalBuilder'; @@ -29,11 +29,11 @@ export default function ForkProposalTemplateModal({ const { t } = useTranslation('proposalTemplate'); const navigate = useNavigate(); - const signerOrProvider = useSignerOrProvider(); const { chain, addressPrefix } = useNetworkConfig(); const { node: { proposalTemplatesHash }, } = useFractal(); + const { publicClient } = useContractClient(); const { isSafe, isSafeLoading } = useIsSafe(targetDAOAddress); const { getCanUserCreateProposal } = useCanUserCreateProposal(); @@ -51,7 +51,7 @@ export default function ForkProposalTemplateModal({ const { validation: { address, isValidAddress }, - } = await validateAddress({ address: inputValue, signerOrProvider }); + } = await validateAddress({ address: inputValue, publicClient }); if (!isValidAddress) { setError(t('errorInvalidAddress', { ns: 'common' })); @@ -71,7 +71,7 @@ export default function ForkProposalTemplateModal({ } return isValidAddress; - }, [getCanUserCreateProposal, inputValue, isSafe, isSafeLoading, chain, signerOrProvider, t]); + }, [getCanUserCreateProposal, inputValue, isSafe, isSafeLoading, chain, publicClient, t]); const handleSubmit = () => { navigate( diff --git a/src/components/ui/modals/ProposalTemplateModal.tsx b/src/components/ui/modals/ProposalTemplateModal.tsx index 6cc11a8431..71791f8631 100644 --- a/src/components/ui/modals/ProposalTemplateModal.tsx +++ b/src/components/ui/modals/ProposalTemplateModal.tsx @@ -8,7 +8,6 @@ import { Switch, VStack, } from '@chakra-ui/react'; -import { utils } from 'ethers'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; diff --git a/src/components/ui/modals/UnwrapToken.tsx b/src/components/ui/modals/UnwrapToken.tsx index b25974e8c1..4912c9f3d8 100644 --- a/src/components/ui/modals/UnwrapToken.tsx +++ b/src/components/ui/modals/UnwrapToken.tsx @@ -1,39 +1,42 @@ import { Button, Flex, Input } from '@chakra-ui/react'; import { LabelWrapper } from '@decent-org/fractal-ui'; -import { VotesERC20Wrapper } from '@fractal-framework/fractal-contracts'; import { Formik, FormikProps } from 'formik'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { getContract } from 'viem'; import { useAccount } from 'wagmi'; import * as Yup from 'yup'; import { useERC20LinearToken } from '../../../hooks/DAO/loaders/governance/useERC20LinearToken'; import useSafeContracts from '../../../hooks/safe/useSafeContracts'; import useApproval from '../../../hooks/utils/useApproval'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { useFormHelpers } from '../../../hooks/utils/useFormHelpers'; import { useTransaction } from '../../../hooks/utils/useTransaction'; import { useFractal } from '../../../providers/App/AppProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; -import { AzoriusGovernance, BigIntValuePair } from '../../../types'; +import { AzoriusGovernance, BigIntValuePair, VotesERC20, VotesERC20Wrapper } from '../../../types'; import { formatCoin } from '../../../utils'; import { BigIntInput } from '../forms/BigIntInput'; export function UnwrapToken({ close }: { close: () => void }) { const { governance, governanceContracts } = useFractal(); const azoriusGovernance = governance as AzoriusGovernance; - const signer = useEthersSigner(); const { address: account } = useAccount(); const baseContracts = useSafeContracts(); const { loadERC20TokenAccountData } = useERC20LinearToken({ onMount: false }); + const { walletClient } = useContractClient(); + const [contractCall, pending] = useTransaction(); const { approved, approveTransaction, pending: approvalPending, } = useApproval( - baseContracts?.votesTokenMasterCopyContract?.asSigner.attach( - governanceContracts.underlyingTokenAddress!, - ), + getContract({ + abi: baseContracts?.votesTokenMasterCopyContract.asWallet.abi!, + address: governanceContracts.underlyingTokenAddress!, + client: walletClient!, + }) as unknown as VotesERC20 | VotesERC20Wrapper, azoriusGovernance.votesToken?.address, ); @@ -43,14 +46,14 @@ export function UnwrapToken({ close }: { close: () => void }) { const handleFormSubmit = useCallback( (amount: BigIntValuePair) => { const { votesTokenContractAddress } = governanceContracts; - if (!votesTokenContractAddress || !signer || !account) return; - const votesTokenContract = - baseContracts?.votesERC20WrapperMasterCopyContract?.asSigner.attach( - votesTokenContractAddress, - ); - const wrapperTokenContract = votesTokenContract as VotesERC20Wrapper; + if (!votesTokenContractAddress || !walletClient || !account) return; + const votesTokenContract = getContract({ + abi: baseContracts?.votesERC20WrapperMasterCopyContract.asWallet.abi, + address: votesTokenContractAddress, + client: walletClient, + }); contractCall({ - contractFn: () => wrapperTokenContract.withdrawTo(account, amount.bigintValue!), + contractFn: () => votesTokenContract.write.withdrawTo([account, amount.bigintValue!]), pendingMessage: t('unwrapTokenPendingMessage'), failedMessage: t('unwrapTokenFailedMessage'), successMessage: t('unwrapTokenSuccessMessage'), @@ -66,7 +69,7 @@ export function UnwrapToken({ close }: { close: () => void }) { account, contractCall, governanceContracts, - signer, + walletClient, close, t, loadERC20TokenAccountData, diff --git a/src/components/ui/modals/WrapToken.tsx b/src/components/ui/modals/WrapToken.tsx index 4284322cf4..97b8450696 100644 --- a/src/components/ui/modals/WrapToken.tsx +++ b/src/components/ui/modals/WrapToken.tsx @@ -1,28 +1,26 @@ import { Button, Flex, Input } from '@chakra-ui/react'; import { LabelWrapper } from '@decent-org/fractal-ui'; -import { Contract } from 'ethers'; import { Formik, FormikProps } from 'formik'; import { useCallback, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { erc20Abi } from 'viem'; +import { erc20Abi, getContract } from 'viem'; import { useAccount } from 'wagmi'; import * as Yup from 'yup'; import { logError } from '../../../helpers/errorLogging'; import { useERC20LinearToken } from '../../../hooks/DAO/loaders/governance/useERC20LinearToken'; import useSafeContracts from '../../../hooks/safe/useSafeContracts'; import useApproval from '../../../hooks/utils/useApproval'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { useFormHelpers } from '../../../hooks/utils/useFormHelpers'; import { useTransaction } from '../../../hooks/utils/useTransaction'; import { useFractal } from '../../../providers/App/AppProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; -import { AzoriusGovernance, BigIntValuePair } from '../../../types'; +import { VotesERC20, VotesERC20Wrapper, AzoriusGovernance, BigIntValuePair } from '../../../types'; import { formatCoin } from '../../../utils'; import { BigIntInput } from '../forms/BigIntInput'; export function WrapToken({ close }: { close: () => void }) { const { governance, governanceContracts } = useFractal(); const azoriusGovernance = governance as AzoriusGovernance; - const signer = useEthersSigner(); const { address: account } = useAccount(); const [userBalance, setUserBalance] = useState({ value: '', @@ -31,15 +29,18 @@ export function WrapToken({ close }: { close: () => void }) { const baseContracts = useSafeContracts(); const { loadERC20TokenAccountData } = useERC20LinearToken({ onMount: false }); + const { walletClient } = useContractClient(); const [contractCall, pending] = useTransaction(); const { approved, approveTransaction, pending: approvalPending, } = useApproval( - baseContracts?.votesTokenMasterCopyContract?.asSigner.attach( - governanceContracts.underlyingTokenAddress!, - ), + getContract({ + abi: baseContracts?.votesTokenMasterCopyContract.asWallet.abi!, + address: governanceContracts.underlyingTokenAddress!, + client: walletClient!, + }) as unknown as VotesERC20 | VotesERC20Wrapper, azoriusGovernance.votesToken?.address, userBalance.bigintValue, ); @@ -51,19 +52,19 @@ export function WrapToken({ close }: { close: () => void }) { if ( !azoriusGovernance.votesToken?.decimals || !azoriusGovernance.votesToken.underlyingTokenData || - !signer || + !walletClient || !account ) return; - const baseTokenContract = new Contract( - azoriusGovernance.votesToken.underlyingTokenData.address, - erc20Abi, - signer, - ); + const baseTokenContract = getContract({ + address: azoriusGovernance.votesToken.underlyingTokenData.address, + abi: erc20Abi, + client: walletClient, + }); try { const [balance, decimals]: [bigint, number] = await Promise.all([ - baseTokenContract.balanceOf(account), - baseTokenContract.decimals(), + baseTokenContract.read.balanceOf([account]), + baseTokenContract.read.decimals(), ]); setUserBalance({ value: formatCoin( @@ -78,7 +79,7 @@ export function WrapToken({ close }: { close: () => void }) { logError(e); return; } - }, [account, azoriusGovernance.votesToken, signer]); + }, [account, azoriusGovernance.votesToken, walletClient]); useEffect(() => { getUserUnderlyingTokenBalance(); @@ -87,13 +88,14 @@ export function WrapToken({ close }: { close: () => void }) { const handleFormSubmit = useCallback( (amount: BigIntValuePair) => { const { votesTokenContractAddress } = governanceContracts; - if (!votesTokenContractAddress || !signer || !account || !baseContracts) return; - const wrapperTokenContract = - baseContracts.votesERC20WrapperMasterCopyContract.asSigner.attach( - votesTokenContractAddress, - ); + if (!votesTokenContractAddress || !account || !baseContracts || !walletClient) return; + const votesTokenContract = getContract({ + abi: baseContracts?.votesERC20WrapperMasterCopyContract.asWallet.abi, + address: votesTokenContractAddress, + client: walletClient, + }); contractCall({ - contractFn: () => wrapperTokenContract.depositFor(account, amount.bigintValue!), + contractFn: () => votesTokenContract.write.depositFor([account, amount.bigintValue!]), pendingMessage: t('wrapTokenPendingMessage'), failedMessage: t('wrapTokenFailedMessage'), successMessage: t('wrapTokenSuccessMessage'), @@ -109,11 +111,11 @@ export function WrapToken({ close }: { close: () => void }) { account, contractCall, governanceContracts, - signer, close, t, loadERC20TokenAccountData, baseContracts, + walletClient, ], ); diff --git a/src/components/ui/proposal/ProposalExecutableCode.tsx b/src/components/ui/proposal/ProposalExecutableCode.tsx index 42b1429a0b..36e4107149 100644 --- a/src/components/ui/proposal/ProposalExecutableCode.tsx +++ b/src/components/ui/proposal/ProposalExecutableCode.tsx @@ -11,8 +11,8 @@ import { Text, } from '@chakra-ui/react'; import { Info } from '@decent-org/fractal-ui'; -import { utils } from 'ethers'; import { useTranslation } from 'react-i18next'; +import { isAddress } from 'viem'; import { ADDRESS_MULTISIG_METADATA } from '../../../constants/common'; import { DecodedTransaction, FractalProposal } from '../../../types'; import EtherscanLinkAddress from '../links/EtherscanLinkAddress'; @@ -38,7 +38,7 @@ function TransactionRow({ paramKey, value }: { paramKey: string; value: string } ml={{ base: 0, md: '0.5rem' }} maxW={{ base: '100%', md: '70%' }} > - {utils.isAddress(value) ? ( + {isAddress(value) ? ( {value} ) : ( value diff --git a/src/components/ui/proposal/useProposalCountdown.tsx b/src/components/ui/proposal/useProposalCountdown.tsx index 92e85ec5dc..3797fd9393 100644 --- a/src/components/ui/proposal/useProposalCountdown.tsx +++ b/src/components/ui/proposal/useProposalCountdown.tsx @@ -1,18 +1,19 @@ -import { AzoriusFreezeGuard, MultisigFreezeGuard } from '@fractal-framework/fractal-contracts'; import { useCallback, useEffect, useRef, useState } from 'react'; +import { getContract } from 'viem'; import { logError } from '../../../helpers/errorLogging'; import useSnapshotProposal from '../../../hooks/DAO/loaders/snapshot/useSnapshotProposal'; import { useDAOProposals } from '../../../hooks/DAO/loaders/useProposals'; import useUpdateProposalState from '../../../hooks/DAO/proposal/useUpdateProposalState'; import useSafeContracts from '../../../hooks/safe/useSafeContracts'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { useFractal } from '../../../providers/App/AppProvider'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; import { AzoriusGovernance, FractalProposal, FractalProposalState, AzoriusProposal, FreezeGuardType, + MultisigFreezeGuard, } from '../../../types'; import { blocksToSeconds } from '../../../utils/contract'; import { getTxTimelockedTimestamp } from '../../../utils/guard'; @@ -26,7 +27,7 @@ export function useProposalCountdown(proposal: FractalProposal) { readOnly: { dao }, } = useFractal(); const baseContracts = useSafeContracts(); - const provider = useEthersProvider(); + const { publicClient } = useContractClient(); const [secondsLeft, setSecondsLeft] = useState(); const { snapshotProposal, isSnapshotProposal } = useSnapshotProposal(proposal); @@ -85,23 +86,27 @@ export function useProposalCountdown(proposal: FractalProposal) { }; }, [secondsLeft, loadDAOProposals, proposal, updateProposalState, governance.type, dao]); - const startCountdown = useCallback((initialTimeMs: number) => { + const startCountdown = useCallback((initialTimeMs: bigint) => { countdownInterval.current = setInterval(() => { - setSecondsLeft(Math.floor((initialTimeMs - Date.now()) / 1000)); + setSecondsLeft(Math.floor((Number(initialTimeMs) - Date.now()) / 1000)); }, 1000); }, []); const getCountdown = useCallback(async () => { - if (!baseContracts) return; + if (!baseContracts || !publicClient) return; const freezeGuard = - freezeGuardType === FreezeGuardType.MULTISIG - ? baseContracts.multisigFreezeGuardMasterCopyContract.asSigner.attach( - freezeGuardContractAddress || '0x', - ) - : freezeGuardType === FreezeGuardType.AZORIUS - ? (baseContracts.azoriusFreezeGuardMasterCopyContract.asSigner.attach( - freezeGuardContractAddress || '0x', - ) as AzoriusFreezeGuard) + freezeGuardType === FreezeGuardType.MULTISIG && freezeGuardContractAddress + ? getContract({ + client: publicClient, + abi: baseContracts.multisigFreezeGuardMasterCopyContract.asPublic.abi, + address: freezeGuardContractAddress, + }) + : freezeGuardType === FreezeGuardType.AZORIUS && freezeGuardContractAddress + ? getContract({ + address: freezeGuardContractAddress, + client: publicClient, + abi: baseContracts.azoriusFreezeGuardMasterCopyContract.asPublic.abi, + }) : undefined; const isSafeGuard = freezeGuardType === FreezeGuardType.MULTISIG; @@ -112,7 +117,7 @@ export function useProposalCountdown(proposal: FractalProposal) { // If the proposal is active and has a deadline, start the countdown (for Azorius proposals) if (proposal.state === FractalProposalState.ACTIVE && votingDeadlineMs) { - startCountdown(votingDeadlineMs); + startCountdown(BigInt(votingDeadlineMs)); return; } else if ( // If the proposal is timelocked and has a deadline, start the countdown (for Azorius proposals) @@ -120,57 +125,64 @@ export function useProposalCountdown(proposal: FractalProposal) { votingDeadlineMs && timeLockPeriod ) { - startCountdown(votingDeadlineMs + Number(timeLockPeriod.value) * 1000); + startCountdown(BigInt(votingDeadlineMs) + timeLockPeriod.value * 1000n); // If the proposal is timelocked start the countdown (for safe multisig proposals with guards) return; } else if ( proposal.state === FractalProposalState.TIMELOCKED && freezeGuard && isSafeGuard && - provider + publicClient ) { - const safeGuard = freezeGuard as MultisigFreezeGuard; - const timelockedTimestamp = await getTxTimelockedTimestamp(proposal, safeGuard, provider); - const guardTimeLockPeriod = await blocksToSeconds(await safeGuard.timelockPeriod(), provider); - startCountdown(timelockedTimestamp * 1000 + guardTimeLockPeriod * 1000); + const safeGuard = freezeGuard as unknown as MultisigFreezeGuard; + const timelockedTimestamp = await getTxTimelockedTimestamp(proposal, safeGuard, publicClient); + const guardTimeLockPeriod = await blocksToSeconds( + Number(await safeGuard.read.timelockPeriod()), + publicClient, + ); + startCountdown(BigInt(timelockedTimestamp) * 1000n + BigInt(guardTimeLockPeriod) * 1000n); // If the proposal is executable start the countdown (for safe multisig proposals with guards) return; } else if (proposal.state === FractalProposalState.EXECUTABLE && freezeGuard) { - let guardTimelockPeriod: number = 0; - if (isSafeGuard && provider) { - const safeGuard = freezeGuard as MultisigFreezeGuard; + let guardTimelockPeriod: bigint = 0n; + if (isSafeGuard && publicClient) { + const safeGuard = freezeGuard as unknown as MultisigFreezeGuard; const timelockedTimestamp = - (await getTxTimelockedTimestamp(proposal, safeGuard, provider)) * 1000; + BigInt(await getTxTimelockedTimestamp(proposal, safeGuard, publicClient)) * 1000n; const safeGuardTimelockPeriod = - (await blocksToSeconds(await safeGuard.timelockPeriod(), provider)) * 1000; + BigInt( + await blocksToSeconds(Number(await safeGuard.read.timelockPeriod()), publicClient), + ) * 1000n; const guardExecutionPeriod = - (await blocksToSeconds(await safeGuard.executionPeriod(), provider)) * 1000; + BigInt( + await blocksToSeconds(Number(await safeGuard.read.executionPeriod()), publicClient), + ) * 1000n; guardTimelockPeriod = timelockedTimestamp + safeGuardTimelockPeriod + guardExecutionPeriod; // If the proposal is executing start the countdown (for Azorius proposals with guards) return; } else if (isAzoriusGuard && timeLockPeriod && votingDeadlineMs) { - guardTimelockPeriod = Number(timeLockPeriod.value) * 1000 + votingDeadlineMs; + guardTimelockPeriod = timeLockPeriod.value * 1000n + BigInt(votingDeadlineMs); } startCountdown(guardTimelockPeriod); return; } else if (isSnapshotProposal && proposal.state === FractalProposalState.PENDING) { - startCountdown(snapshotProposal.startTime * 1000); + startCountdown(BigInt(snapshotProposal.startTime) * 1000n); return; } else if (isSnapshotProposal) { - startCountdown(snapshotProposal.endTime * 1000); + startCountdown(BigInt(snapshotProposal.endTime) * 1000n); return; } }, [ freezeGuardType, baseContracts, azoriusGovernance.votingStrategy, - provider, proposal, startCountdown, isSnapshotProposal, snapshotProposal, freezeGuardContractAddress, + publicClient, ]); useEffect(() => { diff --git a/src/helpers/crypto.ts b/src/helpers/crypto.ts index 117be476b0..b197e3c09a 100644 --- a/src/helpers/crypto.ts +++ b/src/helpers/crypto.ts @@ -1,13 +1,23 @@ -import { TypedDataSigner } from '@ethersproject/abstract-signer'; -import { Contract, utils, Signer } from 'ethers'; -import { zeroAddress } from 'viem'; +import { + zeroAddress, + WalletClient, + toBytes, + encodePacked, + toHex, + encodeFunctionData, + hashTypedData, + Hash, + Address, + Hex, +} from 'viem'; import { sepolia, mainnet } from 'wagmi/chains'; -import { ContractConnection } from '../types'; +import { SafeL2 } from '../types'; +import { NetworkContract } from '../types/network'; import { MetaTransaction, SafePostTransaction, SafeTransaction } from '../types/transaction'; export interface SafeSignature { - signer: string; - data: string; + signer: Address; + data: Hex; } export const EIP712_SAFE_TX_TYPE = { @@ -34,18 +44,19 @@ export function getRandomBytes() { } export const calculateSafeTransactionHash = ( - safe: Contract, + safe: SafeL2, safeTx: SafeTransaction, chainId: number, ): string => { - return utils._TypedDataEncoder.hash( - { verifyingContract: safe.address, chainId }, - EIP712_SAFE_TX_TYPE, - safeTx, - ); + return hashTypedData({ + domain: { verifyingContract: safe.address, chainId }, + types: EIP712_SAFE_TX_TYPE, + primaryType: 'SafeTx', + message: { ...safeTx }, + }); }; -export const buildSignatureBytes = (signatures: SafeSignature[]): string => { +export const buildSignatureBytes = (signatures: SafeSignature[]): Hash => { signatures.sort((left, right) => left.signer.toLowerCase().localeCompare(right.signer.toLowerCase()), ); @@ -53,11 +64,11 @@ export const buildSignatureBytes = (signatures: SafeSignature[]): string => { for (const sig of signatures) { signatureBytes += sig.data.slice(2); } - return signatureBytes; + return signatureBytes as Hash; }; export const buildSafeTransaction = (template: { - to: string; + to: Address; value?: bigint | number | string; data?: string; operation?: number; @@ -83,32 +94,37 @@ export const buildSafeTransaction = (template: { }; export const safeSignTypedData = async ( - signer: Signer & TypedDataSigner, - safe: Contract, + client: WalletClient, + safe: SafeL2, safeTx: SafeTransaction, chainId?: number, ): Promise => { - if (!chainId && !signer.provider) throw Error('Provider required to retrieve chainId'); - const cid = chainId || (await signer.provider!.getNetwork()).chainId; - const signerAddress = await signer.getAddress(); + if (!chainId && !client.account?.address) + throw Error('Wallet client required to retrieve chainId'); + const cid = chainId || (await client.getChainId()); + const signerAddress = client.account!.address; return { signer: signerAddress, - data: await signer._signTypedData( - { verifyingContract: safe.address, chainId: cid }, - EIP712_SAFE_TX_TYPE, - safeTx, - ), + data: await client.signTypedData({ + types: EIP712_SAFE_TX_TYPE, + primaryType: 'SafeTx', + domain: { verifyingContract: safe.address, chainId: cid }, + account: client.account!, + message: { + ...safeTx, + }, + }), }; }; export const buildSafeAPIPost = async ( - safeContract: Contract, - signerOrProvider: Signer & TypedDataSigner, + safeContract: SafeL2, + client: WalletClient, chainId: number, template: { - to: string; + to: Address; value?: bigint | number | string; - data?: string; + data?: Hex; operation?: number; safeTxGas?: number | string; baseGas?: number | string; @@ -121,14 +137,7 @@ export const buildSafeAPIPost = async ( const safeTx = buildSafeTransaction(template); const txHash = calculateSafeTransactionHash(safeContract, safeTx, chainId); - const sig = [ - await safeSignTypedData( - signerOrProvider as Signer & TypedDataSigner, - safeContract, - safeTx, - chainId, - ), - ]; + const sig = [await safeSignTypedData(client, safeContract, safeTx, chainId)]; const signatureBytes = buildSignatureBytes(sig); return { safe: safeContract.address, @@ -143,20 +152,21 @@ export const buildSafeAPIPost = async ( refundReceiver: safeTx.refundReceiver, nonce: safeTx.nonce, contractTransactionHash: txHash, - sender: await signerOrProvider.getAddress(), + sender: client.account?.address!, signature: signatureBytes, }; }; export const buildContractCall = ( - contract: Contract, - method: string, - params: any[], + contract: NetworkContract, + functionName: string, + params: any, nonce: number, delegateCall?: boolean, overrides?: Partial, ): SafeTransaction => { - const data = contract.interface.encodeFunctionData(method, params); + // @todo: Typing this encodeFunctionData is a nightmare. Figure this out, future me :( + const data = encodeFunctionData({ abi: contract.abi, functionName, args: params } as any); return buildSafeTransaction( Object.assign( { @@ -171,10 +181,10 @@ export const buildContractCall = ( }; const encodeMetaTransaction = (tx: MetaTransaction): string => { - const data = utils.arrayify(tx.data); - const encoded = utils.solidityPack( + const data = toHex(toBytes(tx.data)); + const encoded = encodePacked( ['uint8', 'address', 'uint256', 'uint256', 'bytes'], - [tx.operation, tx.to, tx.value, data.length, data], + [tx.operation, tx.to, BigInt(tx.value), BigInt(data.length), data], ); return encoded.slice(2); }; @@ -183,13 +193,6 @@ export const encodeMultiSend = (txs: MetaTransaction[]): string => { return '0x' + txs.map(tx => encodeMetaTransaction(tx)).join(''); }; -/** - * TODO: Remove getEventRPC usage as whole - */ -export function getEventRPC(connection: ContractConnection): T { - return connection.asProvider; -} - export function supportsENS(chainId: number): boolean { return chainId === sepolia.id || chainId == mainnet.id || chainId == sepolia.id; } diff --git a/src/hooks/DAO/loaders/governance/useAzoriusListeners.ts b/src/hooks/DAO/loaders/governance/useAzoriusListeners.ts index 6fdd1bd518..2e639e3906 100644 --- a/src/hooks/DAO/loaders/governance/useAzoriusListeners.ts +++ b/src/hooks/DAO/loaders/governance/useAzoriusListeners.ts @@ -1,23 +1,13 @@ -import { LinearERC20Voting, LinearERC721Voting } from '@fractal-framework/fractal-contracts'; -import { TypedListener } from '@fractal-framework/fractal-contracts/dist/typechain-types/common'; -import { TimelockPeriodUpdatedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/MultisigFreezeGuard'; -import { - Azorius, - ProposalCreatedEvent, -} from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/Azorius'; -import { VotedEvent as ERC20VotedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC20Voting'; -import { VotedEvent as ERC721VotedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC721Voting'; import { Dispatch, useEffect, useMemo } from 'react'; +import { getContract } from 'viem'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalGovernanceAction } from '../../../../providers/App/governance/action'; -import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider'; import { CreateProposalMetadata, VotingStrategyType, DecodedTransaction, FractalActions, } from '../../../../types'; -import { Providers } from '../../../../types/network'; import { getProposalVotesSummary, mapProposalCreatedEventToProposal, @@ -25,6 +15,7 @@ import { } from '../../../../utils'; import { getAverageBlockTime } from '../../../../utils/contract'; import useSafeContracts from '../../../safe/useSafeContracts'; +import useContractClient from '../../../utils/useContractClient'; import { useSafeDecoder } from '../../../utils/useSafeDecoder'; const proposalCreatedEventListener = ( @@ -144,18 +135,22 @@ export const useAzoriusListeners = () => { erc721LinearVotingContractAddress, }, } = useFractal(); + const { publicClient } = useContractClient(); const baseContracts = useSafeContracts(); - const provider = useEthersProvider(); const decode = useSafeDecoder(); const azoriusContract = useMemo(() => { - if (!baseContracts || !azoriusContractAddress) { + if (!baseContracts || !azoriusContractAddress || !publicClient) { return; } - return baseContracts.fractalAzoriusMasterCopyContract.asProvider.attach(azoriusContractAddress); - }, [azoriusContractAddress, baseContracts]); + return getContract({ + address: azoriusContractAddress, + abi: baseContracts.fractalAzoriusMasterCopyContract.asPublic.abi, + client: publicClient, + }); + }, [azoriusContractAddress, baseContracts, publicClient]); const strategyType = useMemo(() => { if (ozLinearVotingContractAddress) { @@ -168,24 +163,33 @@ export const useAzoriusListeners = () => { }, [ozLinearVotingContractAddress, erc721LinearVotingContractAddress]); const erc20StrategyContract = useMemo(() => { - if (!baseContracts || !ozLinearVotingContractAddress) { + if (!baseContracts || !ozLinearVotingContractAddress || !publicClient) { return undefined; } - return baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - }, [baseContracts, ozLinearVotingContractAddress]); + return getContract({ + abi: baseContracts.linearVotingMasterCopyContract.asPublic.abi, + address: ozLinearVotingContractAddress, + client: publicClient, + }); + }, [baseContracts, ozLinearVotingContractAddress, publicClient]); const erc721StrategyContract = useMemo(() => { - if (!baseContracts || !erc721LinearVotingContractAddress) { + if ( + !baseContracts || + !erc721LinearVotingContractAddress || + !baseContracts.linearVotingERC721MasterCopyContract || + !publicClient + ) { return undefined; } - return baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - }, [baseContracts, erc721LinearVotingContractAddress]); + return getContract({ + abi: baseContracts.linearVotingERC721MasterCopyContract.asPublic.abi, + address: erc721LinearVotingContractAddress, + client: publicClient, + }); + }, [baseContracts, erc721LinearVotingContractAddress, publicClient]); useEffect(() => { if (!azoriusContract || !provider || !strategyType) { @@ -214,7 +218,7 @@ export const useAzoriusListeners = () => { decode, erc20StrategyContract, erc721StrategyContract, - provider, + publicClient, strategyType, ]); diff --git a/src/hooks/DAO/loaders/governance/useAzoriusProposals.ts b/src/hooks/DAO/loaders/governance/useAzoriusProposals.ts index 60ba70925f..6413338702 100644 --- a/src/hooks/DAO/loaders/governance/useAzoriusProposals.ts +++ b/src/hooks/DAO/loaders/governance/useAzoriusProposals.ts @@ -1,22 +1,16 @@ -import { LinearERC20Voting, LinearERC721Voting } from '@fractal-framework/fractal-contracts'; -import { - Azorius, - ProposalExecutedEvent, -} from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/Azorius'; -import { VotedEvent as ERC20VotedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC20Voting'; -import { VotedEvent as ERC721VotedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC721Voting'; import { useCallback, useEffect, useMemo, useRef } from 'react'; +import { PublicClient, getContract } from 'viem'; import { useFractal } from '../../../../providers/App/AppProvider'; -import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider'; import { CreateProposalMetadata, VotingStrategyType, DecodedTransaction } from '../../../../types'; import { AzoriusProposal } from '../../../../types/daoProposal'; -import { Providers } from '../../../../types/network'; import { mapProposalCreatedEventToProposal, decodeTransactions } from '../../../../utils'; import useSafeContracts from '../../../safe/useSafeContracts'; +import useContractClient from '../../../utils/useContractClient'; import { useSafeDecoder } from '../../../utils/useSafeDecoder'; export const useAzoriusProposals = () => { const currentAzoriusAddress = useRef(); + const { publicClient } = useContractClient(); const { governanceContracts: { @@ -27,16 +21,19 @@ export const useAzoriusProposals = () => { } = useFractal(); const baseContracts = useSafeContracts(); - const provider = useEthersProvider(); const decode = useSafeDecoder(); const azoriusContract = useMemo(() => { - if (!baseContracts || !azoriusContractAddress) { + if (!baseContracts || !azoriusContractAddress || !publicClient) { return; } - return baseContracts.fractalAzoriusMasterCopyContract.asProvider.attach(azoriusContractAddress); - }, [azoriusContractAddress, baseContracts]); + return getContract({ + address: azoriusContractAddress, + abi: baseContracts.fractalAzoriusMasterCopyContract.asPublic.abi, + client: publicClient, + }); + }, [azoriusContractAddress, baseContracts, publicClient]); const strategyType = useMemo(() => { if (ozLinearVotingContractAddress) { @@ -49,24 +46,33 @@ export const useAzoriusProposals = () => { }, [ozLinearVotingContractAddress, erc721LinearVotingContractAddress]); const erc20StrategyContract = useMemo(() => { - if (!baseContracts || !ozLinearVotingContractAddress) { + if (!baseContracts || !ozLinearVotingContractAddress || !publicClient) { return undefined; } - return baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - }, [baseContracts, ozLinearVotingContractAddress]); + return getContract({ + abi: baseContracts.linearVotingMasterCopyContract.asPublic.abi, + address: ozLinearVotingContractAddress, + client: publicClient, + }); + }, [baseContracts, ozLinearVotingContractAddress, publicClient]); const erc721StrategyContract = useMemo(() => { - if (!baseContracts || !erc721LinearVotingContractAddress) { + if ( + !baseContracts || + !erc721LinearVotingContractAddress || + !baseContracts.linearVotingERC721MasterCopyContract || + !publicClient + ) { return undefined; } - return baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - }, [baseContracts, erc721LinearVotingContractAddress]); + return getContract({ + abi: baseContracts.linearVotingERC721MasterCopyContract.asPublic.abi, + address: erc721LinearVotingContractAddress, + client: publicClient, + }); + }, [baseContracts, erc721LinearVotingContractAddress, publicClient]); const erc20VotedEvents = useMemo(async () => { if (!erc20StrategyContract) { @@ -120,7 +126,7 @@ export const useAzoriusProposals = () => { _erc20VotedEvents: Promise, _erc721VotedEvents: Promise, _executedEvents: Promise, - _provider: Providers | undefined, + _provider: PublicClient | undefined, _decode: ( value: string, to: string, diff --git a/src/hooks/DAO/loaders/governance/useERC20Claim.ts b/src/hooks/DAO/loaders/governance/useERC20Claim.ts index 16032bcb62..c0be575139 100644 --- a/src/hooks/DAO/loaders/governance/useERC20Claim.ts +++ b/src/hooks/DAO/loaders/governance/useERC20Claim.ts @@ -1,6 +1,9 @@ import { useEffect, useCallback, useRef } from 'react'; +import { getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalGovernanceAction } from '../../../../providers/App/governance/action'; +import { ERC20Claim } from '../../../../types'; import useSafeContracts from '../../../safe/useSafeContracts'; // get list of approvals; approval [0] should be token claim // query using attach = masterTokenClaim.attach(approval[0]).queryFilter() @@ -13,38 +16,42 @@ export function useERC20Claim() { governanceContracts: { votesTokenContractAddress }, action, } = useFractal(); + const publicClient = usePublicClient(); const baseContracts = useSafeContracts(); const loadTokenClaimContract = useCallback(async () => { - if (!baseContracts || !votesTokenContractAddress) { + if (!baseContracts || !votesTokenContractAddress || !publicClient) { return; } const { claimingMasterCopyContract } = baseContracts; - const votesTokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(votesTokenContractAddress); + const votesTokenContract = getContract({ + address: votesTokenContractAddress, + abi: baseContracts.votesTokenMasterCopyContract.asPublic.abi, + client: publicClient, + }); - const approvalFilter = votesTokenContract.filters.Approval(); - const approvals = await votesTokenContract.queryFilter(approvalFilter); + const approvals = await votesTokenContract.getEvents.Approval(); if (!approvals.length) { return; } - const possibleTokenClaimContract = claimingMasterCopyContract.asProvider.attach( - approvals[0].args[1], - ); - const tokenClaimFilter = possibleTokenClaimContract.filters.ERC20ClaimCreated(); - const tokenClaimArray = await possibleTokenClaimContract - .queryFilter(tokenClaimFilter) + const possibleTokenClaimContract = getContract({ + abi: claimingMasterCopyContract.asPublic.abi, + client: publicClient, + address: approvals[0].topics[1]!, + }); + const tokenClaimArray = await possibleTokenClaimContract.getEvents + .ERC20ClaimCreated() .catch(() => []); - if (!tokenClaimArray.length || tokenClaimArray[0].args[1] === votesTokenContractAddress) { + if (!tokenClaimArray.length || tokenClaimArray[0].topics[1] === votesTokenContractAddress) { return; } // action to governance action.dispatch({ type: FractalGovernanceAction.SET_CLAIMING_CONTRACT, - payload: possibleTokenClaimContract, + payload: possibleTokenClaimContract as unknown as ERC20Claim, }); - }, [baseContracts, votesTokenContractAddress, action]); + }, [baseContracts, votesTokenContractAddress, action, publicClient]); const loadKey = useRef(); useEffect(() => { diff --git a/src/hooks/DAO/loaders/governance/useERC20LinearStrategy.ts b/src/hooks/DAO/loaders/governance/useERC20LinearStrategy.ts index 9b49822822..9a28cf0182 100644 --- a/src/hooks/DAO/loaders/governance/useERC20LinearStrategy.ts +++ b/src/hooks/DAO/loaders/governance/useERC20LinearStrategy.ts @@ -1,10 +1,8 @@ -import { TypedListener } from '@fractal-framework/fractal-contracts/dist/typechain-types/common'; -import { QuorumNumeratorUpdatedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/BaseQuorumPercent'; -import { VotingPeriodUpdatedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC20Voting'; -import { useCallback, useEffect } from 'react'; +import { useCallback } from 'react'; +import { getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalGovernanceAction } from '../../../../providers/App/governance/action'; -import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider'; import { VotingStrategyType } from '../../../../types'; import { blocksToSeconds } from '../../../../utils/contract'; import useSafeContracts from '../../../safe/useSafeContracts'; @@ -16,29 +14,39 @@ export const useERC20LinearStrategy = () => { action, } = useFractal(); const baseContracts = useSafeContracts(); - const provider = useEthersProvider(); + const publicClient = usePublicClient(); const { getTimeDuration } = useTimeHelpers(); const loadERC20Strategy = useCallback(async () => { - if (!ozLinearVotingContractAddress || !azoriusContractAddress || !provider || !baseContracts) { + if ( + !ozLinearVotingContractAddress || + !azoriusContractAddress || + !publicClient || + !baseContracts + ) { return {}; } - const ozLinearVotingContract = baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - const azoriusContract = - baseContracts.fractalAzoriusMasterCopyContract.asProvider.attach(azoriusContractAddress); + const ozLinearVotingContract = getContract({ + address: ozLinearVotingContractAddress, + client: publicClient, + abi: baseContracts.linearVotingMasterCopyContract.asPublic.abi, + }); + const azoriusContract = getContract({ + abi: baseContracts.fractalAzoriusMasterCopyContract.asPublic.abi, + address: azoriusContractAddress, + client: publicClient, + }); const [votingPeriodBlocks, quorumNumerator, quorumDenominator, timeLockPeriod] = await Promise.all([ - ozLinearVotingContract.votingPeriod(), - (await ozLinearVotingContract.quorumNumerator()).toBigInt(), - (await ozLinearVotingContract.QUORUM_DENOMINATOR()).toBigInt(), - azoriusContract.timelockPeriod(), + (await ozLinearVotingContract.read.votingPeriod([])) as bigint, + (await ozLinearVotingContract.read.quorumNumerator([])) as bigint, + (await ozLinearVotingContract.read.QUORUM_DENOMINATOR([])) as bigint, + (await azoriusContract.read.timelockPeriod([])) as bigint, ]); const quorumPercentage = (quorumNumerator * 100n) / quorumDenominator; - const votingPeriodValue = await blocksToSeconds(votingPeriodBlocks, provider); - const timeLockPeriodValue = await blocksToSeconds(timeLockPeriod, provider); + const votingPeriodValue = await blocksToSeconds(Number(votingPeriodBlocks), publicClient); + const timeLockPeriodValue = await blocksToSeconds(Number(timeLockPeriod), publicClient); const votingData = { votingPeriod: { value: BigInt(votingPeriodValue), @@ -60,52 +68,9 @@ export const useERC20LinearStrategy = () => { azoriusContractAddress, getTimeDuration, action, - provider, + publicClient, baseContracts, ]); - useEffect(() => { - if (!ozLinearVotingContractAddress || !baseContracts) { - return; - } - const ozLinearVotingContract = baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - - const votingPeriodfilter = ozLinearVotingContract.filters.VotingPeriodUpdated(); - const listener: TypedListener = votingPeriod => { - action.dispatch({ - type: FractalGovernanceAction.UPDATE_VOTING_PERIOD, - payload: BigInt(votingPeriod), - }); - }; - ozLinearVotingContract.on(votingPeriodfilter, listener); - return () => { - ozLinearVotingContract.off(votingPeriodfilter, listener); - }; - }, [ozLinearVotingContractAddress, action, baseContracts]); - - useEffect(() => { - if (!ozLinearVotingContractAddress || !baseContracts) { - return; - } - const ozLinearVotingContract = baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - const quorumNumeratorUpdatedFilter = ozLinearVotingContract.filters.QuorumNumeratorUpdated(); - const quorumNumeratorUpdatedListener: TypedListener< - QuorumNumeratorUpdatedEvent - > = quorumPercentage => { - action.dispatch({ - type: FractalGovernanceAction.UPDATE_VOTING_QUORUM, - payload: quorumPercentage.toBigInt(), - }); - }; - ozLinearVotingContract.on(quorumNumeratorUpdatedFilter, quorumNumeratorUpdatedListener); - return () => { - ozLinearVotingContract.off(quorumNumeratorUpdatedFilter, quorumNumeratorUpdatedListener); - }; - }, [ozLinearVotingContractAddress, action, baseContracts]); - return loadERC20Strategy; }; diff --git a/src/hooks/DAO/loaders/governance/useERC20LinearToken.ts b/src/hooks/DAO/loaders/governance/useERC20LinearToken.ts index e0759a269a..24f7d5eb07 100644 --- a/src/hooks/DAO/loaders/governance/useERC20LinearToken.ts +++ b/src/hooks/DAO/loaders/governance/useERC20LinearToken.ts @@ -1,5 +1,6 @@ -import { DelegateChangedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/VotesERC20'; import { useCallback, useEffect, useRef } from 'react'; +import { Address, getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalGovernanceAction } from '../../../../providers/App/governance/action'; import useSafeContracts from '../../../safe/useSafeContracts'; @@ -15,79 +16,87 @@ export const useERC20LinearToken = ({ onMount = true }: { onMount?: boolean }) = } = useFractal(); const account = user.address; const baseContracts = useSafeContracts(); + const publicClient = usePublicClient(); const loadERC20Token = useCallback(async () => { - if (!votesTokenContractAddress || !baseContracts) { + if (!votesTokenContractAddress || !baseContracts || !publicClient) { return; } - const tokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(votesTokenContractAddress); + const tokenContract = getContract({ + address: votesTokenContractAddress, + abi: baseContracts.votesTokenMasterCopyContract.asPublic.abi, + client: publicClient, + }); const [tokenName, tokenSymbol, tokenDecimals, totalSupply] = await Promise.all([ - tokenContract.name(), - tokenContract.symbol(), - tokenContract.decimals(), - (await tokenContract.totalSupply()).toBigInt(), + tokenContract.read.name([]), + tokenContract.read.symbol([]), + tokenContract.read.decimals([]), + (await tokenContract.read.totalSupply([])) as bigint, ]); const tokenData = { - name: tokenName, - symbol: tokenSymbol, - decimals: tokenDecimals, + name: tokenName as string, + symbol: tokenSymbol as string, + decimals: Number(tokenDecimals as bigint), address: votesTokenContractAddress, totalSupply, }; isTokenLoaded.current = true; action.dispatch({ type: FractalGovernanceAction.SET_TOKEN_DATA, payload: tokenData }); - }, [votesTokenContractAddress, action, baseContracts]); + }, [votesTokenContractAddress, action, baseContracts, publicClient]); const loadUnderlyingERC20Token = useCallback(async () => { - if (!underlyingTokenAddress || !baseContracts) { + if (!underlyingTokenAddress || !baseContracts || !publicClient) { return; } - const tokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(underlyingTokenAddress); + const tokenContract = getContract({ + address: underlyingTokenAddress, + abi: baseContracts.votesTokenMasterCopyContract.asPublic.abi, + client: publicClient, + }); const [tokenName, tokenSymbol] = await Promise.all([ - tokenContract.name(), - tokenContract.symbol(), + tokenContract.read.name([]), + tokenContract.read.symbol([]), ]); const tokenData = { - name: tokenName, - symbol: tokenSymbol, + name: tokenName as string, + symbol: tokenSymbol as string, address: underlyingTokenAddress, }; action.dispatch({ type: FractalGovernanceAction.SET_UNDERLYING_TOKEN_DATA, payload: tokenData, }); - }, [underlyingTokenAddress, action, baseContracts]); + }, [underlyingTokenAddress, action, baseContracts, publicClient]); const loadERC20TokenAccountData = useCallback(async () => { - if (!votesTokenContractAddress || !account || !baseContracts) { + if (!votesTokenContractAddress || !account || !baseContracts || !publicClient) { action.dispatch({ type: FractalGovernanceAction.RESET_TOKEN_ACCOUNT_DATA }); return; } - const tokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(votesTokenContractAddress); + const tokenContract = getContract({ + address: votesTokenContractAddress, + abi: baseContracts.votesTokenMasterCopyContract.asPublic.abi, + client: publicClient, + }); // @todo We could probably save on some requests here. const [tokenBalance, tokenDelegatee, tokenVotingWeight] = await Promise.all([ - (await tokenContract.balanceOf(account)).toBigInt(), - tokenContract.delegates(account), - (await tokenContract.getVotes(account)).toBigInt(), + (await tokenContract.read.balanceOf([account])) as bigint, + tokenContract.read.delegates([account]), + await tokenContract.read.getVotes([account]), ]); - let delegateChangeEvents: DelegateChangedEvent[]; + let delegateChangeEvents = []; try { - delegateChangeEvents = await tokenContract.queryFilter( - tokenContract.filters.DelegateChanged(), - ); + delegateChangeEvents = await tokenContract.getEvents.DelegateChanged(); } catch (e) { delegateChangeEvents = []; } const tokenAccountData = { balance: tokenBalance, - delegatee: tokenDelegatee, - votingWeight: tokenVotingWeight, + delegatee: tokenDelegatee as Address, + votingWeight: tokenVotingWeight as bigint, isDelegatesSet: delegateChangeEvents.length > 0, }; @@ -95,7 +104,7 @@ export const useERC20LinearToken = ({ onMount = true }: { onMount?: boolean }) = type: FractalGovernanceAction.SET_TOKEN_ACCOUNT_DATA, payload: tokenAccountData, }); - }, [votesTokenContractAddress, action, account, baseContracts]); + }, [votesTokenContractAddress, action, account, baseContracts, publicClient]); useEffect(() => { if ( @@ -109,50 +118,5 @@ export const useERC20LinearToken = ({ onMount = true }: { onMount?: boolean }) = } }, [account, votesTokenContractAddress, onMount, loadERC20TokenAccountData]); - useEffect(() => { - if (!votesTokenContractAddress || !onMount || !baseContracts) { - return; - } - const tokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(votesTokenContractAddress); - - const delegateVotesChangedfilter = tokenContract.filters.DelegateVotesChanged(); - tokenContract.on(delegateVotesChangedfilter, loadERC20TokenAccountData); - - return () => { - tokenContract.off(delegateVotesChangedfilter, loadERC20TokenAccountData); - }; - }, [votesTokenContractAddress, loadERC20TokenAccountData, onMount, baseContracts]); - - useEffect(() => { - if (!votesTokenContractAddress || !onMount || !baseContracts) { - return; - } - const tokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(votesTokenContractAddress); - const delegateChangedfilter = tokenContract.filters.DelegateChanged(); - tokenContract.on(delegateChangedfilter, loadERC20TokenAccountData); - - return () => { - tokenContract.off(delegateChangedfilter, loadERC20TokenAccountData); - }; - }, [votesTokenContractAddress, loadERC20TokenAccountData, onMount, baseContracts]); - - useEffect(() => { - if (!votesTokenContractAddress || !onMount || !baseContracts) { - return; - } - const tokenContract = - baseContracts.votesTokenMasterCopyContract.asProvider.attach(votesTokenContractAddress); - const filterTo = tokenContract.filters.Transfer(null, account); - const filterFrom = tokenContract.filters.Transfer(account, null); - tokenContract.on(filterTo, loadERC20TokenAccountData); - tokenContract.on(filterFrom, loadERC20TokenAccountData); - return () => { - tokenContract.off(filterTo, loadERC20TokenAccountData); - tokenContract.off(filterFrom, loadERC20TokenAccountData); - }; - }, [votesTokenContractAddress, account, onMount, loadERC20TokenAccountData, baseContracts]); - return { loadERC20Token, loadUnderlyingERC20Token, loadERC20TokenAccountData }; }; diff --git a/src/hooks/DAO/loaders/governance/useERC721LinearStrategy.ts b/src/hooks/DAO/loaders/governance/useERC721LinearStrategy.ts index 54fca51bfe..4fee75bb14 100644 --- a/src/hooks/DAO/loaders/governance/useERC721LinearStrategy.ts +++ b/src/hooks/DAO/loaders/governance/useERC721LinearStrategy.ts @@ -1,12 +1,8 @@ -import { TypedListener } from '@fractal-framework/fractal-contracts/dist/typechain-types/common'; -import { - VotingPeriodUpdatedEvent, - QuorumThresholdUpdatedEvent, -} from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC721Voting'; -import { useCallback, useEffect } from 'react'; +import { useCallback } from 'react'; +import { getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalGovernanceAction } from '../../../../providers/App/governance/action'; -import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider'; import { VotingStrategyType } from '../../../../types'; import { blocksToSeconds } from '../../../../utils/contract'; import useSafeContracts from '../../../safe/useSafeContracts'; @@ -17,41 +13,45 @@ export const useERC721LinearStrategy = () => { governanceContracts: { erc721LinearVotingContractAddress, azoriusContractAddress }, action, } = useFractal(); - const provider = useEthersProvider(); const { getTimeDuration } = useTimeHelpers(); const baseContracts = useSafeContracts(); + const publicClient = usePublicClient(); const loadERC721Strategy = useCallback(async () => { if ( !erc721LinearVotingContractAddress || !azoriusContractAddress || - !provider || + !publicClient || !baseContracts ) { return {}; } - const erc721LinearVotingContract = - baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - const azoriusContract = - baseContracts.fractalAzoriusMasterCopyContract.asProvider.attach(azoriusContractAddress); + const erc721LinearVotingContract = getContract({ + client: publicClient, + address: erc721LinearVotingContractAddress, + abi: baseContracts.linearVotingERC721MasterCopyContract?.asPublic.abi!, + }); + const azoriusContract = getContract({ + address: azoriusContractAddress, + abi: baseContracts.fractalAzoriusMasterCopyContract.asPublic.abi, + client: publicClient, + }); const [votingPeriodBlocks, quorumThreshold, timeLockPeriod] = await Promise.all([ - erc721LinearVotingContract.votingPeriod(), - erc721LinearVotingContract.quorumThreshold(), - azoriusContract.timelockPeriod(), + erc721LinearVotingContract.read.votingPeriod([]), + erc721LinearVotingContract.read.quorumThreshold([]), + azoriusContract.read.timelockPeriod([]), ]); - const votingPeriodValue = await blocksToSeconds(votingPeriodBlocks, provider); - const timeLockPeriodValue = await blocksToSeconds(timeLockPeriod, provider); + const votingPeriodValue = await blocksToSeconds(Number(votingPeriodBlocks), publicClient); + const timeLockPeriodValue = await blocksToSeconds(Number(timeLockPeriod), publicClient); const votingData = { votingPeriod: { value: BigInt(votingPeriodValue), formatted: getTimeDuration(votingPeriodValue), }, quorumThreshold: { - value: quorumThreshold.toBigInt(), - formatted: quorumThreshold.toString(), + value: BigInt(quorumThreshold as bigint), + formatted: BigInt(quorumThreshold as bigint).toString(), }, timeLockPeriod: { value: BigInt(timeLockPeriodValue), @@ -65,54 +65,9 @@ export const useERC721LinearStrategy = () => { azoriusContractAddress, getTimeDuration, action, - provider, + publicClient, baseContracts, ]); - useEffect(() => { - if (!erc721LinearVotingContractAddress || !baseContracts) { - return; - } - const erc721LinearVotingContract = - baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - const votingPeriodfilter = erc721LinearVotingContract.filters.VotingPeriodUpdated(); - const listener: TypedListener = votingPeriod => { - action.dispatch({ - type: FractalGovernanceAction.UPDATE_VOTING_PERIOD, - payload: BigInt(votingPeriod), - }); - }; - erc721LinearVotingContract.on(votingPeriodfilter, listener); - return () => { - erc721LinearVotingContract.off(votingPeriodfilter, listener); - }; - }, [erc721LinearVotingContractAddress, action, baseContracts]); - - useEffect(() => { - if (!erc721LinearVotingContractAddress || !baseContracts) { - return; - } - const erc721LinearVotingContract = - baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - const quorumThresholdUpdatedFilter = - erc721LinearVotingContract.filters.QuorumThresholdUpdated(); - const quorumThresholdUpdatedListener: TypedListener< - QuorumThresholdUpdatedEvent - > = quorumThreshold => { - action.dispatch({ - type: FractalGovernanceAction.UPDATE_VOTING_QUORUM_THRESHOLD, - payload: quorumThreshold.toBigInt(), - }); - }; - erc721LinearVotingContract.on(quorumThresholdUpdatedFilter, quorumThresholdUpdatedListener); - return () => { - erc721LinearVotingContract.off(quorumThresholdUpdatedFilter, quorumThresholdUpdatedListener); - }; - }, [erc721LinearVotingContractAddress, action, baseContracts]); - return loadERC721Strategy; }; diff --git a/src/hooks/DAO/loaders/governance/useERC721Tokens.ts b/src/hooks/DAO/loaders/governance/useERC721Tokens.ts index c93384341e..2e3d29fdfd 100644 --- a/src/hooks/DAO/loaders/governance/useERC721Tokens.ts +++ b/src/hooks/DAO/loaders/governance/useERC721Tokens.ts @@ -1,43 +1,50 @@ -import { ERC721__factory } from '@fractal-framework/fractal-contracts'; import { useCallback } from 'react'; -import { zeroAddress } from 'viem'; +import { Address, erc721Abi, getContract, zeroAddress } from 'viem'; import { logError } from '../../../../helpers/errorLogging'; import { useFractal } from '../../../../providers/App/AppProvider'; import { FractalGovernanceAction } from '../../../../providers/App/governance/action'; import { ERC721TokenData } from '../../../../types'; import useSafeContracts from '../../../safe/useSafeContracts'; -import useSignerOrProvider from '../../../utils/useSignerOrProvider'; +import useContractClient from '../../../utils/useContractClient'; export default function useERC721Tokens() { - const signerOrProvider = useSignerOrProvider(); + const { walletOrPublicClient } = useContractClient(); const { governanceContracts: { erc721LinearVotingContractAddress }, action, } = useFractal(); const baseContracts = useSafeContracts(); const loadERC721Tokens = useCallback(async () => { - if (!erc721LinearVotingContractAddress || !signerOrProvider || !baseContracts) { + if ( + !erc721LinearVotingContractAddress || + !walletOrPublicClient || + !baseContracts || + !baseContracts.linearVotingERC721MasterCopyContract + ) { return; } - const erc721LinearVotingContract = - baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - const addresses = await erc721LinearVotingContract.getAllTokenAddresses(); + const erc721LinearVotingContract = getContract({ + address: erc721LinearVotingContractAddress, + abi: baseContracts.linearVotingERC721MasterCopyContract.asPublic.abi, + client: walletOrPublicClient, + }); + const addresses = (await erc721LinearVotingContract.read.getAllTokenAddresses([])) as Address[]; const erc721Tokens: ERC721TokenData[] = await Promise.all( addresses.map(async address => { - const tokenContract = ERC721__factory.connect(address, signerOrProvider); - const votingWeight = (await erc721LinearVotingContract.getTokenWeight(address)).toBigInt(); - const name = await tokenContract.name(); - const symbol = await tokenContract.symbol(); + const tokenContract = getContract({ + abi: erc721Abi, + address, + client: walletOrPublicClient, + }); + const votingWeight = (await erc721LinearVotingContract.read.getTokenWeight([ + address, + ])) as bigint; + const name = await tokenContract.read.name(); + const symbol = await tokenContract.read.symbol(); let totalSupply = undefined; try { - const tokenMintEvents = await tokenContract.queryFilter( - tokenContract.filters.Transfer(zeroAddress, null), - ); - const tokenBurnEvents = await tokenContract.queryFilter( - tokenContract.filters.Transfer(null, zeroAddress), - ); + const tokenMintEvents = await tokenContract.getEvents.Transfer({ from: zeroAddress }); + const tokenBurnEvents = await tokenContract.getEvents.Transfer({ to: zeroAddress }); totalSupply = BigInt(tokenMintEvents.length - tokenBurnEvents.length); } catch (e) { logError('Error while getting ERC721 total supply'); @@ -50,7 +57,7 @@ export default function useERC721Tokens() { type: FractalGovernanceAction.SET_ERC721_TOKENS_DATA, payload: erc721Tokens, }); - }, [erc721LinearVotingContractAddress, signerOrProvider, action, baseContracts]); + }, [erc721LinearVotingContractAddress, walletOrPublicClient, action, baseContracts]); return loadERC721Tokens; } diff --git a/src/hooks/DAO/loaders/governance/useLockRelease.ts b/src/hooks/DAO/loaders/governance/useLockRelease.ts index 8f3b4305c9..afdf35ba5f 100644 --- a/src/hooks/DAO/loaders/governance/useLockRelease.ts +++ b/src/hooks/DAO/loaders/governance/useLockRelease.ts @@ -1,9 +1,9 @@ -import { DelegateChangedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/VotesERC20'; import { useCallback, useEffect, useRef } from 'react'; -import { LockRelease__factory } from '../../../../assets/typechain-types/dcnt'; +import { Address, getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; +import LockReleaseABI from '../../../../assets/abi/LockRelease'; import { useFractal } from '../../../../providers/App/AppProvider'; import { DecentGovernanceAction } from '../../../../providers/App/governance/action'; -import { useEthersProvider } from '../../../../providers/Ethers/hooks/useEthersProvider'; /** * @link https://github.com/decent-dao/dcnt/blob/master/contracts/LockRelease.sol @@ -18,28 +18,30 @@ export const useLockRelease = ({ onMount = true }: { onMount?: boolean }) => { action, readOnly: { user }, } = useFractal(); - const provider = useEthersProvider(); const account = user.address; + const publicClient = usePublicClient(); const loadLockedVotesToken = useCallback(async () => { - if (!lockReleaseContractAddress || !account || !provider) { + if (!lockReleaseContractAddress || !account || !publicClient) { action.dispatch({ type: DecentGovernanceAction.RESET_LOCKED_TOKEN_ACCOUNT_DATA }); return; } - const lockReleaseContract = LockRelease__factory.connect(lockReleaseContractAddress, provider); + const lockReleaseContract = getContract({ + abi: LockReleaseABI, + address: lockReleaseContractAddress, + client: publicClient, + }); const [tokenAmountTotal, tokenAmountReleased, tokenDelegatee, tokenVotingWeight] = await Promise.all([ - (await lockReleaseContract.getTotal(account)).toBigInt(), - (await lockReleaseContract.getReleased(account)).toBigInt(), - lockReleaseContract.delegates(account), - (await lockReleaseContract.getVotes(account)).toBigInt(), + (await lockReleaseContract.read.getTotal([account])) as bigint, + (await lockReleaseContract.read.getReleased([account])) as bigint, + (await lockReleaseContract.read.delegates([account])) as Address, + (await lockReleaseContract.read.getVotes([account])) as bigint, ]); - let delegateChangeEvents: DelegateChangedEvent[]; + let delegateChangeEvents = []; try { - delegateChangeEvents = await lockReleaseContract.queryFilter( - lockReleaseContract.filters.DelegateChanged(), - ); + delegateChangeEvents = await lockReleaseContract.getEvents.DelegateChanged(); } catch (e) { delegateChangeEvents = []; } @@ -54,7 +56,7 @@ export const useLockRelease = ({ onMount = true }: { onMount?: boolean }) => { type: DecentGovernanceAction.SET_LOCKED_TOKEN_ACCOUNT_DATA, payload: tokenAccountData, }); - }, [lockReleaseContractAddress, action, account, provider]); + }, [lockReleaseContractAddress, action, account, publicClient]); useEffect(() => { if ( @@ -69,30 +71,42 @@ export const useLockRelease = ({ onMount = true }: { onMount?: boolean }) => { }, [account, lockReleaseContractAddress, onMount, loadLockedVotesToken]); useEffect(() => { - if (!lockReleaseContractAddress || !onMount || !provider) { + if (!lockReleaseContractAddress || !onMount || !publicClient) { return; } - const lockReleaseContract = LockRelease__factory.connect(lockReleaseContractAddress, provider); - const delegateVotesChangedfilter = lockReleaseContract.filters.DelegateVotesChanged(); - lockReleaseContract.on(delegateVotesChangedfilter, loadLockedVotesToken); + const lockReleaseContract = getContract({ + abi: LockReleaseABI, + address: lockReleaseContractAddress, + client: publicClient, + }); + const unsubscribe = lockReleaseContract.watchEvent.DelegateVotesChanged( + {}, + { onLogs: loadLockedVotesToken }, + ); return () => { - lockReleaseContract.off(delegateVotesChangedfilter, loadLockedVotesToken); + unsubscribe(); }; - }, [lockReleaseContractAddress, loadLockedVotesToken, onMount, provider]); + }, [lockReleaseContractAddress, loadLockedVotesToken, onMount, publicClient]); useEffect(() => { - if (!lockReleaseContractAddress || !onMount || !provider) { + if (!lockReleaseContractAddress || !onMount || !publicClient) { return; } - const lockReleaseContract = LockRelease__factory.connect(lockReleaseContractAddress, provider); - const delegateChangedfilter = lockReleaseContract.filters.DelegateChanged(); - lockReleaseContract.on(delegateChangedfilter, loadLockedVotesToken); + const lockReleaseContract = getContract({ + abi: LockReleaseABI, + address: lockReleaseContractAddress, + client: publicClient, + }); + const unsubscribe = lockReleaseContract.watchEvent.DelegateChanged( + {}, + { onLogs: loadLockedVotesToken }, + ); return () => { - lockReleaseContract.off(delegateChangedfilter, loadLockedVotesToken); + unsubscribe(); }; - }, [lockReleaseContractAddress, loadLockedVotesToken, onMount, provider]); + }, [lockReleaseContractAddress, loadLockedVotesToken, onMount, publicClient]); return { loadLockedVotesToken }; }; diff --git a/src/hooks/DAO/loaders/useFractalFreeze.ts b/src/hooks/DAO/loaders/useFractalFreeze.ts index 16ce49105b..2f2c792c56 100644 --- a/src/hooks/DAO/loaders/useFractalFreeze.ts +++ b/src/hooks/DAO/loaders/useFractalFreeze.ts @@ -1,12 +1,6 @@ -import { - ERC20FreezeVoting, - ERC721FreezeVoting, - MultisigFreezeVoting, -} from '@fractal-framework/fractal-contracts'; -import { TypedListener } from '@fractal-framework/fractal-contracts/dist/typechain-types/common'; -import { FreezeVoteCastEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/ERC20FreezeVoting'; import { useCallback, useEffect, useRef } from 'react'; -import { zeroAddress } from 'viem'; +import { Address, decodeEventLog, getContract, zeroAddress } from 'viem'; +import { WatchContractEventOnLogsFn } from 'viem/_types/actions/public/watchContractEvent'; import { useAccount } from 'wagmi'; import { isWithinFreezeProposalPeriod, @@ -14,12 +8,11 @@ import { } from '../../../helpers/freezePeriodHelpers'; import { useFractal } from '../../../providers/App/AppProvider'; import { FractalGuardAction } from '../../../providers/App/guard/action'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; -import { FractalGuardContracts, FreezeVotingType } from '../../../types'; +import { FractalGuardContracts, FreezeGuard, FreezeVotingType } from '../../../types'; import { blocksToSeconds, getTimeStamp } from '../../../utils/contract'; import useSafeContracts from '../../safe/useSafeContracts'; +import useContractClient from '../../utils/useContractClient'; import useUserERC721VotingTokens from '../proposal/useUserERC721VotingTokens'; -import { FreezeGuard } from './../../../types/fractal'; export const useFractalFreeze = ({ loadOnMount = true, @@ -35,14 +28,13 @@ export const useFractalFreeze = ({ const { guardContracts, action } = useFractal(); const baseContracts = useSafeContracts(); const { address: account } = useAccount(); + const { walletOrPublicClient, publicClient } = useContractClient(); const { getUserERC721VotingTokens } = useUserERC721VotingTokens( undefined, parentSafeAddress, loadOnMount, ); - const provider = useEthersProvider(); - const loadFractalFreezeGuard = useCallback( async ({ freezeVotingContractAddress, @@ -52,38 +44,43 @@ export const useFractalFreeze = ({ freezeVotingType == null || !freezeVotingContractAddress || !account || - !provider || - !baseContracts + !publicClient || + !baseContracts || + !walletOrPublicClient ) { return; } // @dev using freeze 'multisig' contract but these functions are the same for all freeze types - const freezeVotingContract = - baseContracts.freezeMultisigVotingMasterCopyContract.asProvider.attach( - freezeVotingContractAddress, - ); + const freezeVotingContract = getContract({ + address: freezeVotingContractAddress, + abi: baseContracts.freezeMultisigVotingMasterCopyContract.asPublic.abi, + client: publicClient, + }); let userHasVotes: boolean = false; - const freezeCreatedBlock = await freezeVotingContract.freezeProposalCreatedBlock(); - - const freezeVotesThreshold = (await freezeVotingContract.freezeVotesThreshold()).toBigInt(); - const freezeProposalCreatedBlock = await freezeVotingContract.freezeProposalCreatedBlock(); - const freezeProposalCreatedTime = await getTimeStamp(freezeProposalCreatedBlock, provider); - const freezeProposalVoteCount = ( - await freezeVotingContract.freezeProposalVoteCount() - ).toBigInt(); - const freezeProposalBlock = await freezeVotingContract.freezeProposalPeriod(); + const freezeCreatedBlock = await freezeVotingContract.read.freezeProposalCreatedBlock([]); + + const freezeVotesThreshold = await freezeVotingContract.read.freezeVotesThreshold([]); + const freezeProposalCreatedBlock = await freezeVotingContract.read.freezeProposalCreatedBlock( + [], + ); + const freezeProposalCreatedTime = await getTimeStamp( + freezeProposalCreatedBlock as bigint, + publicClient, + ); + const freezeProposalVoteCount = await freezeVotingContract.read.freezeProposalVoteCount([]); + const freezeProposalBlock = await freezeVotingContract.read.freezeProposalPeriod([]); // length of time to vote on freeze - const freezeProposalPeriod = await blocksToSeconds(freezeProposalBlock, provider); - const freezePeriodBlock = await freezeVotingContract.freezePeriod(); + const freezeProposalPeriod = await blocksToSeconds(Number(freezeProposalBlock), publicClient); + const freezePeriodBlock = await freezeVotingContract.read.freezePeriod([]); // length of time frozen for in seconds - const freezePeriod = await blocksToSeconds(freezePeriodBlock, provider); + const freezePeriod = await blocksToSeconds(Number(freezePeriodBlock), publicClient); - const userHasFreezeVoted = await freezeVotingContract.userHasFreezeVoted( + const userHasFreezeVoted = await freezeVotingContract.read.userHasFreezeVoted([ account || zeroAddress, freezeCreatedBlock, - ); - const isFrozen = await freezeVotingContract.isFrozen(); + ]); + const isFrozen = await freezeVotingContract.read.isFrozen([]); const freezeGuard = { freezeVotesThreshold, @@ -102,19 +99,25 @@ export const useFractalFreeze = ({ } = baseContracts; if (freezeVotingType === FreezeVotingType.MULTISIG) { - const safeContract = safeSingletonContract!.asProvider.attach( - await (freezeVotingContract as MultisigFreezeVoting).parentGnosisSafe(), - ); - const owners = await safeContract.getOwners(); + const safeContract = getContract({ + abi: safeSingletonContract.asPublic.abi, + address: (await freezeVotingContract.read.parentGnosisSafe([])) as Address, + client: walletOrPublicClient, + }); + const owners = (await safeContract.read.getOwners([])) as Address[]; userHasVotes = owners.find(owner => owner === account) !== undefined; } else if (freezeVotingType === FreezeVotingType.ERC20) { - const freezeERC20VotingContract = freezeERC20VotingMasterCopyContract.asProvider.attach( - freezeVotingContractAddress, - ); - const votesTokenContract = votesTokenMasterCopyContract!.asProvider.attach( - await freezeERC20VotingContract.votesERC20(), - ); - const currentTimestamp = await getTimeStamp('latest', provider); + const freezeERC20VotingContract = getContract({ + address: freezeVotingContractAddress, + abi: freezeERC20VotingMasterCopyContract.asPublic.abi, + client: walletOrPublicClient, + }); + const votesTokenContract = getContract({ + abi: votesTokenMasterCopyContract.asPublic.abi, + address: (await freezeERC20VotingContract.read.votesERC20([])) as Address, + client: walletOrPublicClient, + }); + const currentTimestamp = await getTimeStamp('latest', publicClient); const isFreezeActive = isWithinFreezeProposalPeriod( freezeGuard.freezeProposalCreatedTime, @@ -129,11 +132,13 @@ export const useFractalFreeze = ({ userHasVotes = (!isFreezeActive ? // freeze not active - (await votesTokenContract.getVotes(account || '')).toBigInt() + ((await votesTokenContract.read.getVotes([account || ''])) as bigint) : // freeze is active - ( - await votesTokenContract.getPastVotes(account || '', freezeCreatedBlock) - ).toBigInt()) > 0n; + + ((await votesTokenContract.read.getPastVotes([ + account || '', + freezeCreatedBlock, + ])) as bigint)) > 0n; } else if (freezeVotingType === FreezeVotingType.ERC721) { const { totalVotingTokenAddresses } = await getUserERC721VotingTokens( undefined, @@ -142,21 +147,31 @@ export const useFractalFreeze = ({ userHasVotes = totalVotingTokenAddresses.length > 0; } - const freeze: FreezeGuard = { + const freeze = { ...freezeGuard, userHasVotes, }; isFreezeSet.current = true; return freeze; }, - [account, provider, baseContracts, getUserERC721VotingTokens, parentSafeAddress], + [ + account, + publicClient, + baseContracts, + getUserERC721VotingTokens, + parentSafeAddress, + walletOrPublicClient, + ], ); const setFractalFreezeGuard = useCallback( async (_guardContracts: FractalGuardContracts) => { const freezeGuard = await loadFractalFreezeGuard(_guardContracts); if (freezeGuard) { - action.dispatch({ type: FractalGuardAction.SET_FREEZE_GUARD, payload: freezeGuard }); + action.dispatch({ + type: FractalGuardAction.SET_FREEZE_GUARD, + payload: freezeGuard as FreezeGuard, + }); } }, [action, loadFractalFreezeGuard], @@ -179,52 +194,50 @@ export const useFractalFreeze = ({ useEffect(() => { const { freezeVotingContractAddress, freezeVotingType: freezeVotingType } = guardContracts; - if (!loadOnMount || !provider || !baseContracts || !freezeVotingContractAddress) return; - const { - freezeERC721VotingMasterCopyContract, - freezeMultisigVotingMasterCopyContract, - freezeERC20VotingMasterCopyContract, - } = baseContracts; + if (!loadOnMount || !publicClient || !baseContracts || !freezeVotingContractAddress) return; + const { freezeMultisigVotingMasterCopyContract } = baseContracts; // @dev using freeze 'multisig' contract but these functions are the same for all freeze types - let votingRPC: MultisigFreezeVoting | ERC20FreezeVoting | ERC721FreezeVoting = - freezeMultisigVotingMasterCopyContract.asProvider.attach(freezeVotingContractAddress); - - const listenerCallback: TypedListener = async ( - voter: string, - votesCast, - ) => { - const freezeProposalCreatedBlock = await votingRPC.freezeProposalCreatedBlock(); - action.dispatch({ - type: FractalGuardAction.UPDATE_FREEZE_VOTE, - payload: { - isVoter: voter === account, - freezeProposalCreatedTime: BigInt( - await getTimeStamp(freezeProposalCreatedBlock, provider), - ), - votesCast: votesCast.toBigInt(), - }, + let votingRPC = getContract({ + address: freezeVotingContractAddress, + abi: freezeMultisigVotingMasterCopyContract.asPublic.abi, + client: publicClient, + }); + + const listenerCallback: WatchContractEventOnLogsFn< + typeof freezeMultisigVotingMasterCopyContract.asPublic.abi, + 'FreezeVoteCast', + undefined + > = async logs => { + logs.forEach(async log => { + const decodedLog = decodeEventLog< + typeof freezeMultisigVotingMasterCopyContract.asPublic.abi, + 'FreezeVoteCast' + >({ + data: log.data as any, + topics: log.topics, + abi: freezeMultisigVotingMasterCopyContract.asPublic.abi, + }); + const args = decodedLog.args as any[]; + const freezeProposalCreatedBlock = (await votingRPC.read.freezeProposalCreatedBlock( + [], + )) as bigint; + action.dispatch({ + type: FractalGuardAction.UPDATE_FREEZE_VOTE, + payload: { + isVoter: (args[0] as Address) === account, + freezeProposalCreatedTime: BigInt( + await getTimeStamp(freezeProposalCreatedBlock, publicClient), + ), + votesCast: BigInt(args[1]!), + }, + }); }); }; if (isFreezeSet.current && freezeVotingType !== null && freezeVotingContractAddress) { - if (freezeVotingType === FreezeVotingType.MULTISIG) { - const filter = votingRPC.filters.FreezeVoteCast(); - votingRPC.on(filter, listenerCallback); - } else if (freezeVotingType === FreezeVotingType.ERC20) { - votingRPC = freezeERC20VotingMasterCopyContract.asProvider.attach( - freezeVotingContractAddress, - ); - const filter = votingRPC.filters.FreezeVoteCast(); - votingRPC.on(filter, listenerCallback); - } else if (freezeVotingType === FreezeVotingType.ERC721) { - votingRPC = freezeERC721VotingMasterCopyContract.asProvider.attach( - freezeVotingContractAddress, - ); - const filter = votingRPC.filters.FreezeVoteCast(); - votingRPC.on(filter, listenerCallback); - } + votingRPC.watchEvent.FreezeVoteCast({}, { onLogs: listenerCallback as any }); } - }, [guardContracts, account, action, loadOnMount, provider, baseContracts]); + }, [guardContracts, account, action, loadOnMount, publicClient, baseContracts]); return loadFractalFreezeGuard; }; diff --git a/src/hooks/DAO/loaders/useFractalGuardContracts.ts b/src/hooks/DAO/loaders/useFractalGuardContracts.ts index 475ed64bc1..d62cc72bdb 100644 --- a/src/hooks/DAO/loaders/useFractalGuardContracts.ts +++ b/src/hooks/DAO/loaders/useFractalGuardContracts.ts @@ -1,16 +1,11 @@ -import { AzoriusFreezeGuard, MultisigFreezeGuard } from '@fractal-framework/fractal-contracts'; import { useCallback, useEffect, useRef } from 'react'; -import { zeroAddress } from 'viem'; +import { Address, getContract, zeroAddress } from 'viem'; import { useFractal } from '../../../providers/App/AppProvider'; import { GuardContractAction } from '../../../providers/App/guardContracts/action'; import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider'; -import { - ContractConnection, - SafeInfoResponseWithGuard, - FreezeGuardType, - FreezeVotingType, -} from '../../../types'; +import { SafeInfoResponseWithGuard, FreezeGuardType, FreezeVotingType } from '../../../types'; import useSafeContracts from '../../safe/useSafeContracts'; +import useContractClient from '../../utils/useContractClient'; import { useMasterCopy } from '../../utils/useMasterCopy'; import { FractalModuleData, FractalModuleType } from './../../../types/fractal'; @@ -22,6 +17,7 @@ export const useFractalGuardContracts = ({ loadOnMount = true }: { loadOnMount?: action, } = useFractal(); const baseContracts = useSafeContracts(); + const { publicClient } = useContractClient(); const { chain } = useNetworkConfig(); @@ -33,53 +29,52 @@ export const useFractalGuardContracts = ({ loadOnMount = true }: { loadOnMount?: _safe: SafeInfoResponseWithGuard, _fractalModules: FractalModuleData[], ) => { - if (!baseContracts) { + if (!baseContracts || !publicClient) { return; } const { azoriusFreezeGuardMasterCopyContract, multisigFreezeGuardMasterCopyContract } = baseContracts; const { guard } = _safe; - let freezeGuardContract: - | ContractConnection - | undefined; + let freezeGuardContract; let freezeGuardType: FreezeGuardType | null = null; const azoriusModule = _fractalModules?.find( module => module.moduleType === FractalModuleType.AZORIUS, ); if (!!azoriusModule && azoriusModule.moduleContract) { - const azoriusGuardAddress = await azoriusModule.moduleContract.getGuard(); + const azoriusGuardAddress = await azoriusModule.moduleContract.read.getGuard(); if (azoriusGuardAddress === zeroAddress) { return { - freezeGuardContractAddress: '', - freezeVotingContractAddress: '', + freezeGuardContractAddress: undefined, + freezeVotingContractAddress: undefined, freezeVotingType: null, freezeGuardType: null, }; } - - freezeGuardContract = { - asSigner: azoriusFreezeGuardMasterCopyContract.asSigner.attach(azoriusGuardAddress), - asProvider: azoriusFreezeGuardMasterCopyContract.asProvider.attach(azoriusGuardAddress), - }; + freezeGuardContract = getContract({ + abi: azoriusFreezeGuardMasterCopyContract.asPublic.abi, + address: azoriusGuardAddress! as Address, + client: publicClient, + }); freezeGuardType = FreezeGuardType.AZORIUS; } else { const hasNoGuard = _safe.guard === zeroAddress; - const masterCopyData = await getZodiacModuleProxyMasterCopyData(guard!); + const masterCopyData = await getZodiacModuleProxyMasterCopyData(guard! as Address); if (masterCopyData.isMultisigFreezeGuard && !hasNoGuard) { - freezeGuardContract = { - asSigner: multisigFreezeGuardMasterCopyContract.asSigner.attach(guard!), - asProvider: multisigFreezeGuardMasterCopyContract.asProvider.attach(guard!), - }; + freezeGuardContract = getContract({ + abi: multisigFreezeGuardMasterCopyContract.asPublic.abi, + address: guard! as Address, + client: publicClient, + }); freezeGuardType = FreezeGuardType.MULTISIG; } } if (!!freezeGuardContract) { - const votingAddress = await freezeGuardContract.asProvider.freezeVoting(); - const masterCopyData = await getZodiacModuleProxyMasterCopyData(votingAddress); + const votingAddress = await freezeGuardContract.read.freezeVoting([]); + const masterCopyData = await getZodiacModuleProxyMasterCopyData(votingAddress as Address); const freezeVotingType = masterCopyData.isMultisigFreezeVoting ? FreezeVotingType.MULTISIG : masterCopyData.isERC721FreezeVoting @@ -87,8 +82,8 @@ export const useFractalGuardContracts = ({ loadOnMount = true }: { loadOnMount?: : FreezeVotingType.ERC20; const contracts = { - freezeGuardContractAddress: freezeGuardContract.asProvider.address, - freezeVotingContractAddress: votingAddress, + freezeGuardContractAddress: freezeGuardContract.address, + freezeVotingContractAddress: votingAddress as Address, freezeVotingType, freezeGuardType, }; @@ -96,14 +91,14 @@ export const useFractalGuardContracts = ({ loadOnMount = true }: { loadOnMount?: return contracts; } else { return { - freezeGuardContractAddress: '', - freezeVotingContractAddress: '', + freezeGuardContractAddress: undefined, + freezeVotingContractAddress: undefined, freezeVotingType: null, freezeGuardType: null, }; } }, - [baseContracts, getZodiacModuleProxyMasterCopyData], + [baseContracts, getZodiacModuleProxyMasterCopyData, publicClient], ); const setGuardContracts = useCallback(async () => { diff --git a/src/hooks/DAO/loaders/useFractalModules.ts b/src/hooks/DAO/loaders/useFractalModules.ts index 89ecd9a9a2..4536d3f7f7 100644 --- a/src/hooks/DAO/loaders/useFractalModules.ts +++ b/src/hooks/DAO/loaders/useFractalModules.ts @@ -1,37 +1,48 @@ import { useCallback } from 'react'; +import { Address, getContract } from 'viem'; import { useFractal } from '../../../providers/App/AppProvider'; import { FractalModuleData, FractalModuleType } from '../../../types'; +import useContractClient from '../../utils/useContractClient'; import { useMasterCopy } from '../../utils/useMasterCopy'; export const useFractalModules = () => { const { baseContracts } = useFractal(); const { getZodiacModuleProxyMasterCopyData } = useMasterCopy(); + const { walletOrPublicClient } = useContractClient(); const lookupModules = useCallback( - async (_moduleAddresses: string[]) => { + async (_moduleAddresses: Address[]) => { const modules = await Promise.all( _moduleAddresses.map(async moduleAddress => { const masterCopyData = await getZodiacModuleProxyMasterCopyData(moduleAddress); let safeModule: FractalModuleData; - if (masterCopyData.isAzorius && baseContracts) { + if (masterCopyData.isAzorius && baseContracts && walletOrPublicClient) { + const moduleContract = getContract({ + client: walletOrPublicClient, + abi: baseContracts.fractalAzoriusMasterCopyContract.asPublic.abi, + address: moduleAddress, + }); safeModule = { - moduleContract: - baseContracts.fractalAzoriusMasterCopyContract.asSigner.attach(moduleAddress), - moduleAddress: moduleAddress, + moduleContract, + moduleAddress, moduleType: FractalModuleType.AZORIUS, }; - } else if (masterCopyData.isFractalModule && baseContracts) { + } else if (masterCopyData.isFractalModule && baseContracts && walletOrPublicClient) { + const moduleContract = getContract({ + client: walletOrPublicClient, + abi: baseContracts.fractalModuleMasterCopyContract.asPublic.abi, + address: moduleAddress, + }); safeModule = { - moduleContract: - baseContracts.fractalModuleMasterCopyContract.asSigner.attach(moduleAddress), - moduleAddress: moduleAddress, + moduleContract, + moduleAddress, moduleType: FractalModuleType.FRACTAL, }; } else { safeModule = { moduleContract: undefined, - moduleAddress: moduleAddress, + moduleAddress, moduleType: FractalModuleType.UNKNOWN, }; } @@ -41,7 +52,7 @@ export const useFractalModules = () => { ); return modules; }, - [baseContracts, getZodiacModuleProxyMasterCopyData], + [baseContracts, getZodiacModuleProxyMasterCopyData, walletOrPublicClient], ); return lookupModules; }; diff --git a/src/hooks/DAO/loaders/useFractalNode.ts b/src/hooks/DAO/loaders/useFractalNode.ts index 6d006ddf1c..6829f13499 100644 --- a/src/hooks/DAO/loaders/useFractalNode.ts +++ b/src/hooks/DAO/loaders/useFractalNode.ts @@ -1,6 +1,6 @@ import { useQuery } from '@apollo/client'; -import { utils } from 'ethers'; import { useCallback, useEffect, useRef, useState } from 'react'; +import { getAddress } from 'viem'; import { DAOQueryDocument, DAOQueryQuery } from '../../../../.graphclient'; import { useFractal } from '../../../providers/App/AppProvider'; import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI'; @@ -48,7 +48,7 @@ export const useFractalNode = ( childNodes: mapChildNodes(hierarchy), }, daoName: name as string, - daoAddress: utils.getAddress(_daoAddress as string), + daoAddress: getAddress(_daoAddress as string), daoSnapshotURL: snapshotURL as string, proposalTemplatesHash: proposalTemplatesHash as string, }; @@ -64,7 +64,7 @@ export const useFractalNode = ( onCompleted: async data => { if (!daoAddress) return; const graphNodeInfo = formatDAOQuery({ data }, daoAddress); - const daoName = await getDaoName(utils.getAddress(daoAddress), graphNodeInfo?.daoName); + const daoName = await getDaoName(getAddress(daoAddress), graphNodeInfo?.daoName); if (!!graphNodeInfo) { action.dispatch({ @@ -104,7 +104,7 @@ export const useFractalNode = ( try { if (!safeAPI) throw new Error('SafeAPI not set'); - safeInfo = await safeAPI.getSafeInfo(utils.getAddress(_daoAddress)); + safeInfo = await safeAPI.getSafeInfo(getAddress(_daoAddress)); } catch (e) { reset({ error: true }); return; diff --git a/src/hooks/DAO/loaders/useGovernanceContracts.ts b/src/hooks/DAO/loaders/useGovernanceContracts.ts index adad0da411..366aab058a 100644 --- a/src/hooks/DAO/loaders/useGovernanceContracts.ts +++ b/src/hooks/DAO/loaders/useGovernanceContracts.ts @@ -1,10 +1,10 @@ -import { Azorius } from '@fractal-framework/fractal-contracts'; -import { ethers } from 'ethers'; import { useCallback, useEffect, useRef } from 'react'; -import { LockRelease, LockRelease__factory } from '../../../assets/typechain-types/dcnt'; +import { Address, getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; +import LockReleaseABI from '../../../assets/abi/LockRelease'; import { useFractal } from '../../../providers/App/AppProvider'; import { GovernanceContractAction } from '../../../providers/App/governanceContracts/action'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; +import { Azorius } from '../../../types'; import { getAzoriusModuleFromModules } from '../../../utils'; import useSafeContracts from '../../safe/useSafeContracts'; import { useMasterCopy } from '../../utils/useMasterCopy'; @@ -15,7 +15,7 @@ export const useGovernanceContracts = () => { const { node, action } = useFractal(); const baseContracts = useSafeContracts(); const { getZodiacModuleProxyMasterCopyData } = useMasterCopy(); - const provider = useEthersProvider(); + const publicClient = usePublicClient(); const { fractalModules, isModulesLoaded, daoAddress } = node; @@ -31,23 +31,27 @@ export const useGovernanceContracts = () => { const azoriusModule = getAzoriusModuleFromModules(fractalModules); const azoriusModuleContract = azoriusModule?.moduleContract as Azorius; - if (!!azoriusModuleContract) { - const azoriusContract = fractalAzoriusMasterCopyContract.asProvider.attach( - azoriusModuleContract.address, - ); + if (!!azoriusModuleContract && !!publicClient) { + const azoriusContract = getContract({ + address: azoriusModuleContract.address, + client: publicClient, + abi: fractalAzoriusMasterCopyContract.asPublic.abi, + }); - let govTokenAddress: string | undefined; + let govTokenAddress: Address | undefined; - let ozLinearVotingContractAddress: string | undefined; - let erc721LinearVotingContractAddress: string | undefined; - let votesTokenContractAddress: string | undefined; - let underlyingTokenAddress: string | undefined; - let lockReleaseContractAddress: string | undefined; + let ozLinearVotingContractAddress: Address | undefined; + let erc721LinearVotingContractAddress: Address | undefined; + let votesTokenContractAddress: Address | undefined; + let underlyingTokenAddress: Address | undefined; + let lockReleaseContractAddress: Address | undefined; // @dev assumes the first strategy is the voting contract - const votingStrategyAddress = ( - await azoriusContract.getStrategies('0x0000000000000000000000000000000000000001', 0) - )[1]; + const votingStrategyAddresses = (await azoriusContract.read.getStrategies([ + '0x0000000000000000000000000000000000000001', + 0, + ])) as Address[]; + const votingStrategyAddress = votingStrategyAddresses[1]; const masterCopyData = await getZodiacModuleProxyMasterCopyData(votingStrategyAddress); const isOzLinearVoting = masterCopyData.isOzLinearVoting; @@ -55,41 +59,47 @@ export const useGovernanceContracts = () => { if (isOzLinearVoting) { ozLinearVotingContractAddress = votingStrategyAddress; - // asProvider: linearVotingMasterCopyContract.asProvider.attach(votingStrategyAddress!), - const ozLinearVotingContract = linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - govTokenAddress = await ozLinearVotingContract.governanceToken(); - const possibleERC20Wrapper = - votesERC20WrapperMasterCopyContract.asProvider.attach(govTokenAddress); - underlyingTokenAddress = await possibleERC20Wrapper.underlying().catch(() => { - // if the underlying token is not an ERC20Wrapper, this will throw an error, - // so we catch it and return undefined - return undefined; + const ozLinearVotingContract = getContract({ + address: ozLinearVotingContractAddress, + client: publicClient, + abi: linearVotingMasterCopyContract.asPublic.abi, }); - const possibleLockRelease = new ethers.Contract( - govTokenAddress, - LockRelease__factory.abi, - provider, - ) as LockRelease; + govTokenAddress = (await ozLinearVotingContract.read.governanceToken([])) as Address; + if (govTokenAddress) { + const possibleERC20Wrapper = getContract({ + address: govTokenAddress, + abi: votesERC20WrapperMasterCopyContract.asPublic.abi, + client: publicClient, + }); + underlyingTokenAddress = (await possibleERC20Wrapper.read.underlying([]).catch(() => { + // if the underlying token is not an ERC20Wrapper, this will throw an error, + // so we catch it and return undefined + return undefined; + })) as Address | undefined; + const possibleLockRelease = getContract({ + address: govTokenAddress, + abi: LockReleaseABI, + client: publicClient, + }); - const lockedTokenAddress = await possibleLockRelease.token().catch(() => { - // if the underlying token is not an ERC20Wrapper, this will throw an error, - // so we catch it and return undefined - return undefined; - }); + const lockedTokenAddress = await possibleLockRelease.read.token().catch(() => { + // if the underlying token is not an ERC20Wrapper, this will throw an error, + // so we catch it and return undefined + return undefined; + }); - if (lockedTokenAddress) { - lockReleaseContractAddress = govTokenAddress; - votesTokenContractAddress = lockedTokenAddress; - } else { - // @dev if the underlying token is an ERC20Wrapper, we use the underlying token as the token contract - // @dev if the no underlying token, we use the governance token as the token contract - votesTokenContractAddress = govTokenAddress; + if (lockedTokenAddress) { + lockReleaseContractAddress = govTokenAddress; + votesTokenContractAddress = lockedTokenAddress as Address; + } else { + // @dev if the underlying token is an ERC20Wrapper, we use the underlying token as the token contract + // @dev if the no underlying token, we use the governance token as the token contract + votesTokenContractAddress = govTokenAddress; + } } } else if (isOzLinearVotingERC721) { // @dev for use with the ERC721 voting contract - erc721LinearVotingContractAddress = votingStrategyAddress; + erc721LinearVotingContractAddress = votingStrategyAddress as Address; } if (!!votesTokenContractAddress) { @@ -112,7 +122,7 @@ export const useGovernanceContracts = () => { payload: {}, }); } - }, [action, provider, getZodiacModuleProxyMasterCopyData, baseContracts, fractalModules]); + }, [action, getZodiacModuleProxyMasterCopyData, baseContracts, fractalModules, publicClient]); useEffect(() => { if (currentValidAddress.current !== daoAddress && isModulesLoaded) { diff --git a/src/hooks/DAO/loaders/useLoadDAONode.ts b/src/hooks/DAO/loaders/useLoadDAONode.ts index ba5c53d35d..c48e2d261a 100644 --- a/src/hooks/DAO/loaders/useLoadDAONode.ts +++ b/src/hooks/DAO/loaders/useLoadDAONode.ts @@ -1,6 +1,6 @@ import { useLazyQuery } from '@apollo/client'; -import { utils } from 'ethers'; import { useCallback } from 'react'; +import { getAddress, isAddress } from 'viem'; import { DAOQueryDocument, DAOQueryQuery } from '../../../../.graphclient'; import { logError } from '../../../helpers/errorLogging'; import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI'; @@ -38,7 +38,7 @@ export const useLoadDAONode = () => { childNodes: mapChildNodes(hierarchy), }, daoName: name as string, - daoAddress: utils.getAddress(_daoAddress as string), + daoAddress: getAddress(_daoAddress as string), daoSnapshotURL: snapshotURL as string, }; return currentNode; @@ -48,7 +48,7 @@ export const useLoadDAONode = () => { const loadDao = useCallback( async (_daoAddress: string): Promise => { - if (utils.isAddress(_daoAddress) && safeAPI) { + if (isAddress(_daoAddress) && safeAPI) { try { const graphNodeInfo = formatDAOQuery( await getDAOInfo({ variables: { daoAddress: _daoAddress } }), @@ -60,7 +60,7 @@ export const useLoadDAONode = () => { } const safe = await safeAPI.getSafeInfo(_daoAddress); const fractalModules = await lookupModules(safe.modules); - const daoName = await getDaoName(utils.getAddress(safe.address), graphNodeInfo.daoName); + const daoName = await getDaoName(getAddress(safe.address), graphNodeInfo.daoName); const node: FractalNode = Object.assign(graphNodeInfo, { daoName, diff --git a/src/hooks/DAO/proposal/useCastVote.ts b/src/hooks/DAO/proposal/useCastVote.ts index f0550e5836..b9523febdf 100644 --- a/src/hooks/DAO/proposal/useCastVote.ts +++ b/src/hooks/DAO/proposal/useCastVote.ts @@ -1,12 +1,11 @@ import snapshot from '@snapshot-labs/snapshot.js'; -import { ethers } from 'ethers'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { toast } from 'react-toastify'; +import { getContract } from 'viem'; import { useVoteContext } from '../../../components/Proposals/ProposalVotes/context/VoteContext'; import { logError } from '../../../helpers/errorLogging'; import { useFractal } from '../../../providers/App/AppProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; import { AzoriusGovernance, GovernanceType, @@ -15,6 +14,7 @@ import { } from '../../../types'; import encryptWithShutter from '../../../utils/shutter'; import useSafeContracts from '../../safe/useSafeContracts'; +import useContractClient from '../../utils/useContractClient'; import { useTransaction } from '../../utils/useTransaction'; import useSnapshotSpaceName from '../loaders/snapshot/useSnapshotSpaceName'; import useUserERC721VotingTokens from './useUserERC721VotingTokens'; @@ -39,9 +39,9 @@ const useCastVote = ({ user: { address }, }, } = useFractal(); + const { walletClient } = useContractClient(); const baseContracts = useSafeContracts(); const daoSnapshotSpaceName = useSnapshotSpaceName(); - const signer = useEthersSigner(); const client = useMemo(() => { if (daoSnapshotURL) { const isTestnetSnapshotURL = daoSnapshotURL.includes('testnet'); @@ -90,28 +90,37 @@ const useCastVote = ({ const castVote = useCallback( async (vote: number) => { let contractFn; - if (type === GovernanceType.AZORIUS_ERC20 && ozLinearVotingContractAddress && baseContracts) { - const ozLinearVotingContract = baseContracts.linearVotingMasterCopyContract.asSigner.attach( - ozLinearVotingContractAddress, - ); - contractFn = () => ozLinearVotingContract.vote(proposal.proposalId, vote); + if ( + type === GovernanceType.AZORIUS_ERC20 && + ozLinearVotingContractAddress && + baseContracts && + walletClient + ) { + const ozLinearVotingContract = getContract({ + address: ozLinearVotingContractAddress, + abi: baseContracts.linearVotingMasterCopyContract.asWallet.abi, + client: walletClient, + }); + contractFn = () => ozLinearVotingContract.write.vote([proposal.proposalId, vote]); } else if ( type === GovernanceType.AZORIUS_ERC721 && erc721LinearVotingContractAddress && - baseContracts + baseContracts && + walletClient ) { - const erc721LinearVotingContract = - baseContracts.linearVotingERC721MasterCopyContract.asSigner.attach( - erc721LinearVotingContractAddress, - ); + const erc721LinearVotingContract = getContract({ + address: erc721LinearVotingContractAddress, + abi: baseContracts!.linearVotingERC721MasterCopyContract!.asWallet.abi, + client: walletClient, + }); contractFn = () => - erc721LinearVotingContract.vote( + erc721LinearVotingContract.write.vote([ proposal.proposalId, vote, remainingTokenAddresses, remainingTokenIds, - ); + ]); } if (contractFn) { @@ -141,19 +150,13 @@ const useCastVote = ({ getCanVote, getHasVoted, baseContracts, + walletClient, ], ); const castSnapshotVote = useCallback( async (onSuccess?: () => Promise) => { - if ( - signer && - signer?.provider && - address && - daoSnapshotSpaceName && - extendedSnapshotProposal && - client - ) { + if (address && daoSnapshotSpaceName && extendedSnapshotProposal && client) { let toastId; const mappedSnapshotWeightedChoice: { [choiceKey: number]: number } = {}; if (extendedSnapshotProposal.type === 'weighted') { @@ -180,7 +183,7 @@ const useCastVote = ({ JSON.stringify(choice), extendedSnapshotProposal.proposalId, ); - await client.vote(signer.provider as ethers.providers.Web3Provider, address, { + await client.vote(signer.provider, address, { space: daoSnapshotSpaceName, proposal: extendedSnapshotProposal.proposalId, type: extendedSnapshotProposal.type, @@ -189,7 +192,7 @@ const useCastVote = ({ app: 'fractal', }); } else { - await client.vote(signer.provider as ethers.providers.Web3Provider, address, { + await client.vote(signer.provider, address, { space: daoSnapshotSpaceName, proposal: extendedSnapshotProposal.proposalId, type: extendedSnapshotProposal.type, @@ -212,7 +215,6 @@ const useCastVote = ({ } }, [ - signer, address, daoSnapshotSpaceName, extendedSnapshotProposal, diff --git a/src/hooks/DAO/proposal/useCreateProposalTemplate.ts b/src/hooks/DAO/proposal/useCreateProposalTemplate.ts index 0fee5cdb6e..df739c61ee 100644 --- a/src/hooks/DAO/proposal/useCreateProposalTemplate.ts +++ b/src/hooks/DAO/proposal/useCreateProposalTemplate.ts @@ -1,24 +1,24 @@ import { useCallback } from 'react'; +import { encodeFunctionData } from 'viem'; +import { usePublicClient } from 'wagmi'; import { useFractal } from '../../../providers/App/AppProvider'; import useIPFSClient from '../../../providers/App/hooks/useIPFSClient'; import { ProposalExecuteData } from '../../../types'; import { CreateProposalForm } from '../../../types/proposalBuilder'; import { couldBeENS } from '../../../utils/url'; import useSafeContracts from '../../safe/useSafeContracts'; -import useSignerOrProvider from '../../utils/useSignerOrProvider'; export default function useCreateProposalTemplate() { - const signerOrProvider = useSignerOrProvider(); - const keyValuePairsContract = useSafeContracts()?.keyValuePairsContract; const client = useIPFSClient(); const { governance: { proposalTemplates }, } = useFractal(); + const publicClient = usePublicClient(); const prepareProposalTemplateProposal = useCallback( async (values: CreateProposalForm) => { - if (proposalTemplates && signerOrProvider && keyValuePairsContract) { + if (proposalTemplates && publicClient && keyValuePairsContract) { const proposalMetadata = { title: 'Create Proposal Template', description: @@ -33,7 +33,7 @@ export default function useCreateProposalTemplate() { values.transactions.map(async tx => ({ ...tx, targetAddress: couldBeENS(tx.targetAddress) - ? await signerOrProvider.resolveName(tx.targetAddress) + ? await publicClient.getEnsAddress({ name: tx.targetAddress }) : tx.targetAddress, parameters: tx.parameters .map(param => { @@ -55,20 +55,21 @@ export default function useCreateProposalTemplate() { const proposal: ProposalExecuteData = { metaData: proposalMetadata, - targets: [keyValuePairsContract.asProvider.address], + targets: [keyValuePairsContract.asPublic.address], values: [0n], calldatas: [ - keyValuePairsContract.asProvider.interface.encodeFunctionData('updateValues', [ - ['proposalTemplates'], - [Hash], - ]), + encodeFunctionData({ + abi: keyValuePairsContract.asPublic.abi, + functionName: 'updateValues', + args: [['proposalTemplates'], [Hash]], + }), ], }; return proposal; } }, - [proposalTemplates, keyValuePairsContract, client, signerOrProvider], + [proposalTemplates, keyValuePairsContract, client, publicClient], ); return { prepareProposalTemplateProposal }; diff --git a/src/hooks/DAO/proposal/useExecuteProposal.ts b/src/hooks/DAO/proposal/useExecuteProposal.ts index 9b5cbd09fc..e47712f1c5 100644 --- a/src/hooks/DAO/proposal/useExecuteProposal.ts +++ b/src/hooks/DAO/proposal/useExecuteProposal.ts @@ -1,8 +1,10 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { getContract } from 'viem'; import { useFractal } from '../../../providers/App/AppProvider'; import { MetaTransaction, FractalProposal, AzoriusProposal } from '../../../types'; import useSafeContracts from '../../safe/useSafeContracts'; +import useContractClient from '../../utils/useContractClient'; import { useTransaction } from '../../utils/useTransaction'; import useUpdateProposalState from './useUpdateProposalState'; @@ -17,6 +19,7 @@ export default function useExecuteProposal() { governanceDispatch: action.dispatch, }); const [contractCallExecuteProposal, contractCallPending] = useTransaction(); + const { walletClient } = useContractClient(); const executeProposal = useCallback( (proposal: FractalProposal) => { @@ -25,12 +28,16 @@ export default function useExecuteProposal() { !azoriusContractAddress || !azoriusProposal.data || !azoriusProposal.data.transactions || - !baseContracts + !baseContracts || + !walletClient ) { return; } - const azoriusContract = - baseContracts.fractalAzoriusMasterCopyContract.asSigner.attach(azoriusContractAddress); + const azoriusContract = getContract({ + client: walletClient, + address: azoriusContractAddress, + abi: baseContracts.fractalAzoriusMasterCopyContract.asWallet.abi, + }); const targets: string[] = []; const values: MetaTransaction['value'][] = []; @@ -46,7 +53,13 @@ export default function useExecuteProposal() { contractCallExecuteProposal({ contractFn: () => - azoriusContract.executeProposal(proposal.proposalId, targets, values, data, operations), + azoriusContract.write.executeProposal([ + proposal.proposalId, + targets, + values, + data, + operations, + ]), pendingMessage: t('pendingExecute'), failedMessage: t('failedExecute'), successMessage: t('successExecute'), @@ -56,7 +69,14 @@ export default function useExecuteProposal() { }, }); }, - [contractCallExecuteProposal, t, azoriusContractAddress, updateProposalState, baseContracts], + [ + contractCallExecuteProposal, + t, + azoriusContractAddress, + updateProposalState, + baseContracts, + walletClient, + ], ); return { diff --git a/src/hooks/DAO/proposal/useGetMetadata.ts b/src/hooks/DAO/proposal/useGetMetadata.ts index cf7bf93d7a..c900aaaf30 100644 --- a/src/hooks/DAO/proposal/useGetMetadata.ts +++ b/src/hooks/DAO/proposal/useGetMetadata.ts @@ -1,6 +1,6 @@ -import { utils } from 'ethers'; import { useCallback, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { parseAbiParameters, decodeAbiParameters, Hash } from 'viem'; import useIPFSClient from '../../../providers/App/hooks/useIPFSClient'; import { FractalProposal, @@ -19,7 +19,7 @@ interface Parameter { } interface Transaction { - data: string; + data: Hash; } const useGetMultisigMetadata = (proposal: FractalProposal | null | undefined) => { @@ -61,8 +61,8 @@ const useGetMultisigMetadata = (proposal: FractalProposal | null | undefined) => // data from IPFS if (encodedMetadata) { try { - const decoded = new utils.AbiCoder().decode(['string'], encodedMetadata); - const ipfsHash = (decoded as string[])[0]; + const decoded = decodeAbiParameters(parseAbiParameters('string'), encodedMetadata); + const ipfsHash = decoded[0]; const meta: CreateProposalMetadata = await ipfsClient.cat(ipfsHash); // cache the metadata JSON diff --git a/src/hooks/DAO/proposal/usePrepareProposal.ts b/src/hooks/DAO/proposal/usePrepareProposal.ts index 4e60043391..c1adad4fb3 100644 --- a/src/hooks/DAO/proposal/usePrepareProposal.ts +++ b/src/hooks/DAO/proposal/usePrepareProposal.ts @@ -1,11 +1,11 @@ import { useCallback } from 'react'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; +import { usePublicClient } from 'wagmi'; import { CreateProposalForm } from '../../../types/proposalBuilder'; import { encodeFunction } from '../../../utils/crypto'; import { couldBeENS, isValidUrl } from '../../../utils/url'; export function usePrepareProposal() { - const signer = useEthersSigner(); + const publicClient = usePublicClient(); const prepareProposal = useCallback( async (values: CreateProposalForm) => { const { transactions, proposalMetadata } = values; @@ -33,8 +33,8 @@ export function usePrepareProposal() { }); const targets = await Promise.all( transactionsWithEncoding.map(tx => { - if (couldBeENS(tx.targetAddress)) { - return signer!.resolveName(tx.targetAddress); + if (couldBeENS(tx.targetAddress) && publicClient) { + return publicClient!.getEnsAddress({ name: tx.targetAddress }); } return tx.targetAddress; }), @@ -51,7 +51,7 @@ export function usePrepareProposal() { }, }; }, - [signer], + [publicClient], ); return { prepareProposal }; } diff --git a/src/hooks/DAO/proposal/useRemoveProposalTemplate.ts b/src/hooks/DAO/proposal/useRemoveProposalTemplate.ts index 036cba697e..86042135d9 100644 --- a/src/hooks/DAO/proposal/useRemoveProposalTemplate.ts +++ b/src/hooks/DAO/proposal/useRemoveProposalTemplate.ts @@ -1,4 +1,5 @@ import { useCallback } from 'react'; +import { encodeFunctionData } from 'viem'; import { useFractal } from '../../../providers/App/AppProvider'; import useIPFSClient from '../../../providers/App/hooks/useIPFSClient'; import { ProposalExecuteData } from '../../../types'; @@ -29,13 +30,14 @@ export default function useRemoveProposalTemplate() { const proposal: ProposalExecuteData = { metaData: proposalMetadata, - targets: [keyValuePairsContract.asProvider.address], + targets: [keyValuePairsContract.asPublic.address], values: [0n], calldatas: [ - keyValuePairsContract.asProvider.interface.encodeFunctionData('updateValues', [ - ['proposalTemplates'], - [Hash], - ]), + encodeFunctionData({ + abi: keyValuePairsContract.asPublic.abi, + functionName: 'updateValues', + args: [['proposalTemplates'], [Hash]], + }), ], }; diff --git a/src/hooks/DAO/proposal/useSubmitProposal.ts b/src/hooks/DAO/proposal/useSubmitProposal.ts index bfec37a83e..5030cff11a 100644 --- a/src/hooks/DAO/proposal/useSubmitProposal.ts +++ b/src/hooks/DAO/proposal/useSubmitProposal.ts @@ -1,24 +1,31 @@ -import { TypedDataSigner } from '@ethersproject/abstract-signer'; -import { Azorius } from '@fractal-framework/fractal-contracts'; import axios from 'axios'; -import { Signer, utils } from 'ethers'; -import { getAddress, isAddress } from 'ethers/lib/utils'; import { useCallback, useMemo, useState } from 'react'; import { toast } from 'react-toastify'; -import { GnosisSafeL2__factory } from '../../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; +import { + Address, + encodeAbiParameters, + getContract, + parseAbiParameters, + isAddress, + getAddress, + encodeFunctionData, +} from 'viem'; +import { useWalletClient } from 'wagmi'; import { ADDRESS_MULTISIG_METADATA } from '../../../constants/common'; import { buildSafeAPIPost, encodeMultiSend } from '../../../helpers'; import { logError } from '../../../helpers/errorLogging'; import { useFractal } from '../../../providers/App/AppProvider'; import useIPFSClient from '../../../providers/App/hooks/useIPFSClient'; import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider'; -import { MetaTransaction, ProposalExecuteData, CreateProposalMetadata } from '../../../types'; +import { + Azorius, + MetaTransaction, + ProposalExecuteData, + CreateProposalMetadata, +} from '../../../types'; import { buildSafeApiUrl, getAzoriusModuleFromModules } from '../../../utils'; import useSafeContracts from '../../safe/useSafeContracts'; -import useSignerOrProvider from '../../utils/useSignerOrProvider'; import { useFractalModules } from '../loaders/useFractalModules'; import { useDAOProposals } from '../loaders/useProposals'; @@ -32,7 +39,7 @@ interface ISubmitProposal { /** * @param safeAddress - provided address of DAO to which proposal will be submitted */ - safeAddress?: string; + safeAddress?: Address; } interface ISubmitAzoriusProposal extends ISubmitProposal { @@ -47,14 +54,13 @@ interface ISubmitAzoriusProposal extends ISubmitProposal { * Depending on safeAddress it's either picked from global context * either grabbed from the safe info from Safe API & provided Azorius contract. */ - votingStrategyAddress: string; + votingStrategyAddress: Address; } export default function useSubmitProposal() { const [pendingCreateTx, setPendingCreateTx] = useState(false); const loadDAOProposals = useDAOProposals(); - const signer = useEthersSigner(); - const provider = useEthersProvider(); + const walletClient = useWalletClient(); const { node: { safe, fractalModules }, @@ -65,19 +71,17 @@ export default function useSubmitProposal() { const safeAPI = useSafeAPI(); const globalAzoriusContract = useMemo(() => { - if (!signer) { + if (!walletClient.data) { return undefined; } const azoriusModule = getAzoriusModuleFromModules(fractalModules); if (!azoriusModule) { return undefined; } - const moduleContract = azoriusModule.moduleContract as Azorius; - return moduleContract.connect(signer); - }, [fractalModules, signer]); + return azoriusModule.moduleContract as Azorius; + }, [fractalModules, walletClient.data]); const lookupModules = useFractalModules(); - const signerOrProvider = useSignerOrProvider(); const { chain, safeBaseURL, addressPrefix } = useNetworkConfig(); const ipfsClient = useIPFSClient(); @@ -104,7 +108,7 @@ export default function useSubmitProposal() { progress: 1, }); - if (!safeAddress || !signerOrProvider || nonce === undefined) { + if (!safeAddress || !walletClient.data || nonce === undefined) { toast.dismiss(toastId); return; } @@ -124,7 +128,7 @@ export default function useSubmitProposal() { const { Hash } = await ipfsClient.add(JSON.stringify(metaData)); proposalData.targets.push(ADDRESS_MULTISIG_METADATA); proposalData.values.push(0n); - proposalData.calldatas.push(new utils.AbiCoder().encode(['string'], [Hash])); + proposalData.calldatas.push(encodeAbiParameters(parseAbiParameters('string'), [Hash])); } let to, value, data, operation; @@ -134,7 +138,7 @@ export default function useSubmitProposal() { return; } // Need to wrap it in Multisend function call - to = multiSendContract.asProvider.address; + to = multiSendContract.asPublic.address; const tempData = proposalData.targets.map((target, index) => { return { @@ -145,9 +149,11 @@ export default function useSubmitProposal() { } as MetaTransaction; }); - data = multiSendContract.asProvider.interface.encodeFunctionData('multiSend', [ - encodeMultiSend(tempData), - ]); + data = encodeFunctionData({ + functionName: 'multiSend', + args: [encodeMultiSend(tempData)], + abi: multiSendContract.asPublic.abi, + }); operation = 1; } else { @@ -158,21 +164,20 @@ export default function useSubmitProposal() { operation = 0; } - const safeContract = GnosisSafeL2__factory.connect(safeAddress, signerOrProvider); + const safeContract = getContract({ + address: safeAddress, + abi: baseContracts.safeSingletonContract.asWallet.abi, + client: walletClient.data, + }); await axios.post( buildSafeApiUrl(safeBaseURL, `/safes/${safeAddress}/multisig-transactions/`), - await buildSafeAPIPost( - safeContract, - signerOrProvider as Signer & TypedDataSigner, - chain.id, - { - to, - value, - data, - operation, - nonce, - }, - ), + await buildSafeAPIPost(safeContract, walletClient.data, chain.id, { + to, + value, + data, + operation, + nonce, + }), ); await new Promise(resolve => setTimeout(resolve, 1000)); await loadDAOProposals(); @@ -190,13 +195,13 @@ export default function useSubmitProposal() { } }, [ - signerOrProvider, safeBaseURL, chain, loadDAOProposals, ipfsClient, baseContracts, addressPrefix, + walletClient.data, ], ); @@ -211,7 +216,7 @@ export default function useSubmitProposal() { failedToastMessage, safeAddress, }: ISubmitAzoriusProposal) => { - if (!proposalData || !provider) { + if (!proposalData) { return; } const toastId = toast(pendingToastMessage, { @@ -232,18 +237,16 @@ export default function useSubmitProposal() { })); // @todo: Implement voting strategy proposal selection when/if we will support multiple strategies on single Azorius instance - await ( - await azoriusContract.submitProposal( - votingStrategyAddress, - '0x', - transactions, - JSON.stringify({ - title: proposalData.metaData.title, - description: proposalData.metaData.description, - documentationUrl: proposalData.metaData.documentationUrl, - }), - ) - ).wait(); + await azoriusContract.write.submitProposal([ + votingStrategyAddress, + '0x', + transactions, + JSON.stringify({ + title: proposalData.metaData.title, + description: proposalData.metaData.description, + documentationUrl: proposalData.metaData.documentationUrl, + }), + ]); toast.dismiss(toastId); toast(successToastMessage); if (successCallback) { @@ -257,7 +260,7 @@ export default function useSubmitProposal() { setPendingCreateTx(false); } }, - [provider, addressPrefix], + [addressPrefix], ); const submitProposal = useCallback( @@ -292,12 +295,17 @@ export default function useSubmitProposal() { } else { const azoriusModuleContract = azoriusModule.moduleContract as Azorius; // @dev assumes the first strategy is the voting contract - const votingStrategyAddress = ( - await azoriusModuleContract.getStrategies( - '0x0000000000000000000000000000000000000001', - 0, - ) - )[1]; + // const votingStrategyAddress = ( + // await azoriusModuleContract.read.getStrategies([ + // '0x0000000000000000000000000000000000000001', + // 0, + // ]) + // )[1]; + const votingStrategyAddresses = (await azoriusModuleContract.read.getStrategies([ + '0x0000000000000000000000000000000000000001', + 0, + ])) as Address[]; + const votingStrategyAddress = votingStrategyAddresses[1]; submitAzoriusProposal({ proposalData, pendingToastMessage, @@ -324,7 +332,7 @@ export default function useSubmitProposal() { failedToastMessage, nonce, successCallback, - safeAddress: safe?.address, + safeAddress: safe!.address as Address, }); } else { await submitAzoriusProposal({ @@ -336,7 +344,7 @@ export default function useSubmitProposal() { successCallback, votingStrategyAddress, azoriusContract: globalAzoriusContract, - safeAddress: safe?.address, + safeAddress: safe!.address as Address, }); } } diff --git a/src/hooks/DAO/proposal/useUpdateProposalState.ts b/src/hooks/DAO/proposal/useUpdateProposalState.ts index dd7535bfc5..1038480ea4 100644 --- a/src/hooks/DAO/proposal/useUpdateProposalState.ts +++ b/src/hooks/DAO/proposal/useUpdateProposalState.ts @@ -1,4 +1,6 @@ import { useCallback, Dispatch } from 'react'; +import { getContract } from 'viem'; +import { usePublicClient } from 'wagmi'; import { FractalGovernanceAction, FractalGovernanceActions, @@ -17,20 +19,24 @@ export default function useUpdateProposalState({ governanceDispatch, }: IUseUpdateProposalState) { const baseContracts = useSafeContracts(); + const publicClient = usePublicClient(); const updateProposalState = useCallback( async (proposalId: bigint) => { - if (!azoriusContractAddress || !baseContracts) { + if (!azoriusContractAddress || !baseContracts || !publicClient) { return; } - const azoriusContract = - baseContracts.fractalAzoriusMasterCopyContract.asProvider.attach(azoriusContractAddress); + const azoriusContract = getContract({ + address: azoriusContractAddress, + client: publicClient, + abi: baseContracts.fractalAzoriusMasterCopyContract.asPublic.abi, + }); const newState = await getAzoriusProposalState(azoriusContract, proposalId); governanceDispatch({ type: FractalGovernanceAction.UPDATE_PROPOSAL_STATE, payload: { proposalId: proposalId.toString(), state: newState }, }); }, - [azoriusContractAddress, governanceDispatch, baseContracts], + [azoriusContractAddress, governanceDispatch, baseContracts, publicClient], ); return updateProposalState; diff --git a/src/hooks/DAO/proposal/useUserERC721VotingTokens.ts b/src/hooks/DAO/proposal/useUserERC721VotingTokens.ts index 610c744c42..f13c2883a6 100644 --- a/src/hooks/DAO/proposal/useUserERC721VotingTokens.ts +++ b/src/hooks/DAO/proposal/useUserERC721VotingTokens.ts @@ -1,18 +1,13 @@ -import { - ERC721__factory, - Azorius, - LinearERC721Voting__factory, - LinearERC721Voting, -} from '@fractal-framework/fractal-contracts'; -import { utils } from 'ethers'; import { useState, useEffect, useCallback } from 'react'; +import { Address, getAddress, getContract, erc721Abi } from 'viem'; +import { usePublicClient } from 'wagmi'; import { logError } from '../../../helpers/errorLogging'; import { useFractal } from '../../../providers/App/AppProvider'; import { useSafeAPI } from '../../../providers/App/hooks/useSafeAPI'; -import { AzoriusGovernance } from '../../../types'; +import { Azorius, AzoriusGovernance } from '../../../types'; import { getAzoriusModuleFromModules } from '../../../utils'; import useSafeContracts from '../../safe/useSafeContracts'; -import useSignerOrProvider from '../../utils/useSignerOrProvider'; +import useContractClient from '../../utils/useContractClient'; import { useFractalModules } from '../loaders/useFractalModules'; /** @@ -34,8 +29,8 @@ export default function useUserERC721VotingTokens( const [totalVotingTokenAddresses, setTotalVotingTokenAddresses] = useState([]); const [remainingTokenIds, setRemainingTokenIds] = useState([]); const [remainingTokenAddresses, setRemainingTokenAddresses] = useState([]); + const { walletOrPublicClient } = useContractClient(); - const signerOrProvider = useSignerOrProvider(); const { node: { daoAddress }, governanceContracts: { erc721LinearVotingContractAddress }, @@ -45,6 +40,7 @@ export default function useUserERC721VotingTokens( const baseContracts = useSafeContracts(); const lookupModules = useFractalModules(); const safeAPI = useSafeAPI(); + const publicClient = usePublicClient(); const azoriusGovernance = governance as AzoriusGovernance; const { erc721Tokens } = azoriusGovernance; @@ -58,9 +54,9 @@ export default function useUserERC721VotingTokens( const userERC721Tokens = new Map>(); let govTokens = erc721Tokens; - let votingContract: LinearERC721Voting | undefined; + let votingContract: any; - if (!baseContracts || !signerOrProvider || !daoAddress) { + if (!baseContracts || !daoAddress || !walletOrPublicClient) { return { totalVotingTokenAddresses: totalTokenAddresses, totalVotingTokenIds: totalTokenIds, @@ -69,33 +65,37 @@ export default function useUserERC721VotingTokens( }; } - if (_safeAddress && daoAddress !== _safeAddress) { + if (_safeAddress && daoAddress !== _safeAddress && publicClient) { // Means getting these for any safe, primary use case - calculating user voting weight for freeze voting - const safeInfo = await safeAPI!.getSafeInfo(utils.getAddress(_safeAddress)); - const safeModules = await lookupModules(safeInfo.modules); + const safeInfo = await safeAPI!.getSafeInfo(getAddress(_safeAddress)); + const safeModules = await lookupModules(safeInfo.modules as Address[]); const azoriusModule = getAzoriusModuleFromModules(safeModules); if (azoriusModule && azoriusModule.moduleContract) { const azoriusContract = azoriusModule.moduleContract as Azorius; // @dev assumes the first strategy is the voting contract - const votingContractAddress = ( - await azoriusContract.getStrategies('0x0000000000000000000000000000000000000001', 0) - )[1]; - votingContract = LinearERC721Voting__factory.connect( - votingContractAddress, - signerOrProvider, - ); - const addresses = await votingContract.getAllTokenAddresses(); + const votingContractAddresses = (await azoriusContract.read.getStrategies([ + '0x0000000000000000000000000000000000000001', + 0, + ])) as Address[]; + votingContract = getContract({ + address: votingContractAddresses[1], + client: walletOrPublicClient, + abi: baseContracts.linearVotingERC721MasterCopyContract?.asPublic.abi!, + }); + const addresses = (await votingContract?.read.getAllTokenAddresses([])) as Address[]; govTokens = await Promise.all( addresses.map(async tokenAddress => { - const tokenContract = ERC721__factory.connect(tokenAddress, signerOrProvider); - const votingWeight = (await votingContract!.getTokenWeight(tokenAddress)).toBigInt(); - const name = await tokenContract.name(); - const symbol = await tokenContract.symbol(); + const tokenContract = getContract({ + address: tokenAddress, + abi: erc721Abi, + client: publicClient, + }); + const votingWeight = await votingContract?.read.getTokenWeight(tokenAddress); + const name = await tokenContract.read.name(); + const symbol = await tokenContract.read.symbol(); let totalSupply = undefined; try { - const tokenSentEvents = await tokenContract.queryFilter( - tokenContract.filters.Transfer(null, null), - ); + const tokenSentEvents = await tokenContract.getEvents.Transfer(); totalSupply = BigInt(tokenSentEvents.length); } catch (e) { logError('Error while getting ERC721 total supply'); @@ -105,13 +105,15 @@ export default function useUserERC721VotingTokens( ); } } - if (erc721LinearVotingContractAddress && !votingContract) { - votingContract = baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); + if (erc721LinearVotingContractAddress && !votingContract && publicClient) { + votingContract = getContract({ + address: erc721LinearVotingContractAddress, + abi: baseContracts.linearVotingERC721MasterCopyContract?.asPublic.abi!, + client: publicClient, + }); } - if (!govTokens || !votingContract || !user.address) { + if (!govTokens || !votingContract || !user.address || !publicClient) { return { totalVotingTokenAddresses: totalTokenAddresses, totalVotingTokenIds: totalTokenIds, @@ -123,26 +125,30 @@ export default function useUserERC721VotingTokens( // Using `map` instead of `forEach` to simplify usage of `Promise.all` // and guarantee syncronous contractFn assignment govTokens.map(async token => { - const tokenContract = ERC721__factory.connect(token.address, signerOrProvider!); - if ((await tokenContract.balanceOf(user.address!)).toBigInt() > 0n) { - const tokenSentEvents = await tokenContract.queryFilter( - tokenContract.filters.Transfer(user.address!, null), - ); - const tokenReceivedEvents = await tokenContract.queryFilter( - tokenContract.filters.Transfer(null, user.address), - ); + const tokenContract = getContract({ + address: token.address, + abi: erc721Abi, + client: publicClient, + }); + if (((await tokenContract.read.balanceOf([user.address!])) as bigint) > 0n) { + const tokenSentEvents = await tokenContract.getEvents.Transfer({ from: user.address }); + const tokenReceivedEvents = await tokenContract.getEvents.Transfer({ + to: user.address, + }); const allEvents = tokenSentEvents .concat(tokenReceivedEvents) .sort( - (a, b) => a.blockNumber - b.blockNumber || a.transactionIndex - b.transactionIndex, + (a, b) => + Number(a.blockNumber - b.blockNumber) || + Number(a.transactionIndex - b.transactionIndex), ); const ownedTokenIds = new Set(); allEvents.forEach(({ args: { to, from, tokenId } }) => { - if (to.toLowerCase() === user.address!.toLowerCase()) { - ownedTokenIds.add(tokenId.toString()); - } else if (from.toLowerCase() === user.address!.toLowerCase()) { - ownedTokenIds.delete(tokenId.toString()); + if (to?.toLowerCase() === user.address!.toLowerCase()) { + ownedTokenIds.add(tokenId?.toString() || ''); + } else if (from?.toLowerCase() === user.address!.toLowerCase()) { + ownedTokenIds.delete(tokenId?.toString() || ''); } }); if (ownedTokenIds.size > 0) { @@ -193,12 +199,13 @@ export default function useUserERC721VotingTokens( [ erc721LinearVotingContractAddress, erc721Tokens, - signerOrProvider, lookupModules, safeAPI, daoAddress, user.address, baseContracts, + publicClient, + walletOrPublicClient, ], ); diff --git a/src/hooks/DAO/useBuildDAOTx.ts b/src/hooks/DAO/useBuildDAOTx.ts index 24af6c17c4..274cf75046 100644 --- a/src/hooks/DAO/useBuildDAOTx.ts +++ b/src/hooks/DAO/useBuildDAOTx.ts @@ -12,10 +12,9 @@ import { AzoriusGovernance, VotingStrategyType, } from '../../types'; -import useSignerOrProvider from '../utils/useSignerOrProvider'; +import useContractClient from '../utils/useContractClient'; const useBuildDAOTx = () => { - const signerOrProvider = useSignerOrProvider(); const { createOptions, contracts: { fallbackHandler }, @@ -27,6 +26,7 @@ const useBuildDAOTx = () => { governance, governanceContracts: { erc721LinearVotingContractAddress }, } = useFractal(); + const { walletOrPublicClient } = useContractClient(); const buildDao = useCallback( async ( @@ -36,7 +36,7 @@ const useBuildDAOTx = () => { ) => { let azoriusContracts; - if (!user.address || !signerOrProvider || !baseContracts) { + if (!user.address || !walletOrPublicClient || !baseContracts) { return; } const { @@ -81,36 +81,36 @@ const useBuildDAOTx = () => { } azoriusContracts = { - fractalAzoriusMasterCopyContract: fractalAzoriusMasterCopyContract.asSigner, - linearVotingMasterCopyContract: linearVotingMasterCopyContract.asSigner, - linearVotingERC721MasterCopyContract: linearVotingERC721MasterCopyContract.asSigner, - azoriusFreezeGuardMasterCopyContract: azoriusFreezeGuardMasterCopyContract.asSigner, - votesTokenMasterCopyContract: votesTokenMasterCopyContract.asSigner, - claimingMasterCopyContract: claimingMasterCopyContract.asSigner, - votesERC20WrapperMasterCopyContract: votesERC20WrapperMasterCopyContract.asSigner, + fractalAzoriusMasterCopyContract: fractalAzoriusMasterCopyContract.asWallet, + linearVotingMasterCopyContract: linearVotingMasterCopyContract.asWallet, + linearVotingERC721MasterCopyContract: linearVotingERC721MasterCopyContract.asWallet, + azoriusFreezeGuardMasterCopyContract: azoriusFreezeGuardMasterCopyContract.asWallet, + votesTokenMasterCopyContract: votesTokenMasterCopyContract.asWallet, + claimingMasterCopyContract: claimingMasterCopyContract.asWallet, + votesERC20WrapperMasterCopyContract: votesERC20WrapperMasterCopyContract.asWallet, } as AzoriusContracts; } const buildrerBaseContracts = { - fractalModuleMasterCopyContract: fractalModuleMasterCopyContract.asSigner, - fractalRegistryContract: fractalRegistryContract.asSigner, - safeFactoryContract: safeFactoryContract.asSigner, - safeSingletonContract: safeSingletonContract.asSigner, - multisigFreezeGuardMasterCopyContract: multisigFreezeGuardMasterCopyContract.asSigner, - multiSendContract: multiSendContract.asSigner, - freezeERC20VotingMasterCopyContract: freezeERC20VotingMasterCopyContract.asSigner, - freezeERC721VotingMasterCopyContract: freezeERC721VotingMasterCopyContract.asSigner, - freezeMultisigVotingMasterCopyContract: freezeMultisigVotingMasterCopyContract.asSigner, - zodiacModuleProxyFactoryContract: zodiacModuleProxyFactoryContract.asSigner, - keyValuePairsContract: keyValuePairsContract.asSigner, + fractalModuleMasterCopyContract: fractalModuleMasterCopyContract.asWallet, + fractalRegistryContract: fractalRegistryContract.asWallet, + safeFactoryContract: safeFactoryContract.asWallet, + safeSingletonContract: safeSingletonContract.asWallet, + multisigFreezeGuardMasterCopyContract: multisigFreezeGuardMasterCopyContract.asWallet, + multiSendContract: multiSendContract.asWallet, + freezeERC20VotingMasterCopyContract: freezeERC20VotingMasterCopyContract.asWallet, + freezeERC721VotingMasterCopyContract: freezeERC721VotingMasterCopyContract.asWallet, + freezeMultisigVotingMasterCopyContract: freezeMultisigVotingMasterCopyContract.asWallet, + zodiacModuleProxyFactoryContract: zodiacModuleProxyFactoryContract.asWallet, + keyValuePairsContract: keyValuePairsContract.asWallet, } as BaseContracts; const txBuilderFactory = new TxBuilderFactory( - signerOrProvider, + walletOrPublicClient, buildrerBaseContracts, azoriusContracts, daoData, - fallbackHandler, + fallbackHandler.address, parentAddress, parentTokenAddress, ); @@ -150,7 +150,7 @@ const useBuildDAOTx = () => { }, [ user.address, - signerOrProvider, + walletOrPublicClient, baseContracts, erc721LinearVotingContractAddress, dao, diff --git a/src/hooks/DAO/useCastFreezeVote.ts b/src/hooks/DAO/useCastFreezeVote.ts index 44658cdfe1..7177b4bb91 100644 --- a/src/hooks/DAO/useCastFreezeVote.ts +++ b/src/hooks/DAO/useCastFreezeVote.ts @@ -1,8 +1,10 @@ import { useCallback, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { getContract } from 'viem'; import { useFractal } from '../../providers/App/AppProvider'; import { FreezeVotingType } from '../../types'; import useSafeContracts from '../safe/useSafeContracts'; +import useContractClient from '../utils/useContractClient'; import { useTransaction } from '../utils/useTransaction'; import useUserERC721VotingTokens from './proposal/useUserERC721VotingTokens'; @@ -20,6 +22,7 @@ const useCastFreezeVote = ({ } = useFractal(); const baseContracts = useSafeContracts(); const { getUserERC721VotingTokens } = useUserERC721VotingTokens(undefined, undefined, false); + const { walletClient } = useContractClient(); useEffect(() => { setPending(contractCallPending); @@ -28,26 +31,28 @@ const useCastFreezeVote = ({ const { t } = useTranslation('transaction'); const castFreezeVote = useCallback(() => { - if (!freezeVotingContractAddress || !baseContracts) return; + if (!freezeVotingContractAddress || !baseContracts || !walletClient) return; contractCallCastFreeze({ contractFn: () => { if (freezeVotingType === FreezeVotingType.ERC721) { - const freezeERC721VotingContract = - baseContracts.freezeERC721VotingMasterCopyContract.asSigner.attach( - freezeVotingContractAddress, - ); + const freezeERC721VotingContract = getContract({ + address: freezeVotingContractAddress, + abi: baseContracts.freezeERC721VotingMasterCopyContract?.asWallet.abi!, + client: walletClient, + }); return getUserERC721VotingTokens(undefined, parentAddress).then(tokensInfo => - freezeERC721VotingContract['castFreezeVote(address[],uint256[])']( + freezeERC721VotingContract.write['castFreezeVote(address[],uint256[])']([ tokensInfo.totalVotingTokenAddresses, tokensInfo.totalVotingTokenIds, - ), + ]), ); } else { - const freezeVotingContract = - baseContracts.freezeMultisigVotingMasterCopyContract.asSigner.attach( - freezeVotingContractAddress, - ); - return freezeVotingContract.castFreezeVote(); + const freezeVotingContract = getContract({ + address: freezeVotingContractAddress, + abi: baseContracts.freezeERC20VotingMasterCopyContract.asWallet.abi, + client: walletClient, + }); + return freezeVotingContract.write.castFreezeVote([]); } }, pendingMessage: t('pendingCastFreezeVote'), @@ -62,6 +67,7 @@ const useCastFreezeVote = ({ getUserERC721VotingTokens, parentAddress, baseContracts, + walletClient, ]); return castFreezeVote; }; diff --git a/src/hooks/DAO/useClawBack.ts b/src/hooks/DAO/useClawBack.ts index 497dc5683b..890b6a9a5d 100644 --- a/src/hooks/DAO/useClawBack.ts +++ b/src/hooks/DAO/useClawBack.ts @@ -1,33 +1,34 @@ -import { ERC20__factory, FractalModule } from '@fractal-framework/fractal-contracts'; -import { ethers, utils } from 'ethers'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { + erc20Abi, + getAddress, + encodeAbiParameters, + parseAbiParameters, + encodeFunctionData, + Address, +} from 'viem'; import { useSafeAPI } from '../../providers/App/hooks/useSafeAPI'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; -import { FractalModuleType, FractalNode } from '../../types'; +import { FractalModuleType, FractalNode, FractalModule } from '../../types'; import { useCanUserCreateProposal } from '../utils/useCanUserSubmitProposal'; import useSubmitProposal from './proposal/useSubmitProposal'; interface IUseClawBack { childSafeInfo?: FractalNode; - parentAddress?: string | null; + parentAddress?: Address | null; } export default function useClawBack({ childSafeInfo, parentAddress }: IUseClawBack) { const { t } = useTranslation(['proposal', 'proposalMetadata']); - const provider = useEthersProvider(); const safeAPI = useSafeAPI(); const { submitProposal } = useSubmitProposal(); const { canUserCreateProposal } = useCanUserCreateProposal(); const handleClawBack = useCallback(async () => { - if (childSafeInfo && childSafeInfo.daoAddress && parentAddress && safeAPI && provider) { - const childSafeBalance = await safeAPI.getBalances( - utils.getAddress(childSafeInfo.daoAddress), - ); - const parentSafeInfo = await safeAPI.getSafeInfo(utils.getAddress(parentAddress)); + if (childSafeInfo && childSafeInfo.daoAddress && parentAddress && safeAPI) { + const childSafeBalance = await safeAPI.getBalances(getAddress(childSafeInfo.daoAddress)); + const parentSafeInfo = await safeAPI.getSafeInfo(getAddress(parentAddress)); if (canUserCreateProposal && parentAddress && childSafeInfo && parentSafeInfo) { - const abiCoder = new ethers.utils.AbiCoder(); const fractalModule = childSafeInfo.fractalModules!.find( module => module.moduleType === FractalModuleType.FRACTAL, ); @@ -36,33 +37,35 @@ export default function useClawBack({ childSafeInfo, parentAddress }: IUseClawBa const transactions = childSafeBalance.map(asset => { if (!asset.tokenAddress) { // Seems like we're operating with native coin i.e ETH - const txData = abiCoder.encode( - ['address', 'uint256', 'bytes', 'uint8'], - [parentAddress, asset.balance, '0x', 0], - ); - const fractalModuleCalldata = fractalModuleContract.interface.encodeFunctionData( - 'execTx', - [txData], + const txData = encodeAbiParameters( + parseAbiParameters('address, uint256, bytes, uint8'), + [parentAddress, BigInt(asset.balance), '0x', 0], ); + const fractalModuleCalldata = encodeFunctionData({ + abi: fractalModuleContract.abi, + functionName: 'execTx', + args: [txData], + }); return { target: fractalModuleContract.address, value: 0, calldata: fractalModuleCalldata, }; } else { - const tokenContract = ERC20__factory.connect(asset.tokenAddress, provider); - const clawBackCalldata = tokenContract.interface.encodeFunctionData('transfer', [ - parentAddress, - asset.balance, - ]); - const txData = abiCoder.encode( - ['address', 'uint256', 'bytes', 'uint8'], - [asset.tokenAddress, 0, clawBackCalldata, 0], - ); - const fractalModuleCalldata = fractalModuleContract.interface.encodeFunctionData( - 'execTx', - [txData], + const clawBackCalldata = encodeFunctionData({ + abi: erc20Abi, + functionName: 'transfer', + args: [parentAddress, BigInt(asset.balance)], + }); + const txData = encodeAbiParameters( + parseAbiParameters('address, uint256, bytes, uint8'), + [asset.tokenAddress as Address, 0n, clawBackCalldata, 0], ); + const fractalModuleCalldata = encodeFunctionData({ + abi: fractalModuleContract.abi, + functionName: 'execTx', + args: [txData], + }); return { target: fractalModuleContract.address, @@ -97,7 +100,7 @@ export default function useClawBack({ childSafeInfo, parentAddress }: IUseClawBa } } } - }, [canUserCreateProposal, childSafeInfo, parentAddress, provider, submitProposal, t, safeAPI]); + }, [canUserCreateProposal, childSafeInfo, parentAddress, submitProposal, t, safeAPI]); return { handleClawBack }; } diff --git a/src/hooks/DAO/useCreateSubDAOProposal.ts b/src/hooks/DAO/useCreateSubDAOProposal.ts index 04e2005dbe..27106bfd19 100644 --- a/src/hooks/DAO/useCreateSubDAOProposal.ts +++ b/src/hooks/DAO/useCreateSubDAOProposal.ts @@ -1,5 +1,6 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { encodeFunctionData } from 'viem'; import { useFractal } from '../../providers/App/AppProvider'; import { SafeMultisigDAO, AzoriusGovernance, AzoriusERC20DAO, AzoriusERC721DAO } from '../../types'; import { ProposalExecuteData } from '../../types/daoProposal'; @@ -39,16 +40,19 @@ export const useCreateSubDAOProposal = () => { const { safeTx, predictedSafeAddress } = builtSafeTx; const proposalData: ProposalExecuteData = { - targets: [ - multiSendContract.asProvider.address, - fractalRegistryContract.asProvider.address, - ], + targets: [multiSendContract.asPublic.address, fractalRegistryContract.asPublic.address], values: [0n, 0n], calldatas: [ - multiSendContract.asProvider.interface.encodeFunctionData('multiSend', [safeTx]), - fractalRegistryContract.asProvider.interface.encodeFunctionData('declareSubDAO', [ - predictedSafeAddress, - ]), + encodeFunctionData({ + abi: multiSendContract.asPublic.abi, + functionName: 'multiSend', + args: [safeTx], + }), + encodeFunctionData({ + abi: fractalRegistryContract.asPublic.abi, + functionName: 'declareSubDAO', + args: [predictedSafeAddress], + }), ], metaData: { title: t('Create a sub-Safe', { ns: 'proposalMetadata' }), diff --git a/src/hooks/DAO/useDAOController.ts b/src/hooks/DAO/useDAOController.ts index cf64f02197..5965b40b8c 100644 --- a/src/hooks/DAO/useDAOController.ts +++ b/src/hooks/DAO/useDAOController.ts @@ -1,5 +1,5 @@ -import { utils } from 'ethers'; import { useSearchParams } from 'react-router-dom'; +import { isAddress } from 'viem'; import { useFractal } from '../../providers/App/AppProvider'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; import { useAzoriusListeners } from './loaders/governance/useAzoriusListeners'; @@ -24,7 +24,7 @@ export default function useDAOController() { const invalidQuery = addressWithPrefix === null || !validDaoQueryString.test(addressWithPrefix) || - !utils.isAddress(daoAddress || ''); + !isAddress(daoAddress || ''); const { addressPrefix: connectedAddressPrefix } = useNetworkConfig(); const wrongNetwork = addressPrefix !== connectedAddressPrefix; diff --git a/src/hooks/DAO/useDAOName.ts b/src/hooks/DAO/useDAOName.ts index c53ccb34b8..340d758473 100644 --- a/src/hooks/DAO/useDAOName.ts +++ b/src/hooks/DAO/useDAOName.ts @@ -1,10 +1,7 @@ -import { FractalRegistry } from '@fractal-framework/fractal-contracts'; import { useCallback, useEffect, useState } from 'react'; -import { Address } from 'viem'; -import { useEnsName } from 'wagmi'; -import { getEventRPC } from '../../helpers'; +import { Address, decodeEventLog } from 'viem'; +import { useEnsName, usePublicClient } from 'wagmi'; import { useFractal } from '../../providers/App/AppProvider'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; import { createAccountSubstring } from '../utils/useDisplayName'; @@ -51,16 +48,22 @@ export default function useDAOName({ // Aka supplied from Subgraph setDAORegistryName(registryName); } else { - const rpc = getEventRPC(fractalRegistryContract); - const events = await rpc.queryFilter(rpc.filters.FractalNameUpdated(address)); + const events = await fractalRegistryContract.asPublic.getEvents.FractalNameUpdated({ + address: address as any, + }); const latestEvent = events.pop(); if (!latestEvent) { setDAORegistryName(createAccountSubstring(address)); return; } - - const { daoName } = latestEvent.args; + const decodedLatestEvent = decodeEventLog({ + topics: latestEvent.topics, + data: latestEvent.data, + abi: fractalRegistryContract.asPublic.abi, + }); + const args = decodedLatestEvent.args as any[]; + const daoName = args[0]; setDAORegistryName(daoName); } }, [address, ensName, baseContracts, registryName]); @@ -84,12 +87,12 @@ export default function useDAOName({ * @dev this is used on initial load of the DAO Node, after subGraph data is loaded */ export function useLazyDAOName() { - const provider = useEthersProvider(); + const publicClient = usePublicClient(); const getDaoName = useCallback( async (_address: string, _registryName?: string | null): Promise => { - if (provider) { + if (publicClient) { // check if ens name resolves - const ensName = await provider.lookupAddress(_address).catch(() => null); + const ensName = await publicClient.getEnsAddress({ name: _address }).catch(() => null); if (ensName) { return ensName; } @@ -101,7 +104,7 @@ export function useLazyDAOName() { return createAccountSubstring(_address); }, - [provider], + [publicClient], ); return { getDaoName }; diff --git a/src/hooks/DAO/useDelegateVote.ts b/src/hooks/DAO/useDelegateVote.ts index eb80711927..5e33ecc778 100644 --- a/src/hooks/DAO/useDelegateVote.ts +++ b/src/hooks/DAO/useDelegateVote.ts @@ -1,7 +1,6 @@ -import { VotesERC20 } from '@fractal-framework/fractal-contracts'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -import { LockRelease } from '../../assets/typechain-types/dcnt'; +import { VotesERC20 } from '../../types'; import { useTransaction } from '../utils/useTransaction'; const useDelegateVote = () => { @@ -16,11 +15,11 @@ const useDelegateVote = () => { successCallback, }: { delegatee: string; - votingTokenContract: VotesERC20 | LockRelease; + votingTokenContract: VotesERC20; successCallback?: () => void; }) => { contractCallDelegateVote({ - contractFn: () => votingTokenContract.delegate(delegatee), + contractFn: () => votingTokenContract.write.delegate([delegatee]), pendingMessage: t('pendingDelegateVote'), failedMessage: t('failedDelegateVote'), successMessage: t('successDelegateVote'), diff --git a/src/hooks/DAO/useDeployAzorius.ts b/src/hooks/DAO/useDeployAzorius.ts index f2c970ebcf..10e1399f66 100644 --- a/src/hooks/DAO/useDeployAzorius.ts +++ b/src/hooks/DAO/useDeployAzorius.ts @@ -1,6 +1,7 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; +import { Address, encodeFunctionData } from 'viem'; import { DAO_ROUTES } from '../../constants/routes'; import { TxBuilderFactory } from '../../models/TxBuilderFactory'; import { useFractal } from '../../providers/App/AppProvider'; @@ -13,11 +14,11 @@ import { AzoriusERC721DAO, } from '../../types'; import { useCanUserCreateProposal } from '../utils/useCanUserSubmitProposal'; -import useSignerOrProvider from '../utils/useSignerOrProvider'; +import useContractClient from '../utils/useContractClient'; import useSubmitProposal from './proposal/useSubmitProposal'; const useDeployAzorius = () => { - const signerOrProvider = useSignerOrProvider(); + const { walletOrPublicClient } = useContractClient(); const navigate = useNavigate(); const { contracts: { fallbackHandler }, @@ -61,38 +62,38 @@ const useDeployAzorius = () => { let azoriusContracts; azoriusContracts = { - fractalAzoriusMasterCopyContract: fractalAzoriusMasterCopyContract.asProvider, - linearVotingMasterCopyContract: linearVotingMasterCopyContract.asProvider, - azoriusFreezeGuardMasterCopyContract: azoriusFreezeGuardMasterCopyContract.asProvider, - votesTokenMasterCopyContract: votesTokenMasterCopyContract.asProvider, - claimingMasterCopyContract: claimingMasterCopyContract.asProvider, - votesERC20WrapperMasterCopyContract: votesERC20WrapperMasterCopyContract.asProvider, + fractalAzoriusMasterCopyContract: fractalAzoriusMasterCopyContract.asPublic, + linearVotingMasterCopyContract: linearVotingMasterCopyContract.asPublic, + azoriusFreezeGuardMasterCopyContract: azoriusFreezeGuardMasterCopyContract.asPublic, + votesTokenMasterCopyContract: votesTokenMasterCopyContract.asPublic, + claimingMasterCopyContract: claimingMasterCopyContract.asPublic, + votesERC20WrapperMasterCopyContract: votesERC20WrapperMasterCopyContract.asPublic, } as AzoriusContracts; const builderBaseContracts = { - fractalModuleMasterCopyContract: fractalModuleMasterCopyContract.asProvider, - fractalRegistryContract: fractalRegistryContract.asProvider, - safeFactoryContract: safeFactoryContract.asProvider, - safeSingletonContract: safeSingletonContract.asProvider, - multisigFreezeGuardMasterCopyContract: multisigFreezeGuardMasterCopyContract.asProvider, - multiSendContract: multiSendContract.asProvider, - freezeERC20VotingMasterCopyContract: freezeERC20VotingMasterCopyContract.asProvider, - freezeMultisigVotingMasterCopyContract: freezeMultisigVotingMasterCopyContract.asProvider, - zodiacModuleProxyFactoryContract: zodiacModuleProxyFactoryContract.asProvider, - keyValuePairsContract: keyValuePairsContract.asProvider, + fractalModuleMasterCopyContract: fractalModuleMasterCopyContract.asPublic, + fractalRegistryContract: fractalRegistryContract.asPublic, + safeFactoryContract: safeFactoryContract.asPublic, + safeSingletonContract: safeSingletonContract.asPublic, + multisigFreezeGuardMasterCopyContract: multisigFreezeGuardMasterCopyContract.asPublic, + multiSendContract: multiSendContract.asPublic, + freezeERC20VotingMasterCopyContract: freezeERC20VotingMasterCopyContract.asPublic, + freezeMultisigVotingMasterCopyContract: freezeMultisigVotingMasterCopyContract.asPublic, + zodiacModuleProxyFactoryContract: zodiacModuleProxyFactoryContract.asPublic, + keyValuePairsContract: keyValuePairsContract.asPublic, } as BaseContracts; const txBuilderFactory = new TxBuilderFactory( - signerOrProvider, + walletOrPublicClient, builderBaseContracts, azoriusContracts, daoData, - fallbackHandler, + fallbackHandler.address, undefined, undefined, ); - txBuilderFactory.setSafeContract(daoAddress); + txBuilderFactory.setSafeContract(daoAddress as Address); const daoTxBuilder = txBuilderFactory.createDaoTxBuilder(); const safeTx = await daoTxBuilder.buildAzoriusTx(shouldSetName, shouldSetSnapshot, { @@ -100,14 +101,19 @@ const useDeployAzorius = () => { }); const proposalData: ProposalExecuteData = { - targets: [daoAddress, multiSendContract.asProvider.address], + targets: [daoAddress as Address, multiSendContract.asPublic.address], values: [0n, 0n], calldatas: [ - safeSingletonContract.asProvider.interface.encodeFunctionData('addOwnerWithThreshold', [ - multiSendContract.asProvider.address, - 1, - ]), - multiSendContract.asProvider.interface.encodeFunctionData('multiSend', [safeTx]), + encodeFunctionData({ + abi: safeSingletonContract.asPublic.abi, + functionName: 'addOwnerWithThreshold', + args: [multiSendContract.asPublic.address, 1], + }), + encodeFunctionData({ + abi: multiSendContract.asPublic.abi, + functionName: 'multiSend', + args: [safeTx], + }), ], metaData: { title: '', @@ -126,7 +132,7 @@ const useDeployAzorius = () => { }); }, [ - signerOrProvider, + walletOrPublicClient, baseContracts, t, canUserCreateProposal, diff --git a/src/hooks/DAO/useDeployDAO.ts b/src/hooks/DAO/useDeployDAO.ts index be500b601f..780414ced8 100644 --- a/src/hooks/DAO/useDeployDAO.ts +++ b/src/hooks/DAO/useDeployDAO.ts @@ -36,7 +36,7 @@ const useDeployDAO = () => { const { predictedSafeAddress, safeTx } = builtSafeTx; contractCallDeploy({ - contractFn: () => multiSendContract.asSigner.multiSend(safeTx), + contractFn: () => multiSendContract.asWallet.write.multiSend([safeTx]), pendingMessage: t('pendingDeploySafe'), failedMessage: t('failedDeploySafe'), successMessage: t('successDeploySafe'), diff --git a/src/hooks/safe/useIsSafe.ts b/src/hooks/safe/useIsSafe.ts index 5d0aa096cf..a5a3bdf81a 100644 --- a/src/hooks/safe/useIsSafe.ts +++ b/src/hooks/safe/useIsSafe.ts @@ -1,5 +1,5 @@ -import { isAddress } from 'ethers/lib/utils'; import { useEffect, useState } from 'react'; +import { isAddress } from 'viem'; import { useSafeAPI } from '../../providers/App/hooks/useSafeAPI'; /** diff --git a/src/hooks/safe/useSafeContracts.ts b/src/hooks/safe/useSafeContracts.ts index 2ad2d8ee4a..4128305084 100644 --- a/src/hooks/safe/useSafeContracts.ts +++ b/src/hooks/safe/useSafeContracts.ts @@ -1,32 +1,10 @@ -import { - FractalModule__factory, - FractalRegistry__factory, - AzoriusFreezeGuard__factory, - ERC20FreezeVoting__factory, - MultisigFreezeGuard__factory, - MultisigFreezeVoting__factory, - VotesERC20__factory, - GnosisSafeProxyFactory__factory, - ModuleProxyFactory__factory, - LinearERC20Voting__factory, - Azorius__factory, - ERC20Claim__factory, - VotesERC20Wrapper__factory, - KeyValuePairs__factory, - LinearERC721Voting__factory, - ERC721FreezeVoting__factory, -} from '@fractal-framework/fractal-contracts'; import { useMemo } from 'react'; -import { MultiSend__factory } from '../../assets/typechain-types/usul'; -import { GnosisSafeL2__factory } from '../../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; +import { getContract } from 'viem'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; -import useSignerOrProvider from '../utils/useSignerOrProvider'; +import { NetworkContract } from '../../types/network'; +import useContractClient from '../utils/useContractClient'; export default function useSafeContracts() { - const signerOrProvider = useSignerOrProvider(); - const provider = useEthersProvider(); - const { contracts: { safe, @@ -49,105 +27,63 @@ export default function useSafeContracts() { keyValuePairs, }, } = useNetworkConfig(); + const { walletOrPublicClient, publicClient } = useContractClient(); const daoContracts = useMemo(() => { - if (!signerOrProvider || !provider) { + if (!walletOrPublicClient || !publicClient) { return; } - const multiSendContract = { - asSigner: MultiSend__factory.connect(multisend, signerOrProvider), - asProvider: MultiSend__factory.connect(multisend, provider), + const getContractConnection = (networkContract: NetworkContract) => { + const baseArgs = { address: networkContract.address, abi: networkContract.abi }; + return { + asWallet: getContract({ ...baseArgs, client: walletOrPublicClient }), + asPublic: getContract({ ...baseArgs, client: publicClient }), + }; }; + const multiSendContract = getContractConnection(multisend); - const safeFactoryContract = { - asSigner: GnosisSafeProxyFactory__factory.connect(safeFactory, signerOrProvider), - asProvider: GnosisSafeProxyFactory__factory.connect(safeFactory, provider), - }; + const safeFactoryContract = getContractConnection(safeFactory); - const fractalAzoriusMasterCopyContract = { - asSigner: Azorius__factory.connect(fractalAzoriusMasterCopy, signerOrProvider), - asProvider: Azorius__factory.connect(fractalAzoriusMasterCopy, provider), - }; + const fractalAzoriusMasterCopyContract = getContractConnection(fractalAzoriusMasterCopy); - const linearVotingMasterCopyContract = { - asSigner: LinearERC20Voting__factory.connect(linearVotingMasterCopy, signerOrProvider), - asProvider: LinearERC20Voting__factory.connect(linearVotingMasterCopy, provider), - }; - const linearVotingERC721MasterCopyContract = { - asSigner: LinearERC721Voting__factory.connect(linearVotingERC721MasterCopy, signerOrProvider), - asProvider: LinearERC721Voting__factory.connect(linearVotingERC721MasterCopy, provider), - }; + const linearVotingMasterCopyContract = getContractConnection(linearVotingMasterCopy); + const linearVotingERC721MasterCopyContract = linearVotingERC721MasterCopy + ? getContractConnection(linearVotingERC721MasterCopy) + : undefined; - const safeSingletonContract = { - asSigner: GnosisSafeL2__factory.connect(safe, signerOrProvider), - asProvider: GnosisSafeL2__factory.connect(safe, provider), - }; + const safeSingletonContract = getContractConnection(safe); - const zodiacModuleProxyFactoryContract = { - asSigner: ModuleProxyFactory__factory.connect(zodiacModuleProxyFactory, signerOrProvider), - asProvider: ModuleProxyFactory__factory.connect(zodiacModuleProxyFactory, provider), - }; + const zodiacModuleProxyFactoryContract = getContractConnection(zodiacModuleProxyFactory); - const fractalModuleMasterCopyContract = { - asSigner: FractalModule__factory.connect(fractalModuleMasterCopy, signerOrProvider), - asProvider: FractalModule__factory.connect(fractalModuleMasterCopy, provider), - }; + const fractalModuleMasterCopyContract = getContractConnection(fractalModuleMasterCopy); - const fractalRegistryContract = { - asSigner: FractalRegistry__factory.connect(fractalRegistry, signerOrProvider), - asProvider: FractalRegistry__factory.connect(fractalRegistry, provider), - }; + const fractalRegistryContract = getContractConnection(fractalRegistry); - const multisigFreezeGuardMasterCopyContract = { - asSigner: MultisigFreezeGuard__factory.connect( - multisigFreezeGuardMasterCopy, - signerOrProvider, - ), - asProvider: MultisigFreezeGuard__factory.connect(multisigFreezeGuardMasterCopy, provider), - }; + const multisigFreezeGuardMasterCopyContract = getContractConnection( + multisigFreezeGuardMasterCopy, + ); - const azoriusFreezeGuardMasterCopyContract = { - asSigner: AzoriusFreezeGuard__factory.connect(azoriusFreezeGuardMasterCopy, signerOrProvider), - asProvider: AzoriusFreezeGuard__factory.connect(azoriusFreezeGuardMasterCopy, provider), - }; + const azoriusFreezeGuardMasterCopyContract = getContractConnection( + azoriusFreezeGuardMasterCopy, + ); - const freezeMultisigVotingMasterCopyContract = { - asSigner: MultisigFreezeVoting__factory.connect( - multisigFreezeVotingMasterCopy, - signerOrProvider, - ), - asProvider: MultisigFreezeVoting__factory.connect(multisigFreezeVotingMasterCopy, provider), - }; + const freezeMultisigVotingMasterCopyContract = getContractConnection( + multisigFreezeVotingMasterCopy, + ); - const freezeERC20VotingMasterCopyContract = { - asSigner: ERC20FreezeVoting__factory.connect(erc20FreezeVotingMasterCopy, signerOrProvider), - asProvider: ERC20FreezeVoting__factory.connect(erc20FreezeVotingMasterCopy, provider), - }; + const freezeERC20VotingMasterCopyContract = getContractConnection(erc20FreezeVotingMasterCopy); - const freezeERC721VotingMasterCopyContract = { - asSigner: ERC721FreezeVoting__factory.connect(erc721FreezeVotingMasterCopy, signerOrProvider), - asProvider: ERC721FreezeVoting__factory.connect(erc721FreezeVotingMasterCopy, provider), - }; + const freezeERC721VotingMasterCopyContract = erc721FreezeVotingMasterCopy + ? getContractConnection(erc721FreezeVotingMasterCopy) + : undefined; - const votesTokenMasterCopyContract = { - asSigner: VotesERC20__factory.connect(votesERC20MasterCopy, signerOrProvider), - asProvider: VotesERC20__factory.connect(votesERC20MasterCopy, provider), - }; + const votesTokenMasterCopyContract = getContractConnection(votesERC20MasterCopy); - const claimingMasterCopyContract = { - asSigner: ERC20Claim__factory.connect(claimingMasterCopy, signerOrProvider), - asProvider: ERC20Claim__factory.connect(claimingMasterCopy, provider), - }; + const claimingMasterCopyContract = getContractConnection(claimingMasterCopy); - const votesERC20WrapperMasterCopyContract = { - asSigner: VotesERC20Wrapper__factory.connect(votesERC20WrapperMasterCopy, signerOrProvider), - asProvider: VotesERC20Wrapper__factory.connect(votesERC20WrapperMasterCopy, provider), - }; + const votesERC20WrapperMasterCopyContract = getContractConnection(votesERC20WrapperMasterCopy); - const keyValuePairsContract = { - asSigner: KeyValuePairs__factory.connect(keyValuePairs, signerOrProvider), - asProvider: KeyValuePairs__factory.connect(keyValuePairs, provider), - }; + const keyValuePairsContract = getContractConnection(keyValuePairs); return { multiSendContract, @@ -188,8 +124,8 @@ export default function useSafeContracts() { linearVotingERC721MasterCopy, erc721FreezeVotingMasterCopy, keyValuePairs, - signerOrProvider, - provider, + walletOrPublicClient, + publicClient, ]); return daoContracts; diff --git a/src/hooks/schemas/DAOCreate/useDAOCreateTests.ts b/src/hooks/schemas/DAOCreate/useDAOCreateTests.ts index 9bf4a8b2c8..c5bb9f9798 100644 --- a/src/hooks/schemas/DAOCreate/useDAOCreateTests.ts +++ b/src/hooks/schemas/DAOCreate/useDAOCreateTests.ts @@ -1,13 +1,11 @@ -import { ethers, utils } from 'ethers'; import { useMemo, useRef } from 'react'; import { useTranslation } from 'react-i18next'; -import { erc20Abi } from 'viem'; +import { Address, erc20Abi, getContract, isAddress } from 'viem'; +import { usePublicClient } from 'wagmi'; import { AnyObject } from 'yup'; import { logError } from '../../../helpers/errorLogging'; -import { useEthersProvider } from '../../../providers/Ethers/hooks/useEthersProvider'; import { AddressValidationMap, CreatorFormState, TokenAllocation } from '../../../types'; import { couldBeENS } from '../../../utils/url'; -import useSignerOrProvider from '../../utils/useSignerOrProvider'; import { validateAddress } from '../common/useValidationAddress'; /** @@ -21,9 +19,8 @@ export function useDAOCreateTests() { * @dev this is used for any other functions contained within this hook, to lookup resolved addresses in this session without requesting again. */ const addressValidationMap = useRef(new Map()); - const provider = useEthersProvider(); - const signerOrProvider = useSignerOrProvider(); const { t } = useTranslation(['daoCreate', 'common']); + const publicClient = usePublicClient(); const minValueValidation = useMemo( () => (minValue: number) => { @@ -47,14 +44,14 @@ export function useDAOCreateTests() { message: t('errorInvalidENSAddress', { ns: 'common' }), test: async function (address: string | undefined) { if (!address) return false; - const { validation } = await validateAddress({ signerOrProvider, address }); + const { validation } = await validateAddress({ publicClient, address }); if (validation.isValidAddress) { addressValidationMap.current.set(address, validation); } return validation.isValidAddress; }, }; - }, [signerOrProvider, addressValidationMap, t]); + }, [publicClient, addressValidationMap, t]); const uniqueAllocationValidationTest = useMemo(() => { return { @@ -70,21 +67,20 @@ export function useDAOCreateTests() { // looks up tested value let inputValidation = addressValidationMap.current.get(value); if (!!value && !inputValidation) { - inputValidation = (await validateAddress({ signerOrProvider, address: value })) - .validation; + inputValidation = (await validateAddress({ publicClient, address: value })).validation; } // converts all inputs to addresses to compare // uses addressValidationMap to save on requests const resolvedAddresses: string[] = await Promise.all( parentAddressArray.map(async ({ address }: TokenAllocation) => { // look up validated values - const addressValidation = addressValidationMap.current.get(address); + const addressValidation = addressValidationMap.current.get(address!); if (addressValidation && addressValidation.isValidAddress) { return addressValidation.address; } // because mapping is not 'state', this catches values that may not be resolved yet if (couldBeENS(address)) { - const { validation } = await validateAddress({ signerOrProvider, address }); + const { validation } = await validateAddress({ publicClient, address: address! }); return validation.address; } return address; @@ -97,7 +93,7 @@ export function useDAOCreateTests() { return uniqueFilter.length === 1; }, }; - }, [signerOrProvider, t]); + }, [publicClient, t]); const maxAllocationValidation = useMemo(() => { return { name: 'Token Supply validation', @@ -134,14 +130,14 @@ export function useDAOCreateTests() { return { name: 'ERC20 Address Validation', message: t('errorInvalidERC20Address', { ns: 'common' }), - test: async function (address: string | undefined) { - if (address && utils.isAddress(address)) { + test: async function (address: Address | undefined) { + if (address && isAddress(address) && publicClient) { try { - const tokenContract = new ethers.Contract(address, erc20Abi, provider); + const tokenContract = getContract({ address, abi: erc20Abi, client: publicClient }); const [name, symbol, decimals] = await Promise.all([ - tokenContract.name(), - tokenContract.symbol(), - tokenContract.decimals(), + tokenContract.read.name(), + tokenContract.read.symbol(), + tokenContract.read.decimals(), ]); return !!name && !!symbol && !!decimals; } catch (error) { @@ -151,21 +147,21 @@ export function useDAOCreateTests() { return false; }, }; - }, [provider, t]); + }, [publicClient, t]); const validERC721Address = useMemo(() => { return { name: 'ERC721 Address Validation', message: t('errorInvalidERC721Address', { ns: 'common' }), test: async function (address: string | undefined) { - if (address && utils.isAddress(address)) { + if (address && isAddress(address) && publicClient) { try { // We're using this instead of erc721ABI from wagmi cause that one doesn't have supportsInterface for whatever reason const erc165 = [ 'function supportsInterface(bytes4 interfaceID) external view returns (bool)', ]; - const nftContract = new ethers.Contract(address, erc165, provider); - const supportsInterface = await nftContract.supportsInterface('0x80ac58cd'); // Exact same check we have in voting strategy contract + const nftContract = getContract({ address, abi: erc165, client: publicClient }); + const supportsInterface = await nftContract.read.supportsInterface(['0x80ac58cd']); // Exact same check we have in voting strategy contract return supportsInterface; } catch (error) { logError(error); @@ -175,7 +171,7 @@ export function useDAOCreateTests() { return false; }, }; - }, [provider, t]); + }, [publicClient, t]); const isBigIntValidation = useMemo(() => { return { diff --git a/src/hooks/schemas/common/useValidationAddress.tsx b/src/hooks/schemas/common/useValidationAddress.tsx index dcada73849..dd3fd4cebf 100644 --- a/src/hooks/schemas/common/useValidationAddress.tsx +++ b/src/hooks/schemas/common/useValidationAddress.tsx @@ -1,13 +1,12 @@ -import { Signer, utils } from 'ethers'; import { useMemo, useRef, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { PublicClient, isAddress } from 'viem'; +import { normalize } from 'viem/ens'; import { AnyObject } from 'yup'; import { useFractal } from '../../../providers/App/AppProvider'; -import { useEthersSigner } from '../../../providers/Ethers/hooks/useEthersSigner'; import { AddressValidationMap, ERC721TokenConfig } from '../../../types'; -import { Providers } from '../../../types/network'; import { couldBeENS } from '../../../utils/url'; -import useSignerOrProvider from '../../utils/useSignerOrProvider'; +import useContractClient from '../../utils/useContractClient'; export function validateENSName({ ensName }: { ensName: string }) { if (couldBeENS(ensName)) { @@ -29,16 +28,16 @@ export function validateENSName({ ensName }: { ensName: string }) { } export async function validateAddress({ - signerOrProvider, + publicClient, address, checkENS = true, }: { - signerOrProvider?: Signer | Providers; + publicClient?: PublicClient; address: string; checkENS?: boolean; }) { - if (couldBeENS(address) && checkENS && signerOrProvider) { - const resolvedAddress = await signerOrProvider.resolveName(address).catch(); + if (couldBeENS(address) && checkENS && publicClient) { + const resolvedAddress = await publicClient.getEnsAddress({ name: normalize(address) }).catch(); if (resolvedAddress) { return { validation: { @@ -57,7 +56,7 @@ export async function validateAddress({ }; } } - const isValidAddress = utils.isAddress(address); + const isValidAddress = isAddress(address); if (isValidAddress) { return { validation: { @@ -85,12 +84,11 @@ export const useValidationAddress = () => { * @dev this is used for any other functions contained within this hook, to lookup resolved addresses in this session without requesting again. */ const addressValidationMap = useRef(new Map()); - const signer = useEthersSigner(); - const signerOrProvider = useSignerOrProvider(); const { t } = useTranslation(['daoCreate', 'common', 'modals']); const { node: { safe }, } = useFractal(); + const { publicClient } = useContractClient(); const addressValidationTest = useMemo(() => { return { @@ -98,14 +96,14 @@ export const useValidationAddress = () => { message: t('errorInvalidENSAddress', { ns: 'common' }), test: async function (address: string | undefined) { if (!address) return false; - const { validation } = await validateAddress({ signerOrProvider, address }); + const { validation } = await validateAddress({ publicClient, address }); if (validation.isValidAddress) { addressValidationMap.current.set(address, validation); } return validation.isValidAddress; }, }; - }, [signerOrProvider, addressValidationMap, t]); + }, [publicClient, addressValidationMap, t]); const addressValidationTestSimple = useMemo(() => { return { @@ -114,7 +112,7 @@ export const useValidationAddress = () => { test: async function (address: string | undefined) { if (!address) return false; const { validation } = await validateAddress({ - signerOrProvider, + publicClient, address, checkENS: false, }); @@ -124,28 +122,28 @@ export const useValidationAddress = () => { return validation.isValidAddress; }, }; - }, [signerOrProvider, addressValidationMap, t]); + }, [publicClient, addressValidationMap, t]); const newSignerValidationTest = useMemo(() => { return { name: 'New Signer Validation', message: t('alreadySigner', { ns: 'modals' }), - test: async function (address: string | undefined) { - if (!address || !safe || !signer) return false; + test: async function (address: string | undefined | null) { + if (!address || !safe || !publicClient) return false; if (couldBeENS(address)) { - address = await signer.resolveName(address); + address = await publicClient.getEnsAddress({ name: address }); } - return !safe.owners.includes(address); + return !safe.owners.includes(address!); }, }; - }, [safe, signer, t]); + }, [safe, publicClient, t]); const testUniqueAddressArray = useCallback( async (value: string, addressArray: string[]) => { // looks up tested value let inputValidation = addressValidationMap.current.get(value); if (!!value && !inputValidation) { - inputValidation = (await validateAddress({ signerOrProvider, address: value })).validation; + inputValidation = (await validateAddress({ publicClient, address: value })).validation; } // converts all inputs to addresses to compare // uses addressValidationMap to save on requests @@ -158,7 +156,7 @@ export const useValidationAddress = () => { } // because mapping is not 'state', this catches values that may not be resolved yet if (couldBeENS(address)) { - const { validation } = await validateAddress({ signerOrProvider, address }); + const { validation } = await validateAddress({ publicClient, address }); return validation.address; } return address; @@ -171,7 +169,7 @@ export const useValidationAddress = () => { return uniqueFilter.length === 1; }, - [signerOrProvider], + [publicClient], ); const uniqueAddressValidationTest = useMemo(() => { diff --git a/src/hooks/stake/lido/useLidoStaking.ts b/src/hooks/stake/lido/useLidoStaking.ts index 657587a5af..e1aa32f15c 100644 --- a/src/hooks/stake/lido/useLidoStaking.ts +++ b/src/hooks/stake/lido/useLidoStaking.ts @@ -5,7 +5,6 @@ import { useFractal } from '../../../providers/App/AppProvider'; import { useNetworkConfig } from '../../../providers/NetworkConfig/NetworkConfigProvider'; import { ProposalExecuteData } from '../../../types'; import useSubmitProposal from '../../DAO/proposal/useSubmitProposal'; -import useSignerOrProvider from '../../utils/useSignerOrProvider'; export default function useLidoStaking() { const { @@ -14,18 +13,17 @@ export default function useLidoStaking() { const { staking: { lido }, } = useNetworkConfig(); - const signerOrProvider = useSignerOrProvider(); const { submitProposal } = useSubmitProposal(); const { t } = useTranslation('proposal'); const handleStake = useCallback( async (value: bigint) => { - if (!lido || !daoAddress || !signerOrProvider) { + if (!lido || !daoAddress) { // Means it is not supported on current network return; } - const stETHContract = getSTETHContract(lido.stETHContractAddress, signerOrProvider); + const stETHContract = getSTETHContract(lido.stETHContractAddress); const proposalData: ProposalExecuteData = { metaData: { @@ -45,19 +43,18 @@ export default function useLidoStaking() { failedToastMessage: t('proposalCreateFailureToastMessage'), }); }, - [lido, signerOrProvider, daoAddress, safe, submitProposal, t], + [lido, daoAddress, safe, submitProposal, t], ); const handleUnstake = useCallback( async (value: string) => { - if (!lido || !daoAddress || !signerOrProvider) { + if (!lido || !daoAddress) { // Means it is not supported on current network return; } - const stETHContract = getSTETHContract(lido.stETHContractAddress, signerOrProvider); + const stETHContract = getSTETHContract(lido.stETHContractAddress); const withdrawalQueueContract = getWithdrawalQueueContract( lido.withdrawalQueueContractAddress, - signerOrProvider, ); const proposalData: ProposalExecuteData = { @@ -90,19 +87,18 @@ export default function useLidoStaking() { failedToastMessage: t('proposalCreateFailureToastMessage'), }); }, - [lido, daoAddress, safe, submitProposal, t, signerOrProvider], + [lido, daoAddress, safe, submitProposal, t], ); const handleClaimUnstakedETH = useCallback( async (nftId: bigint) => { - if (!lido || !daoAddress || !signerOrProvider) { + if (!lido || !daoAddress) { // Means it is not supported on current network return; } const withdrawalQueueContract = getWithdrawalQueueContract( lido.withdrawalQueueContractAddress, - signerOrProvider, ); const proposalData: ProposalExecuteData = { @@ -127,7 +123,7 @@ export default function useLidoStaking() { failedToastMessage: t('proposalCreateFailureToastMessage'), }); }, - [lido, daoAddress, safe, submitProposal, t, signerOrProvider], + [lido, daoAddress, safe, submitProposal, t], ); return { handleStake, handleUnstake, handleClaimUnstakedETH }; diff --git a/src/hooks/utils/useAddress.ts b/src/hooks/utils/useAddress.ts index a6fcbdb2b8..0b4cca9dbd 100644 --- a/src/hooks/utils/useAddress.ts +++ b/src/hooks/utils/useAddress.ts @@ -1,20 +1,19 @@ import { useEffect, useState } from 'react'; import { getAddress, isAddress } from 'viem'; +import { usePublicClient } from 'wagmi'; import { supportsENS } from '../../helpers'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; import { couldBeENS } from '../../utils/url'; import { CacheKeys, CacheExpiry } from './cache/cacheDefaults'; import { useLocalStorage } from './cache/useLocalStorage'; const useAddress = (addressInput: string | undefined) => { - const provider = useEthersProvider(); - const [address, setAddress] = useState(); const [isValidAddress, setIsValidAddress] = useState(); const [isAddressLoading, setIsAddressLoading] = useState(false); const { setValue, getValue } = useLocalStorage(); const { chain } = useNetworkConfig(); + const publicClient = usePublicClient(); useEffect(() => { setIsAddressLoading(true); @@ -70,15 +69,15 @@ const useAddress = (addressInput: string | undefined) => { return; } - if (!provider) { + if (!publicClient) { setAddress(addressInput); setIsValidAddress(undefined); setIsAddressLoading(false); return; } - provider - .resolveName(addressInput) + publicClient + .getEnsAddress({ name: addressInput }) .then((resolvedAddress: any) => { if (!resolvedAddress) { // cache an unresolved address as 'undefined' for 20 minutes @@ -103,7 +102,7 @@ const useAddress = (addressInput: string | undefined) => { .finally(() => { setIsAddressLoading(false); }); - }, [provider, addressInput, getValue, setValue, chain]); + }, [publicClient, addressInput, getValue, setValue, chain]); return { address, isValidAddress, isAddressLoading }; }; diff --git a/src/hooks/utils/useApproval.tsx b/src/hooks/utils/useApproval.tsx index e9dd48270b..c75c152cb0 100644 --- a/src/hooks/utils/useApproval.tsx +++ b/src/hooks/utils/useApproval.tsx @@ -1,8 +1,8 @@ -import { VotesERC20, VotesERC20Wrapper } from '@fractal-framework/fractal-contracts'; import { useCallback, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { maxUint256 } from 'viem'; import { useAccount } from 'wagmi'; +import { VotesERC20, VotesERC20Wrapper } from '../../types'; import { useTransaction } from './useTransaction'; const useApproval = ( @@ -19,15 +19,15 @@ const useApproval = ( const fetchAllowance = useCallback(async () => { if (!tokenContract || !account || !spenderAddress) return; - const userAllowance = (await tokenContract.allowance(account, spenderAddress)).toBigInt(); - setAllowance(userAllowance); + const userAllowance = await tokenContract.read.allowance([account, spenderAddress]); + setAllowance(userAllowance as bigint); }, [account, tokenContract, spenderAddress]); const approveTransaction = useCallback(async () => { if (!tokenContract || !account || !spenderAddress) return; contractCall({ - contractFn: () => tokenContract.approve(spenderAddress, maxUint256), + contractFn: () => tokenContract.write.approve([spenderAddress, maxUint256]), pendingMessage: t('approvalPendingMessage'), failedMessage: t('approvalFailedMessage'), successMessage: t('approvalSuccessMessage'), diff --git a/src/hooks/utils/useBlockTimestamp.ts b/src/hooks/utils/useBlockTimestamp.ts index 2e57cb02e6..87cf185aa6 100644 --- a/src/hooks/utils/useBlockTimestamp.ts +++ b/src/hooks/utils/useBlockTimestamp.ts @@ -1,28 +1,28 @@ import { useEffect, useState } from 'react'; +import { usePublicClient } from 'wagmi'; import { logError } from '../../helpers/errorLogging'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; const useBlockTimestamp = (blockNumber?: number) => { const [timestamp, setTimestamp] = useState(Math.floor(Date.now() / 1000)); - const provider = useEthersProvider(); + const publicClient = usePublicClient(); useEffect(() => { - if (!provider || !blockNumber) { + if (!publicClient || !blockNumber) { setTimestamp(Math.floor(Date.now() / 1000)); return; } - provider - .getBlock(blockNumber) + publicClient + .getBlock({ blockNumber: BigInt(blockNumber) }) .then(block => { if (!block) { return; } - setTimestamp(block.timestamp); + setTimestamp(Number(block.timestamp)); }) .catch(logError); - }, [provider, blockNumber]); + }, [publicClient, blockNumber]); return timestamp; }; diff --git a/src/hooks/utils/useCanUserSubmitProposal.ts b/src/hooks/utils/useCanUserSubmitProposal.ts index 132aa0b6b9..5eda1c0389 100644 --- a/src/hooks/utils/useCanUserSubmitProposal.ts +++ b/src/hooks/utils/useCanUserSubmitProposal.ts @@ -1,12 +1,12 @@ -import { Azorius } from '@fractal-framework/fractal-contracts'; -import { utils } from 'ethers'; import { useState, useCallback, useEffect } from 'react'; +import { Address, getAddress, getContract } from 'viem'; import { useFractal } from '../../providers/App/AppProvider'; import { useSafeAPI } from '../../providers/App/hooks/useSafeAPI'; -import { GovernanceType } from '../../types'; +import { Azorius, GovernanceType } from '../../types'; import { getAzoriusModuleFromModules } from '../../utils'; import { useFractalModules } from '../DAO/loaders/useFractalModules'; import useSafeContracts from '../safe/useSafeContracts'; +import useContractClient from './useContractClient'; export function useCanUserCreateProposal() { const { @@ -19,6 +19,7 @@ export function useCanUserCreateProposal() { const baseContracts = useSafeContracts(); const lookupModules = useFractalModules(); const [canUserCreateProposal, setCanUserCreateProposal] = useState(); + const { walletClient } = useContractClient(); /** * Performs a check whether user has access rights to create proposal for DAO * @param {string} safeAddress - parameter to verify that user can create proposal for this specific DAO. @@ -36,20 +37,25 @@ export function useCanUserCreateProposal() { }; if (safeAddress && baseContracts) { - const safeInfo = await safeAPI.getSafeInfo(utils.getAddress(safeAddress)); + const safeInfo = await safeAPI.getSafeInfo(getAddress(safeAddress)); const safeModules = await lookupModules(safeInfo.modules); const azoriusModule = getAzoriusModuleFromModules(safeModules); if (azoriusModule && azoriusModule.moduleContract) { const azoriusContract = azoriusModule.moduleContract as Azorius; // @dev assumes the first strategy is the voting contract - const votingContractAddress = ( - await azoriusContract.getStrategies('0x0000000000000000000000000000000000000001', 0) - )[1]; - const votingContract = - baseContracts.linearVotingMasterCopyContract.asProvider.attach(votingContractAddress); - const isProposer = await votingContract.isProposer(user.address); - return isProposer; + const votingContractAddresses = (await azoriusContract.read.getStrategies([ + '0x0000000000000000000000000000000000000001', + 0, + ])) as Address[]; + const votingContractAddress = votingContractAddresses[1]; + const votingContract = getContract({ + address: votingContractAddress, + client: walletClient!, + abi: baseContracts.linearVotingMasterCopyContract.asWallet.abi, + }); + const isProposer = await votingContract.read.isProposer([user.address]); + return isProposer as boolean; } else { return checkIsMultisigOwner(safeInfo.owners); } @@ -59,22 +65,25 @@ export function useCanUserCreateProposal() { return checkIsMultisigOwner(owners); } else if (type === GovernanceType.AZORIUS_ERC20) { if (ozLinearVotingContractAddress && user.address && baseContracts) { - const ozLinearVotingContract = - baseContracts.linearVotingMasterCopyContract.asProvider.attach( - ozLinearVotingContractAddress, - ); - return ozLinearVotingContract.isProposer(user.address); + const ozLinearVotingContract = getContract({ + address: ozLinearVotingContractAddress, + abi: baseContracts.linearVotingMasterCopyContract.asWallet.abi, + client: walletClient!, + }); + + return (await ozLinearVotingContract.read.isProposer([user.address])) as boolean; } } else if ( type === GovernanceType.AZORIUS_ERC721 && baseContracts && erc721LinearVotingContractAddress ) { - const erc721LinearVotingContract = - baseContracts.linearVotingERC721MasterCopyContract.asProvider.attach( - erc721LinearVotingContractAddress, - ); - return erc721LinearVotingContract.isProposer(user.address); + const erc721LinearVotingContract = getContract({ + address: erc721LinearVotingContractAddress, + abi: baseContracts!.linearVotingERC721MasterCopyContract!.asWallet.abi, + client: walletClient!, + }); + return (await erc721LinearVotingContract.read.isProposer([user.address])) as boolean; } else { return; } @@ -90,6 +99,7 @@ export function useCanUserCreateProposal() { lookupModules, safeAPI, baseContracts, + walletClient, ], ); useEffect(() => { diff --git a/src/hooks/utils/useContractClient.ts b/src/hooks/utils/useContractClient.ts new file mode 100644 index 0000000000..0f30cd40fe --- /dev/null +++ b/src/hooks/utils/useContractClient.ts @@ -0,0 +1,19 @@ +import { useMemo } from 'react'; +import { usePublicClient, useWalletClient } from 'wagmi'; + +export default function useContractClient() { + const publicClient = usePublicClient(); + const walletClient = useWalletClient(); + const walletOrPublicClient = useMemo(() => { + if (walletClient.data) { + return walletClient.data; + } + return publicClient; + }, [walletClient.data, publicClient]); + + return { + publicClient, + walletClient: walletClient.data, + walletOrPublicClient, + }; +} diff --git a/src/hooks/utils/useCurrentBlockNumber.ts b/src/hooks/utils/useCurrentBlockNumber.ts index ef2177c181..10eec32325 100644 --- a/src/hooks/utils/useCurrentBlockNumber.ts +++ b/src/hooks/utils/useCurrentBlockNumber.ts @@ -1,14 +1,14 @@ import { useEffect, useState, useCallback } from 'react'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; +import { usePublicClient } from 'wagmi'; const useCurrentBlockNumber = () => { const [currentBlockNumber, setCurrentBlockNumber] = useState(); const [isLoaded, setIsLoaded] = useState(false); - const provider = useEthersProvider(); + const publicClient = usePublicClient(); const updateBlockNumber = useCallback( - (block: number) => { - setCurrentBlockNumber(block); + (block: bigint) => { + setCurrentBlockNumber(Number(block)); if (!isLoaded) { setIsLoaded(true); } @@ -17,17 +17,17 @@ const useCurrentBlockNumber = () => { ); useEffect(() => { - if (!provider) { + if (!publicClient) { setCurrentBlockNumber(undefined); return; } - provider.on('block', updateBlockNumber); + const unsubscribe = publicClient.watchBlockNumber({ onBlockNumber: updateBlockNumber }); return () => { - provider.off('block', updateBlockNumber); + unsubscribe(); }; - }, [provider, updateBlockNumber]); + }, [publicClient, updateBlockNumber]); return { currentBlockNumber, isLoaded }; }; diff --git a/src/hooks/utils/useMasterCopy.ts b/src/hooks/utils/useMasterCopy.ts index 89598241dc..bd13b85662 100644 --- a/src/hooks/utils/useMasterCopy.ts +++ b/src/hooks/utils/useMasterCopy.ts @@ -1,8 +1,5 @@ -import { ModuleProxyFactory } from '@fractal-framework/fractal-contracts'; -import { Contract } from 'ethers'; import { useCallback } from 'react'; -import { zeroAddress } from 'viem'; -import { getEventRPC } from '../../helpers'; +import { Address, zeroAddress } from 'viem'; import { useFractal } from '../../providers/App/AppProvider'; import { CacheExpiry, CacheKeys } from './cache/cacheDefaults'; import { useLocalStorage } from './cache/useLocalStorage'; @@ -12,76 +9,67 @@ export function useMasterCopy() { const { baseContracts } = useFractal(); const isOzLinearVoting = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === baseContracts?.linearVotingMasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.linearVotingMasterCopyContract.asPublic.address, [baseContracts], ); const isOzLinearVotingERC721 = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === baseContracts?.linearVotingERC721MasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.linearVotingERC721MasterCopyContract.asPublic.address, [baseContracts], ); const isMultisigFreezeGuard = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === baseContracts?.multisigFreezeGuardMasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.multisigFreezeGuardMasterCopyContract.asPublic.address, [baseContracts], ); const isMultisigFreezeVoting = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === - baseContracts?.freezeMultisigVotingMasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.freezeMultisigVotingMasterCopyContract.asPublic.address, [baseContracts], ); const isERC721FreezeVoting = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === baseContracts?.freezeERC721VotingMasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.freezeERC721VotingMasterCopyContract.asPublic.address, [baseContracts], ); const isAzorius = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === baseContracts?.fractalAzoriusMasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.fractalAzoriusMasterCopyContract.asPublic.address, [baseContracts], ); const isFractalModule = useCallback( - (masterCopyAddress: string | `0x${string}`) => - masterCopyAddress === baseContracts?.fractalModuleMasterCopyContract.asProvider.address, + (masterCopyAddress?: Address) => + masterCopyAddress === baseContracts?.fractalModuleMasterCopyContract.asPublic.address, [baseContracts], ); - const getMasterCopyAddress = useCallback( - async function ( - contract: Contract, - proxyAddress: string | `0x${string}`, - ): Promise<[string, string | null]> { - const cachedValue = getValue(CacheKeys.MASTER_COPY_PREFIX + proxyAddress); - if (cachedValue) return [cachedValue, null] as const; - - const filter = contract.filters.ModuleProxyCreation(proxyAddress, null); - return contract.queryFilter(filter).then(proxiesCreated => { - // @dev to prevent redundant queries, cache the master copy address as AddressZero if no proxies were created - if (proxiesCreated.length === 0) { - setValue(CacheKeys.MASTER_COPY_PREFIX + proxyAddress, zeroAddress, CacheExpiry.ONE_WEEK); - return [zeroAddress, 'No proxies created'] as const; - } - const masterCopyAddress = proxiesCreated[0].args!.masterCopy; - setValue(CacheKeys.MASTER_COPY_PREFIX + proxyAddress, masterCopyAddress); - return [masterCopyAddress, null] as const; - }); - }, - [getValue, setValue], - ); - const getZodiacModuleProxyMasterCopyData = useCallback( - async function (proxyAddress: string | `0x${string}`) { - let masterCopyAddress = ''; - let error; + async function (proxyAddress: Address) { + let masterCopyAddress: Address | undefined; if (baseContracts) { - const contract = getEventRPC( - baseContracts?.zodiacModuleProxyFactoryContract, - ); - [masterCopyAddress, error] = await getMasterCopyAddress(contract, proxyAddress); - if (error) { - console.error(error); + const cachedValue = getValue(CacheKeys.MASTER_COPY_PREFIX + proxyAddress); + if (cachedValue) { + masterCopyAddress = cachedValue as Address; + } else { + masterCopyAddress = + await baseContracts.zodiacModuleProxyFactoryContract.asPublic.getEvents + .ModuleProxyCreation([proxyAddress, null]) + .then(proxiesCreated => { + // @dev to prevent redundant queries, cache the master copy address as AddressZero if no proxies were created + if (proxiesCreated.length === 0) { + setValue( + CacheKeys.MASTER_COPY_PREFIX + proxyAddress, + zeroAddress, + CacheExpiry.ONE_WEEK, + ); + console.error('No proxies created for Zodiac Module Proxy', proxyAddress); + return zeroAddress; + } + const masterCopy = proxiesCreated[0].topics[0]; + setValue(CacheKeys.MASTER_COPY_PREFIX + proxyAddress, masterCopy); + return masterCopy; + }); } } return { @@ -96,7 +84,6 @@ export function useMasterCopy() { }; }, [ - getMasterCopyAddress, isAzorius, isFractalModule, isERC721FreezeVoting, @@ -105,6 +92,8 @@ export function useMasterCopy() { isOzLinearVoting, isOzLinearVotingERC721, baseContracts, + getValue, + setValue, ], ); diff --git a/src/hooks/utils/useSafeDecoder.tsx b/src/hooks/utils/useSafeDecoder.tsx index 70c98b6a99..545ada3c6c 100644 --- a/src/hooks/utils/useSafeDecoder.tsx +++ b/src/hooks/utils/useSafeDecoder.tsx @@ -1,6 +1,6 @@ import axios from 'axios'; -import { solidityKeccak256 } from 'ethers/lib/utils.js'; import { useCallback } from 'react'; +import { encodePacked, keccak256 } from 'viem'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; import { DecodedTransaction, DecodedTxParam } from '../../types'; import { buildSafeApiUrl, parseMultiSendTransactions } from '../../utils'; @@ -31,7 +31,7 @@ export const useSafeDecoder = () => { } const cachedTransactions = await getValue( - CacheKeys.DECODED_TRANSACTION_PREFIX + solidityKeccak256(['string'], [to + data]), + CacheKeys.DECODED_TRANSACTION_PREFIX + keccak256(encodePacked(['string'], [to + data])), ); if (cachedTransactions) return cachedTransactions; @@ -74,7 +74,7 @@ export const useSafeDecoder = () => { } await setValue( - CacheKeys.DECODED_TRANSACTION_PREFIX + solidityKeccak256(['string'], [to + data]), + CacheKeys.DECODED_TRANSACTION_PREFIX + keccak256(encodePacked(['string'], [to + data])), decoded, ); diff --git a/src/hooks/utils/useSafeTransactions.ts b/src/hooks/utils/useSafeTransactions.ts index 082aac8a2f..4fd1222a99 100644 --- a/src/hooks/utils/useSafeTransactions.ts +++ b/src/hooks/utils/useSafeTransactions.ts @@ -1,4 +1,3 @@ -import { MultisigFreezeGuard } from '@fractal-framework/fractal-contracts'; import { AllTransactionsListResponse, EthereumTxWithTransfersResponse, @@ -6,10 +5,9 @@ import { TransferWithTokenInfoResponse, } from '@safe-global/safe-service-client'; import { useCallback } from 'react'; -import { zeroAddress } from 'viem'; +import { getContract, zeroAddress } from 'viem'; import { isApproved, isRejected } from '../../helpers/activity'; import { useFractal } from '../../providers/App/AppProvider'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; import { useNetworkConfig } from '../../providers/NetworkConfig/NetworkConfigProvider'; import { AssetTotals, @@ -17,11 +15,13 @@ import { ActivityEventType, Activity, FractalProposalState, + MultisigFreezeGuard, } from '../../types'; import { formatWeiToValue, isModuleTx, isMultiSigTx, parseDecodedData } from '../../utils'; import { getAverageBlockTime } from '../../utils/contract'; import { getTxTimelockedTimestamp } from '../../utils/guard'; import useSafeContracts from '../safe/useSafeContracts'; +import useContractClient from './useContractClient'; import { useSafeDecoder } from './useSafeDecoder'; type FreezeGuardData = { @@ -32,10 +32,10 @@ type FreezeGuardData = { export const useSafeTransactions = () => { const { chain } = useNetworkConfig(); - const provider = useEthersProvider(); const { guardContracts } = useFractal(); const baseContracts = useSafeContracts(); const decode = useSafeDecoder(); + const { publicClient } = useContractClient(); const getState = useCallback( async ( @@ -43,7 +43,7 @@ export const useSafeTransactions = () => { freezeGuard?: MultisigFreezeGuard, freezeGuardData?: FreezeGuardData, ) => { - if (freezeGuard && freezeGuardData && provider) { + if (freezeGuard && freezeGuardData && publicClient) { return Promise.all( activities.map(async (activity, _, activityArr) => { if (activity.eventType !== ActivityEventType.Governance || !activity.transaction) { @@ -71,7 +71,7 @@ export const useSafeTransactions = () => { } else { // it's not executed or rejected, so we need to check the timelock status const timelockedTimestampMs = - (await getTxTimelockedTimestamp(activity, freezeGuard, provider)) * 1000; + Number(await getTxTimelockedTimestamp(activity, freezeGuard, publicClient)) * 1000; if (timelockedTimestampMs === 0) { // not yet timelocked if (isApproved(multiSigTransaction)) { @@ -136,7 +136,7 @@ export const useSafeTransactions = () => { }); } }, - [provider], + [publicClient], ); const getTransferTotal = useCallback( @@ -191,7 +191,7 @@ export const useSafeTransactions = () => { const parseTransactions = useCallback( async (transactions: AllTransactionsListResponse, daoAddress: string) => { - if (!transactions.results.length || !provider) { + if (!transactions.results.length || !publicClient) { return []; } @@ -321,25 +321,27 @@ export const useSafeTransactions = () => { let freezeGuardData: FreezeGuardData | undefined; if (guardContracts.freezeGuardContractAddress && baseContracts) { - const blockNumber = await provider.getBlockNumber(); - const averageBlockTime = BigInt(Math.round(await getAverageBlockTime(provider))); - freezeGuard = baseContracts.multisigFreezeGuardMasterCopyContract.asProvider.attach( - guardContracts.freezeGuardContractAddress, - ); - - const timelockPeriod = BigInt(await freezeGuard.timelockPeriod()); - const executionPeriod = BigInt(await freezeGuard.executionPeriod()); + const blockNumber = await publicClient.getBlockNumber(); + const averageBlockTime = BigInt(Math.round(await getAverageBlockTime(publicClient))); + freezeGuard = getContract({ + address: guardContracts.freezeGuardContractAddress, + abi: baseContracts.multisigFreezeGuardMasterCopyContract.asPublic.abi, + client: publicClient, + }) as unknown as MultisigFreezeGuard; + + const timelockPeriod = BigInt((await freezeGuard.read.timelockPeriod([])) as bigint); + const executionPeriod = BigInt((await freezeGuard.read.executionPeriod([])) as bigint); freezeGuardData = { guardTimelockPeriodMs: timelockPeriod * averageBlockTime * 1000n, guardExecutionPeriodMs: executionPeriod * averageBlockTime * 1000n, - lastBlockTimestamp: (await provider.getBlock(blockNumber)).timestamp, + lastBlockTimestamp: Number((await publicClient.getBlock({ blockNumber })).timestamp), }; } const activitiesWithState = await getState(activities, freezeGuard, freezeGuardData); return activitiesWithState; }, - [guardContracts, getState, getTransferTotal, decode, chain, provider, baseContracts], + [guardContracts, getState, getTransferTotal, decode, chain, publicClient, baseContracts], ); return { parseTransactions }; }; diff --git a/src/hooks/utils/useSignerOrProvider.ts b/src/hooks/utils/useSignerOrProvider.ts deleted file mode 100644 index b180b73e12..0000000000 --- a/src/hooks/utils/useSignerOrProvider.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { useMemo } from 'react'; -import { useEthersProvider } from '../../providers/Ethers/hooks/useEthersProvider'; -import { useEthersSigner } from '../../providers/Ethers/hooks/useEthersSigner'; - -export default function useSignerOrProvider() { - const signer = useEthersSigner(); - const provider = useEthersProvider(); - - const signerOrProvider = useMemo(() => signer || provider, [signer, provider]); - - return signerOrProvider; -} diff --git a/src/hooks/utils/useTransaction.ts b/src/hooks/utils/useTransaction.ts index 1e0cb1c4ed..52cb405e10 100644 --- a/src/hooks/utils/useTransaction.ts +++ b/src/hooks/utils/useTransaction.ts @@ -1,4 +1,3 @@ -import { ContractReceipt, ethers } from 'ethers'; import React, { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { toast } from 'react-toastify'; @@ -36,7 +35,7 @@ const useTransaction = () => { setPending(true); params .contractFn() - .then((txResponse: ethers.ContractTransaction) => { + .then(txResponse => { return Promise.all([txResponse.wait(), toastId]); }) .then(([txReceipt, toastID]) => { diff --git a/src/models/AzoriusTxBuilder.ts b/src/models/AzoriusTxBuilder.ts index cc919d50b4..a36513df0f 100644 --- a/src/models/AzoriusTxBuilder.ts +++ b/src/models/AzoriusTxBuilder.ts @@ -1,15 +1,15 @@ import { - Azorius, - Azorius__factory, - LinearERC20Voting, - LinearERC20Voting__factory, - LinearERC721Voting, - LinearERC721Voting__factory, - VotesERC20, - VotesERC20__factory, -} from '@fractal-framework/fractal-contracts'; -import { defaultAbiCoder, getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; + keccak256, + encodePacked, + getCreate2Address, + encodeAbiParameters, + parseAbiParameters, + Hash, + Address, + WalletClient, + PublicClient, + encodeFunctionData, +} from 'viem'; import { buildContractCall, getRandomBytes } from '../helpers'; import { BaseContracts, @@ -20,46 +20,42 @@ import { AzoriusERC721DAO, VotingStrategyType, } from '../types'; +import { NetworkContract } from '../types/network'; import { BaseTxBuilder } from './BaseTxBuilder'; import { generateContractByteCodeLinear, generateSalt } from './helpers/utils'; export class AzoriusTxBuilder extends BaseTxBuilder { - private readonly safeContract: GnosisSafeL2; - private readonly predictedSafeAddress: string; - - private encodedSetupTokenData: string | undefined; - private encodedSetupERC20WrapperData: string | undefined; - private encodedStrategySetupData: string | undefined; - private encodedSetupAzoriusData: string | undefined; - private encodedSetupTokenClaimData: string | undefined; - - private predictedTokenAddress: string | undefined; - private predictedStrategyAddress: string | undefined; - private predictedAzoriusAddress: string | undefined; - private predictedTokenClaimAddress: string | undefined; - - public azoriusContract: Azorius | undefined; - public linearVotingContract: LinearERC20Voting | undefined; - public linearERC721VotingContract: LinearERC721Voting | undefined; - public votesTokenContract: VotesERC20 | undefined; - - private tokenNonce: string; - private strategyNonce: string; - private azoriusNonce: string; - private claimNonce: string; + private readonly safeContract: NetworkContract; + private readonly predictedSafeAddress: Address; + + private encodedSetupTokenData: Hash | undefined; + private encodedSetupERC20WrapperData: Hash | undefined; + private encodedStrategySetupData: Hash | undefined; + private encodedSetupAzoriusData: Hash | undefined; + private encodedSetupTokenClaimData: Hash | undefined; + + public predictedTokenAddress: Address | undefined; + public predictedStrategyAddress: Address | undefined; + public predictedAzoriusAddress: Address | undefined; + public predictedTokenClaimAddress: Address | undefined; + + private tokenNonce: bigint; + private strategyNonce: bigint; + private azoriusNonce: bigint; + private claimNonce: bigint; constructor( - signerOrProvider: any, + walletOrPublicClient: WalletClient | PublicClient, baseContracts: BaseContracts, azoriusContracts: AzoriusContracts, daoData: AzoriusERC20DAO | AzoriusERC721DAO, - safeContract: GnosisSafeL2, - predictedSafeAddress: string, - parentAddress?: string, - parentTokenAddress?: string, + safeContract: NetworkContract, + predictedSafeAddress: Address, + parentAddress?: Address, + parentTokenAddress?: Address, ) { super( - signerOrProvider, + walletOrPublicClient, baseContracts, azoriusContracts, daoData, @@ -70,10 +66,10 @@ export class AzoriusTxBuilder extends BaseTxBuilder { this.safeContract = safeContract; this.predictedSafeAddress = predictedSafeAddress; - this.tokenNonce = getRandomBytes(); - this.claimNonce = getRandomBytes(); - this.strategyNonce = getRandomBytes(); - this.azoriusNonce = getRandomBytes(); + this.tokenNonce = BigInt(getRandomBytes()); + this.claimNonce = BigInt(getRandomBytes()); + this.strategyNonce = BigInt(getRandomBytes()); + this.azoriusNonce = BigInt(getRandomBytes()); if (daoData.votingStrategyType === VotingStrategyType.LINEAR_ERC20) { daoData = daoData as AzoriusERC20DAO; @@ -94,7 +90,6 @@ export class AzoriusTxBuilder extends BaseTxBuilder { public async init() { await this.setPredictedStrategyAddress(); this.setPredictedAzoriusAddress(); - this.setContracts(); if ( (this.daoData as AzoriusERC20DAO | AzoriusERC721DAO).votingStrategyType === @@ -128,11 +123,15 @@ export class AzoriusTxBuilder extends BaseTxBuilder { public buildVotingContractSetupTx(): SafeTransaction { const daoData = this.daoData as AzoriusGovernanceDAO; return buildContractCall( - daoData.votingStrategyType === VotingStrategyType.LINEAR_ERC20 - ? this.linearVotingContract! - : this.linearERC721VotingContract!, + { + address: this.predictedStrategyAddress!, + abi: + daoData.votingStrategyType === VotingStrategyType.LINEAR_ERC20 + ? this.azoriusContracts!.linearVotingMasterCopyContract.abi + : this.azoriusContracts!.linearVotingERC721MasterCopyContract.abi, + }, 'setAzorius', // contract function name - [this.azoriusContract!.address], + [this.predictedAzoriusAddress!], 0, false, ); @@ -142,7 +141,7 @@ export class AzoriusTxBuilder extends BaseTxBuilder { return buildContractCall( this.safeContract!, 'enableModule', - [this.azoriusContract!.address], + [this.predictedAzoriusAddress!], 0, false, ); @@ -152,7 +151,7 @@ export class AzoriusTxBuilder extends BaseTxBuilder { return buildContractCall( this.safeContract!, 'addOwnerWithThreshold', - [this.azoriusContract!.address, 1], + [this.predictedAzoriusAddress!, 1], 0, false, ); @@ -162,7 +161,7 @@ export class AzoriusTxBuilder extends BaseTxBuilder { return buildContractCall( this.safeContract!, 'removeOwner', - [this.azoriusContract!.address, this.baseContracts.multiSendContract.address, 1], + [this.predictedAzoriusAddress!, this.baseContracts.multiSendContract.address, 1], 0, false, ); @@ -231,7 +230,10 @@ export class AzoriusTxBuilder extends BaseTxBuilder { public buildApproveClaimAllocation() { const azoriusGovernanceDaoData = this.daoData as AzoriusERC20DAO; return buildContractCall( - this.votesTokenContract!, + { + address: this.predictedTokenAddress!, + abi: this.azoriusContracts!.votesTokenMasterCopyContract.abi, + }, 'approve', [this.predictedTokenClaimAddress, azoriusGovernanceDaoData.parentAllocationAmount], 0, @@ -256,27 +258,29 @@ export class AzoriusTxBuilder extends BaseTxBuilder { public setEncodedSetupERC20WrapperData() { const { tokenImportAddress } = this.daoData as AzoriusERC20DAO; - const encodedInitTokenData = defaultAbiCoder.encode(['address'], [tokenImportAddress!]); + const encodedInitTokenData = encodeAbiParameters(parseAbiParameters('address'), [ + tokenImportAddress!, + ]); - this.encodedSetupERC20WrapperData = - this.azoriusContracts!.votesERC20WrapperMasterCopyContract.interface.encodeFunctionData( - 'setUp', - [encodedInitTokenData], - ); + this.encodedSetupERC20WrapperData = encodeFunctionData({ + abi: this.azoriusContracts!.votesERC20WrapperMasterCopyContract.abi, + functionName: 'setUp', + args: [encodedInitTokenData], + }); } public setPredictedERC20WrapperAddress() { const tokenByteCodeLinear = generateContractByteCodeLinear( - this.azoriusContracts!.votesERC20WrapperMasterCopyContract.address.slice(2), + this.azoriusContracts!.votesERC20WrapperMasterCopyContract.address.slice(2) as Address, ); const tokenSalt = generateSalt(this.encodedSetupERC20WrapperData!, this.tokenNonce); - this.predictedTokenAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - tokenSalt, - solidityKeccak256(['bytes'], [tokenByteCodeLinear]), - ); + this.predictedTokenAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: tokenSalt, + bytecodeHash: keccak256(encodePacked(['bytes'], [tokenByteCodeLinear])), + }); } public signatures = (): string => { @@ -290,7 +294,7 @@ export class AzoriusTxBuilder extends BaseTxBuilder { private calculateTokenAllocations( azoriusGovernanceDaoData: AzoriusERC20DAO, - ): [string[], bigint[]] { + ): [Address[], bigint[]] { const tokenAllocationsOwners = azoriusGovernanceDaoData.tokenAllocations.map( tokenAllocation => tokenAllocation.address, ); @@ -316,8 +320,8 @@ export class AzoriusTxBuilder extends BaseTxBuilder { const [tokenAllocationsOwners, tokenAllocationsValues] = this.calculateTokenAllocations(azoriusGovernanceDaoData); - const encodedInitTokenData = defaultAbiCoder.encode( - ['string', 'string', 'address[]', 'uint256[]'], + const encodedInitTokenData = encodeAbiParameters( + parseAbiParameters('string, string, address[], uint256[]'), [ azoriusGovernanceDaoData.tokenName, azoriusGovernanceDaoData.tokenSymbol, @@ -326,194 +330,178 @@ export class AzoriusTxBuilder extends BaseTxBuilder { ], ); - this.encodedSetupTokenData = - this.azoriusContracts!.votesTokenMasterCopyContract.interface.encodeFunctionData('setUp', [ - encodedInitTokenData, - ]); + this.encodedSetupTokenData = encodeFunctionData({ + abi: this.azoriusContracts!.votesTokenMasterCopyContract.abi, + functionName: 'setUp', + args: [encodedInitTokenData], + }); } private setPredictedTokenAddress() { const tokenByteCodeLinear = generateContractByteCodeLinear( - this.azoriusContracts!.votesTokenMasterCopyContract.address.slice(2), + this.azoriusContracts!.votesTokenMasterCopyContract.address.slice(2) as Address, ); const tokenSalt = generateSalt(this.encodedSetupTokenData!, this.tokenNonce); - this.predictedTokenAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - tokenSalt, - solidityKeccak256(['bytes'], [tokenByteCodeLinear]), - ); + this.predictedTokenAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: tokenSalt, + bytecodeHash: keccak256(encodePacked(['bytes'], [tokenByteCodeLinear])), + }); } private setEncodedSetupTokenClaimData() { const azoriusGovernanceDaoData = this.daoData as AzoriusERC20DAO; - const encodedInitTokenData = defaultAbiCoder.encode( - ['address', 'address', 'address', 'uint256'], + const encodedInitTokenData = encodeAbiParameters( + parseAbiParameters('address, address, address, uint256'), [ this.safeContract.address, - this.parentTokenAddress, - this.predictedTokenAddress, + this.parentTokenAddress as Address, + this.predictedTokenAddress as Address, azoriusGovernanceDaoData.parentAllocationAmount, ], ); - this.encodedSetupTokenClaimData = - this.azoriusContracts!.claimingMasterCopyContract.interface.encodeFunctionData('setUp', [ - encodedInitTokenData, - ]); + this.encodedSetupTokenClaimData = encodeFunctionData({ + abi: this.azoriusContracts!.claimingMasterCopyContract.abi, + functionName: 'setUp', + args: [encodedInitTokenData], + }); } private setPredictedTokenClaimAddress() { const tokenByteCodeLinear = generateContractByteCodeLinear( - this.azoriusContracts!.claimingMasterCopyContract.address.slice(2), + this.azoriusContracts!.claimingMasterCopyContract.address.slice(2) as Address, ); const tokenSalt = generateSalt(this.encodedSetupTokenClaimData!, this.claimNonce); - this.predictedTokenClaimAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - tokenSalt, - solidityKeccak256(['bytes'], [tokenByteCodeLinear]), - ); + this.predictedTokenClaimAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: tokenSalt, + bytecodeHash: keccak256(encodePacked(['bytes'], [tokenByteCodeLinear])), + }); } private async setPredictedStrategyAddress() { const azoriusGovernanceDaoData = this.daoData as AzoriusGovernanceDAO; if (azoriusGovernanceDaoData.votingStrategyType === VotingStrategyType.LINEAR_ERC20) { - const quorumDenominator = ( - await this.azoriusContracts!.linearVotingMasterCopyContract.QUORUM_DENOMINATOR() - ).toBigInt(); - const encodedStrategyInitParams = defaultAbiCoder.encode( - ['address', 'address', 'address', 'uint32', 'uint256', 'uint256', 'uint256'], + const quorumDenominator = + (await this.azoriusContracts!.linearVotingMasterCopyContract.read.QUORUM_DENOMINATOR()) as bigint; + const encodedStrategyInitParams = encodeAbiParameters( + parseAbiParameters('address, address, address, uint32, uint256, uint256, uint256'), [ this.safeContract.address, // owner - this.predictedTokenAddress, // governance token + this.predictedTokenAddress as Address, // governance token '0x0000000000000000000000000000000000000001', // Azorius module - azoriusGovernanceDaoData.votingPeriod, + Number(azoriusGovernanceDaoData.votingPeriod), 1n, // proposer weight, how much is needed to create a proposal. (azoriusGovernanceDaoData.quorumPercentage * quorumDenominator) / 100n, // quorom numerator, denominator is 1,000,000, so quorum percentage is quorumNumerator * 100 / quorumDenominator 500000n, // basis numerator, denominator is 1,000,000, so basis percentage is 50% (simple majority) ], ); - const encodedStrategySetupData = - this.azoriusContracts!.linearVotingMasterCopyContract.interface.encodeFunctionData( - 'setUp', - [encodedStrategyInitParams], - ); + const encodedStrategySetupData = encodeFunctionData({ + abi: this.azoriusContracts!.linearVotingMasterCopyContract.abi, + functionName: 'setUp', + args: [encodedStrategyInitParams], + }); const strategyByteCodeLinear = generateContractByteCodeLinear( - this.azoriusContracts!.linearVotingMasterCopyContract.address.slice(2), + this.azoriusContracts!.linearVotingMasterCopyContract.address.slice(2) as Address, ); - const strategySalt = solidityKeccak256( - ['bytes32', 'uint256'], - [solidityKeccak256(['bytes'], [encodedStrategySetupData]), this.strategyNonce], + const strategySalt = keccak256( + encodePacked( + ['bytes32', 'uint256'], + [keccak256(encodePacked(['bytes'], [encodedStrategySetupData])), this.strategyNonce], + ), ); this.encodedStrategySetupData = encodedStrategySetupData; - this.predictedStrategyAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - strategySalt, - solidityKeccak256(['bytes'], [strategyByteCodeLinear]), - ); + this.predictedStrategyAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: strategySalt, + bytecodeHash: keccak256(encodePacked(['bytes'], [strategyByteCodeLinear])), + }); } else if (azoriusGovernanceDaoData.votingStrategyType === VotingStrategyType.LINEAR_ERC721) { const daoData = azoriusGovernanceDaoData as AzoriusERC721DAO; - const encodedStrategyInitParams = defaultAbiCoder.encode( - ['address', 'address[]', 'uint256[]', 'address', 'uint32', 'uint256', 'uint256', 'uint256'], + const encodedStrategyInitParams = encodeAbiParameters( + parseAbiParameters( + 'address, address[], uint256[], address, uint32, uint256, uint256, uint256', + ), [ this.safeContract.address, // owner daoData.nfts.map(nft => nft.tokenAddress), // governance tokens addresses daoData.nfts.map(nft => nft.tokenWeight), // governance tokens weights '0x0000000000000000000000000000000000000001', // Azorius module - azoriusGovernanceDaoData.votingPeriod, + Number(azoriusGovernanceDaoData.votingPeriod), daoData.quorumThreshold, // quorom threshold. Since smart contract can't know total of NFTs minted - we need to provide it manually 1n, // proposer weight, how much is needed to create a proposal. 500000n, // basis numerator, denominator is 1,000,000, so basis percentage is 50% (simple majority) ], ); - const encodedStrategySetupData = - this.azoriusContracts!.linearVotingERC721MasterCopyContract.interface.encodeFunctionData( - 'setUp', - [encodedStrategyInitParams], - ); + const encodedStrategySetupData = encodeFunctionData({ + abi: this.azoriusContracts!.linearVotingERC721MasterCopyContract.abi, + functionName: 'setUp', + args: [encodedStrategyInitParams], + }); const strategyByteCodeLinear = generateContractByteCodeLinear( - this.azoriusContracts!.linearVotingERC721MasterCopyContract.address.slice(2), + this.azoriusContracts!.linearVotingERC721MasterCopyContract.address.slice(2) as Address, ); - const strategySalt = solidityKeccak256( - ['bytes32', 'uint256'], - [solidityKeccak256(['bytes'], [encodedStrategySetupData]), this.strategyNonce], + const strategySalt = keccak256( + encodePacked( + ['bytes32', 'uint256'], + [keccak256(encodePacked(['bytes'], [encodedStrategySetupData])), this.strategyNonce], + ), ); this.encodedStrategySetupData = encodedStrategySetupData; - this.predictedStrategyAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - strategySalt, - solidityKeccak256(['bytes'], [strategyByteCodeLinear]), - ); + this.predictedStrategyAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: strategySalt, + bytecodeHash: keccak256(encodePacked(['bytes'], [strategyByteCodeLinear])), + }); } } // TODO - verify we can use safe contract address private setPredictedAzoriusAddress() { const azoriusGovernanceDaoData = this.daoData as AzoriusGovernanceDAO; - const encodedInitAzoriusData = defaultAbiCoder.encode( - ['address', 'address', 'address', 'address[]', 'uint32', 'uint32'], + const encodedInitAzoriusData = encodeAbiParameters( + parseAbiParameters(['address, address, address, address[], uint32, uint32']), [ this.safeContract.address, this.safeContract.address, this.safeContract.address, - [this.predictedStrategyAddress], - azoriusGovernanceDaoData.timelock, // timelock period in blocks - azoriusGovernanceDaoData.executionPeriod, // execution period in blocks + [this.predictedStrategyAddress as Address], + Number(azoriusGovernanceDaoData.timelock), // timelock period in blocks + Number(azoriusGovernanceDaoData.executionPeriod), // execution period in blocks ], ); - const encodedSetupAzoriusData = - this.azoriusContracts!.fractalAzoriusMasterCopyContract.interface.encodeFunctionData( - 'setUp', - [encodedInitAzoriusData], - ); + const encodedSetupAzoriusData = encodeFunctionData({ + abi: this.azoriusContracts!.fractalAzoriusMasterCopyContract.abi, + functionName: 'setUp', + args: [encodedInitAzoriusData], + }); const azoriusByteCodeLinear = generateContractByteCodeLinear( - this.azoriusContracts!.fractalAzoriusMasterCopyContract.address.slice(2), + this.azoriusContracts!.fractalAzoriusMasterCopyContract.address.slice(2) as Address, ); const azoriusSalt = generateSalt(encodedSetupAzoriusData, this.azoriusNonce); this.encodedSetupAzoriusData = encodedSetupAzoriusData; - this.predictedAzoriusAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - azoriusSalt, - solidityKeccak256(['bytes'], [azoriusByteCodeLinear]), - ); - } - - private setContracts() { - const daoData = this.daoData as AzoriusGovernanceDAO; - this.azoriusContract = Azorius__factory.connect( - this.predictedAzoriusAddress!, - this.signerOrProvider, - ); - if (daoData.votingStrategyType === VotingStrategyType.LINEAR_ERC20) { - this.linearVotingContract = LinearERC20Voting__factory.connect( - this.predictedStrategyAddress!, - this.signerOrProvider, - ); - this.votesTokenContract = VotesERC20__factory.connect( - this.predictedTokenAddress!, - this.signerOrProvider, - ); - } else if (daoData.votingStrategyType === VotingStrategyType.LINEAR_ERC721) { - this.linearERC721VotingContract = LinearERC721Voting__factory.connect( - this.predictedStrategyAddress!, - this.signerOrProvider, - ); - } + this.predictedAzoriusAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: azoriusSalt, + bytecodeHash: keccak256(encodePacked(['bytes'], [azoriusByteCodeLinear])), + }); } } diff --git a/src/models/BaseTxBuilder.ts b/src/models/BaseTxBuilder.ts index d9c5ee903d..e684bcaecf 100644 --- a/src/models/BaseTxBuilder.ts +++ b/src/models/BaseTxBuilder.ts @@ -1,4 +1,4 @@ -import { ethers } from 'ethers'; +import { Address, PublicClient, WalletClient } from 'viem'; import { BaseContracts, AzoriusContracts, @@ -9,22 +9,22 @@ import { } from '../types'; export class BaseTxBuilder { - protected readonly signerOrProvider: ethers.Signer | any; + protected readonly walletOrPublicClient: WalletClient | PublicClient; protected readonly baseContracts: BaseContracts; protected readonly azoriusContracts: AzoriusContracts | undefined; protected readonly daoData: SafeMultisigDAO | AzoriusERC20DAO | AzoriusERC721DAO | SubDAO; - protected readonly parentAddress?: string; - protected readonly parentTokenAddress?: string; + protected readonly parentAddress?: Address; + protected readonly parentTokenAddress?: Address; constructor( - signerOrProvider: ethers.Signer | any, + walletOrPublicClient: WalletClient | PublicClient, baseContracts: BaseContracts, azoriusContracts: AzoriusContracts | undefined, daoData: SafeMultisigDAO | AzoriusERC20DAO | AzoriusERC721DAO | SubDAO, - parentAddress?: string, - parentTokenAddress?: string, + parentAddress?: Address, + parentTokenAddress?: Address, ) { - this.signerOrProvider = signerOrProvider; + this.walletOrPublicClient = walletOrPublicClient; this.baseContracts = baseContracts; this.daoData = daoData; this.azoriusContracts = azoriusContracts; diff --git a/src/models/DaoTxBuilder.ts b/src/models/DaoTxBuilder.ts index ce6afa7069..fc9dad27f8 100644 --- a/src/models/DaoTxBuilder.ts +++ b/src/models/DaoTxBuilder.ts @@ -1,6 +1,11 @@ -import { ethers } from 'ethers'; -import { zeroAddress } from 'viem'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { + Address, + PublicClient, + WalletClient, + zeroAddress, + encodeFunctionData, + getContract, +} from 'viem'; import { buildContractCall, encodeMultiSend } from '../helpers'; import { BaseContracts, @@ -10,6 +15,8 @@ import { AzoriusERC20DAO, AzoriusERC721DAO, VotingStrategyType, + SafeL2, + Azorius, } from '../types'; import { BaseTxBuilder } from './BaseTxBuilder'; import { TxBuilderFactory } from './TxBuilderFactory'; @@ -21,11 +28,11 @@ export class DaoTxBuilder extends BaseTxBuilder { private txBuilderFactory: TxBuilderFactory; // Safe Data - private predictedSafeAddress: string; + private predictedSafeAddress: Address; private readonly createSafeTx: SafeTransaction; - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; private readonly parentStrategyType?: VotingStrategyType; - private readonly parentStrategyAddress?: string; + private readonly parentStrategyAddress?: Address; // Fractal Module Txs private enableFractalModuleTx: SafeTransaction | undefined; @@ -34,22 +41,22 @@ export class DaoTxBuilder extends BaseTxBuilder { private internalTxs: SafeTransaction[] = []; constructor( - signerOrProvider: ethers.Signer | any, + walletOrPublicClient: WalletClient | PublicClient, baseContracts: BaseContracts, azoriusContracts: AzoriusContracts | undefined, daoData: SafeMultisigDAO | AzoriusERC20DAO | AzoriusERC721DAO, - saltNum: string, - predictedSafeAddress: string, + saltNum: bigint, + predictedSafeAddress: Address, createSafeTx: SafeTransaction, - safeContract: GnosisSafeL2, + safeContract: SafeL2, txBuilderFactory: TxBuilderFactory, - parentAddress?: string, - parentTokenAddress?: string, + parentAddress?: Address, + parentTokenAddress?: Address, parentStrategyType?: VotingStrategyType, - parentStrategyAddress?: string, + parentStrategyAddress?: Address, ) { super( - signerOrProvider, + walletOrPublicClient, baseContracts, azoriusContracts, daoData, @@ -95,9 +102,8 @@ export class DaoTxBuilder extends BaseTxBuilder { if (this.parentAddress) { const freezeGuardTxBuilder = this.txBuilderFactory.createFreezeGuardTxBuilder( - azoriusTxBuilder.azoriusContract!.address, - azoriusTxBuilder.linearVotingContract?.address ?? - azoriusTxBuilder.linearERC721VotingContract?.address, + azoriusTxBuilder.predictedAzoriusAddress, + azoriusTxBuilder.predictedStrategyAddress, this.parentStrategyType, this.parentStrategyAddress, ); @@ -108,7 +114,13 @@ export class DaoTxBuilder extends BaseTxBuilder { freezeGuardTxBuilder.buildDeployZodiacModuleTx(), freezeGuardTxBuilder.buildFreezeVotingSetupTx(), freezeGuardTxBuilder.buildDeployFreezeGuardTx(), - freezeGuardTxBuilder.buildSetGuardTx(azoriusTxBuilder.azoriusContract!), + freezeGuardTxBuilder.buildSetGuardTx( + getContract({ + address: azoriusTxBuilder.predictedAzoriusAddress!, + client: this.walletOrPublicClient, + abi: this.azoriusContracts?.fractalAzoriusMasterCopyContract.abi!, + }) as unknown as Azorius, + ), ]); } const data = this.daoData as AzoriusERC20DAO; @@ -205,7 +217,7 @@ export class DaoTxBuilder extends BaseTxBuilder { this.baseContracts.fractalModuleMasterCopyContract, this.baseContracts.zodiacModuleProxyFactoryContract, this.safeContract!, - this.saltNum, + this.saltNum.toString(), this.parentAddress, ); @@ -245,9 +257,11 @@ export class DaoTxBuilder extends BaseTxBuilder { [ this.baseContracts.multiSendContract.address, // to '0', // value - this.baseContracts.multiSendContract.interface.encodeFunctionData('multiSend', [ - safeInternalTx, - ]), // calldata + encodeFunctionData({ + abi: this.baseContracts.multiSendContract.abi, + functionName: 'multiSend', + args: [safeInternalTx], + }), // calldata '1', // operation '0', // tx gas '0', // base gas diff --git a/src/models/FreezeGuardTxBuilder.ts b/src/models/FreezeGuardTxBuilder.ts index 666c531c86..73ee1998b4 100644 --- a/src/models/FreezeGuardTxBuilder.ts +++ b/src/models/FreezeGuardTxBuilder.ts @@ -1,17 +1,15 @@ import { - Azorius, - AzoriusFreezeGuard__factory, - ERC20FreezeVoting__factory, - MultisigFreezeGuard__factory, - MultisigFreezeVoting__factory, - ERC721FreezeVoting__factory, - MultisigFreezeVoting, - ERC20FreezeVoting, - ERC721FreezeVoting, -} from '@fractal-framework/fractal-contracts'; -import { ethers } from 'ethers'; -import { getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; + Address, + Hex, + PublicClient, + WalletClient, + getCreate2Address, + keccak256, + encodePacked, + encodeFunctionData, + parseAbiParameters, + encodeAbiParameters, +} from 'viem'; import { buildContractCall } from '../helpers'; import { BaseContracts, @@ -19,6 +17,8 @@ import { SubDAO, AzoriusContracts, VotingStrategyType, + SafeL2, + Azorius, } from '../types'; import { BaseTxBuilder } from './BaseTxBuilder'; import { @@ -33,40 +33,40 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { private readonly saltNum; // Safe Data - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; // Freeze Voting Data private freezeVotingType: any; - private freezeVotingCallData: string | undefined; - private freezeVotingAddress: string | undefined; + private freezeVotingCallData: Hex | undefined; + private freezeVotingAddress: Address | undefined; // Freeze Guard Data - private freezeGuardCallData: string | undefined; - private freezeGuardAddress: string | undefined; + private freezeGuardCallData: Hex | undefined; + private freezeGuardAddress: Address | undefined; // Azorius Data - private azoriusAddress: string | undefined; - private strategyAddress: string | undefined; + private azoriusAddress: Address | undefined; + private strategyAddress: Address | undefined; private parentStrategyType: VotingStrategyType | undefined; - private parentStrategyAddress: string | undefined; + private parentStrategyAddress: Address | undefined; constructor( - signerOrProvider: any, + walletOrPublicClient: WalletClient | PublicClient, baseContracts: BaseContracts, daoData: SubDAO, - safeContract: GnosisSafeL2, - saltNum: string, - parentAddress: string, - parentTokenAddress?: string, + safeContract: SafeL2, + saltNum: bigint, + parentAddress: Address, + parentTokenAddress?: Address, azoriusContracts?: AzoriusContracts, - azoriusAddress?: string, - strategyAddress?: string, + azoriusAddress?: Address, + strategyAddress?: Address, parentStrategyType?: VotingStrategyType, - parentStrategyAddress?: string, + parentStrategyAddress?: Address, ) { super( - signerOrProvider, + walletOrPublicClient, baseContracts, azoriusContracts, daoData, @@ -96,10 +96,10 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { this.baseContracts.zodiacModuleProxyFactoryContract, 'deployModule', [ - this.freezeVotingType === ERC20FreezeVoting__factory + this.freezeVotingType === this.baseContracts.freezeERC20VotingMasterCopyContract ? this.baseContracts.freezeERC20VotingMasterCopyContract.address - : this.freezeVotingType === ERC721FreezeVoting__factory - ? this.baseContracts.freezeERC721VotingMasterCopyContract.address + : this.freezeVotingType === this.baseContracts.freezeERC721VotingMasterCopyContract + ? this.baseContracts.freezeERC721VotingMasterCopyContract!.address : this.baseContracts.freezeMultisigVotingMasterCopyContract.address, this.freezeVotingCallData, this.saltNum, @@ -113,28 +113,25 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { const subDaoData = this.daoData as SubDAO; return buildContractCall( - this.freezeVotingType.connect(this.freezeVotingAddress, this.signerOrProvider), + { address: this.freezeVotingAddress!, abi: this.freezeVotingType.abi }, 'setUp', [ - ethers.utils.defaultAbiCoder.encode( - ['address', 'uint256', 'uint32', 'uint32', 'address'], - [ - this.parentAddress, // Owner -- Parent DAO - subDaoData.freezeVotesThreshold, // FreezeVotesThreshold - subDaoData.freezeProposalPeriod, // FreezeProposalPeriod - subDaoData.freezePeriod, // FreezePeriod - this.parentStrategyType === VotingStrategyType.LINEAR_ERC721 - ? this.parentStrategyAddress - : this.parentTokenAddress ?? this.parentAddress, // Parent Votes Token or Parent Safe Address - ], - ), + encodeAbiParameters(parseAbiParameters('address, uint256, uint32, uint32, address'), [ + this.parentAddress!, // Owner -- Parent DAO + subDaoData.freezeVotesThreshold, // FreezeVotesThreshold + Number(subDaoData.freezeProposalPeriod), // FreezeProposalPeriod + Number(subDaoData.freezePeriod), // FreezePeriod + this.parentStrategyType === VotingStrategyType.LINEAR_ERC721 + ? this.parentStrategyAddress! + : this.parentTokenAddress! ?? this.parentAddress!, // Parent Votes Token or Parent Safe Address + ]), ], 0, false, ); } - public buildSetGuardTx(contract: GnosisSafeL2 | Azorius): SafeTransaction { + public buildSetGuardTx(contract: SafeL2 | Azorius): SafeTransaction { return buildContractCall(contract, 'setGuard', [this.freezeGuardAddress], 0, false); } @@ -142,7 +139,7 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { return buildDeployZodiacModuleTx(this.baseContracts.zodiacModuleProxyFactoryContract, [ this.getGuardMasterCopyAddress(), this.freezeGuardCallData!, - this.saltNum, + this.saltNum.toString(), ]); } @@ -154,44 +151,45 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { private setFreezeVotingTypeAndCallData() { if (this.parentStrategyType) { if (this.parentStrategyType === VotingStrategyType.LINEAR_ERC20) { - this.freezeVotingType = ERC20FreezeVoting__factory; + this.freezeVotingType = this.baseContracts.freezeERC20VotingMasterCopyContract; } else if (this.parentStrategyType === VotingStrategyType.LINEAR_ERC721) { - this.freezeVotingType = ERC721FreezeVoting__factory; + this.freezeVotingType = this.baseContracts.freezeERC721VotingMasterCopyContract!; } } else { - this.freezeVotingType = MultisigFreezeVoting__factory; + this.freezeVotingType = this.baseContracts.freezeMultisigVotingMasterCopyContract; } - this.freezeVotingCallData = this.freezeVotingType.createInterface().encodeFunctionData('owner'); + this.freezeVotingCallData = encodeFunctionData({ + functionName: 'owner', + abi: this.freezeVotingType.abi, + args: [], + }); } private setFreezeVotingAddress() { - let freezeVotesMasterCopyContract: - | MultisigFreezeVoting - | ERC20FreezeVoting - | ERC721FreezeVoting = this.baseContracts.freezeMultisigVotingMasterCopyContract; + let freezeVotesMasterCopyContract = this.baseContracts.freezeMultisigVotingMasterCopyContract; if (this.parentStrategyType) { if (this.parentStrategyType === VotingStrategyType.LINEAR_ERC20) { freezeVotesMasterCopyContract = this.baseContracts.freezeERC20VotingMasterCopyContract; } else if (this.parentStrategyType === VotingStrategyType.LINEAR_ERC721) { - freezeVotesMasterCopyContract = this.baseContracts.freezeERC721VotingMasterCopyContract; + freezeVotesMasterCopyContract = this.baseContracts.freezeERC721VotingMasterCopyContract!; } } const freezeVotingByteCodeLinear = generateContractByteCodeLinear( - freezeVotesMasterCopyContract.address.slice(2), + freezeVotesMasterCopyContract.address.slice(2) as Address, ); - this.freezeVotingAddress = getCreate2Address( - this.baseContracts.zodiacModuleProxyFactoryContract.address, - generateSalt(this.freezeVotingCallData!, this.saltNum), - solidityKeccak256(['bytes'], [freezeVotingByteCodeLinear]), - ); + this.freezeVotingAddress = getCreate2Address({ + from: this.baseContracts.zodiacModuleProxyFactoryContract.address, + salt: generateSalt(this.freezeVotingCallData!, this.saltNum), + bytecodeHash: keccak256(encodePacked(['bytes'], [freezeVotingByteCodeLinear])), + }); } private setFreezeGuardAddress() { const freezeGuardByteCodeLinear = generateContractByteCodeLinear( - this.getGuardMasterCopyAddress().slice(2), + this.getGuardMasterCopyAddress().slice(2) as Address, ); const freezeGuardSalt = generateSalt(this.freezeGuardCallData!, this.saltNum); @@ -213,41 +211,36 @@ export class FreezeGuardTxBuilder extends BaseTxBuilder { private setFreezeGuardCallDataMultisig() { const subDaoData = this.daoData as SubDAO; - this.freezeGuardCallData = MultisigFreezeGuard__factory.createInterface().encodeFunctionData( - 'setUp', - [ - ethers.utils.defaultAbiCoder.encode( - ['uint256', 'uint256', 'address', 'address', 'address'], - [ - subDaoData.timelockPeriod, // Timelock Period - subDaoData.executionPeriod, // Execution Period - this.parentAddress, // Owner -- Parent DAO - this.freezeVotingAddress, // Freeze Voting - this.safeContract.address, // Safe - ], - ), + this.freezeGuardCallData = encodeFunctionData({ + functionName: 'setUp', + abi: this.baseContracts.multisigFreezeGuardMasterCopyContract.abi, + args: [ + encodeAbiParameters(parseAbiParameters('uint256, uint256, address, address, address'), [ + subDaoData.timelockPeriod, // Timelock Period + subDaoData.executionPeriod, // Execution Period + this.parentAddress!, // Owner -- Parent DAO + this.freezeVotingAddress!, // Freeze Voting + this.safeContract.address, // Safe + ]), ], - ); + }); } private setFreezeGuardCallDataAzorius() { const subDaoData = this.daoData as SubDAO; - - this.freezeGuardCallData = AzoriusFreezeGuard__factory.createInterface().encodeFunctionData( - 'setUp', - [ - ethers.utils.defaultAbiCoder.encode( - ['address', 'address', 'address', 'address', 'uint256'], - [ - this.parentAddress, // Owner -- Parent DAO - this.freezeVotingAddress, // Freeze Voting - this.strategyAddress, // Base Strategy - this.azoriusAddress, // Azorius - subDaoData.executionPeriod, // Execution Period - ], - ), + this.freezeGuardCallData = encodeFunctionData({ + abi: this.azoriusContracts?.azoriusFreezeGuardMasterCopyContract.abi!, + functionName: 'setUp', + args: [ + encodeAbiParameters(parseAbiParameters('address, address, address, address, uint256'), [ + this.parentAddress!, // Owner -- Parent DAO + this.freezeVotingAddress!, // Freeze Voting + this.strategyAddress!, // Base Strategy + this.azoriusAddress!, // Azorius + subDaoData.executionPeriod, // Execution Period + ]), ], - ); + }); } private getGuardMasterCopyAddress(): string { diff --git a/src/models/MultisigTxBuilder.ts b/src/models/MultisigTxBuilder.ts index 89cac1fd6c..3437c702e6 100644 --- a/src/models/MultisigTxBuilder.ts +++ b/src/models/MultisigTxBuilder.ts @@ -1,13 +1,12 @@ -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; import { buildContractCall } from '../helpers'; -import { BaseContracts, SafeMultisigDAO, SafeTransaction } from '../types'; +import { BaseContracts, SafeMultisigDAO, SafeTransaction, SafeL2 } from '../types'; export class MultisigTxBuilder { private baseContracts: BaseContracts; private readonly daoData: SafeMultisigDAO; - private readonly safeContract: GnosisSafeL2; + private readonly safeContract: SafeL2; - constructor(baseContracts: BaseContracts, daoData: SafeMultisigDAO, safeContract: GnosisSafeL2) { + constructor(baseContracts: BaseContracts, daoData: SafeMultisigDAO, safeContract: SafeL2) { this.baseContracts = baseContracts; this.daoData = daoData; this.safeContract = safeContract; diff --git a/src/models/TxBuilderFactory.ts b/src/models/TxBuilderFactory.ts index 392452bb2d..31c2938a13 100644 --- a/src/models/TxBuilderFactory.ts +++ b/src/models/TxBuilderFactory.ts @@ -1,6 +1,4 @@ -import { ethers } from 'ethers'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; -import { GnosisSafeL2__factory } from '../assets/typechain-types/usul/factories/@gnosis.pm/safe-contracts/contracts'; +import { Address, PublicClient, WalletClient, getContract } from 'viem'; import { getRandomBytes } from '../helpers'; import { BaseContracts, @@ -11,6 +9,7 @@ import { AzoriusContracts, AzoriusERC20DAO, VotingStrategyType, + SafeL2, } from '../types'; import { AzoriusTxBuilder } from './AzoriusTxBuilder'; import { BaseTxBuilder } from './BaseTxBuilder'; @@ -20,25 +19,25 @@ import { MultisigTxBuilder } from './MultisigTxBuilder'; import { safeData } from './helpers/safeData'; export class TxBuilderFactory extends BaseTxBuilder { - private readonly saltNum: string; + private readonly saltNum: bigint; // Safe Data - public predictedSafeAddress: string | undefined; + public predictedSafeAddress: Address | undefined; public createSafeTx: SafeTransaction | undefined; - private safeContract: GnosisSafeL2 | undefined; - public fallbackHandler: string; + private safeContract: SafeL2 | undefined; + public fallbackHandler: Address; constructor( - signerOrProvider: ethers.Signer | any, + walletOrPublicClient: WalletClient | PublicClient | any, baseContracts: BaseContracts, azoriusContracts: AzoriusContracts | undefined, daoData: SafeMultisigDAO | AzoriusERC20DAO | AzoriusERC721DAO | SubDAO, - fallbackHandler: string, - parentAddress?: string, - parentTokenAddress?: string, + fallbackHandler: Address, + parentAddress?: Address, + parentTokenAddress?: Address, ) { super( - signerOrProvider, + walletOrPublicClient, baseContracts, azoriusContracts, daoData, @@ -47,16 +46,21 @@ export class TxBuilderFactory extends BaseTxBuilder { ); this.fallbackHandler = fallbackHandler; - this.saltNum = getRandomBytes(); + this.saltNum = BigInt(getRandomBytes()); } - public setSafeContract(safeAddress: string) { - const safeContract = GnosisSafeL2__factory.connect(safeAddress, this.signerOrProvider); - this.safeContract = safeContract; + public setSafeContract(safeAddress: Address) { + const safeContract = getContract({ + address: safeAddress, + client: this.walletOrPublicClient, + abi: this.baseContracts.safeSingletonContract.abi, + }); + this.safeContract = safeContract as unknown as SafeL2; } public async setupSafeData(): Promise { const { predictedSafeAddress, createSafeTx } = await safeData( + this.walletOrPublicClient, this.baseContracts.multiSendContract, this.baseContracts.safeFactoryContract, this.baseContracts.safeSingletonContract, @@ -74,10 +78,10 @@ export class TxBuilderFactory extends BaseTxBuilder { public createDaoTxBuilder( parentStrategyType?: VotingStrategyType, - parentStrategyAddress?: string, + parentStrategyAddress?: Address, ): DaoTxBuilder { return new DaoTxBuilder( - this.signerOrProvider, + this.walletOrPublicClient, this.baseContracts, this.azoriusContracts, this.daoData, @@ -94,13 +98,13 @@ export class TxBuilderFactory extends BaseTxBuilder { } public createFreezeGuardTxBuilder( - azoriusAddress?: string, - strategyAddress?: string, + azoriusAddress?: Address, + strategyAddress?: Address, parentStrategyType?: VotingStrategyType, - parentStrategyAddress?: string, // User only with ERC-721 parent + parentStrategyAddress?: Address, // User only with ERC-721 parent ): FreezeGuardTxBuilder { return new FreezeGuardTxBuilder( - this.signerOrProvider, + this.walletOrPublicClient, this.baseContracts, this.daoData as SubDAO, this.safeContract!, @@ -125,7 +129,7 @@ export class TxBuilderFactory extends BaseTxBuilder { public async createAzoriusTxBuilder(): Promise { const azoriusTxBuilder = new AzoriusTxBuilder( - this.signerOrProvider, + this.walletOrPublicClient, this.baseContracts, this.azoriusContracts!, this.daoData as AzoriusERC20DAO, diff --git a/src/models/helpers/fractalModuleData.ts b/src/models/helpers/fractalModuleData.ts index 9d4ede6e69..3ad5cc1bec 100644 --- a/src/models/helpers/fractalModuleData.ts +++ b/src/models/helpers/fractalModuleData.ts @@ -1,12 +1,7 @@ -import { - FractalModule, - FractalModule__factory, - ModuleProxyFactory, -} from '@fractal-framework/fractal-contracts'; -import { ethers } from 'ethers'; -import { GnosisSafeL2 } from '../../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { Address, encodeAbiParameters, encodeFunctionData, parseAbiParameters } from 'viem'; import { buildContractCall } from '../../helpers/crypto'; import { SafeTransaction } from '../../types'; +import { NetworkContract } from '../../types/network'; import { buildDeployZodiacModuleTx, generateContractByteCodeLinear, @@ -21,32 +16,30 @@ export interface FractalModuleData { } export const fractalModuleData = ( - fractalModuleMasterCopyContract: FractalModule, - zodiacModuleProxyFactoryContract: ModuleProxyFactory, - safeContract: GnosisSafeL2, + fractalModuleMasterCopyContract: NetworkContract, + zodiacModuleProxyFactoryContract: NetworkContract, + safeContract: NetworkContract, saltNum: string, - parentAddress?: string, + parentAddress?: Address, ): FractalModuleData => { - const fractalModuleCalldata = FractalModule__factory.createInterface().encodeFunctionData( - 'setUp', - [ - ethers.utils.defaultAbiCoder.encode( - ['address', 'address', 'address', 'address[]'], - [ - parentAddress ?? safeContract.address, // Owner -- Parent DAO or safe contract - safeContract.address, // Avatar - safeContract.address, // Target - [], // Authorized Controllers - ], - ), + const fractalModuleCalldata = encodeFunctionData({ + functionName: 'setUp', + args: [ + encodeAbiParameters(parseAbiParameters(['address, address, address, address[]']), [ + parentAddress ?? safeContract.address, // Owner -- Parent DAO or safe contract + safeContract.address, // Avatar + safeContract.address, // Target + [], // Authorized Controllers + ]), ], - ); + abi: fractalModuleMasterCopyContract.abi, + }); const fractalByteCodeLinear = generateContractByteCodeLinear( - fractalModuleMasterCopyContract.address.slice(2), + fractalModuleMasterCopyContract.address.slice(2) as Address, ); - const fractalSalt = generateSalt(fractalModuleCalldata, saltNum); + const fractalSalt = generateSalt(fractalModuleCalldata, BigInt(saltNum)); const deployFractalModuleTx = buildDeployZodiacModuleTx(zodiacModuleProxyFactoryContract, [ fractalModuleMasterCopyContract.address, fractalModuleCalldata, diff --git a/src/models/helpers/safeData.ts b/src/models/helpers/safeData.ts index 17dd025048..dc352e4909 100644 --- a/src/models/helpers/safeData.ts +++ b/src/models/helpers/safeData.ts @@ -1,18 +1,28 @@ -import { GnosisSafeProxyFactory } from '@fractal-framework/fractal-contracts'; -import { getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; -import { zeroAddress, zeroHash } from 'viem'; -import { MultiSend } from '../../assets/typechain-types/usul'; -import { GnosisSafeL2 } from '../../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { + getCreate2Address, + zeroAddress, + zeroHash, + keccak256, + encodePacked, + Address, + getContract, + WalletClient, + PublicClient, + Hash, + encodeFunctionData, +} from 'viem'; import { buildContractCall } from '../../helpers/crypto'; import { SafeMultisigDAO } from '../../types'; +import { NetworkContract } from '../../types/network'; export const safeData = async ( - multiSendContract: MultiSend, - safeFactoryContract: GnosisSafeProxyFactory, - safeSingletonContract: GnosisSafeL2, + walletOrPublicClient: WalletClient | PublicClient, + multiSendContract: NetworkContract, + safeFactoryContract: NetworkContract, + safeSingletonContract: NetworkContract, daoData: SafeMultisigDAO, - saltNum: string, - fallbackHandler: string, + saltNum: bigint, + fallbackHandler: Address, hasAzorius?: boolean, ) => { const signers = hasAzorius @@ -22,28 +32,44 @@ export const safeData = async ( multiSendContract.address, ]; - const createSafeCalldata = safeSingletonContract.interface.encodeFunctionData('setup', [ - signers, - 1, // Threshold - zeroAddress, - zeroHash, - fallbackHandler, // Fallback handler - zeroAddress, - 0, - zeroAddress, - ]); + const createSafeCalldata = encodeFunctionData({ + functionName: 'setup', + args: [ + signers, + 1, // Threshold + zeroAddress, + zeroHash, + fallbackHandler, + zeroAddress, + 0, + zeroAddress, + ], + abi: safeSingletonContract.abi, + }); - const predictedSafeAddress = getCreate2Address( - safeFactoryContract.address, - solidityKeccak256( - ['bytes', 'uint256'], - [solidityKeccak256(['bytes'], [createSafeCalldata]), saltNum], - ), - solidityKeccak256( - ['bytes', 'uint256'], - [await safeFactoryContract.proxyCreationCode(), safeSingletonContract.address], + const factoryContract = getContract({ + address: safeFactoryContract.address, + client: walletOrPublicClient!, + abi: safeFactoryContract.abi, + }); + const predictedSafeAddress = getCreate2Address({ + from: safeFactoryContract.address, + salt: keccak256( + encodePacked( + ['bytes', 'uint256'], + [keccak256(encodePacked(['bytes'], [createSafeCalldata])), saltNum], + ), ), - ); + bytecode: keccak256( + encodePacked( + ['bytes', 'uint256'], + [ + (await factoryContract.read.proxyCreationCode([])) as Hash, + safeSingletonContract.address as unknown as bigint, + ], + ), + ), // @dev - wtf is going on? uint256 but passing address? + }); const createSafeTx = buildContractCall( safeFactoryContract, diff --git a/src/models/helpers/utils.ts b/src/models/helpers/utils.ts index 24cc09b693..dfa3eada3e 100644 --- a/src/models/helpers/utils.ts +++ b/src/models/helpers/utils.ts @@ -1,36 +1,38 @@ -// Prefix and postfix strings come from Zodiac contracts -import { ModuleProxyFactory } from '@fractal-framework/fractal-contracts'; -import { getCreate2Address, solidityKeccak256 } from 'ethers/lib/utils'; +import { getCreate2Address, keccak256, encodePacked, Hash, Address } from 'viem'; import { buildContractCall } from '../../helpers/crypto'; import { SafeTransaction } from '../../types'; +import { NetworkContract } from '../../types/network'; /** * These hardcoded values were taken from * @link https://github.com/gnosis/module-factory/blob/master/contracts/ModuleProxyFactory.sol */ -export const generateContractByteCodeLinear = (contractAddress: string): string => { - return ( - '0x602d8060093d393df3363d3d373d3d3d363d73' + contractAddress + '5af43d82803e903d91602b57fd5bf3' - ); +export const generateContractByteCodeLinear = (contractAddress: Address): Hash => { + return ('0x602d8060093d393df3363d3d373d3d3d363d73' + + contractAddress + + '5af43d82803e903d91602b57fd5bf3') as Hash; }; -export const generateSalt = (calldata: string, saltNum: string): string => { - return solidityKeccak256( - ['bytes32', 'uint256'], - [solidityKeccak256(['bytes'], [calldata]), saltNum], +export const generateSalt = (calldata: Hash, saltNum: bigint): Hash => { + return keccak256( + encodePacked(['bytes32', 'uint256'], [keccak256(encodePacked(['bytes'], [calldata])), saltNum]), ); }; export const generatePredictedModuleAddress = ( - zodiacProxyAddress: string, - salt: string, - byteCode: string, -): string => { - return getCreate2Address(zodiacProxyAddress, salt, solidityKeccak256(['bytes'], [byteCode])); + zodiacProxyAddress: Address, + salt: Hash, + byteCode: Hash, +): Address => { + return getCreate2Address({ + from: zodiacProxyAddress, + salt, + bytecodeHash: keccak256(encodePacked(['bytes'], [byteCode])), + }); }; export const buildDeployZodiacModuleTx = ( - zodiacProxyFactoryContract: ModuleProxyFactory, + zodiacProxyFactoryContract: NetworkContract, params: string[], ): SafeTransaction => { return buildContractCall(zodiacProxyFactoryContract, 'deployModule', params, 0, false); diff --git a/src/providers/App/governance/action.ts b/src/providers/App/governance/action.ts index 7e1baab1d3..5d8b4ee13e 100644 --- a/src/providers/App/governance/action.ts +++ b/src/providers/App/governance/action.ts @@ -1,4 +1,3 @@ -import { ERC20Claim } from '@fractal-framework/fractal-contracts'; import { FractalProposal, ProposalVotesSummary, @@ -9,6 +8,7 @@ import { UnderlyingTokenData, GovernanceType, ERC721TokenData, + ERC20Claim, } from '../../../types'; import { ProposalTemplate } from '../../../types/proposalBuilder'; diff --git a/src/providers/App/hooks/useSafeAPI.ts b/src/providers/App/hooks/useSafeAPI.ts index f3da12c8b6..4b595aaa94 100644 --- a/src/providers/App/hooks/useSafeAPI.ts +++ b/src/providers/App/hooks/useSafeAPI.ts @@ -1,4 +1,3 @@ -import EthersAdapter from '@safe-global/safe-ethers-lib'; import SafeServiceClient, { AllTransactionsListResponse, AllTransactionsOptions, @@ -22,7 +21,6 @@ import SafeServiceClient, { TokenInfoResponse, TransferListResponse, } from '@safe-global/safe-service-client'; -import { ethers } from 'ethers'; import { useMemo } from 'react'; import { CacheExpiry } from '../../../hooks/utils/cache/cacheDefaults'; import { @@ -30,7 +28,7 @@ import { getIndexedDBValue, setIndexedDBValue, } from '../../../hooks/utils/cache/useLocalDB'; -import useSignerOrProvider from '../../../hooks/utils/useSignerOrProvider'; +import useContractClient from '../../../hooks/utils/useContractClient'; import { SafeMultisigTransactionResponse } from '../../../types'; import { useNetworkConfig } from '../../NetworkConfig/NetworkConfigProvider'; @@ -41,8 +39,8 @@ class CachingSafeServiceClient extends SafeServiceClient { // endpoint more than once requestMap = new Map | null>(); - constructor(chainId: number, { txServiceUrl, ethAdapter }: SafeServiceClientConfig) { - super({ txServiceUrl, ethAdapter }); + constructor(chainId: number, { txServiceUrl }: SafeServiceClientConfig) { + super({ txServiceUrl }); this.CHAINID = chainId; } @@ -227,21 +225,16 @@ class CachingSafeServiceClient extends SafeServiceClient { export function useSafeAPI() { const { safeBaseURL, chain } = useNetworkConfig(); - const signerOrProvider = useSignerOrProvider(); + const { walletOrPublicClient } = useContractClient(); const safeAPI: SafeServiceClient | undefined = useMemo(() => { - if (!signerOrProvider) { + if (!walletOrPublicClient) { return undefined; } - const ethAdapter = new EthersAdapter({ - ethers, - signerOrProvider, - }); return new CachingSafeServiceClient(chain.id, { txServiceUrl: safeBaseURL, - ethAdapter, }); - }, [signerOrProvider, chain, safeBaseURL]); + }, [chain, safeBaseURL, walletOrPublicClient]); return safeAPI; } diff --git a/src/providers/App/node/reducer.ts b/src/providers/App/node/reducer.ts index ad67816d3b..2c199731ed 100644 --- a/src/providers/App/node/reducer.ts +++ b/src/providers/App/node/reducer.ts @@ -1,4 +1,4 @@ -import { utils } from 'ethers'; +import { getAddress } from 'viem'; import { FractalNode, NodeHierarchy } from '../../../types'; import { NodeAction, NodeActions } from './action'; @@ -23,7 +23,7 @@ export function nodeReducer(state: FractalNode, action: NodeActions) { return { ...state, safe: action.payload, - daoAddress: utils.getAddress(action.payload.address), + daoAddress: getAddress(action.payload.address), }; } case NodeAction.SET_DAO_INFO: { diff --git a/src/providers/App/useReadOnlyValues.ts b/src/providers/App/useReadOnlyValues.ts index 468cb4db90..3fcf6b9d32 100644 --- a/src/providers/App/useReadOnlyValues.ts +++ b/src/providers/App/useReadOnlyValues.ts @@ -1,7 +1,6 @@ -import { ERC721__factory } from '@fractal-framework/fractal-contracts'; -import { utils } from 'ethers'; import { useEffect, useState, useCallback } from 'react'; -import useSignerOrProvider from '../../hooks/utils/useSignerOrProvider'; +import { getAddress, erc721Abi, getContract, Address } from 'viem'; +import useContractClient from '../../hooks/utils/useContractClient'; import { ReadOnlyState, Fractal, @@ -23,9 +22,9 @@ const INITIAL_READ_ONLY_VALUES: ReadOnlyState = { * These are useful dao or user specific values calculated from other stateful * values. */ -export const useReadOnlyValues = ({ node, governance }: Fractal, _account?: string) => { +export const useReadOnlyValues = ({ node, governance }: Fractal, _account?: Address) => { const [readOnlyValues, setReadOnlyValues] = useState(INITIAL_READ_ONLY_VALUES); - const signerOrProvider = useSignerOrProvider(); + const { walletOrPublicClient } = useContractClient(); const loadReadOnlyValues = useCallback(async () => { const getVotingWeight = async () => { @@ -39,14 +38,18 @@ export const useReadOnlyValues = ({ node, governance }: Fractal, _account?: stri const tokenWeight = azoriusGovernance.votesToken?.votingWeight || 0n; return lockedTokenWeight || tokenWeight; case GovernanceType.AZORIUS_ERC721: - if (!_account || !azoriusGovernance.erc721Tokens || !signerOrProvider) { + if (!_account || !azoriusGovernance.erc721Tokens || !walletOrPublicClient) { return 0n; } const userVotingWeight = ( await Promise.all( azoriusGovernance.erc721Tokens.map(async ({ address, votingWeight }) => { - const tokenContract = ERC721__factory.connect(address, signerOrProvider); - const userBalance = (await tokenContract.balanceOf(_account)).toBigInt(); + const tokenContract = getContract({ + address, + abi: erc721Abi, + client: walletOrPublicClient, + }); + const userBalance = await tokenContract.read.balanceOf([_account]); return userBalance * votingWeight; }), ) @@ -59,7 +62,7 @@ export const useReadOnlyValues = ({ node, governance }: Fractal, _account?: stri setReadOnlyValues({ user: { - address: _account ? utils.getAddress(_account) : undefined, + address: _account ? getAddress(_account) : undefined, votingWeight: await getVotingWeight(), }, dao: !node.daoAddress @@ -70,7 +73,7 @@ export const useReadOnlyValues = ({ node, governance }: Fractal, _account?: stri governance.type === GovernanceType.AZORIUS_ERC721, }, }); - }, [node, governance, _account, signerOrProvider]); + }, [node, governance, _account, walletOrPublicClient]); useEffect(() => { loadReadOnlyValues(); }, [loadReadOnlyValues]); diff --git a/src/providers/Ethers/hooks/useEthersProvider.ts b/src/providers/Ethers/hooks/useEthersProvider.ts deleted file mode 100644 index 8cf195e078..0000000000 --- a/src/providers/Ethers/hooks/useEthersProvider.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { useContext } from 'react'; -import { EthersContext } from '..'; - -export function useEthersProvider() { - const { provider } = useContext(EthersContext); - return provider; -} diff --git a/src/providers/Ethers/hooks/useEthersSigner.ts b/src/providers/Ethers/hooks/useEthersSigner.ts deleted file mode 100644 index 2d2b395d6d..0000000000 --- a/src/providers/Ethers/hooks/useEthersSigner.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { useContext } from 'react'; -import { EthersContext } from '..'; - -export function useEthersSigner() { - const { signer } = useContext(EthersContext); - return signer; -} diff --git a/src/providers/Ethers/index.tsx b/src/providers/Ethers/index.tsx deleted file mode 100644 index e641f64612..0000000000 --- a/src/providers/Ethers/index.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Signer, providers } from 'ethers'; -import { ReactNode, createContext, useMemo } from 'react'; -import type { Transport } from 'viem'; -import { usePublicClient, useWalletClient } from 'wagmi'; - -interface IEthersContext { - provider?: providers.JsonRpcProvider | providers.FallbackProvider; - signer?: Signer; -} - -export const EthersContext = createContext({ - provider: undefined, - signer: undefined, -}); - -/** - * Provider to convert a viem Clients to an ethers.js Provider and Signer - * and supply "singleton" instances of it to underlying components. - */ -export default function EthersContextProvider({ children }: { children: ReactNode }) { - const publicClient = usePublicClient(); - const { data: walletClient } = useWalletClient(); - - const provider = useMemo(() => { - if (publicClient) { - const { chain, transport } = publicClient; - const network = { - chainId: chain.id, - name: chain.name, - ensAddress: chain.contracts?.ensRegistry?.address, - }; - if (transport.type === 'fallback') { - return new providers.FallbackProvider( - (transport.transports as ReturnType[]).map( - ({ value }) => new providers.JsonRpcProvider(value?.url, network), - ), - ); - } - return new providers.JsonRpcProvider(transport.url, network); - } - }, [publicClient]); - - const signer = useMemo(() => { - if (walletClient) { - const { account, chain, transport } = walletClient; - const network = { - chainId: chain.id, - name: chain.name, - ensAddress: chain.contracts?.ensRegistry?.address, - }; - const publicProvider = new providers.Web3Provider(transport, network); - return publicProvider.getSigner(account.address); - } - }, [walletClient]); - - return {children}; -} diff --git a/src/providers/NetworkConfig/networks/base.ts b/src/providers/NetworkConfig/networks/base.ts index 8f02ee1497..9e76a3e39f 100644 --- a/src/providers/NetworkConfig/networks/base.ts +++ b/src/providers/NetworkConfig/networks/base.ts @@ -19,12 +19,27 @@ import { getSafeL2SingletonDeployment, getCompatibilityFallbackHandlerDeployment, } from '@safe-global/safe-deployments'; +import { Abi, Address } from 'viem'; import { base } from 'wagmi/chains'; import { GovernanceType } from '../../../types'; import { NetworkConfig } from '../../../types/network'; const SAFE_VERSION = '1.3.0'; +const fallbackHandler = getCompatibilityFallbackHandlerDeployment({ + version: SAFE_VERSION, + network: base.id.toString(), +})!; +const safe = getSafeL2SingletonDeployment({ version: SAFE_VERSION, network: base.id.toString() })!; +const safeFactory = getProxyFactoryDeployment({ + version: SAFE_VERSION, + network: base.id.toString(), +})!; +const multiSendCallOnly = getMultiSendCallOnlyDeployment({ + version: SAFE_VERSION, + network: base.id.toString(), +})!; + export const baseConfig: NetworkConfig = { order: 10, chain: base, @@ -40,35 +55,67 @@ export const baseConfig: NetworkConfig = { version: 'v0.0.1', }, contracts: { - fractalAzoriusMasterCopy: Azorius.address, - fractalModuleMasterCopy: FractalModule.address, - fractalRegistry: FractalRegistry.address, - votesERC20MasterCopy: VotesERC20.address, - linearVotingERC721MasterCopy: LinearVotingERC721.address, - claimingMasterCopy: ERC20Claim.address, - azoriusFreezeGuardMasterCopy: AzoriusFreezeGuard.address, - multisigFreezeVotingMasterCopy: MultisigFreezeVoting.address, - erc20FreezeVotingMasterCopy: ERC20FreezeVoting.address, - erc721FreezeVotingMasterCopy: ERC721FreezeVoting.address, - multisigFreezeGuardMasterCopy: MultisigFreezeGuard.address, - fallbackHandler: getCompatibilityFallbackHandlerDeployment({ - version: SAFE_VERSION, - network: base.id.toString(), - })?.networkAddresses[base.id.toString()]!, - safe: getSafeL2SingletonDeployment({ version: SAFE_VERSION, network: base.id.toString() }) - ?.networkAddresses[base.id.toString()]!, - safeFactory: getProxyFactoryDeployment({ - version: SAFE_VERSION, - network: base.id.toString(), - })?.networkAddresses[base.id.toString()]!, - zodiacModuleProxyFactory: ModuleProxyFactory.address, - linearVotingMasterCopy: LinearERC20Voting.address, - multisend: getMultiSendCallOnlyDeployment({ - version: SAFE_VERSION, - network: base.id.toString(), - })?.networkAddresses[base.id.toString()]!, - votesERC20WrapperMasterCopy: VotesERC20Wrapper.address, - keyValuePairs: KeyValuePairs.address, + fractalAzoriusMasterCopy: { address: Azorius.address as Address, abi: Azorius.abi as Abi }, + fractalModuleMasterCopy: { + address: FractalModule.address as Address, + abi: FractalModule.abi as Abi, + }, + fractalRegistry: { + address: FractalRegistry.address as Address, + abi: FractalRegistry.abi as Abi, + }, + votesERC20MasterCopy: { address: VotesERC20.address as Address, abi: VotesERC20.abi as Abi }, + linearVotingERC721MasterCopy: { + address: LinearVotingERC721.address as Address, + abi: LinearVotingERC721.abi as Abi, + }, + claimingMasterCopy: { address: ERC20Claim.address as Address, abi: ERC20Claim.abi as Abi }, + azoriusFreezeGuardMasterCopy: { + address: AzoriusFreezeGuard.address as Address, + abi: AzoriusFreezeGuard.abi as Abi, + }, + multisigFreezeVotingMasterCopy: { + address: MultisigFreezeVoting.address as Address, + abi: MultisigFreezeVoting.abi as Abi, + }, + erc20FreezeVotingMasterCopy: { + address: ERC20FreezeVoting.address as Address, + abi: ERC20FreezeVoting.abi as Abi, + }, + erc721FreezeVotingMasterCopy: { + address: ERC721FreezeVoting.address as Address, + abi: ERC721FreezeVoting.abi as Abi, + }, + multisigFreezeGuardMasterCopy: { + address: MultisigFreezeGuard.address as Address, + abi: MultisigFreezeGuard.abi as Abi, + }, + fallbackHandler: { + address: fallbackHandler.networkAddresses[base.id.toString()]! as Address, + abi: fallbackHandler.abi as Abi, + }, + safe: { address: safe.networkAddresses[base.id.toString()]! as Address, abi: safe.abi as Abi }, + safeFactory: { + address: safeFactory.networkAddresses[base.id.toString()] as Address, + abi: safeFactory.abi as Abi, + }, + zodiacModuleProxyFactory: { + address: ModuleProxyFactory.address as Address, + abi: ModuleProxyFactory.abi as Abi, + }, + linearVotingMasterCopy: { + address: LinearERC20Voting.address as Address, + abi: LinearERC20Voting.abi as Abi, + }, + multisend: { + address: multiSendCallOnly.networkAddresses[base.id.toString()]! as Address, + abi: multiSendCallOnly.abi as Abi, + }, + votesERC20WrapperMasterCopy: { + address: VotesERC20Wrapper.address as Address, + abi: VotesERC20Wrapper.abi as Abi, + }, + keyValuePairs: { address: KeyValuePairs.address as Address, abi: KeyValuePairs.abi as Abi }, }, staking: {}, createOptions: [ diff --git a/src/providers/NetworkConfig/networks/baseSepolia.ts b/src/providers/NetworkConfig/networks/baseSepolia.ts index 8194e13251..cc7ed921c5 100644 --- a/src/providers/NetworkConfig/networks/baseSepolia.ts +++ b/src/providers/NetworkConfig/networks/baseSepolia.ts @@ -19,12 +19,30 @@ import { getSafeL2SingletonDeployment, getCompatibilityFallbackHandlerDeployment, } from '@safe-global/safe-deployments'; +import { Address, Abi } from 'viem'; import { baseSepolia } from 'wagmi/chains'; import { GovernanceType } from '../../../types'; import { NetworkConfig } from '../../../types/network'; const SAFE_VERSION = '1.3.0'; +const fallbackHandler = getCompatibilityFallbackHandlerDeployment({ + version: SAFE_VERSION, + network: baseSepolia.id.toString(), +})!; +const safe = getSafeL2SingletonDeployment({ + version: SAFE_VERSION, + network: baseSepolia.id.toString(), +})!; +const safeFactory = getProxyFactoryDeployment({ + version: SAFE_VERSION, + network: baseSepolia.id.toString(), +})!; +const multiSendCallOnly = getMultiSendCallOnlyDeployment({ + version: SAFE_VERSION, + network: baseSepolia.id.toString(), +})!; + export const baseSepoliaConfig: NetworkConfig = { order: 40, chain: baseSepolia, @@ -40,37 +58,70 @@ export const baseSepoliaConfig: NetworkConfig = { version: 'v0.0.1', }, contracts: { - fractalAzoriusMasterCopy: Azorius.address, - fractalModuleMasterCopy: FractalModule.address, - fractalRegistry: FractalRegistry.address, - votesERC20MasterCopy: VotesERC20.address, - linearVotingERC721MasterCopy: LinearVotingERC721.address, - claimingMasterCopy: ERC20Claim.address, - azoriusFreezeGuardMasterCopy: AzoriusFreezeGuard.address, - multisigFreezeVotingMasterCopy: MultisigFreezeVoting.address, - erc20FreezeVotingMasterCopy: ERC20FreezeVoting.address, - erc721FreezeVotingMasterCopy: ERC721FreezeVoting.address, - multisigFreezeGuardMasterCopy: MultisigFreezeGuard.address, - fallbackHandler: getCompatibilityFallbackHandlerDeployment({ - version: SAFE_VERSION, - network: baseSepolia.id.toString(), - })?.networkAddresses[baseSepolia.id.toString()]!, - safe: getSafeL2SingletonDeployment({ - version: SAFE_VERSION, - network: baseSepolia.id.toString(), - })?.networkAddresses[baseSepolia.id.toString()]!, - safeFactory: getProxyFactoryDeployment({ - version: SAFE_VERSION, - network: baseSepolia.id.toString(), - })?.networkAddresses[baseSepolia.id.toString()]!, - zodiacModuleProxyFactory: ModuleProxyFactory.address, - linearVotingMasterCopy: LinearERC20Voting.address, - multisend: getMultiSendCallOnlyDeployment({ - version: SAFE_VERSION, - network: baseSepolia.id.toString(), - })?.networkAddresses[baseSepolia.id.toString()]!, - votesERC20WrapperMasterCopy: VotesERC20Wrapper.address, - keyValuePairs: KeyValuePairs.address, + fractalAzoriusMasterCopy: { address: Azorius.address as Address, abi: Azorius.abi as Abi }, + fractalModuleMasterCopy: { + address: FractalModule.address as Address, + abi: FractalModule.abi as Abi, + }, + fractalRegistry: { + address: FractalRegistry.address as Address, + abi: FractalRegistry.abi as Abi, + }, + votesERC20MasterCopy: { address: VotesERC20.address as Address, abi: VotesERC20.abi as Abi }, + linearVotingERC721MasterCopy: { + address: LinearVotingERC721.address as Address, + abi: LinearVotingERC721.abi as Abi, + }, + claimingMasterCopy: { address: ERC20Claim.address as Address, abi: ERC20Claim.abi as Abi }, + azoriusFreezeGuardMasterCopy: { + address: AzoriusFreezeGuard.address as Address, + abi: AzoriusFreezeGuard.abi as Abi, + }, + multisigFreezeVotingMasterCopy: { + address: MultisigFreezeVoting.address as Address, + abi: MultisigFreezeVoting.abi as Abi, + }, + erc20FreezeVotingMasterCopy: { + address: ERC20FreezeVoting.address as Address, + abi: ERC20FreezeVoting.abi as Abi, + }, + erc721FreezeVotingMasterCopy: { + address: ERC721FreezeVoting.address as Address, + abi: ERC721FreezeVoting.abi as Abi, + }, + multisigFreezeGuardMasterCopy: { + address: MultisigFreezeGuard.address as Address, + abi: MultisigFreezeGuard.abi as Abi, + }, + fallbackHandler: { + address: fallbackHandler.networkAddresses[baseSepolia.id.toString()]! as Address, + abi: fallbackHandler.abi as Abi, + }, + safe: { + address: safe.networkAddresses[baseSepolia.id.toString()]! as Address, + abi: safe.abi as Abi, + }, + safeFactory: { + address: safeFactory.networkAddresses[baseSepolia.id.toString()] as Address, + abi: safeFactory.abi as Abi, + }, + zodiacModuleProxyFactory: { + address: ModuleProxyFactory.address as Address, + abi: ModuleProxyFactory.abi as Abi, + }, + linearVotingMasterCopy: { + address: LinearERC20Voting.address as Address, + abi: LinearERC20Voting.abi as Abi, + }, + multisend: { + address: multiSendCallOnly.networkAddresses[baseSepolia.id.toString()]! as Address, + abi: multiSendCallOnly.abi as Abi, + }, + votesERC20WrapperMasterCopy: { + address: VotesERC20Wrapper.address as Address, + abi: VotesERC20Wrapper.abi as Abi, + }, + keyValuePairs: { address: KeyValuePairs.address as Address, abi: KeyValuePairs.abi as Abi }, }, staking: {}, createOptions: [ diff --git a/src/providers/NetworkConfig/networks/mainnet.ts b/src/providers/NetworkConfig/networks/mainnet.ts index f9e7ff9d99..86997e6a3a 100644 --- a/src/providers/NetworkConfig/networks/mainnet.ts +++ b/src/providers/NetworkConfig/networks/mainnet.ts @@ -19,12 +19,30 @@ import { getSafeL2SingletonDeployment, getCompatibilityFallbackHandlerDeployment, } from '@safe-global/safe-deployments'; +import { Abi, Address } from 'viem'; import { mainnet } from 'wagmi/chains'; import { GovernanceType } from '../../../types'; import { NetworkConfig } from '../../../types/network'; const SAFE_VERSION = '1.3.0'; +const fallbackHandler = getCompatibilityFallbackHandlerDeployment({ + version: SAFE_VERSION, + network: mainnet.id.toString(), +})!; +const safe = getSafeL2SingletonDeployment({ + version: SAFE_VERSION, + network: mainnet.id.toString(), +})!; +const safeFactory = getProxyFactoryDeployment({ + version: SAFE_VERSION, + network: mainnet.id.toString(), +})!; +const multiSendCallOnly = getMultiSendCallOnlyDeployment({ + version: SAFE_VERSION, + network: mainnet.id.toString(), +})!; + export const mainnetConfig: NetworkConfig = { order: 0, chain: mainnet, @@ -40,41 +58,68 @@ export const mainnetConfig: NetworkConfig = { version: 'v0.0.1', }, contracts: { - fractalAzoriusMasterCopy: Azorius.address, - fractalModuleMasterCopy: FractalModule.address, - fractalRegistry: FractalRegistry.address, - votesERC20MasterCopy: VotesERC20.address, - linearVotingERC721MasterCopy: '', // TODO - Add actual address once contract is deployed on mainnet - claimingMasterCopy: ERC20Claim.address, - azoriusFreezeGuardMasterCopy: AzoriusFreezeGuard.address, - multisigFreezeVotingMasterCopy: MultisigFreezeVoting.address, - erc20FreezeVotingMasterCopy: ERC20FreezeVoting.address, - erc721FreezeVotingMasterCopy: '', // TODO - Add actual address once contract is deployed on mainnet - multisigFreezeGuardMasterCopy: MultisigFreezeGuard.address, - fallbackHandler: getCompatibilityFallbackHandlerDeployment({ - version: SAFE_VERSION, - network: mainnet.id.toString(), - })?.networkAddresses[mainnet.id.toString()]!, - safe: getSafeL2SingletonDeployment({ version: SAFE_VERSION, network: mainnet.id.toString() }) - ?.networkAddresses[mainnet.id.toString()]!, - safeFactory: getProxyFactoryDeployment({ - version: SAFE_VERSION, - network: mainnet.id.toString(), - })?.networkAddresses[mainnet.id.toString()]!, - zodiacModuleProxyFactory: ModuleProxyFactory.address, - linearVotingMasterCopy: LinearERC20Voting.address, - multisend: getMultiSendCallOnlyDeployment({ - version: SAFE_VERSION, - network: mainnet.id.toString(), - })?.networkAddresses[mainnet.id.toString()]!, - votesERC20WrapperMasterCopy: VotesERC20Wrapper.address, - keyValuePairs: KeyValuePairs.address, + fractalAzoriusMasterCopy: { address: Azorius.address as Address, abi: Azorius.abi as Abi }, + fractalModuleMasterCopy: { + address: FractalModule.address as Address, + abi: FractalModule.abi as Abi, + }, + fractalRegistry: { + address: FractalRegistry.address as Address, + abi: FractalRegistry.abi as Abi, + }, + votesERC20MasterCopy: { address: VotesERC20.address as Address, abi: VotesERC20.abi as Abi }, + claimingMasterCopy: { address: ERC20Claim.address as Address, abi: ERC20Claim.abi as Abi }, + azoriusFreezeGuardMasterCopy: { + address: AzoriusFreezeGuard.address as Address, + abi: AzoriusFreezeGuard.abi as Abi, + }, + multisigFreezeVotingMasterCopy: { + address: MultisigFreezeVoting.address as Address, + abi: MultisigFreezeVoting.abi as Abi, + }, + erc20FreezeVotingMasterCopy: { + address: ERC20FreezeVoting.address as Address, + abi: ERC20FreezeVoting.abi as Abi, + }, + multisigFreezeGuardMasterCopy: { + address: MultisigFreezeGuard.address as Address, + abi: MultisigFreezeGuard.abi as Abi, + }, + fallbackHandler: { + address: fallbackHandler.networkAddresses[mainnet.id.toString()]! as Address, + abi: fallbackHandler.abi as Abi, + }, + safe: { + address: safe.networkAddresses[mainnet.id.toString()]! as Address, + abi: safe.abi as Abi, + }, + safeFactory: { + address: safeFactory.networkAddresses[mainnet.id.toString()] as Address, + abi: safeFactory.abi as Abi, + }, + zodiacModuleProxyFactory: { + address: ModuleProxyFactory.address as Address, + abi: ModuleProxyFactory.abi as Abi, + }, + linearVotingMasterCopy: { + address: LinearERC20Voting.address as Address, + abi: LinearERC20Voting.abi as Abi, + }, + multisend: { + address: multiSendCallOnly.networkAddresses[mainnet.id.toString()]! as Address, + abi: multiSendCallOnly.abi as Abi, + }, + votesERC20WrapperMasterCopy: { + address: VotesERC20Wrapper.address as Address, + abi: VotesERC20Wrapper.abi as Abi, + }, + keyValuePairs: { address: KeyValuePairs.address as Address, abi: KeyValuePairs.abi as Abi }, }, staking: { lido: { - rewardsAddress: '0x8202E3cBa328CCf3eeA5bF0A11596c5297Cf7525', - stETHContractAddress: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', - withdrawalQueueContractAddress: '0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1', + rewardsAddress: { address: '0x8202E3cBa328CCf3eeA5bF0A11596c5297Cf7525' }, + stETHContractAddress: { address: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84' }, + withdrawalQueueContractAddress: { address: '0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1' }, }, }, createOptions: [GovernanceType.MULTISIG, GovernanceType.AZORIUS_ERC20], diff --git a/src/providers/NetworkConfig/networks/optimism.ts b/src/providers/NetworkConfig/networks/optimism.ts index af91cfc650..9cb7664ff9 100644 --- a/src/providers/NetworkConfig/networks/optimism.ts +++ b/src/providers/NetworkConfig/networks/optimism.ts @@ -19,12 +19,30 @@ import { getSafeL2SingletonDeployment, getCompatibilityFallbackHandlerDeployment, } from '@safe-global/safe-deployments'; +import { Address, Abi } from 'viem'; import { optimism } from 'wagmi/chains'; import { GovernanceType } from '../../../types'; import { NetworkConfig } from '../../../types/network'; const SAFE_VERSION = '1.3.0'; +const fallbackHandler = getCompatibilityFallbackHandlerDeployment({ + version: SAFE_VERSION, + network: optimism.id.toString(), +})!; +const safe = getSafeL2SingletonDeployment({ + version: SAFE_VERSION, + network: optimism.id.toString(), +})!; +const safeFactory = getProxyFactoryDeployment({ + version: SAFE_VERSION, + network: optimism.id.toString(), +})!; +const multiSendCallOnly = getMultiSendCallOnlyDeployment({ + version: SAFE_VERSION, + network: optimism.id.toString(), +})!; + export const optimismConfig: NetworkConfig = { order: 15, chain: optimism, @@ -40,35 +58,70 @@ export const optimismConfig: NetworkConfig = { version: 'v0.0.1', }, contracts: { - fractalAzoriusMasterCopy: Azorius.address, - fractalModuleMasterCopy: FractalModule.address, - fractalRegistry: FractalRegistry.address, - votesERC20MasterCopy: VotesERC20.address, - linearVotingERC721MasterCopy: LinearVotingERC721.address, - claimingMasterCopy: ERC20Claim.address, - azoriusFreezeGuardMasterCopy: AzoriusFreezeGuard.address, - multisigFreezeVotingMasterCopy: MultisigFreezeVoting.address, - erc20FreezeVotingMasterCopy: ERC20FreezeVoting.address, - erc721FreezeVotingMasterCopy: ERC721FreezeVoting.address, - multisigFreezeGuardMasterCopy: MultisigFreezeGuard.address, - fallbackHandler: getCompatibilityFallbackHandlerDeployment({ - version: SAFE_VERSION, - network: optimism.id.toString(), - })?.networkAddresses[optimism.id.toString()]!, - safe: getSafeL2SingletonDeployment({ version: SAFE_VERSION, network: optimism.id.toString() }) - ?.networkAddresses[optimism.id.toString()]!, - safeFactory: getProxyFactoryDeployment({ - version: SAFE_VERSION, - network: optimism.id.toString(), - })?.networkAddresses[optimism.id.toString()]!, - zodiacModuleProxyFactory: ModuleProxyFactory.address, - linearVotingMasterCopy: LinearERC20Voting.address, - multisend: getMultiSendCallOnlyDeployment({ - version: SAFE_VERSION, - network: optimism.id.toString(), - })?.networkAddresses[optimism.id.toString()]!, - votesERC20WrapperMasterCopy: VotesERC20Wrapper.address, - keyValuePairs: KeyValuePairs.address, + fractalAzoriusMasterCopy: { address: Azorius.address as Address, abi: Azorius.abi as Abi }, + fractalModuleMasterCopy: { + address: FractalModule.address as Address, + abi: FractalModule.abi as Abi, + }, + fractalRegistry: { + address: FractalRegistry.address as Address, + abi: FractalRegistry.abi as Abi, + }, + votesERC20MasterCopy: { address: VotesERC20.address as Address, abi: VotesERC20.abi as Abi }, + linearVotingERC721MasterCopy: { + address: LinearVotingERC721.address as Address, + abi: LinearVotingERC721.abi as Abi, + }, + claimingMasterCopy: { address: ERC20Claim.address as Address, abi: ERC20Claim.abi as Abi }, + azoriusFreezeGuardMasterCopy: { + address: AzoriusFreezeGuard.address as Address, + abi: AzoriusFreezeGuard.abi as Abi, + }, + multisigFreezeVotingMasterCopy: { + address: MultisigFreezeVoting.address as Address, + abi: MultisigFreezeVoting.abi as Abi, + }, + erc20FreezeVotingMasterCopy: { + address: ERC20FreezeVoting.address as Address, + abi: ERC20FreezeVoting.abi as Abi, + }, + erc721FreezeVotingMasterCopy: { + address: ERC721FreezeVoting.address as Address, + abi: ERC721FreezeVoting.abi as Abi, + }, + multisigFreezeGuardMasterCopy: { + address: MultisigFreezeGuard.address as Address, + abi: MultisigFreezeGuard.abi as Abi, + }, + fallbackHandler: { + address: fallbackHandler.networkAddresses[optimism.id.toString()]! as Address, + abi: fallbackHandler.abi as Abi, + }, + safe: { + address: safe.networkAddresses[optimism.id.toString()]! as Address, + abi: safe.abi as Abi, + }, + safeFactory: { + address: safeFactory.networkAddresses[optimism.id.toString()] as Address, + abi: safeFactory.abi as Abi, + }, + zodiacModuleProxyFactory: { + address: ModuleProxyFactory.address as Address, + abi: ModuleProxyFactory.abi as Abi, + }, + linearVotingMasterCopy: { + address: LinearERC20Voting.address as Address, + abi: LinearERC20Voting.abi as Abi, + }, + multisend: { + address: multiSendCallOnly.networkAddresses[optimism.id.toString()]! as Address, + abi: multiSendCallOnly.abi as Abi, + }, + votesERC20WrapperMasterCopy: { + address: VotesERC20Wrapper.address as Address, + abi: VotesERC20Wrapper.abi as Abi, + }, + keyValuePairs: { address: KeyValuePairs.address as Address, abi: KeyValuePairs.abi as Abi }, }, staking: {}, createOptions: [ diff --git a/src/providers/NetworkConfig/networks/polygon.ts b/src/providers/NetworkConfig/networks/polygon.ts index 7034c77c9a..f29cbf4ee9 100644 --- a/src/providers/NetworkConfig/networks/polygon.ts +++ b/src/providers/NetworkConfig/networks/polygon.ts @@ -19,12 +19,30 @@ import { getSafeL2SingletonDeployment, getCompatibilityFallbackHandlerDeployment, } from '@safe-global/safe-deployments'; +import { Address, Abi } from 'viem'; import { polygon } from 'wagmi/chains'; import { GovernanceType } from '../../../types'; import { NetworkConfig } from '../../../types/network'; const SAFE_VERSION = '1.3.0'; +const fallbackHandler = getCompatibilityFallbackHandlerDeployment({ + version: SAFE_VERSION, + network: polygon.id.toString(), +})!; +const safe = getSafeL2SingletonDeployment({ + version: SAFE_VERSION, + network: polygon.id.toString(), +})!; +const safeFactory = getProxyFactoryDeployment({ + version: SAFE_VERSION, + network: polygon.id.toString(), +})!; +const multiSendCallOnly = getMultiSendCallOnlyDeployment({ + version: SAFE_VERSION, + network: polygon.id.toString(), +})!; + export const polygonConfig: NetworkConfig = { order: 20, chain: polygon, @@ -40,35 +58,62 @@ export const polygonConfig: NetworkConfig = { version: 'v0.0.1', }, contracts: { - fractalAzoriusMasterCopy: Azorius.address, - fractalModuleMasterCopy: FractalModule.address, - fractalRegistry: FractalRegistry.address, - votesERC20MasterCopy: VotesERC20.address, - linearVotingERC721MasterCopy: '', // TODO - Add actual address once contract is deployed on polygon - claimingMasterCopy: ERC20Claim.address, - azoriusFreezeGuardMasterCopy: AzoriusFreezeGuard.address, - multisigFreezeVotingMasterCopy: MultisigFreezeVoting.address, - erc20FreezeVotingMasterCopy: ERC20FreezeVoting.address, - erc721FreezeVotingMasterCopy: '', // TODO - Add actual address once contract is deployed on polygon - multisigFreezeGuardMasterCopy: MultisigFreezeGuard.address, - fallbackHandler: getCompatibilityFallbackHandlerDeployment({ - version: SAFE_VERSION, - network: polygon.id.toString(), - })?.networkAddresses[polygon.id.toString()]!, - safe: getSafeL2SingletonDeployment({ version: SAFE_VERSION, network: polygon.id.toString() }) - ?.networkAddresses[polygon.id.toString()]!, - safeFactory: getProxyFactoryDeployment({ - version: SAFE_VERSION, - network: polygon.id.toString(), - })?.networkAddresses[polygon.id.toString()]!, - zodiacModuleProxyFactory: ModuleProxyFactory.address, - linearVotingMasterCopy: LinearERC20Voting.address, - multisend: getMultiSendCallOnlyDeployment({ - version: SAFE_VERSION, - network: polygon.id.toString(), - })?.networkAddresses[polygon.id.toString()]!, - votesERC20WrapperMasterCopy: VotesERC20Wrapper.address, - keyValuePairs: KeyValuePairs.address, + fractalAzoriusMasterCopy: { address: Azorius.address as Address, abi: Azorius.abi as Abi }, + fractalModuleMasterCopy: { + address: FractalModule.address as Address, + abi: FractalModule.abi as Abi, + }, + fractalRegistry: { + address: FractalRegistry.address as Address, + abi: FractalRegistry.abi as Abi, + }, + votesERC20MasterCopy: { address: VotesERC20.address as Address, abi: VotesERC20.abi as Abi }, + claimingMasterCopy: { address: ERC20Claim.address as Address, abi: ERC20Claim.abi as Abi }, + azoriusFreezeGuardMasterCopy: { + address: AzoriusFreezeGuard.address as Address, + abi: AzoriusFreezeGuard.abi as Abi, + }, + multisigFreezeVotingMasterCopy: { + address: MultisigFreezeVoting.address as Address, + abi: MultisigFreezeVoting.abi as Abi, + }, + erc20FreezeVotingMasterCopy: { + address: ERC20FreezeVoting.address as Address, + abi: ERC20FreezeVoting.abi as Abi, + }, + multisigFreezeGuardMasterCopy: { + address: MultisigFreezeGuard.address as Address, + abi: MultisigFreezeGuard.abi as Abi, + }, + fallbackHandler: { + address: fallbackHandler.networkAddresses[polygon.id.toString()]! as Address, + abi: fallbackHandler.abi as Abi, + }, + safe: { + address: safe.networkAddresses[polygon.id.toString()]! as Address, + abi: safe.abi as Abi, + }, + safeFactory: { + address: safeFactory.networkAddresses[polygon.id.toString()] as Address, + abi: safeFactory.abi as Abi, + }, + zodiacModuleProxyFactory: { + address: ModuleProxyFactory.address as Address, + abi: ModuleProxyFactory.abi as Abi, + }, + linearVotingMasterCopy: { + address: LinearERC20Voting.address as Address, + abi: LinearERC20Voting.abi as Abi, + }, + multisend: { + address: multiSendCallOnly.networkAddresses[polygon.id.toString()]! as Address, + abi: multiSendCallOnly.abi as Abi, + }, + votesERC20WrapperMasterCopy: { + address: VotesERC20Wrapper.address as Address, + abi: VotesERC20Wrapper.abi as Abi, + }, + keyValuePairs: { address: KeyValuePairs.address as Address, abi: KeyValuePairs.abi as Abi }, }, staking: {}, createOptions: [GovernanceType.MULTISIG, GovernanceType.AZORIUS_ERC20], diff --git a/src/providers/NetworkConfig/networks/sepolia.ts b/src/providers/NetworkConfig/networks/sepolia.ts index 507c4a28f7..8d99ef536c 100644 --- a/src/providers/NetworkConfig/networks/sepolia.ts +++ b/src/providers/NetworkConfig/networks/sepolia.ts @@ -19,12 +19,30 @@ import { getSafeL2SingletonDeployment, getCompatibilityFallbackHandlerDeployment, } from '@safe-global/safe-deployments'; +import { Abi, Address } from 'viem'; import { sepolia } from 'wagmi/chains'; import { GovernanceType } from '../../../types'; import { NetworkConfig } from '../../../types/network'; const SAFE_VERSION = '1.3.0'; +const fallbackHandler = getCompatibilityFallbackHandlerDeployment({ + version: SAFE_VERSION, + network: sepolia.id.toString(), +})!; +const safe = getSafeL2SingletonDeployment({ + version: SAFE_VERSION, + network: sepolia.id.toString(), +})!; +const safeFactory = getProxyFactoryDeployment({ + version: SAFE_VERSION, + network: sepolia.id.toString(), +})!; +const multiSendCallOnly = getMultiSendCallOnlyDeployment({ + version: SAFE_VERSION, + network: sepolia.id.toString(), +})!; + export const sepoliaConfig: NetworkConfig = { order: 30, chain: sepolia, @@ -40,35 +58,70 @@ export const sepoliaConfig: NetworkConfig = { version: 'v0.0.1', }, contracts: { - fractalAzoriusMasterCopy: Azorius.address, - fractalModuleMasterCopy: FractalModule.address, - fractalRegistry: FractalRegistry.address, - votesERC20MasterCopy: VotesERC20.address, - linearVotingERC721MasterCopy: LinearVotingERC721.address, - claimingMasterCopy: ERC20Claim.address, - azoriusFreezeGuardMasterCopy: AzoriusFreezeGuard.address, - multisigFreezeVotingMasterCopy: MultisigFreezeVoting.address, - erc20FreezeVotingMasterCopy: ERC20FreezeVoting.address, - erc721FreezeVotingMasterCopy: ERC721FreezeVoting.address, - multisigFreezeGuardMasterCopy: MultisigFreezeGuard.address, - fallbackHandler: getCompatibilityFallbackHandlerDeployment({ - version: SAFE_VERSION, - network: sepolia.id.toString(), - })?.networkAddresses[sepolia.id.toString()]!, - safe: getSafeL2SingletonDeployment({ version: SAFE_VERSION, network: sepolia.id.toString() }) - ?.networkAddresses[sepolia.id.toString()]!, - safeFactory: getProxyFactoryDeployment({ - version: SAFE_VERSION, - network: sepolia.id.toString(), - })?.networkAddresses[sepolia.id.toString()]!, - zodiacModuleProxyFactory: ModuleProxyFactory.address, - linearVotingMasterCopy: LinearERC20Voting.address, - multisend: getMultiSendCallOnlyDeployment({ - version: SAFE_VERSION, - network: sepolia.id.toString(), - })?.networkAddresses[sepolia.id.toString()]!, - votesERC20WrapperMasterCopy: VotesERC20Wrapper.address, - keyValuePairs: KeyValuePairs.address, + fractalAzoriusMasterCopy: { address: Azorius.address as Address, abi: Azorius.abi as Abi }, + fractalModuleMasterCopy: { + address: FractalModule.address as Address, + abi: FractalModule.abi as Abi, + }, + fractalRegistry: { + address: FractalRegistry.address as Address, + abi: FractalRegistry.abi as Abi, + }, + votesERC20MasterCopy: { address: VotesERC20.address as Address, abi: VotesERC20.abi as Abi }, + linearVotingERC721MasterCopy: { + address: LinearVotingERC721.address as Address, + abi: LinearVotingERC721.abi as Abi, + }, + claimingMasterCopy: { address: ERC20Claim.address as Address, abi: ERC20Claim.abi as Abi }, + azoriusFreezeGuardMasterCopy: { + address: AzoriusFreezeGuard.address as Address, + abi: AzoriusFreezeGuard.abi as Abi, + }, + multisigFreezeVotingMasterCopy: { + address: MultisigFreezeVoting.address as Address, + abi: MultisigFreezeVoting.abi as Abi, + }, + erc20FreezeVotingMasterCopy: { + address: ERC20FreezeVoting.address as Address, + abi: ERC20FreezeVoting.abi as Abi, + }, + erc721FreezeVotingMasterCopy: { + address: ERC721FreezeVoting.address as Address, + abi: ERC721FreezeVoting.abi as Abi, + }, + multisigFreezeGuardMasterCopy: { + address: MultisigFreezeGuard.address as Address, + abi: MultisigFreezeGuard.abi as Abi, + }, + fallbackHandler: { + address: fallbackHandler.networkAddresses[sepolia.id.toString()]! as Address, + abi: fallbackHandler.abi as Abi, + }, + safe: { + address: safe.networkAddresses[sepolia.id.toString()]! as Address, + abi: safe.abi as Abi, + }, + safeFactory: { + address: safeFactory.networkAddresses[sepolia.id.toString()] as Address, + abi: safeFactory.abi as Abi, + }, + zodiacModuleProxyFactory: { + address: ModuleProxyFactory.address as Address, + abi: ModuleProxyFactory.abi as Abi, + }, + linearVotingMasterCopy: { + address: LinearERC20Voting.address as Address, + abi: LinearERC20Voting.abi as Abi, + }, + multisend: { + address: multiSendCallOnly.networkAddresses[sepolia.id.toString()]! as Address, + abi: multiSendCallOnly.abi as Abi, + }, + votesERC20WrapperMasterCopy: { + address: VotesERC20Wrapper.address as Address, + abi: VotesERC20Wrapper.abi as Abi, + }, + keyValuePairs: { address: KeyValuePairs.address as Address, abi: KeyValuePairs.abi as Abi }, }, staking: {}, createOptions: [ diff --git a/src/providers/Providers.tsx b/src/providers/Providers.tsx index 659189dfa2..112bb91044 100644 --- a/src/providers/Providers.tsx +++ b/src/providers/Providers.tsx @@ -9,7 +9,6 @@ import { ErrorFallback } from '../components/ui/utils/ErrorFallback'; import graphQLClient from '../graphql'; import { FractalErrorBoundary } from '../helpers/errorLogging'; import { AppProvider } from './App/AppProvider'; -import EthersContextProvider from './Ethers'; import { NetworkConfigProvider } from './NetworkConfig/NetworkConfigProvider'; import { wagmiConfig, queryClient } from './NetworkConfig/web3-modal.config'; @@ -24,17 +23,15 @@ export default function Providers({ children }: { children: ReactNode }) { - - - - {children} - - + + + {children} + diff --git a/src/types/account.ts b/src/types/account.ts index 95e235ca6c..bcda8362e0 100644 --- a/src/types/account.ts +++ b/src/types/account.ts @@ -1,3 +1,5 @@ +import { Address } from 'viem'; + export interface VotesTokenData extends VotesData, ERC20TokenData {} export interface VotesData { balance: bigint | null; @@ -13,7 +15,7 @@ export type UnderlyingTokenData = Omit< export interface BaseTokenData { name: string; symbol: string; - address: string; + address: Address; } export interface ERC20TokenData extends BaseTokenData { decimals: number; diff --git a/src/types/contract.ts b/src/types/contract.ts index 59c1b54b0b..3530908a27 100644 --- a/src/types/contract.ts +++ b/src/types/contract.ts @@ -1,37 +1,102 @@ -import { - GnosisSafeProxyFactory, - ModuleProxyFactory, - Azorius, - LinearERC20Voting, - FractalModule, - FractalRegistry, - MultisigFreezeGuard, - AzoriusFreezeGuard, - MultisigFreezeVoting, - ERC20FreezeVoting, - VotesERC20, - ERC20Claim, - KeyValuePairs, - ERC721FreezeVoting, -} from '@fractal-framework/fractal-contracts'; -import { MultiSend } from '../assets/typechain-types/usul'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import AzoriusABI from '@fractal-framework/fractal-contracts/deployments/mainnet/Azorius.json'; +import AzoriusFreezeGuardABI from '@fractal-framework/fractal-contracts/deployments/mainnet/AzoriusFreezeGuard.json'; +import ERC20ClaimABI from '@fractal-framework/fractal-contracts/deployments/mainnet/ERC20Claim.json'; +import ERC20FreezeVotingABI from '@fractal-framework/fractal-contracts/deployments/mainnet/ERC20FreezeVoting.json'; +import FractalModuleABI from '@fractal-framework/fractal-contracts/deployments/mainnet/FractalModule.json'; +import FractalRegistryABI from '@fractal-framework/fractal-contracts/deployments/mainnet/FractalRegistry.json'; +import KeyValuePairsABI from '@fractal-framework/fractal-contracts/deployments/mainnet/KeyValuePairs.json'; +import LinearERC20VotingABI from '@fractal-framework/fractal-contracts/deployments/mainnet/LinearERC20Voting.json'; +import ModuleProxyFactoryABI from '@fractal-framework/fractal-contracts/deployments/mainnet/ModuleProxyFactory.json'; +import MultisigFreezeGuardABI from '@fractal-framework/fractal-contracts/deployments/mainnet/MultisigFreezeGuard.json'; +import MultisigFreezeVotingABI from '@fractal-framework/fractal-contracts/deployments/mainnet/MultisigFreezeVoting.json'; +import VotesERC20ABI from '@fractal-framework/fractal-contracts/deployments/mainnet/VotesERC20.json'; +import VotesERC20WrapperABI from '@fractal-framework/fractal-contracts/deployments/mainnet/VotesERC20Wrapper.json'; +import ERC721FreezeVotingABI from '@fractal-framework/fractal-contracts/deployments/sepolia/ERC721FreezeVoting.json'; +import LinearERC721VotingABI from '@fractal-framework/fractal-contracts/deployments/sepolia/LinearERC721Voting.json'; +import SafeProxyFactoryABI from '@safe-global/safe-deployments/src/assets/v1.3.0/proxy_factory.json'; +import { GetContractReturnType, PublicClient, WalletClient } from 'viem'; +import MultiSendABI from '../assets/abi/MultiSend'; +import SafeL2ABI from '../assets/abi/SafeL2'; +import { NetworkContract } from './network'; export interface ContractEvent { blockTimestamp: number; } export type ContractConnection = { - asSigner: T; - asProvider: T; + asWallet: T; + asPublic: T; }; +export type MultiSend = GetContractReturnType; +export type SafeL2 = GetContractReturnType; +export type SafeProxyFactory = GetContractReturnType< + typeof SafeProxyFactoryABI.abi, + WalletClient | PublicClient +>; +export type Azorius = GetContractReturnType; +export type ModuleProxyFactory = GetContractReturnType< + typeof ModuleProxyFactoryABI.abi, + PublicClient +>; +export type LinearERC20Voting = GetContractReturnType< + typeof LinearERC20VotingABI.abi, + WalletClient | PublicClient +>; +export type FractalModule = GetContractReturnType< + typeof FractalModuleABI.abi, + WalletClient | PublicClient +>; +export type FractalRegistry = GetContractReturnType< + typeof FractalRegistryABI.abi, + WalletClient | PublicClient +>; +export type MultisigFreezeGuard = GetContractReturnType< + typeof MultisigFreezeGuardABI.abi, + WalletClient | PublicClient +>; +export type AzoriusFreezeGuard = GetContractReturnType< + typeof AzoriusFreezeGuardABI.abi, + WalletClient | PublicClient +>; +export type MultisigFreezeVoting = GetContractReturnType< + typeof MultisigFreezeVotingABI.abi, + WalletClient | PublicClient +>; +export type ERC20FreezeVoting = GetContractReturnType< + typeof ERC20FreezeVotingABI.abi, + WalletClient | PublicClient +>; +export type VotesERC20 = GetContractReturnType< + typeof VotesERC20ABI.abi, + WalletClient | PublicClient +>; +export type ERC20Claim = GetContractReturnType< + typeof ERC20ClaimABI.abi, + WalletClient | PublicClient +>; +export type KeyValuePairs = GetContractReturnType< + typeof KeyValuePairsABI.abi, + WalletClient | PublicClient +>; +export type ERC721FreezeVoting = GetContractReturnType< + typeof ERC721FreezeVotingABI.abi, + WalletClient | PublicClient +>; +export type VotesERC20Wrapper = GetContractReturnType< + typeof VotesERC20WrapperABI.abi, + WalletClient | PublicClient +>; +export type LinearERC721Voting = GetContractReturnType< + typeof LinearERC721VotingABI.abi, + WalletClient | PublicClient +>; export interface DAOContracts { multiSendContract: ContractConnection; - safeFactoryContract: ContractConnection; + safeFactoryContract: ContractConnection; fractalAzoriusMasterCopyContract: ContractConnection; linearVotingMasterCopyContract: ContractConnection; - safeSingletonContract: ContractConnection; + safeSingletonContract: ContractConnection; zodiacModuleProxyFactoryContract: ContractConnection; fractalModuleMasterCopyContract: ContractConnection; fractalRegistryContract: ContractConnection; @@ -45,15 +110,15 @@ export interface DAOContracts { } export interface BaseContracts { - fractalModuleMasterCopyContract: FractalModule; - fractalRegistryContract: FractalRegistry; - safeFactoryContract: GnosisSafeProxyFactory; - safeSingletonContract: GnosisSafeL2; - multisigFreezeGuardMasterCopyContract: MultisigFreezeGuard; - multiSendContract: MultiSend; - freezeERC20VotingMasterCopyContract: ERC20FreezeVoting; - freezeERC721VotingMasterCopyContract: ERC721FreezeVoting; - freezeMultisigVotingMasterCopyContract: MultisigFreezeVoting; - zodiacModuleProxyFactoryContract: ModuleProxyFactory; - keyValuePairsContract: KeyValuePairs; + fractalModuleMasterCopyContract: NetworkContract; + fractalRegistryContract: NetworkContract; + safeFactoryContract: NetworkContract; + safeSingletonContract: NetworkContract; + multisigFreezeGuardMasterCopyContract: NetworkContract; + multiSendContract: NetworkContract; + freezeERC20VotingMasterCopyContract: NetworkContract; + freezeERC721VotingMasterCopyContract?: NetworkContract; + freezeMultisigVotingMasterCopyContract: NetworkContract; + zodiacModuleProxyFactoryContract: NetworkContract; + keyValuePairsContract: NetworkContract; } diff --git a/src/types/createDAO.ts b/src/types/createDAO.ts index 21cbf986b7..2ab080fe06 100644 --- a/src/types/createDAO.ts +++ b/src/types/createDAO.ts @@ -1,5 +1,6 @@ import { SafeBalanceUsdResponse, SafeCollectibleResponse } from '@safe-global/safe-service-client'; import { FormikProps } from 'formik'; +import { Address } from 'viem'; import { DAOCreateMode } from '../components/DaoCreator/formComponents/EstablishEssentials'; import { BigIntValuePair } from './common'; import { GovernanceType, VotingStrategyType } from './fractal'; @@ -43,7 +44,7 @@ export type DAOEssentials = { export type DAOGovernorERC20Token = { tokenCreationType: TokenCreationType; - tokenImportAddress?: string; + tokenImportAddress?: Address; tokenName: string; tokenSymbol: string; tokenSupply: T; @@ -52,7 +53,7 @@ export type DAOGovernorERC20Token = { }; export type ERC721TokenConfig = { - tokenAddress: string; + tokenAddress?: Address | null; tokenWeight: T; }; diff --git a/src/types/daoGuard.ts b/src/types/daoGuard.ts index 85f358478c..422737b1f7 100644 --- a/src/types/daoGuard.ts +++ b/src/types/daoGuard.ts @@ -1,10 +1,10 @@ import { - MultisigFreezeGuard, AzoriusFreezeGuard, + ContractConnection, ERC20FreezeVoting, + MultisigFreezeGuard, MultisigFreezeVoting, -} from '@fractal-framework/fractal-contracts'; -import { ContractConnection } from './contract'; +} from './contract'; import { FreezeGuardType, FreezeVotingType } from './daoGovernance'; export interface IMultisigFreezeContract { diff --git a/src/types/daoProposal.ts b/src/types/daoProposal.ts index cc6bf6712b..6cc8ed0e06 100644 --- a/src/types/daoProposal.ts +++ b/src/types/daoProposal.ts @@ -1,3 +1,4 @@ +import { Address, Hex } from 'viem'; import { GovernanceActivity } from './fractal'; import { CreateProposalMetadata } from './proposalBuilder'; import { SafeMultisigConfirmationResponse } from './safeGlobal'; @@ -8,9 +9,9 @@ export interface ProposalExecuteData extends ExecuteData { } export interface ExecuteData { - targets: string[]; + targets: Address[]; values: bigint[]; - calldatas: string[]; + calldatas: Hex[]; } export type CreateProposalFunc = (proposal: { @@ -29,7 +30,7 @@ export interface AzoriusProposal extends GovernanceActivity { votesSummary: ProposalVotesSummary; votes: ProposalVote[] | ERC721ProposalVote[]; /** The deadline timestamp for the proposal, in milliseconds. */ - deadlineMs: number; + deadlineMs: bigint; startBlock: bigint; } diff --git a/src/types/fractal.ts b/src/types/fractal.ts index 8c0bc7b3b6..d8a0c4fb58 100644 --- a/src/types/fractal.ts +++ b/src/types/fractal.ts @@ -1,21 +1,3 @@ -import { - FractalModule, - FractalRegistry, - GnosisSafeProxyFactory, - ModuleProxyFactory, - LinearERC20Voting, - Azorius, - AzoriusFreezeGuard, - ERC20Claim, - ERC20FreezeVoting, - MultisigFreezeVoting, - VotesERC20, - MultisigFreezeGuard, - VotesERC20Wrapper, - KeyValuePairs, - ERC721FreezeVoting, - LinearERC721Voting, -} from '@fractal-framework/fractal-contracts'; import { SafeMultisigTransactionWithTransfersResponse, SafeModuleTransactionWithTransfersResponse, @@ -24,8 +6,7 @@ import { SafeCollectibleResponse, } from '@safe-global/safe-service-client'; import { Dispatch } from 'react'; -import { MultiSend } from '../assets/typechain-types/usul'; -import { GnosisSafeL2 } from '../assets/typechain-types/usul/@gnosis.pm/safe-contracts/contracts'; +import { Address } from 'viem'; import { FractalGovernanceActions } from '../providers/App/governance/action'; import { GovernanceContractActions } from '../providers/App/governanceContracts/action'; import { FractalGuardActions } from '../providers/App/guard/action'; @@ -33,7 +14,27 @@ import { GuardContractActions } from '../providers/App/guardContracts/action'; import { TreasuryActions } from '../providers/App/treasury/action'; import { NodeActions } from './../providers/App/node/action'; import { ERC721TokenData, VotesTokenData } from './account'; -import { ContractConnection } from './contract'; +import { + Azorius, + FractalModule, + FractalRegistry, + SafeProxyFactory, + ModuleProxyFactory, + LinearERC20Voting, + AzoriusFreezeGuard, + ERC20Claim, + ERC20FreezeVoting, + MultisigFreezeVoting, + VotesERC20, + MultisigFreezeGuard, + VotesERC20Wrapper, + KeyValuePairs, + ERC721FreezeVoting, + LinearERC721Voting, + MultiSend, + SafeL2, + ContractConnection, +} from './contract'; import { FreezeGuardType, FreezeVotingType } from './daoGovernance'; import { ProposalData, MultisigProposal, AzoriusProposal, SnapshotProposal } from './daoProposal'; import { TreasuryActivity } from './daoTreasury'; @@ -221,12 +222,12 @@ export interface Fractal { } export interface FractalGovernanceContracts { - ozLinearVotingContractAddress?: string; - erc721LinearVotingContractAddress?: string; - azoriusContractAddress?: string; - votesTokenContractAddress?: string; - lockReleaseContractAddress?: string; - underlyingTokenAddress?: string; + ozLinearVotingContractAddress?: Address; + erc721LinearVotingContractAddress?: Address; + azoriusContractAddress?: Address; + votesTokenContractAddress?: Address; + lockReleaseContractAddress?: Address; + underlyingTokenAddress?: Address; isLoaded: boolean; } @@ -247,7 +248,7 @@ export interface Node export interface FractalModuleData { moduleContract: Azorius | FractalModule | undefined; - moduleAddress: string; + moduleAddress: Address; moduleType: FractalModuleType; } @@ -257,8 +258,8 @@ export enum FractalModuleType { UNKNOWN, } export interface FractalGuardContracts { - freezeGuardContractAddress?: string; - freezeVotingContractAddress?: string; + freezeGuardContractAddress?: Address; + freezeVotingContractAddress?: Address; freezeGuardType: FreezeGuardType | null; freezeVotingType: FreezeVotingType | null; isGuardLoaded?: boolean; @@ -335,11 +336,11 @@ export interface NodeHierarchy { export interface FractalContracts { multiSendContract: ContractConnection; - safeFactoryContract: ContractConnection; + safeFactoryContract: ContractConnection; fractalAzoriusMasterCopyContract: ContractConnection; linearVotingMasterCopyContract: ContractConnection; linearVotingERC721MasterCopyContract: ContractConnection; - safeSingletonContract: ContractConnection; + safeSingletonContract: ContractConnection; zodiacModuleProxyFactoryContract: ContractConnection; fractalModuleMasterCopyContract: ContractConnection; fractalRegistryContract: ContractConnection; @@ -370,7 +371,7 @@ export interface ReadOnlyState { export interface ReadOnlyUser { /** The user's wallet address, if connected. */ - address?: string; + address?: Address; /** The number of delegated tokens for the connected Azorius DAO, 1 for a Multisig DAO signer */ votingWeight: bigint; } diff --git a/src/types/network.ts b/src/types/network.ts index 2ad64d6a68..693bce66d7 100644 --- a/src/types/network.ts +++ b/src/types/network.ts @@ -1,12 +1,10 @@ -import { ethers } from 'ethers'; -import { Chain } from 'viem'; +import { Address, Chain } from 'viem'; import { GovernanceType } from './fractal'; -export type Providers = - | ethers.providers.Web3Provider - | ethers.providers.JsonRpcProvider - | ethers.providers.BaseProvider; - +export type NetworkContract = { + address: Address; + abi: any; +}; export type NetworkConfig = { order: number; // any arbitrary integer, used to "order" the networks in the dropdown chain: Chain; @@ -22,31 +20,31 @@ export type NetworkConfig = { version: string; }; contracts: { - safe: string; - safeFactory: string; - fallbackHandler: string; - zodiacModuleProxyFactory: string; - linearVotingMasterCopy: string; - multisend: string; - fractalAzoriusMasterCopy: string; - fractalModuleMasterCopy: string; - fractalRegistry: string; - votesERC20MasterCopy: string; - linearVotingERC721MasterCopy: string; - claimingMasterCopy: string; - multisigFreezeGuardMasterCopy: string; - azoriusFreezeGuardMasterCopy: string; - multisigFreezeVotingMasterCopy: string; - erc20FreezeVotingMasterCopy: string; - erc721FreezeVotingMasterCopy: string; - votesERC20WrapperMasterCopy: string; - keyValuePairs: string; + safe: NetworkContract; + safeFactory: NetworkContract; + fallbackHandler: NetworkContract; + zodiacModuleProxyFactory: NetworkContract; + linearVotingMasterCopy: NetworkContract; + multisend: NetworkContract; + fractalAzoriusMasterCopy: NetworkContract; + fractalModuleMasterCopy: NetworkContract; + fractalRegistry: NetworkContract; + votesERC20MasterCopy: NetworkContract; + linearVotingERC721MasterCopy?: NetworkContract; + claimingMasterCopy: NetworkContract; + multisigFreezeGuardMasterCopy: NetworkContract; + azoriusFreezeGuardMasterCopy: NetworkContract; + multisigFreezeVotingMasterCopy: NetworkContract; + erc20FreezeVotingMasterCopy: NetworkContract; + erc721FreezeVotingMasterCopy?: NetworkContract; + votesERC20WrapperMasterCopy: NetworkContract; + keyValuePairs: NetworkContract; }; staking: { lido?: { - stETHContractAddress: string; - rewardsAddress: string; - withdrawalQueueContractAddress: string; + stETHContractAddress: NetworkContract; + rewardsAddress: NetworkContract; + withdrawalQueueContractAddress: NetworkContract; }; }; createOptions: GovernanceType[]; diff --git a/src/types/strategyAzorius.ts b/src/types/strategyAzorius.ts index 8b3437db14..cd2cf7edf9 100644 --- a/src/types/strategyAzorius.ts +++ b/src/types/strategyAzorius.ts @@ -6,7 +6,7 @@ import { ERC20Claim, VotesERC20Wrapper, LinearERC721Voting, -} from '@fractal-framework/fractal-contracts'; +} from './contract'; export interface AzoriusContracts { fractalAzoriusMasterCopyContract: Azorius; diff --git a/src/types/transaction.ts b/src/types/transaction.ts index 4702976d54..d4b027f12d 100644 --- a/src/types/transaction.ts +++ b/src/types/transaction.ts @@ -1,3 +1,5 @@ +import { Address } from 'viem'; + export interface DecodedTransaction { target: string; value: string; @@ -7,7 +9,7 @@ export interface DecodedTransaction { decodingFailed?: boolean; } export interface MetaTransaction { - to: string; + to: Address; value: string | number | bigint; data: string; operation: number; diff --git a/src/types/utils.ts b/src/types/utils.ts index 973077fc2d..5176ceece5 100644 --- a/src/types/utils.ts +++ b/src/types/utils.ts @@ -1,4 +1,6 @@ -export type EthAddress = { address: string }; +import { Address } from 'viem'; + +export type EthAddress = { address?: Address | null }; export enum SortBy { Newest = 'newest', diff --git a/src/utils/azorius.ts b/src/utils/azorius.ts index 6b3db3383a..a8a2c145a3 100644 --- a/src/utils/azorius.ts +++ b/src/utils/azorius.ts @@ -1,14 +1,5 @@ -import { - Azorius, - LinearERC20Voting, - LinearERC721Voting, -} from '@fractal-framework/fractal-contracts'; -import { ProposalExecutedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/Azorius'; -import { VotedEvent as ERC20VotedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC20Voting'; -import { VotedEvent as ERC721VotedEvent } from '@fractal-framework/fractal-contracts/dist/typechain-types/contracts/azorius/LinearERC721Voting'; import { SafeMultisigTransactionWithTransfersResponse } from '@safe-global/safe-service-client'; import { strategyFractalProposalStates } from '../constants/strategy'; - import { logError } from '../helpers/errorLogging'; import { FractalProposalState, @@ -28,7 +19,6 @@ import { ERC721ProposalVote, MetaTransaction, } from '../types'; -import { Providers } from '../types/network'; import { getTimeStamp } from './contract'; export const getAzoriusProposalState = async ( @@ -227,7 +217,7 @@ export const mapProposalCreatedEventToProposal = async ( proposer, startBlock: BigInt(proposalVotes.startBlock), transactionHash, - deadlineMs: deadlineSeconds * 1000, + deadlineMs: BigInt(deadlineSeconds) * 1000n, state, votes, votesSummary, diff --git a/src/utils/contract.ts b/src/utils/contract.ts index cdadc43df7..d3aff520f5 100644 --- a/src/utils/contract.ts +++ b/src/utils/contract.ts @@ -1,36 +1,37 @@ +import { PublicClient } from 'viem'; import { logError } from '../helpers/errorLogging'; import { CacheExpiry } from '../hooks/utils/cache/cacheDefaults'; import { setValue, getValue } from '../hooks/utils/cache/useLocalStorage'; -import { Providers } from '../types/network'; -export const getAverageBlockTime = async (provider: Providers) => { - let averageBlockTime: number = getValue('averageBlockTime', provider.network.chainId); +export const getAverageBlockTime = async (publicClient: PublicClient) => { + const chainId = await publicClient.getChainId(); + let averageBlockTime = getValue('averageBlockTime', chainId); if (averageBlockTime) { return averageBlockTime; } - const latestBlock = await provider.getBlock('latest'); - const pastBlock = await provider.getBlock(latestBlock.number - 1000); - averageBlockTime = (latestBlock.timestamp - pastBlock.timestamp) / 1000; - setValue('averageBlockTime', averageBlockTime, provider.network.chainId, CacheExpiry.ONE_DAY); + const latestBlock = await publicClient.getBlock(); + const pastBlock = await publicClient.getBlock({ blockNumber: latestBlock.number - 1000n }); + averageBlockTime = (latestBlock.timestamp - pastBlock.timestamp) / 1000n; + setValue('averageBlockTime', averageBlockTime, chainId, CacheExpiry.ONE_DAY); return averageBlockTime; }; -export const getTimeStamp = async (blockNumber: number | 'latest', provider: Providers) => { - if (!provider || !blockNumber) { +export const getTimeStamp = async (blockNumber: bigint | 'latest', publicClient: PublicClient) => { + if (!publicClient || !blockNumber) { return 0; } if (blockNumber === 'latest') { - const latestBlock = await provider.getBlock('latest'); + const latestBlock = await publicClient.getBlock(); return latestBlock.timestamp; } try { - const block = await provider.getBlock(blockNumber); - const latestBlock = await provider.getBlock('latest'); + const block = await publicClient.getBlock({ blockNumber }); + const latestBlock = await publicClient.getBlock(); if (blockNumber < latestBlock.number) { return block.timestamp; } else { - const averageBlockTime = await getAverageBlockTime(provider); + const averageBlockTime = await getAverageBlockTime(publicClient); const estimatedTimestamp = latestBlock.timestamp + averageBlockTime * (blockNumber - latestBlock.number); @@ -44,13 +45,13 @@ export const getTimeStamp = async (blockNumber: number | 'latest', provider: Pro export const blocksToSeconds = async ( numOfBlocks: number, - provider: Providers, + publicClient: PublicClient, ): Promise => { - if (!provider || !numOfBlocks) { + if (!publicClient || !numOfBlocks) { return 0; } try { - const averageBlockTime = Math.round(await getAverageBlockTime(provider)); + const averageBlockTime = Math.round(await getAverageBlockTime(publicClient)); return averageBlockTime * numOfBlocks; } catch (error) { logError(error); @@ -60,9 +61,9 @@ export const blocksToSeconds = async ( export const getEstimatedNumberOfBlocks = async ( timeInMinutes: bigint, - provider: Providers, + publicClient: PublicClient, ): Promise => { const seconds = Number(timeInMinutes) * 60; - const averageBlockTime = await getAverageBlockTime(provider); + const averageBlockTime = await getAverageBlockTime(publicClient); return BigInt(Math.ceil(seconds / averageBlockTime)); }; diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index 3ca73a64ab..aedd7279a7 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -1,4 +1,4 @@ -import { utils } from 'ethers'; +import { encodeFunctionData, parseAbiParameters } from 'viem'; import { logError } from '../helpers/errorLogging'; import { ActivityTransactionType } from '../types'; @@ -25,13 +25,6 @@ export const encodeFunction = ( _functionSignature?: string, _parameters?: string, ) => { - let functionSignature = `function ${_functionName}`; - if (_functionSignature) { - functionSignature = functionSignature.concat(`(${_functionSignature})`); - } else { - functionSignature = functionSignature.concat('()'); - } - const parameters = !!_parameters ? splitIgnoreBrackets(_parameters).map(p => (p = p.trim())) : undefined; @@ -84,10 +77,11 @@ export const encodeFunction = ( }); try { - return new utils.Interface([functionSignature]).encodeFunctionData( - _functionName, - parametersFixedWithBool, - ); + return encodeFunctionData({ + functionName: _functionName, + args: parametersFixedWithBool, + abi: parseAbiParameters(_functionSignature || ''), + }); } catch (e) { logError(e); return; diff --git a/src/utils/guard.ts b/src/utils/guard.ts index de899b5fbc..2548d0dec5 100644 --- a/src/utils/guard.ts +++ b/src/utils/guard.ts @@ -1,29 +1,27 @@ -import { MultisigFreezeGuard } from '@fractal-framework/fractal-contracts'; import { SafeMultisigTransactionWithTransfersResponse } from '@safe-global/safe-service-client'; -import { ethers } from 'ethers'; +import { PublicClient, keccak256, encodePacked, Address, Hex } from 'viem'; import { buildSignatureBytes } from '../helpers/crypto'; -import { Activity } from '../types'; -import { Providers } from '../types/network'; +import { Activity, MultisigFreezeGuard } from '../types'; import { getTimeStamp } from './contract'; export async function getTxTimelockedTimestamp( activity: Activity, freezeGuard: MultisigFreezeGuard, - provider: Providers, + publicClient: PublicClient, ) { const multiSigTransaction = activity.transaction as SafeMultisigTransactionWithTransfersResponse; const signatures = buildSignatureBytes( multiSigTransaction.confirmations!.map(confirmation => ({ - signer: confirmation.owner, - data: confirmation.signature, + signer: confirmation.owner as Address, + data: confirmation.signature as Hex, })), ); - const signaturesHash = ethers.utils.solidityKeccak256(['bytes'], [signatures]); + const signaturesHash = keccak256(encodePacked(['bytes'], [signatures])); const timelockedTimestamp = await getTimeStamp( - await freezeGuard.getTransactionTimelockedBlock(signaturesHash), - provider, + (await freezeGuard.read.getTransactionTimelockedBlock([signaturesHash])) as bigint, + publicClient, ); return timelockedTimestamp; } diff --git a/src/utils/index.ts b/src/utils/index.ts index 64cc7e0416..024b659606 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -4,6 +4,5 @@ export * from './crypto'; export * from './currency'; export * from './numberFormats'; export * from './safeData'; -export * from './signatures'; export * from './time'; export * from './azorius'; diff --git a/src/utils/shutter.ts b/src/utils/shutter.ts index 1b008bee6b..03a44d59a8 100644 --- a/src/utils/shutter.ts +++ b/src/utils/shutter.ts @@ -1,5 +1,5 @@ import { init, encrypt } from '@shutter-network/shutter-crypto'; -import { utils } from 'ethers'; +import { toBytes, toHex, stringToBytes, stringToHex, bytesToHex } from 'viem'; export default async function encryptWithShutter( choice: string, @@ -8,18 +8,17 @@ export default async function encryptWithShutter( const shutterPath = '/assets/scripts/shutter-crypto.wasm'; await init(shutterPath); - const { arrayify, hexlify, toUtf8Bytes, formatBytes32String, randomBytes } = utils; - - const bytesChoice = toUtf8Bytes(choice); - const message = arrayify(bytesChoice); - const eonPublicKey = arrayify(import.meta.env.VITE_APP_SHUTTER_EON_PUBKEY!); + const bytesChoice = stringToBytes(choice); + const message = toHex(bytesChoice); + const eonPublicKey = toBytes(import.meta.env.VITE_APP_SHUTTER_EON_PUBKEY!); const is32ByteString = id.substring(0, 2) === '0x'; - const proposalId = arrayify(is32ByteString ? id : formatBytes32String(id)); + const proposalId = toBytes(is32ByteString ? id : stringToHex(id, { size: 32 })); - const sigma = randomBytes(32); + const randomBytes = crypto.getRandomValues(new Uint8Array(32)); + const sigma = bytesToHex(randomBytes); const encryptedMessage = await encrypt(message, eonPublicKey, proposalId, sigma); - return hexlify(encryptedMessage) ?? null; + return toHex(encryptedMessage) ?? null; } diff --git a/src/utils/signatures.ts b/src/utils/signatures.ts deleted file mode 100644 index 5c2fd50c8f..0000000000 --- a/src/utils/signatures.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Signer, utils } from 'ethers'; -import { logError } from '../helpers/errorLogging'; -import { SafeAPITransaction } from '../types'; - -export const EIP_DOMAIN = { - EIP712Domain: [ - { type: 'uint256', name: 'chainId' }, - { type: 'address', name: 'verifyingContract' }, - ], -}; - -export const EIP712_SAFE_TX_TYPE = { - // "SafeTx(address to,uint256 value,bytes data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address refundReceiver,uint256 nonce)" - SafeTx: [ - { type: 'address', name: 'to' }, - { type: 'uint256', name: 'value' }, - { type: 'bytes', name: 'data' }, - { type: 'uint8', name: 'operation' }, - { type: 'uint256', name: 'safeTxGas' }, - { type: 'uint256', name: 'baseGas' }, - { type: 'uint256', name: 'gasPrice' }, - { type: 'address', name: 'gasToken' }, - { type: 'address', name: 'refundReceiver' }, - { type: 'uint256', name: 'nonce' }, - ], -}; - -export const EIP712_SAFE_MESSAGE_TYPE = { - // "SafeMessage(bytes message)" - SafeMessage: [{ type: 'bytes', name: 'message' }], -}; - -export interface SafeSignature { - signer: string; - data: string | undefined; -} - -export const calculateSafeTransactionHash = ( - safeAddress: string, - safeTx: SafeAPITransaction, - chainId: number, -): string => { - return utils._TypedDataEncoder.hash( - { verifyingContract: safeAddress, chainId }, - EIP712_SAFE_TX_TYPE, - safeTx, - ); -}; - -export const signHash = async (signer: Signer, hash: string): Promise => { - const typedDataHash = utils.arrayify(hash); - const signerAddress = await signer.getAddress(); - try { - const sig = await signer.signMessage(typedDataHash); - return { - signer: signerAddress, - data: sig.replace(/1b$/, '1f').replace(/1c$/, '20'), - }; - } catch (error) { - logError(error); - return { - signer: signerAddress, - data: undefined, - }; - } -}; - -export const safeSignMessage = async ( - signer: Signer, - safeAddress: string, - safeTx: SafeAPITransaction, - chainId?: number, -): Promise => { - const cid = chainId || (await signer.provider!.getNetwork()).chainId; - return signHash(signer, calculateSafeTransactionHash(safeAddress, safeTx, cid)); -}; diff --git a/src/utils/url.ts b/src/utils/url.ts index 471bc43842..eee5f6d1d3 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -15,7 +15,7 @@ export const isValidUrl = (urlString: string) => { * Note that ENS names can use DNS TLDs, so they do not necessarily * end in '.eth', though that is the most common. */ -export const couldBeENS = (ensAddress?: string): boolean => { +export const couldBeENS = (ensAddress?: string | null): boolean => { if (!ensAddress) return false; // everything up to the last index included, to support subdomains, e.g. blah.decent-dao.eth diff --git a/test/encodeFunction.test.ts b/test/encodeFunction.test.ts index 5b71c4763b..1bc079291f 100644 --- a/test/encodeFunction.test.ts +++ b/test/encodeFunction.test.ts @@ -1,46 +1,71 @@ -import { utils } from 'ethers'; +import { encodeFunctionData, parseAbiParameters } from 'viem'; import { expect, test } from 'vitest'; import { encodeFunction } from '../src/utils/crypto'; test('Function encoding with no parameters', () => { - const encoded = new utils.Interface(['function foo()']).encodeFunctionData('foo'); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo()'), + }); expect(encodeFunction('foo')).toEqual(encoded); }); test('Function encoding with [boolean=true]', () => { - const encoded = new utils.Interface(['function foo(bool)']).encodeFunctionData('foo', [true]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(bool)'), + args: [true], + }); expect(encodeFunction('foo', 'bool', 'true')).toEqual(encoded); }); test('Function encoding with [boolean=false]', () => { - const encoded = new utils.Interface(['function foo(bool)']).encodeFunctionData('foo', [false]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(bool)'), + args: [false], + }); expect(encodeFunction('foo', 'bool', 'false')).toEqual(encoded); }); test('Function encoding with [uint=0]', () => { - const encoded = new utils.Interface(['function foo(uint)']).encodeFunctionData('foo', [0]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(uint)'), + args: [0n], + }); expect(encodeFunction('foo', 'uint', '0')).toEqual(encoded); }); test('Function encoding with [uint256=0]', () => { - const encoded = new utils.Interface(['function foo(uint256)']).encodeFunctionData('foo', [0]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(uint256)'), + args: [0n], + }); expect(encodeFunction('foo', 'uint256', '0')).toEqual(encoded); }); test('Function encoding with [uint8=0]', () => { - const encoded = new utils.Interface(['function foo(uint8)']).encodeFunctionData('foo', [0]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(uint8)'), + args: [0n], + }); expect(encodeFunction('foo', 'uint8', '0')).toEqual(encoded); }); test('Function encoding with [uint8=100]', () => { - const encoded = new utils.Interface(['function foo(uint8)']).encodeFunctionData('foo', [100]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(uint8)'), + args: [100n], + }); expect(encodeFunction('foo', 'uint8', '100')).toEqual(encoded); }); test('Function encoding with tuple', () => { - const encoded = new utils.Interface([ - 'function someFooWithTupleAndLargeNumbers((address,address,address,uint88,uint88,uint88,uint88,uint88,uint64,uint64,uint40,uint40,uint40,uint40,bool,bytes32),uint256,uint256,bytes32)', - ]).encodeFunctionData('someFooWithTupleAndLargeNumbers', [ + const args = [ [ '0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9', '0x7f63C82b83B9375c21efbEAd2010F003d7FAD746', @@ -62,7 +87,14 @@ test('Function encoding with tuple', () => { '40000000000000000000000000', '1000000000000000000', '0x1111111111111111111111111111111111111111111111111111111111111111', - ]); + ]; + const encoded = encodeFunctionData({ + functionName: 'someFooWithTupleAndLargeNumbers', + abi: parseAbiParameters( + 'function someFooWithTupleAndLargeNumbers((address,address,address,uint88,uint88,uint88,uint88,uint88,uint64,uint64,uint40,uint40,uint40,uint40,bool,bytes32),uint256,uint256,bytes32)', + ), + args, + }); expect( encodeFunction( 'someFooWithTupleAndLargeNumbers', @@ -74,25 +106,37 @@ test('Function encoding with tuple', () => { // TODO: This test cases would fail, which is known issue. We'll need to improve our implementation test.skip('Function encoding with [string="true"]', () => { - const encoded = new utils.Interface(['function foo(string)']).encodeFunctionData('foo', ['true']); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(string)'), + args: ['true'], + }); expect(encodeFunction('foo', 'string', 'true')).toEqual(encoded); }); test.skip('Function encoding with [string="false"]', () => { - const encoded = new utils.Interface(['function foo(string)']).encodeFunctionData('foo', [ - 'false', - ]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(string)'), + args: ['false'], + }); expect(encodeFunction('foo', 'string', 'false')).toEqual(encoded); }); test.skip('Function encoding with [string=""', () => { - const encoded = new utils.Interface(['function foo(string)']).encodeFunctionData('foo', ['']); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(string)'), + args: [''], + }); expect(encodeFunction('foo', 'string', '')).toEqual(encoded); }); test.skip('Function encoding with [string="hello, world"', () => { - const encoded = new utils.Interface(['function foo(string)']).encodeFunctionData('foo', [ - 'hello, world', - ]); + const encoded = encodeFunctionData({ + functionName: 'foo', + abi: parseAbiParameters('function foo(string)'), + args: ['hello, world'], + }); expect(encodeFunction('foo', 'string', 'hello, world')).toEqual(encoded); });