@safe-global/protocol-kit 4.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/Safe.d.ts +12 -17
- package/dist/src/Safe.js +159 -112
- package/dist/src/Safe.js.map +1 -1
- package/dist/src/SafeProvider.d.ts +11 -20
- package/dist/src/SafeProvider.js +141 -90
- package/dist/src/SafeProvider.js.map +1 -1
- package/dist/src/contracts/BaseContract.d.ts +26 -6
- package/dist/src/contracts/BaseContract.js +101 -14
- package/dist/src/contracts/BaseContract.js.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts +5 -4
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.js +3 -2
- package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.js.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.d.ts +4 -3
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.js +5 -5
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.d.ts +4 -3
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.js +5 -5
- package/dist/src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts +5 -4
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.js +3 -2
- package/dist/src/contracts/CreateCall/CreateCallBaseContract.js.map +1 -1
- package/dist/src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.d.ts +4 -3
- package/dist/src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.js +7 -9
- package/dist/src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1.d.ts +4 -3
- package/dist/src/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1.js +7 -9
- package/dist/src/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts +5 -4
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.js +3 -2
- package/dist/src/contracts/MultiSend/MultiSendBaseContract.js.map +1 -1
- package/dist/src/contracts/MultiSend/MultiSendCallOnlyBaseContract.d.ts +5 -4
- package/dist/src/contracts/MultiSend/MultiSendCallOnlyBaseContract.js +3 -2
- package/dist/src/contracts/MultiSend/MultiSendCallOnlyBaseContract.js.map +1 -1
- package/dist/src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.d.ts +4 -3
- package/dist/src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.js +5 -5
- package/dist/src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.js.map +1 -1
- package/dist/src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.d.ts +4 -3
- package/dist/src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.js +5 -5
- package/dist/src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.d.ts +4 -3
- package/dist/src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.js +5 -5
- package/dist/src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.d.ts +4 -3
- package/dist/src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.js +5 -5
- package/dist/src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.d.ts +4 -3
- package/dist/src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.js +5 -5
- package/dist/src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/Safe/SafeBaseContract.d.ts +5 -4
- package/dist/src/contracts/Safe/SafeBaseContract.js +3 -2
- package/dist/src/contracts/Safe/SafeBaseContract.js.map +1 -1
- package/dist/src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.d.ts +7 -11
- package/dist/src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.js +64 -42
- package/dist/src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.js.map +1 -1
- package/dist/src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.d.ts +4 -9
- package/dist/src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.js +61 -39
- package/dist/src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.js.map +1 -1
- package/dist/src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.d.ts +5 -10
- package/dist/src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.js +63 -41
- package/dist/src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.js.map +1 -1
- package/dist/src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.d.ts +5 -10
- package/dist/src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.js +63 -41
- package/dist/src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.d.ts +5 -10
- package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.js +63 -41
- package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.d.ts +5 -7
- package/dist/src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.js +3 -2
- package/dist/src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.js.map +1 -1
- package/dist/src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.d.ts +5 -11
- package/dist/src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.js +9 -38
- package/dist/src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.js.map +1 -1
- package/dist/src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.d.ts +6 -12
- package/dist/src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.js +12 -41
- package/dist/src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.js.map +1 -1
- package/dist/src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.d.ts +5 -11
- package/dist/src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.js +11 -40
- package/dist/src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.d.ts +5 -11
- package/dist/src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.js +10 -39
- package/dist/src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.d.ts +5 -7
- package/dist/src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.js +3 -2
- package/dist/src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.js.map +1 -1
- package/dist/src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.d.ts +4 -3
- package/dist/src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.js +9 -9
- package/dist/src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.js.map +1 -1
- package/dist/src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.d.ts +5 -7
- package/dist/src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.js +3 -2
- package/dist/src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.js.map +1 -1
- package/dist/src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.d.ts +4 -3
- package/dist/src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.js +8 -8
- package/dist/src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.js.map +1 -1
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts +5 -4
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.js +3 -2
- package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.js.map +1 -1
- package/dist/src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.d.ts +4 -3
- package/dist/src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.js +7 -8
- package/dist/src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.d.ts +4 -3
- package/dist/src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.js +7 -8
- package/dist/src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts +5 -4
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.js +3 -2
- package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.js.map +1 -1
- package/dist/src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.d.ts +4 -3
- package/dist/src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.js +9 -7
- package/dist/src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.js.map +1 -1
- package/dist/src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.d.ts +4 -3
- package/dist/src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.js +9 -7
- package/dist/src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.js.map +1 -1
- package/dist/src/contracts/config.d.ts +8 -1
- package/dist/src/contracts/config.js +47 -16
- package/dist/src/contracts/config.js.map +1 -1
- package/dist/src/contracts/constants.d.ts +4 -3
- package/dist/src/contracts/constants.js +2 -1
- package/dist/src/contracts/constants.js.map +1 -1
- package/dist/src/contracts/contractInstances.d.ts +13 -12
- package/dist/src/contracts/contractInstances.js +34 -34
- package/dist/src/contracts/contractInstances.js.map +1 -1
- package/dist/src/contracts/safeDeploymentContracts.d.ts +6 -5
- package/dist/src/contracts/safeDeploymentContracts.js +26 -66
- package/dist/src/contracts/safeDeploymentContracts.js.map +1 -1
- package/dist/src/contracts/utils.d.ts +35 -13
- package/dist/src/contracts/utils.js +136 -55
- package/dist/src/contracts/utils.js.map +1 -1
- package/dist/src/index.d.ts +10 -6
- package/dist/src/index.js +7 -9
- package/dist/src/index.js.map +1 -1
- package/dist/src/managers/contractManager.js +12 -17
- package/dist/src/managers/contractManager.js.map +1 -1
- package/dist/src/managers/fallbackHandlerManager.js +5 -4
- package/dist/src/managers/fallbackHandlerManager.js.map +1 -1
- package/dist/src/managers/guardManager.js +5 -4
- package/dist/src/managers/guardManager.js.map +1 -1
- package/dist/src/types/contracts.d.ts +13 -13
- package/dist/src/types/index.d.ts +0 -1
- package/dist/src/types/index.js +0 -1
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/safeConfig.d.ts +3 -1
- package/dist/src/types/safeProvider.d.ts +33 -5
- package/dist/src/types/transactions.d.ts +1 -1
- package/dist/src/utils/address.d.ts +1 -1
- package/dist/src/utils/address.js +1 -1
- package/dist/src/utils/address.js.map +1 -1
- package/dist/src/utils/block.d.ts +6 -0
- package/dist/src/utils/block.js +14 -0
- package/dist/src/utils/block.js.map +1 -0
- package/dist/src/utils/constants.d.ts +4 -3
- package/dist/src/utils/constants.js +2 -1
- package/dist/src/utils/constants.js.map +1 -1
- package/dist/src/utils/eip-3770/config.js +32 -1
- package/dist/src/utils/eip-3770/config.js.map +1 -1
- package/dist/src/utils/eip-3770/index.d.ts +1 -1
- package/dist/src/utils/eip-3770/index.js +2 -3
- package/dist/src/utils/eip-3770/index.js.map +1 -1
- package/dist/src/utils/eip-712/encode.d.ts +3 -0
- package/dist/src/utils/eip-712/encode.js +127 -0
- package/dist/src/utils/eip-712/encode.js.map +1 -0
- package/dist/src/utils/eip-712/index.d.ts +1 -1
- package/dist/src/utils/eip-712/index.js +5 -7
- package/dist/src/utils/eip-712/index.js.map +1 -1
- package/dist/src/utils/erc-20/index.d.ts +1 -1
- package/dist/src/utils/erc-20/index.js +12 -5
- package/dist/src/utils/erc-20/index.js.map +1 -1
- package/dist/src/utils/messages/SafeMessage.d.ts +1 -1
- package/dist/src/utils/passkeys/PasskeyClient.d.ts +5 -0
- package/dist/src/utils/passkeys/PasskeyClient.js +156 -0
- package/dist/src/utils/passkeys/PasskeyClient.js.map +1 -0
- package/dist/src/utils/passkeys/createPasskeyDeploymentTransaction.d.ts +2 -1
- package/dist/src/utils/passkeys/createPasskeyDeploymentTransaction.js +12 -12
- package/dist/src/utils/passkeys/createPasskeyDeploymentTransaction.js.map +1 -1
- package/dist/src/utils/passkeys/extractPasskeyData.d.ts +1 -2
- package/dist/src/utils/passkeys/extractPasskeyData.js +8 -15
- package/dist/src/utils/passkeys/extractPasskeyData.js.map +1 -1
- package/dist/src/utils/passkeys/getPasskeyOwnerAddress.js +10 -3
- package/dist/src/utils/passkeys/getPasskeyOwnerAddress.js.map +1 -1
- package/dist/src/utils/passkeys/index.d.ts +1 -1
- package/dist/src/utils/passkeys/index.js +1 -1
- package/dist/src/utils/passkeys/isSharedSigner.d.ts +2 -3
- package/dist/src/utils/passkeys/isSharedSigner.js +6 -5
- package/dist/src/utils/passkeys/isSharedSigner.js.map +1 -1
- package/dist/src/utils/provider.d.ts +3 -0
- package/dist/src/utils/provider.js +12 -0
- package/dist/src/utils/provider.js.map +1 -0
- package/dist/src/utils/safeVersions.js +2 -2
- package/dist/src/utils/safeVersions.js.map +1 -1
- package/dist/src/utils/signatures/SafeSignature.d.ts +1 -1
- package/dist/src/utils/signatures/utils.d.ts +4 -4
- package/dist/src/utils/signatures/utils.js +34 -20
- package/dist/src/utils/signatures/utils.js.map +1 -1
- package/dist/src/utils/transactions/SafeTransaction.d.ts +1 -1
- package/dist/src/utils/transactions/SafeTransaction.js.map +1 -1
- package/dist/src/utils/transactions/gas.d.ts +1 -1
- package/dist/src/utils/transactions/gas.js +37 -64
- package/dist/src/utils/transactions/gas.js.map +1 -1
- package/dist/src/utils/transactions/types.d.ts +17 -1
- package/dist/src/utils/transactions/utils.d.ts +11 -2
- package/dist/src/utils/transactions/utils.js +117 -27
- package/dist/src/utils/transactions/utils.js.map +1 -1
- package/dist/src/utils/types.d.ts +4 -0
- package/dist/src/utils/types.js +59 -1
- package/dist/src/utils/types.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +26 -35
- package/dist/src/SafeFactory.d.ts +0 -15
- package/dist/src/SafeFactory.js +0 -136
- package/dist/src/SafeFactory.js.map +0 -1
- package/dist/src/types/safeFactory.d.ts +0 -31
- package/dist/src/types/safeFactory.js +0 -3
- package/dist/src/types/safeFactory.js.map +0 -1
- package/dist/src/utils/passkeys/PasskeySigner.d.ts +0 -63
- package/dist/src/utils/passkeys/PasskeySigner.js +0 -163
- package/dist/src/utils/passkeys/PasskeySigner.js.map +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Abi } from 'abitype';
|
|
2
|
-
import {
|
|
2
|
+
import { ContractFunctionName, ContractFunctionArgs, Transport, WalletClient, Hash, Chain } from 'viem';
|
|
3
3
|
import { contractName } from '../contracts/config';
|
|
4
|
+
import { DeploymentType } from '../types';
|
|
4
5
|
import SafeProvider from '../SafeProvider';
|
|
5
|
-
import { EncodeFunction, EstimateGasFunction, GetAddressFunction, SafeVersion } from '@safe-global/
|
|
6
|
+
import { EncodeFunction, EstimateGasFunction, GetAddressFunction, SafeVersion, TransactionOptions } from '@safe-global/types-kit';
|
|
7
|
+
import { WalletTransactionOptions, WalletLegacyTransactionOptions } from '../utils';
|
|
8
|
+
import { ExternalClient } from '../types';
|
|
6
9
|
/**
|
|
7
10
|
* Abstract class BaseContract
|
|
8
11
|
* It is designed to be instantiated for different contracts.
|
|
@@ -18,14 +21,16 @@ import { EncodeFunction, EstimateGasFunction, GetAddressFunction, SafeVersion }
|
|
|
18
21
|
* - CreateCallBaseContract<CreateCallContractAbiType> extends BaseContract<CreateCallContractAbiType>
|
|
19
22
|
* - SafeProxyFactoryBaseContract<SafeProxyFactoryContractAbiType> extends BaseContract<SafeProxyFactoryContractAbiType>
|
|
20
23
|
*/
|
|
21
|
-
declare class BaseContract<ContractAbiType extends
|
|
24
|
+
declare class BaseContract<ContractAbiType extends Abi> {
|
|
25
|
+
#private;
|
|
22
26
|
contractAbi: ContractAbiType;
|
|
23
27
|
contractAddress: string;
|
|
24
28
|
contractName: contractName;
|
|
25
29
|
safeVersion: SafeVersion;
|
|
26
30
|
safeProvider: SafeProvider;
|
|
27
|
-
|
|
28
|
-
runner
|
|
31
|
+
chainId: bigint;
|
|
32
|
+
runner: ExternalClient;
|
|
33
|
+
wallet?: WalletClient<Transport, Chain | undefined>;
|
|
29
34
|
/**
|
|
30
35
|
* @constructor
|
|
31
36
|
* Constructs an instance of BaseContract.
|
|
@@ -37,11 +42,26 @@ declare class BaseContract<ContractAbiType extends InterfaceAbi & Abi> {
|
|
|
37
42
|
* @param safeVersion - The version of the Safe contract.
|
|
38
43
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
39
44
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
45
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
40
46
|
*/
|
|
41
|
-
constructor(contractName: contractName, chainId: bigint, safeProvider: SafeProvider, defaultAbi: ContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: ContractAbiType,
|
|
47
|
+
constructor(contractName: contractName, chainId: bigint, safeProvider: SafeProvider, defaultAbi: ContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: ContractAbiType, deploymentType?: DeploymentType);
|
|
42
48
|
init(): Promise<void>;
|
|
49
|
+
getTransactionReceipt(hash: Hash): Promise<import("viem").TransactionReceipt<bigint, number, "success" | "reverted", import("viem").TransactionType>>;
|
|
50
|
+
/**
|
|
51
|
+
* Converts a type of TransactionOptions to a viem transaction type. The viem transaction type creates a clear distinction between the multiple transaction objects (e.g., post-London hard fork) and doesn't allow a union of fields.
|
|
52
|
+
* See: https://github.com/wevm/viem/blob/viem%402.18.0/src/types/fee.ts and https://github.com/wevm/viem/blob/603227e2588366914fb79a902d23fd9afc353cc6/src/types/transaction.ts#L200
|
|
53
|
+
*
|
|
54
|
+
* @param options - Transaction options as expected throughout safe sdk and propagated on the results.
|
|
55
|
+
*
|
|
56
|
+
* @returns Options object compatible with Viem
|
|
57
|
+
*/
|
|
58
|
+
convertOptions(options?: TransactionOptions): WalletTransactionOptions | WalletLegacyTransactionOptions;
|
|
59
|
+
getChain(): Chain | undefined;
|
|
43
60
|
getAddress: GetAddressFunction;
|
|
44
61
|
encode: EncodeFunction<ContractAbiType>;
|
|
45
62
|
estimateGas: EstimateGasFunction<ContractAbiType>;
|
|
63
|
+
getWallet(): WalletClient<Transport, Chain | undefined>;
|
|
64
|
+
write<functionName extends ContractFunctionName<ContractAbiType, 'payable' | 'nonpayable'>, functionArgs extends ContractFunctionArgs<ContractAbiType, 'payable' | 'nonpayable', functionName>>(functionName: functionName, args: functionArgs, options?: TransactionOptions): Promise<`0x${string}`>;
|
|
65
|
+
read<functionName extends ContractFunctionName<ContractAbiType, 'pure' | 'view'>, functionArgs extends ContractFunctionArgs<ContractAbiType, 'pure' | 'view', functionName>>(functionName: functionName, args?: functionArgs): Promise<import("viem").ContractFunctionReturnType<ContractAbiType, "pure" | "view", functionName, ContractFunctionArgs<ContractAbiType, "pure" | "view", functionName>>>;
|
|
46
66
|
}
|
|
47
67
|
export default BaseContract;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _BaseContract_instances, _BaseContract_resolveAddress;
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
9
|
+
const viem_1 = require("viem");
|
|
10
|
+
const actions_1 = require("viem/actions");
|
|
4
11
|
const config_1 = require("../contracts/config");
|
|
12
|
+
const types_1 = require("../utils/types");
|
|
13
|
+
const utils_1 = require("../utils");
|
|
5
14
|
/**
|
|
6
15
|
* Abstract class BaseContract
|
|
7
16
|
* It is designed to be instantiated for different contracts.
|
|
@@ -29,38 +38,116 @@ class BaseContract {
|
|
|
29
38
|
* @param safeVersion - The version of the Safe contract.
|
|
30
39
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
31
40
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
41
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
32
42
|
*/
|
|
33
|
-
constructor(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi,
|
|
43
|
+
constructor(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
44
|
+
_BaseContract_instances.add(this);
|
|
34
45
|
this.getAddress = () => {
|
|
35
|
-
return this.
|
|
46
|
+
return this.contractAddress;
|
|
36
47
|
};
|
|
37
48
|
this.encode = (functionToEncode, args) => {
|
|
38
|
-
|
|
49
|
+
const abi = this.contractAbi;
|
|
50
|
+
const functionName = functionToEncode;
|
|
51
|
+
const params = args;
|
|
52
|
+
return (0, viem_1.encodeFunctionData)({
|
|
53
|
+
abi,
|
|
54
|
+
functionName,
|
|
55
|
+
args: params
|
|
56
|
+
});
|
|
39
57
|
};
|
|
40
|
-
this.estimateGas = (functionToEstimate, args, options = {}) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
58
|
+
this.estimateGas = async (functionToEstimate, args, options = {}) => {
|
|
59
|
+
const contractOptions = this.convertOptions(options);
|
|
60
|
+
const abi = this.contractAbi;
|
|
61
|
+
const params = args;
|
|
62
|
+
return (0, actions_1.estimateContractGas)(this.runner, {
|
|
63
|
+
abi,
|
|
64
|
+
functionName: functionToEstimate,
|
|
65
|
+
address: this.getAddress(),
|
|
66
|
+
args: params,
|
|
67
|
+
...contractOptions
|
|
68
|
+
});
|
|
43
69
|
};
|
|
44
70
|
const deployment = (0, config_1.getContractDeployment)(safeVersion, chainId, contractName);
|
|
45
|
-
const
|
|
46
|
-
deployment?.networkAddresses[chainId.toString()]
|
|
47
|
-
|
|
48
|
-
if (!contractAddress) {
|
|
71
|
+
const resolvedAddress = customContractAddress ??
|
|
72
|
+
__classPrivateFieldGet(this, _BaseContract_instances, "m", _BaseContract_resolveAddress).call(this, deployment?.networkAddresses[chainId.toString()], deployment, deploymentType);
|
|
73
|
+
if (!resolvedAddress) {
|
|
49
74
|
throw new Error(`Invalid ${contractName.replace('Version', '')} contract address`);
|
|
50
75
|
}
|
|
76
|
+
this.chainId = chainId;
|
|
51
77
|
this.contractName = contractName;
|
|
52
78
|
this.safeVersion = safeVersion;
|
|
53
|
-
this.contractAddress =
|
|
79
|
+
this.contractAddress = resolvedAddress;
|
|
54
80
|
this.contractAbi =
|
|
55
81
|
customContractAbi ||
|
|
56
82
|
deployment?.abi || // this cast is required because abi is set as any[] in safe-deployments
|
|
57
83
|
defaultAbi; // if no customAbi and no abi is present in the safe-deployments we use our hardcoded abi
|
|
58
|
-
this.runner =
|
|
84
|
+
this.runner = safeProvider.getExternalProvider();
|
|
59
85
|
this.safeProvider = safeProvider;
|
|
60
86
|
}
|
|
61
87
|
async init() {
|
|
62
|
-
this.
|
|
88
|
+
this.wallet = await this.safeProvider.getExternalSigner();
|
|
89
|
+
}
|
|
90
|
+
async getTransactionReceipt(hash) {
|
|
91
|
+
return (0, actions_1.getTransactionReceipt)(this.runner, { hash });
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Converts a type of TransactionOptions to a viem transaction type. The viem transaction type creates a clear distinction between the multiple transaction objects (e.g., post-London hard fork) and doesn't allow a union of fields.
|
|
95
|
+
* See: https://github.com/wevm/viem/blob/viem%402.18.0/src/types/fee.ts and https://github.com/wevm/viem/blob/603227e2588366914fb79a902d23fd9afc353cc6/src/types/transaction.ts#L200
|
|
96
|
+
*
|
|
97
|
+
* @param options - Transaction options as expected throughout safe sdk and propagated on the results.
|
|
98
|
+
*
|
|
99
|
+
* @returns Options object compatible with Viem
|
|
100
|
+
*/
|
|
101
|
+
convertOptions(options) {
|
|
102
|
+
const chain = this.getChain();
|
|
103
|
+
if (!chain)
|
|
104
|
+
throw new Error('Invalid chainId');
|
|
105
|
+
const account = this.getWallet().account;
|
|
106
|
+
if (!account)
|
|
107
|
+
throw new Error('Invalid signer');
|
|
108
|
+
const txOptions = (0, utils_1.convertTransactionOptions)(options);
|
|
109
|
+
return { chain, ...txOptions, account }; // Needs to be in this order to override the `account` if necessary
|
|
110
|
+
}
|
|
111
|
+
getChain() {
|
|
112
|
+
return (0, types_1.getChainById)(this.chainId);
|
|
113
|
+
}
|
|
114
|
+
getWallet() {
|
|
115
|
+
if (!this.wallet)
|
|
116
|
+
throw new Error('A signer must be set');
|
|
117
|
+
return this.wallet;
|
|
118
|
+
}
|
|
119
|
+
async write(functionName, args, options) {
|
|
120
|
+
const converted = this.convertOptions(options);
|
|
121
|
+
return await this.getWallet().writeContract({
|
|
122
|
+
address: this.contractAddress,
|
|
123
|
+
abi: this.contractAbi,
|
|
124
|
+
functionName,
|
|
125
|
+
args,
|
|
126
|
+
...converted
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
async read(functionName, args) {
|
|
130
|
+
return await this.runner.readContract({
|
|
131
|
+
functionName,
|
|
132
|
+
abi: this.contractAbi,
|
|
133
|
+
address: this.contractAddress,
|
|
134
|
+
args
|
|
135
|
+
});
|
|
63
136
|
}
|
|
64
137
|
}
|
|
138
|
+
_BaseContract_instances = new WeakSet(), _BaseContract_resolveAddress = function _BaseContract_resolveAddress(networkAddresses, deployment, deploymentType) {
|
|
139
|
+
if (!networkAddresses) {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
if (typeof networkAddresses === 'string') {
|
|
143
|
+
return networkAddresses;
|
|
144
|
+
}
|
|
145
|
+
if (deploymentType) {
|
|
146
|
+
const customDeploymentTypeAddress = deployment.deployments[deploymentType]?.address;
|
|
147
|
+
return (networkAddresses.find((address) => address === customDeploymentTypeAddress) ??
|
|
148
|
+
networkAddresses[0]);
|
|
149
|
+
}
|
|
150
|
+
return networkAddresses[0];
|
|
151
|
+
};
|
|
65
152
|
exports.default = BaseContract;
|
|
66
153
|
//# sourceMappingURL=BaseContract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseContract.js","sourceRoot":"","sources":["../../../src/contracts/BaseContract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseContract.js","sourceRoot":"","sources":["../../../src/contracts/BaseContract.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Abi } from 'abitype';
|
|
2
|
-
import { ContractRunner, InterfaceAbi } from 'ethers';
|
|
3
2
|
import SafeProvider from '../../SafeProvider';
|
|
4
3
|
import BaseContract from '../../contracts/BaseContract';
|
|
5
|
-
import {
|
|
4
|
+
import { DeploymentType } from '../../types';
|
|
5
|
+
import { SafeVersion } from '@safe-global/types-kit';
|
|
6
6
|
import { contractName } from '../../contracts/config';
|
|
7
7
|
/**
|
|
8
8
|
* Abstract class CompatibilityFallbackHandlerBaseContract extends BaseContract to specifically integrate with the CompatibilityFallbackHandler contract.
|
|
@@ -17,7 +17,7 @@ import { contractName } from '../../contracts/config';
|
|
|
17
17
|
* - CompatibilityFallbackHandlerContract_v1_4_1 extends CompatibilityFallbackHandlerBaseContract<CompatibilityFallbackHandlerContract_v1_4_1_Abi>
|
|
18
18
|
* - CompatibilityFallbackHandlerContract_v1_3_0 extends CompatibilityFallbackHandlerBaseContract<CompatibilityFallbackHandlerContract_v1_3_0_Abi>
|
|
19
19
|
*/
|
|
20
|
-
declare abstract class CompatibilityFallbackHandlerBaseContract<CompatibilityFallbackHandlerContractAbiType extends
|
|
20
|
+
declare abstract class CompatibilityFallbackHandlerBaseContract<CompatibilityFallbackHandlerContractAbiType extends Abi> extends BaseContract<CompatibilityFallbackHandlerContractAbiType> {
|
|
21
21
|
contractName: contractName;
|
|
22
22
|
/**
|
|
23
23
|
* @constructor
|
|
@@ -29,7 +29,8 @@ declare abstract class CompatibilityFallbackHandlerBaseContract<CompatibilityFal
|
|
|
29
29
|
* @param safeVersion - The version of the Safe contract.
|
|
30
30
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
31
31
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
32
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
32
33
|
*/
|
|
33
|
-
constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: CompatibilityFallbackHandlerContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: CompatibilityFallbackHandlerContractAbiType,
|
|
34
|
+
constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: CompatibilityFallbackHandlerContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: CompatibilityFallbackHandlerContractAbiType, deploymentType?: DeploymentType);
|
|
34
35
|
}
|
|
35
36
|
export default CompatibilityFallbackHandlerBaseContract;
|
package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.js
CHANGED
|
@@ -28,10 +28,11 @@ class CompatibilityFallbackHandlerBaseContract extends BaseContract_1.default {
|
|
|
28
28
|
* @param safeVersion - The version of the Safe contract.
|
|
29
29
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
30
30
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
31
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
31
32
|
*/
|
|
32
|
-
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi,
|
|
33
|
+
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
33
34
|
const contractName = 'compatibilityFallbackHandler';
|
|
34
|
-
super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi,
|
|
35
|
+
super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
|
|
35
36
|
this.contractName = contractName;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompatibilityFallbackHandlerBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"CompatibilityFallbackHandlerBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.ts"],"names":[],"mappings":";;;;;AAGA,oGAA2E;AAK3E;;;;;;;;;;;;GAYG;AACH,MAAe,wCAEb,SAAQ,sBAAyD;IAGjE;;;;;;;;;;;OAWG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAuD,EACvD,WAAwB,EACxB,qBAA8B,EAC9B,iBAA+D,EAC/D,cAA+B;QAE/B,MAAM,YAAY,GAAG,8BAA8B,CAAA;QAEnD,KAAK,CACH,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;CACF;AAED,kBAAe,wCAAwC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import CompatibilityFallbackHandlerBaseContract from '../../../contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract';
|
|
2
2
|
import SafeProvider from '../../../SafeProvider';
|
|
3
|
-
import {
|
|
3
|
+
import { DeploymentType } from '../../../types';
|
|
4
|
+
import { CompatibilityFallbackHandlerContract_v1_3_0_Abi, CompatibilityFallbackHandlerContract_v1_3_0_Contract } from '@safe-global/types-kit';
|
|
4
5
|
/**
|
|
5
6
|
* CompatibilityFallbackHandlerContract_v1_3_0 is the implementation specific to the CompatibilityFallbackHandler contract version 1.3.0.
|
|
6
7
|
*
|
|
@@ -10,7 +11,6 @@ import { SafeVersion, CompatibilityFallbackHandlerContract_v1_3_0_Abi, Compatibi
|
|
|
10
11
|
* @implements CompatibilityFallbackHandlerContract_v1_3_0_Contract - Implements the interface specific to CompatibilityFallbackHandler contract version 1.3.0.
|
|
11
12
|
*/
|
|
12
13
|
declare class CompatibilityFallbackHandlerContract_v1_3_0 extends CompatibilityFallbackHandlerBaseContract<CompatibilityFallbackHandlerContract_v1_3_0_Abi> implements CompatibilityFallbackHandlerContract_v1_3_0_Contract {
|
|
13
|
-
safeVersion: SafeVersion;
|
|
14
14
|
/**
|
|
15
15
|
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_3_0
|
|
16
16
|
*
|
|
@@ -18,7 +18,8 @@ declare class CompatibilityFallbackHandlerContract_v1_3_0 extends CompatibilityF
|
|
|
18
18
|
* @param safeProvider - An instance of SafeProvider.
|
|
19
19
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CompatibilityFallbackHandler deployments based on the chainId and safeVersion.
|
|
20
20
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.3.0 is used.
|
|
21
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
21
22
|
*/
|
|
22
|
-
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CompatibilityFallbackHandlerContract_v1_3_0_Abi);
|
|
23
|
+
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CompatibilityFallbackHandlerContract_v1_3_0_Abi, deploymentType?: DeploymentType);
|
|
23
24
|
}
|
|
24
25
|
export default CompatibilityFallbackHandlerContract_v1_3_0;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const CompatibilityFallbackHandlerBaseContract_1 = __importDefault(require("../../../contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract"));
|
|
7
|
-
const
|
|
7
|
+
const types_kit_1 = require("@safe-global/types-kit");
|
|
8
8
|
/**
|
|
9
9
|
* CompatibilityFallbackHandlerContract_v1_3_0 is the implementation specific to the CompatibilityFallbackHandler contract version 1.3.0.
|
|
10
10
|
*
|
|
@@ -21,12 +21,12 @@ class CompatibilityFallbackHandlerContract_v1_3_0 extends CompatibilityFallbackH
|
|
|
21
21
|
* @param safeProvider - An instance of SafeProvider.
|
|
22
22
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CompatibilityFallbackHandler deployments based on the chainId and safeVersion.
|
|
23
23
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.3.0 is used.
|
|
24
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
24
25
|
*/
|
|
25
|
-
constructor(chainId, safeProvider, customContractAddress, customContractAbi) {
|
|
26
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
26
27
|
const safeVersion = '1.3.0';
|
|
27
|
-
const defaultAbi =
|
|
28
|
-
super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
|
|
29
|
-
this.safeVersion = safeVersion;
|
|
28
|
+
const defaultAbi = types_kit_1.compatibilityFallbackHandler_1_3_0_ContractArtifacts.abi;
|
|
29
|
+
super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.default = CompatibilityFallbackHandlerContract_v1_3_0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompatibilityFallbackHandlerContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,yLAAgK;
|
|
1
|
+
{"version":3,"file":"CompatibilityFallbackHandlerContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,yLAAgK;AAGhK,sDAI+B;AAE/B;;;;;;;GAOG;AACH,MAAM,2CACJ,SAAQ,kDAAyF;IAGjG;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAmE,EACnE,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,gEAAoD,CAAC,GAAG,CAAA;QAE3E,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;IACH,CAAC;CACF;AAED,kBAAe,2CAA2C,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import CompatibilityFallbackHandlerBaseContract from '../../../contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract';
|
|
2
2
|
import SafeProvider from '../../../SafeProvider';
|
|
3
|
-
import {
|
|
3
|
+
import { DeploymentType } from '../../../types';
|
|
4
|
+
import { CompatibilityFallbackHandlerContract_v1_4_1_Abi, CompatibilityFallbackHandlerContract_v1_4_1_Contract } from '@safe-global/types-kit';
|
|
4
5
|
/**
|
|
5
6
|
* CompatibilityFallbackHandlerContract_v1_4_1 is the implementation specific to the CompatibilityFallbackHandler contract version 1.4.1.
|
|
6
7
|
*
|
|
@@ -10,7 +11,6 @@ import { CompatibilityFallbackHandlerContract_v1_4_1_Abi, CompatibilityFallbackH
|
|
|
10
11
|
* @implements CompatibilityFallbackHandlerContract_v1_4_1_Contract - Implements the interface specific to CompatibilityFallbackHandler contract version 1.4.1.
|
|
11
12
|
*/
|
|
12
13
|
declare class CompatibilityFallbackHandlerContract_v1_4_1 extends CompatibilityFallbackHandlerBaseContract<CompatibilityFallbackHandlerContract_v1_4_1_Abi> implements CompatibilityFallbackHandlerContract_v1_4_1_Contract {
|
|
13
|
-
safeVersion: SafeVersion;
|
|
14
14
|
/**
|
|
15
15
|
* Constructs an instance of CompatibilityFallbackHandlerContract_v1_4_1
|
|
16
16
|
*
|
|
@@ -18,7 +18,8 @@ declare class CompatibilityFallbackHandlerContract_v1_4_1 extends CompatibilityF
|
|
|
18
18
|
* @param safeProvider - An instance of SafeProvider.
|
|
19
19
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CompatibilityFallbackHandler deployments based on the chainId and safeVersion.
|
|
20
20
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.4.1 is used.
|
|
21
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
21
22
|
*/
|
|
22
|
-
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CompatibilityFallbackHandlerContract_v1_4_1_Abi);
|
|
23
|
+
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CompatibilityFallbackHandlerContract_v1_4_1_Abi, deploymentType?: DeploymentType);
|
|
23
24
|
}
|
|
24
25
|
export default CompatibilityFallbackHandlerContract_v1_4_1;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const CompatibilityFallbackHandlerBaseContract_1 = __importDefault(require("../../../contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract"));
|
|
7
|
-
const
|
|
7
|
+
const types_kit_1 = require("@safe-global/types-kit");
|
|
8
8
|
/**
|
|
9
9
|
* CompatibilityFallbackHandlerContract_v1_4_1 is the implementation specific to the CompatibilityFallbackHandler contract version 1.4.1.
|
|
10
10
|
*
|
|
@@ -21,12 +21,12 @@ class CompatibilityFallbackHandlerContract_v1_4_1 extends CompatibilityFallbackH
|
|
|
21
21
|
* @param safeProvider - An instance of SafeProvider.
|
|
22
22
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CompatibilityFallbackHandler deployments based on the chainId and safeVersion.
|
|
23
23
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.4.1 is used.
|
|
24
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
24
25
|
*/
|
|
25
|
-
constructor(chainId, safeProvider, customContractAddress, customContractAbi) {
|
|
26
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
26
27
|
const safeVersion = '1.4.1';
|
|
27
|
-
const defaultAbi =
|
|
28
|
-
super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
|
|
29
|
-
this.safeVersion = safeVersion;
|
|
28
|
+
const defaultAbi = types_kit_1.compatibilityFallbackHandler_1_4_1_ContractArtifacts.abi;
|
|
29
|
+
super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.default = CompatibilityFallbackHandlerContract_v1_4_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompatibilityFallbackHandlerContract_v1_4_1.js","sourceRoot":"","sources":["../../../../../src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.ts"],"names":[],"mappings":";;;;;AAAA,yLAAgK;
|
|
1
|
+
{"version":3,"file":"CompatibilityFallbackHandlerContract_v1_4_1.js","sourceRoot":"","sources":["../../../../../src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.ts"],"names":[],"mappings":";;;;;AAAA,yLAAgK;AAGhK,sDAI+B;AAE/B;;;;;;;GAOG;AACH,MAAM,2CACJ,SAAQ,kDAAyF;IAGjG;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAmE,EACnE,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,gEAAoD,CAAC,GAAG,CAAA;QAE3E,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;IACH,CAAC;CACF;AAED,kBAAe,2CAA2C,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Abi } from 'abitype';
|
|
2
|
-
import { ContractRunner, InterfaceAbi } from 'ethers';
|
|
3
2
|
import SafeProvider from '../../SafeProvider';
|
|
3
|
+
import { DeploymentType } from '../../types';
|
|
4
4
|
import BaseContract from '../../contracts/BaseContract';
|
|
5
|
-
import { SafeVersion } from '@safe-global/
|
|
5
|
+
import { SafeVersion } from '@safe-global/types-kit';
|
|
6
6
|
import { contractName } from '../../contracts/config';
|
|
7
7
|
/**
|
|
8
8
|
* Abstract class CreateCallBaseContract extends BaseContract to specifically integrate with the CreateCall contract.
|
|
@@ -17,7 +17,7 @@ import { contractName } from '../../contracts/config';
|
|
|
17
17
|
* - CreateCallContract_v1_4_1 extends CreateCallBaseContract<CreateCallContract_v1_4_1_Abi>
|
|
18
18
|
* - CreateCallContract_v1_3_0 extends CreateCallBaseContract<CreateCallContract_v1_3_0_Abi>
|
|
19
19
|
*/
|
|
20
|
-
declare abstract class CreateCallBaseContract<CreateCallContractAbiType extends
|
|
20
|
+
declare abstract class CreateCallBaseContract<CreateCallContractAbiType extends Abi> extends BaseContract<CreateCallContractAbiType> {
|
|
21
21
|
contractName: contractName;
|
|
22
22
|
/**
|
|
23
23
|
* @constructor
|
|
@@ -29,7 +29,8 @@ declare abstract class CreateCallBaseContract<CreateCallContractAbiType extends
|
|
|
29
29
|
* @param safeVersion - The version of the Safe contract.
|
|
30
30
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
31
31
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
32
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
32
33
|
*/
|
|
33
|
-
constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: CreateCallContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: CreateCallContractAbiType,
|
|
34
|
+
constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: CreateCallContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: CreateCallContractAbiType, deploymentType?: DeploymentType);
|
|
34
35
|
}
|
|
35
36
|
export default CreateCallBaseContract;
|
|
@@ -28,10 +28,11 @@ class CreateCallBaseContract extends BaseContract_1.default {
|
|
|
28
28
|
* @param safeVersion - The version of the Safe contract.
|
|
29
29
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the Safe deployments based on the chainId and safeVersion.
|
|
30
30
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
|
|
31
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
31
32
|
*/
|
|
32
|
-
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi,
|
|
33
|
+
constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
|
|
33
34
|
const contractName = 'createCallVersion';
|
|
34
|
-
super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi,
|
|
35
|
+
super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
|
|
35
36
|
this.contractName = contractName;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateCallBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/CreateCall/CreateCallBaseContract.ts"],"names":[],"mappings":";;;;;AAIA,oGAA2E;AAI3E;;;;;;;;;;;;GAYG;AACH,MAAe,sBAEb,SAAQ,sBAAuC;IAG/C
|
|
1
|
+
{"version":3,"file":"CreateCallBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/CreateCall/CreateCallBaseContract.ts"],"names":[],"mappings":";;;;;AAIA,oGAA2E;AAI3E;;;;;;;;;;;;GAYG;AACH,MAAe,sBAEb,SAAQ,sBAAuC;IAG/C;;;;;;;;;;;OAWG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAqC,EACrC,WAAwB,EACxB,qBAA8B,EAC9B,iBAA6C,EAC7C,cAA+B;QAE/B,MAAM,YAAY,GAAG,mBAAmB,CAAA;QAExC,KAAK,CACH,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;CACF;AAED,kBAAe,sBAAsB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import CreateCallBaseContract from '../../../contracts/CreateCall/CreateCallBaseContract';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateCallContract_v1_3_0_Abi, CreateCallContract_v1_3_0_Contract, SafeContractFunction } from '@safe-global/types-kit';
|
|
3
3
|
import SafeProvider from '../../../SafeProvider';
|
|
4
|
+
import { DeploymentType } from '../../../types';
|
|
4
5
|
/**
|
|
5
6
|
* CreateCallContract_v1_3_0 is the implementation specific to the CreateCall contract version 1.3.0.
|
|
6
7
|
*
|
|
@@ -10,7 +11,6 @@ import SafeProvider from '../../../SafeProvider';
|
|
|
10
11
|
* @implements CreateCallContract_v1_3_0_Contract - Implements the interface specific to CreateCall contract version 1.3.0.
|
|
11
12
|
*/
|
|
12
13
|
declare class CreateCallContract_v1_3_0 extends CreateCallBaseContract<CreateCallContract_v1_3_0_Abi> implements CreateCallContract_v1_3_0_Contract {
|
|
13
|
-
safeVersion: SafeVersion;
|
|
14
14
|
/**
|
|
15
15
|
* Constructs an instance of CreateCallContract_v1_3_0
|
|
16
16
|
*
|
|
@@ -18,8 +18,9 @@ declare class CreateCallContract_v1_3_0 extends CreateCallBaseContract<CreateCal
|
|
|
18
18
|
* @param safeProvider - An instance of SafeProvider.
|
|
19
19
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CreateCall deployments based on the chainId and safeVersion.
|
|
20
20
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.3.0 is used.
|
|
21
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
21
22
|
*/
|
|
22
|
-
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CreateCallContract_v1_3_0_Abi);
|
|
23
|
+
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CreateCallContract_v1_3_0_Abi, deploymentType?: DeploymentType);
|
|
23
24
|
/**
|
|
24
25
|
* @param args - Array[value, deploymentData]
|
|
25
26
|
* @param options - TransactionOptions
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const CreateCallBaseContract_1 = __importDefault(require("../../../contracts/CreateCall/CreateCallBaseContract"));
|
|
7
|
-
const
|
|
7
|
+
const types_kit_1 = require("@safe-global/types-kit");
|
|
8
8
|
const utils_1 = require("../../../contracts/utils");
|
|
9
9
|
/**
|
|
10
10
|
* CreateCallContract_v1_3_0 is the implementation specific to the CreateCall contract version 1.3.0.
|
|
@@ -22,11 +22,12 @@ class CreateCallContract_v1_3_0 extends CreateCallBaseContract_1.default {
|
|
|
22
22
|
* @param safeProvider - An instance of SafeProvider.
|
|
23
23
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CreateCall deployments based on the chainId and safeVersion.
|
|
24
24
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.3.0 is used.
|
|
25
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
25
26
|
*/
|
|
26
|
-
constructor(chainId, safeProvider, customContractAddress, customContractAbi) {
|
|
27
|
+
constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
|
|
27
28
|
const safeVersion = '1.3.0';
|
|
28
|
-
const defaultAbi =
|
|
29
|
-
super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
|
|
29
|
+
const defaultAbi = types_kit_1.createCall_1_3_0_ContractArtifacts.abi;
|
|
30
|
+
super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
|
|
30
31
|
/**
|
|
31
32
|
* @param args - Array[value, deploymentData]
|
|
32
33
|
* @param options - TransactionOptions
|
|
@@ -36,8 +37,7 @@ class CreateCallContract_v1_3_0 extends CreateCallBaseContract_1.default {
|
|
|
36
37
|
if (options && !options.gasLimit) {
|
|
37
38
|
options.gasLimit = (await this.estimateGas('performCreate', [...args], { ...options })).toString();
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
return (0, utils_1.toTxResult)(txResponse, options);
|
|
40
|
+
return (0, utils_1.toTxResult)(this.runner, await this.write('performCreate', args, options), options);
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* @param args - Array[value, deploymentData, salt]
|
|
@@ -48,10 +48,8 @@ class CreateCallContract_v1_3_0 extends CreateCallBaseContract_1.default {
|
|
|
48
48
|
if (options && !options.gasLimit) {
|
|
49
49
|
options.gasLimit = (await this.estimateGas('performCreate2', args, options)).toString();
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
return (0, utils_1.toTxResult)(txResponse, options);
|
|
51
|
+
return (0, utils_1.toTxResult)(this.runner, await this.write('performCreate2', args, options), options);
|
|
53
52
|
};
|
|
54
|
-
this.safeVersion = safeVersion;
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
exports.default = CreateCallContract_v1_3_0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateCallContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,mIAA0G;AAC1G,
|
|
1
|
+
{"version":3,"file":"CreateCallContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,mIAA0G;AAC1G,sDAK+B;AAC/B,qEAAsE;AAItE;;;;;;;GAOG;AACH,MAAM,yBACJ,SAAQ,gCAAqD;IAG7D;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAiD,EACjD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,8CAAkC,CAAC,GAAG,CAAA;QAEzD,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;;WAIG;QACH,kBAAa,GAAyE,KAAK,EACzF,IAAI,EACJ,OAAO,EACP,EAAE;YACF,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,CACjB,MAAM,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CACnE,CAAC,QAAQ,EAAE,CAAA;YACd,CAAC;YAED,OAAO,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;QAC5F,CAAC,CAAA;QAED;;;;WAIG;QACH,mBAAc,GAA0E,KAAK,EAC3F,IAAI,EACJ,OAAO,EACP,EAAE;YACF,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;YACzF,CAAC;YAED,OAAO,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;QAC7F,CAAC,CAAA;IAlCD,CAAC;CAmCF;AAED,kBAAe,yBAAyB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import CreateCallBaseContract from '../../../contracts/CreateCall/CreateCallBaseContract';
|
|
2
2
|
import SafeProvider from '../../../SafeProvider';
|
|
3
|
-
import {
|
|
3
|
+
import { DeploymentType } from '../../../types';
|
|
4
|
+
import { CreateCallContract_v1_4_1_Abi, CreateCallContract_v1_4_1_Contract, SafeContractFunction } from '@safe-global/types-kit';
|
|
4
5
|
/**
|
|
5
6
|
* CreateCallContract_v1_4_1 is the implementation specific to the CreateCall contract version 1.4.1.
|
|
6
7
|
*
|
|
@@ -10,7 +11,6 @@ import { SafeVersion, CreateCallContract_v1_4_1_Abi, CreateCallContract_v1_4_1_C
|
|
|
10
11
|
* @implements CreateCallContract_v1_4_1_Contract - Implements the interface specific to CreateCall contract version 1.4.1.
|
|
11
12
|
*/
|
|
12
13
|
declare class CreateCallContract_v1_4_1 extends CreateCallBaseContract<CreateCallContract_v1_4_1_Abi> implements CreateCallContract_v1_4_1_Contract {
|
|
13
|
-
safeVersion: SafeVersion;
|
|
14
14
|
/**
|
|
15
15
|
* Constructs an instance of CreateCallContract_v1_4_1
|
|
16
16
|
*
|
|
@@ -18,8 +18,9 @@ declare class CreateCallContract_v1_4_1 extends CreateCallBaseContract<CreateCal
|
|
|
18
18
|
* @param safeProvider - An instance of SafeProvider.
|
|
19
19
|
* @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the CreateCall deployments based on the chainId and safeVersion.
|
|
20
20
|
* @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.4.1 is used.
|
|
21
|
+
* @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
|
|
21
22
|
*/
|
|
22
|
-
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CreateCallContract_v1_4_1_Abi);
|
|
23
|
+
constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: CreateCallContract_v1_4_1_Abi, deploymentType?: DeploymentType);
|
|
23
24
|
/**
|
|
24
25
|
* @param args - Array[value, deploymentData]
|
|
25
26
|
* @param options - TransactionOptions
|