@safe-global/protocol-kit 4.1.1 → 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.
Files changed (212) hide show
  1. package/dist/src/Safe.d.ts +12 -17
  2. package/dist/src/Safe.js +159 -112
  3. package/dist/src/Safe.js.map +1 -1
  4. package/dist/src/SafeProvider.d.ts +11 -20
  5. package/dist/src/SafeProvider.js +141 -90
  6. package/dist/src/SafeProvider.js.map +1 -1
  7. package/dist/src/contracts/BaseContract.d.ts +26 -6
  8. package/dist/src/contracts/BaseContract.js +101 -14
  9. package/dist/src/contracts/BaseContract.js.map +1 -1
  10. package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.d.ts +5 -4
  11. package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.js +3 -2
  12. package/dist/src/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerBaseContract.js.map +1 -1
  13. package/dist/src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.d.ts +4 -3
  14. package/dist/src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.js +5 -5
  15. package/dist/src/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandlerContract_v1_3_0.js.map +1 -1
  16. package/dist/src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.d.ts +4 -3
  17. package/dist/src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.js +5 -5
  18. package/dist/src/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandlerContract_v1_4_1.js.map +1 -1
  19. package/dist/src/contracts/CreateCall/CreateCallBaseContract.d.ts +5 -4
  20. package/dist/src/contracts/CreateCall/CreateCallBaseContract.js +3 -2
  21. package/dist/src/contracts/CreateCall/CreateCallBaseContract.js.map +1 -1
  22. package/dist/src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.d.ts +4 -3
  23. package/dist/src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.js +7 -9
  24. package/dist/src/contracts/CreateCall/v1.3.0/CreateCallContract_v1_3_0.js.map +1 -1
  25. package/dist/src/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1.d.ts +4 -3
  26. package/dist/src/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1.js +7 -9
  27. package/dist/src/contracts/CreateCall/v1.4.1/CreateCallContract_v1_4_1.js.map +1 -1
  28. package/dist/src/contracts/MultiSend/MultiSendBaseContract.d.ts +5 -4
  29. package/dist/src/contracts/MultiSend/MultiSendBaseContract.js +3 -2
  30. package/dist/src/contracts/MultiSend/MultiSendBaseContract.js.map +1 -1
  31. package/dist/src/contracts/MultiSend/MultiSendCallOnlyBaseContract.d.ts +5 -4
  32. package/dist/src/contracts/MultiSend/MultiSendCallOnlyBaseContract.js +3 -2
  33. package/dist/src/contracts/MultiSend/MultiSendCallOnlyBaseContract.js.map +1 -1
  34. package/dist/src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.d.ts +4 -3
  35. package/dist/src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.js +5 -5
  36. package/dist/src/contracts/MultiSend/v1.1.1/MultiSendContract_v1_1_1.js.map +1 -1
  37. package/dist/src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.d.ts +4 -3
  38. package/dist/src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.js +5 -5
  39. package/dist/src/contracts/MultiSend/v1.3.0/MultiSendCallOnlyContract_v1_3_0.js.map +1 -1
  40. package/dist/src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.d.ts +4 -3
  41. package/dist/src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.js +5 -5
  42. package/dist/src/contracts/MultiSend/v1.3.0/MultiSendContract_v1_3_0.js.map +1 -1
  43. package/dist/src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.d.ts +4 -3
  44. package/dist/src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.js +5 -5
  45. package/dist/src/contracts/MultiSend/v1.4.1/MultiSendCallOnlyContract_v1_4_1.js.map +1 -1
  46. package/dist/src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.d.ts +4 -3
  47. package/dist/src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.js +5 -5
  48. package/dist/src/contracts/MultiSend/v1.4.1/MultiSendContract_v1_4_1.js.map +1 -1
  49. package/dist/src/contracts/Safe/SafeBaseContract.d.ts +5 -4
  50. package/dist/src/contracts/Safe/SafeBaseContract.js +3 -2
  51. package/dist/src/contracts/Safe/SafeBaseContract.js.map +1 -1
  52. package/dist/src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.d.ts +7 -11
  53. package/dist/src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.js +64 -42
  54. package/dist/src/contracts/Safe/v1.0.0/SafeContract_v1_0_0.js.map +1 -1
  55. package/dist/src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.d.ts +4 -9
  56. package/dist/src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.js +61 -39
  57. package/dist/src/contracts/Safe/v1.1.1/SafeContract_v1_1_1.js.map +1 -1
  58. package/dist/src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.d.ts +5 -10
  59. package/dist/src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.js +63 -41
  60. package/dist/src/contracts/Safe/v1.2.0/SafeContract_v1_2_0.js.map +1 -1
  61. package/dist/src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.d.ts +5 -10
  62. package/dist/src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.js +63 -41
  63. package/dist/src/contracts/Safe/v1.3.0/SafeContract_v1_3_0.js.map +1 -1
  64. package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.d.ts +5 -10
  65. package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.js +63 -41
  66. package/dist/src/contracts/Safe/v1.4.1/SafeContract_v1_4_1.js.map +1 -1
  67. package/dist/src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.d.ts +5 -7
  68. package/dist/src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.js +3 -2
  69. package/dist/src/contracts/SafeProxyFactory/SafeProxyFactoryBaseContract.js.map +1 -1
  70. package/dist/src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.d.ts +5 -11
  71. package/dist/src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.js +9 -38
  72. package/dist/src/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_v1_0_0.js.map +1 -1
  73. package/dist/src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.d.ts +6 -12
  74. package/dist/src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.js +12 -41
  75. package/dist/src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.js.map +1 -1
  76. package/dist/src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.d.ts +5 -11
  77. package/dist/src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.js +11 -40
  78. package/dist/src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.js.map +1 -1
  79. package/dist/src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.d.ts +5 -11
  80. package/dist/src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.js +10 -39
  81. package/dist/src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.js.map +1 -1
  82. package/dist/src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.d.ts +5 -7
  83. package/dist/src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.js +3 -2
  84. package/dist/src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.js.map +1 -1
  85. package/dist/src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.d.ts +4 -3
  86. package/dist/src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.js +9 -9
  87. package/dist/src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.js.map +1 -1
  88. package/dist/src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.d.ts +5 -7
  89. package/dist/src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.js +3 -2
  90. package/dist/src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.js.map +1 -1
  91. package/dist/src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.d.ts +4 -3
  92. package/dist/src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.js +8 -8
  93. package/dist/src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.js.map +1 -1
  94. package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.d.ts +5 -4
  95. package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.js +3 -2
  96. package/dist/src/contracts/SignMessageLib/SignMessageLibBaseContract.js.map +1 -1
  97. package/dist/src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.d.ts +4 -3
  98. package/dist/src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.js +7 -8
  99. package/dist/src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.js.map +1 -1
  100. package/dist/src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.d.ts +4 -3
  101. package/dist/src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.js +7 -8
  102. package/dist/src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.js.map +1 -1
  103. package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.d.ts +5 -4
  104. package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.js +3 -2
  105. package/dist/src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.js.map +1 -1
  106. package/dist/src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.d.ts +4 -3
  107. package/dist/src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.js +9 -7
  108. package/dist/src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.js.map +1 -1
  109. package/dist/src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.d.ts +4 -3
  110. package/dist/src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.js +9 -7
  111. package/dist/src/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_v1_4_1.js.map +1 -1
  112. package/dist/src/contracts/config.d.ts +8 -1
  113. package/dist/src/contracts/config.js +47 -16
  114. package/dist/src/contracts/config.js.map +1 -1
  115. package/dist/src/contracts/constants.d.ts +4 -3
  116. package/dist/src/contracts/constants.js +2 -1
  117. package/dist/src/contracts/constants.js.map +1 -1
  118. package/dist/src/contracts/contractInstances.d.ts +13 -12
  119. package/dist/src/contracts/contractInstances.js +34 -34
  120. package/dist/src/contracts/contractInstances.js.map +1 -1
  121. package/dist/src/contracts/safeDeploymentContracts.d.ts +6 -5
  122. package/dist/src/contracts/safeDeploymentContracts.js +26 -66
  123. package/dist/src/contracts/safeDeploymentContracts.js.map +1 -1
  124. package/dist/src/contracts/utils.d.ts +35 -13
  125. package/dist/src/contracts/utils.js +136 -55
  126. package/dist/src/contracts/utils.js.map +1 -1
  127. package/dist/src/index.d.ts +10 -6
  128. package/dist/src/index.js +7 -9
  129. package/dist/src/index.js.map +1 -1
  130. package/dist/src/managers/contractManager.js +12 -17
  131. package/dist/src/managers/contractManager.js.map +1 -1
  132. package/dist/src/managers/fallbackHandlerManager.js +5 -4
  133. package/dist/src/managers/fallbackHandlerManager.js.map +1 -1
  134. package/dist/src/managers/guardManager.js +5 -4
  135. package/dist/src/managers/guardManager.js.map +1 -1
  136. package/dist/src/types/contracts.d.ts +13 -13
  137. package/dist/src/types/index.d.ts +0 -1
  138. package/dist/src/types/index.js +0 -1
  139. package/dist/src/types/index.js.map +1 -1
  140. package/dist/src/types/safeConfig.d.ts +3 -1
  141. package/dist/src/types/safeProvider.d.ts +33 -5
  142. package/dist/src/types/transactions.d.ts +1 -1
  143. package/dist/src/utils/address.d.ts +1 -1
  144. package/dist/src/utils/address.js +1 -1
  145. package/dist/src/utils/address.js.map +1 -1
  146. package/dist/src/utils/block.d.ts +6 -0
  147. package/dist/src/utils/block.js +14 -0
  148. package/dist/src/utils/block.js.map +1 -0
  149. package/dist/src/utils/constants.d.ts +4 -3
  150. package/dist/src/utils/constants.js +2 -1
  151. package/dist/src/utils/constants.js.map +1 -1
  152. package/dist/src/utils/eip-3770/index.d.ts +1 -1
  153. package/dist/src/utils/eip-3770/index.js +2 -3
  154. package/dist/src/utils/eip-3770/index.js.map +1 -1
  155. package/dist/src/utils/eip-712/encode.d.ts +3 -0
  156. package/dist/src/utils/eip-712/encode.js +127 -0
  157. package/dist/src/utils/eip-712/encode.js.map +1 -0
  158. package/dist/src/utils/eip-712/index.d.ts +1 -1
  159. package/dist/src/utils/eip-712/index.js +5 -7
  160. package/dist/src/utils/eip-712/index.js.map +1 -1
  161. package/dist/src/utils/erc-20/index.d.ts +1 -1
  162. package/dist/src/utils/erc-20/index.js +12 -5
  163. package/dist/src/utils/erc-20/index.js.map +1 -1
  164. package/dist/src/utils/messages/SafeMessage.d.ts +1 -1
  165. package/dist/src/utils/passkeys/PasskeyClient.d.ts +5 -0
  166. package/dist/src/utils/passkeys/PasskeyClient.js +156 -0
  167. package/dist/src/utils/passkeys/PasskeyClient.js.map +1 -0
  168. package/dist/src/utils/passkeys/createPasskeyDeploymentTransaction.d.ts +2 -1
  169. package/dist/src/utils/passkeys/createPasskeyDeploymentTransaction.js +12 -12
  170. package/dist/src/utils/passkeys/createPasskeyDeploymentTransaction.js.map +1 -1
  171. package/dist/src/utils/passkeys/extractPasskeyData.d.ts +1 -2
  172. package/dist/src/utils/passkeys/extractPasskeyData.js +8 -15
  173. package/dist/src/utils/passkeys/extractPasskeyData.js.map +1 -1
  174. package/dist/src/utils/passkeys/getPasskeyOwnerAddress.js +10 -3
  175. package/dist/src/utils/passkeys/getPasskeyOwnerAddress.js.map +1 -1
  176. package/dist/src/utils/passkeys/index.d.ts +1 -1
  177. package/dist/src/utils/passkeys/index.js +1 -1
  178. package/dist/src/utils/passkeys/isSharedSigner.d.ts +2 -3
  179. package/dist/src/utils/passkeys/isSharedSigner.js +6 -5
  180. package/dist/src/utils/passkeys/isSharedSigner.js.map +1 -1
  181. package/dist/src/utils/provider.d.ts +3 -0
  182. package/dist/src/utils/provider.js +12 -0
  183. package/dist/src/utils/provider.js.map +1 -0
  184. package/dist/src/utils/safeVersions.js +2 -2
  185. package/dist/src/utils/safeVersions.js.map +1 -1
  186. package/dist/src/utils/signatures/SafeSignature.d.ts +1 -1
  187. package/dist/src/utils/signatures/utils.d.ts +4 -4
  188. package/dist/src/utils/signatures/utils.js +34 -20
  189. package/dist/src/utils/signatures/utils.js.map +1 -1
  190. package/dist/src/utils/transactions/SafeTransaction.d.ts +1 -1
  191. package/dist/src/utils/transactions/SafeTransaction.js.map +1 -1
  192. package/dist/src/utils/transactions/gas.d.ts +1 -1
  193. package/dist/src/utils/transactions/gas.js +37 -64
  194. package/dist/src/utils/transactions/gas.js.map +1 -1
  195. package/dist/src/utils/transactions/types.d.ts +17 -1
  196. package/dist/src/utils/transactions/utils.d.ts +11 -2
  197. package/dist/src/utils/transactions/utils.js +117 -27
  198. package/dist/src/utils/transactions/utils.js.map +1 -1
  199. package/dist/src/utils/types.d.ts +4 -0
  200. package/dist/src/utils/types.js +59 -1
  201. package/dist/src/utils/types.js.map +1 -1
  202. package/dist/tsconfig.build.tsbuildinfo +1 -1
  203. package/package.json +25 -34
  204. package/dist/src/SafeFactory.d.ts +0 -15
  205. package/dist/src/SafeFactory.js +0 -136
  206. package/dist/src/SafeFactory.js.map +0 -1
  207. package/dist/src/types/safeFactory.d.ts +0 -31
  208. package/dist/src/types/safeFactory.js +0 -3
  209. package/dist/src/types/safeFactory.js.map +0 -1
  210. package/dist/src/utils/passkeys/PasskeySigner.d.ts +0 -63
  211. package/dist/src/utils/passkeys/PasskeySigner.js +0 -163
  212. package/dist/src/utils/passkeys/PasskeySigner.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { ContractRunner } from 'ethers';
2
- import SafeProxyFactoryBaseContract, { CreateProxyProps } from '../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract';
1
+ import SafeProxyFactoryBaseContract from '../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract';
3
2
  import SafeProvider from '../../../SafeProvider';
4
- import { SafeVersion, SafeProxyFactoryContract_v1_1_1_Abi, SafeProxyFactoryContract_v1_1_1_Contract, SafeProxyFactoryContract_v1_1_1_Function } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../../types';
4
+ import { SafeProxyFactoryContract_v1_1_1_Abi, SafeProxyFactoryContract_v1_1_1_Contract, SafeProxyFactoryContract_v1_1_1_Function } from '@safe-global/types-kit';
5
5
  /**
6
6
  * SafeProxyFactoryContract_v1_1_1 is the implementation specific to the Safe Proxy Factory contract version 1.1.1.
7
7
  *
@@ -11,7 +11,6 @@ import { SafeVersion, SafeProxyFactoryContract_v1_1_1_Abi, SafeProxyFactoryContr
11
11
  * @implements SafeProxyFactoryContract_v1_1_1_Contract - Implements the interface specific to Safe Proxy Factory contract version 1.1.1.
12
12
  */
13
13
  declare class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContract<SafeProxyFactoryContract_v1_1_1_Abi> implements SafeProxyFactoryContract_v1_1_1_Contract {
14
- safeVersion: SafeVersion;
15
14
  /**
16
15
  * Constructs an instance of SafeProxyFactoryContract_v1_1_1
17
16
  *
@@ -19,8 +18,9 @@ declare class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContra
19
18
  * @param safeProvider - An instance of SafeProvider.
20
19
  * @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.
21
20
  * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 1.1.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.
22
22
  */
23
- constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SafeProxyFactoryContract_v1_1_1_Abi, runner?: ContractRunner | null);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SafeProxyFactoryContract_v1_1_1_Abi, deploymentType?: DeploymentType);
24
24
  /**
25
25
  * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
26
26
  * @returns Array[creationCode]
@@ -33,7 +33,7 @@ declare class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContra
33
33
  proxyRuntimeCode: SafeProxyFactoryContract_v1_1_1_Function<'proxyRuntimeCode'>;
34
34
  /**
35
35
  * Allows to get the address for a new proxy contact created via `createProxyWithNonce`.
36
- * @param args - Array[masterCopy, initializer, saltNonce]
36
+ * @param args - Array[masterCopy, initializer, saltNonceBigInt]
37
37
  * @returns Array[proxyAddress]
38
38
  */
39
39
  calculateCreateProxyWithNonceAddress: SafeProxyFactoryContract_v1_1_1_Function<'calculateCreateProxyWithNonceAddress'>;
@@ -55,11 +55,5 @@ declare class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContra
55
55
  * @returns Array[proxyAddress]
56
56
  */
57
57
  createProxyWithNonce: SafeProxyFactoryContract_v1_1_1_Function<'createProxyWithNonce'>;
58
- /**
59
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
60
- * @param {CreateProxyProps} props - Properties for the new proxy contract.
61
- * @returns The address of the new proxy contract.
62
- */
63
- createProxyWithOptions({ safeSingletonAddress, initializer, saltNonce, options, callback }: CreateProxyProps): Promise<string>;
64
58
  }
65
59
  export default SafeProxyFactoryContract_v1_1_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 SafeProxyFactoryBaseContract_1 = __importDefault(require("../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract"));
7
- const safe_core_sdk_types_1 = require("@safe-global/safe-core-sdk-types");
7
+ const types_kit_1 = require("@safe-global/types-kit");
8
8
  /**
9
9
  * SafeProxyFactoryContract_v1_1_1 is the implementation specific to the Safe Proxy Factory contract version 1.1.1.
10
10
  *
@@ -21,32 +21,33 @@ class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContract_1.def
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 Safe 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.1.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, runner) {
26
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
26
27
  const safeVersion = '1.1.1';
27
- const defaultAbi = safe_core_sdk_types_1.safeProxyFactory_1_1_1_ContractArtifacts.abi;
28
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, runner);
28
+ const defaultAbi = types_kit_1.safeProxyFactory_1_1_1_ContractArtifacts.abi;
29
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
29
30
  /**
30
31
  * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
31
32
  * @returns Array[creationCode]
32
33
  */
33
34
  this.proxyCreationCode = async () => {
34
- return [await this.contract.proxyCreationCode()];
35
+ return [await this.read('proxyCreationCode')];
35
36
  };
36
37
  /**
37
38
  * Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
38
39
  * @returns Array[runtimeCode]
39
40
  */
40
41
  this.proxyRuntimeCode = async () => {
41
- return [await this.contract.proxyRuntimeCode()];
42
+ return [await this.read('proxyRuntimeCode')];
42
43
  };
43
44
  /**
44
45
  * Allows to get the address for a new proxy contact created via `createProxyWithNonce`.
45
- * @param args - Array[masterCopy, initializer, saltNonce]
46
+ * @param args - Array[masterCopy, initializer, saltNonceBigInt]
46
47
  * @returns Array[proxyAddress]
47
48
  */
48
49
  this.calculateCreateProxyWithNonceAddress = async (args) => {
49
- return [await this.contract.calculateCreateProxyWithNonceAddress(...args)];
50
+ return [await this.write('calculateCreateProxyWithNonceAddress', args)];
50
51
  };
51
52
  /**
52
53
  * Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
@@ -54,7 +55,7 @@ class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContract_1.def
54
55
  * @returns Array[proxyAddress]
55
56
  */
56
57
  this.createProxy = async (args) => {
57
- return [await this.contract.createProxy(...args)];
58
+ return [await this.write('createProxy', args)];
58
59
  };
59
60
  /**
60
61
  * Allows to create new proxy contract, execute a message call to the new proxy and call a specified callback within one transaction.
@@ -62,7 +63,7 @@ class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContract_1.def
62
63
  * @returns Array[proxyAddress]
63
64
  */
64
65
  this.createProxyWithCallback = async (args) => {
65
- return [await this.contract.createProxyWithCallback(...args)];
66
+ return [await this.write('createProxyWithCallback', args)];
66
67
  };
67
68
  /**
68
69
  * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
@@ -70,38 +71,8 @@ class SafeProxyFactoryContract_v1_1_1 extends SafeProxyFactoryBaseContract_1.def
70
71
  * @returns Array[proxyAddress]
71
72
  */
72
73
  this.createProxyWithNonce = async (args) => {
73
- return [await this.contract.createProxyWithNonce(...args)];
74
+ return [await this.write('createProxyWithNonce', args)];
74
75
  };
75
- this.safeVersion = safeVersion;
76
- }
77
- /**
78
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
79
- * @param {CreateProxyProps} props - Properties for the new proxy contract.
80
- * @returns The address of the new proxy contract.
81
- */
82
- async createProxyWithOptions({ safeSingletonAddress, initializer, saltNonce, options, callback }) {
83
- const saltNonceBigInt = BigInt(saltNonce);
84
- if (saltNonceBigInt < 0)
85
- throw new Error('saltNonce must be greater than or equal to 0');
86
- if (options && !options.gasLimit) {
87
- options.gasLimit = (await this.estimateGas('createProxyWithNonce', [safeSingletonAddress, initializer, saltNonceBigInt], { ...options })).toString();
88
- }
89
- const proxyAddress = this.contract
90
- .createProxyWithNonce(safeSingletonAddress, initializer, saltNonce, { ...options })
91
- .then(async (txResponse) => {
92
- if (callback) {
93
- callback(txResponse.hash);
94
- }
95
- const txReceipt = await txResponse.wait();
96
- const events = txReceipt?.logs;
97
- const proxyCreationEvent = events.find((event) => event?.eventName === 'ProxyCreation');
98
- if (!proxyCreationEvent || !proxyCreationEvent.args) {
99
- throw new Error('SafeProxy was not deployed correctly');
100
- }
101
- const proxyAddress = proxyCreationEvent.args[0];
102
- return proxyAddress;
103
- });
104
- return proxyAddress;
105
76
  }
106
77
  }
107
78
  exports.default = SafeProxyFactoryContract_v1_1_1;
@@ -1 +1 @@
1
- {"version":3,"file":"SafeProxyFactoryContract_v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CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,eAAe,CAAC,CAAA;YACvF,IAAI,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;YACzD,CAAC;YACD,MAAM,YAAY,GAAW,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACvD,OAAO,YAAY,CAAA;QACrB,CAAC,CAAC,CAAA;QACJ,OAAO,YAAY,CAAA;IACrB,CAAC;CACF;AAED,kBAAe,+BAA+B,CAAA"}
1
+ {"version":3,"file":"SafeProxyFactoryContract_v1_1_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_v1_1_1.ts"],"names":[],"mappings":";;;;;AAAA,qJAA4H;AAG5H,sDAK+B;AAE/B;;;;;;;GAOG;AACH,MAAM,+BACJ,SAAQ,sCAAiE;IAGzE;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAuD,EACvD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,oDAAwC,CAAC,GAAG,CAAA;QAE/D,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;WAGG;QACH,sBAAiB,GAAkE,KAAK,IAAI,EAAE;YAC5F,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAC/C,CAAC,CAAA;QAED;;;WAGG;QACH,qBAAgB,GAAiE,KAAK,IAAI,EAAE;YAC1F,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAA;QAC9C,CAAC,CAAA;QAED;;;;WAIG;QACH,yCAAoC,GAClC,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,sCAAsC,EAAE,IAAI,CAAC,CAAC,CAAA;QACzE,CAAC,CAAA;QAEH;;;;WAIG;QACH,gBAAW,GAA4D,KAAK,EAAE,IAAI,EAAE,EAAE;YACpF,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAA;QAChD,CAAC,CAAA;QAED;;;;WAIG;QACH,4BAAuB,GACrB,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC,CAAA;QAC5D,CAAC,CAAA;QAEH;;;;WAIG;QACH,yBAAoB,GAAqE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAA;QACzD,CAAC,CAAA;IAxDD,CAAC;CAyDF;AAED,kBAAe,+BAA+B,CAAA"}
@@ -1,7 +1,7 @@
1
- import { ContractRunner } from 'ethers';
2
- import SafeProxyFactoryBaseContract, { CreateProxyProps } from '../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract';
1
+ import SafeProxyFactoryBaseContract from '../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract';
3
2
  import SafeProvider from '../../../SafeProvider';
4
- import { SafeVersion, SafeProxyFactoryContract_v1_3_0_Abi, SafeProxyFactoryContract_v1_3_0_Contract, SafeProxyFactoryContract_v1_3_0_Function } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../../types';
4
+ import { SafeProxyFactoryContract_v1_3_0_Abi, SafeProxyFactoryContract_v1_3_0_Contract, SafeProxyFactoryContract_v1_3_0_Function } from '@safe-global/types-kit';
5
5
  /**
6
6
  * SafeProxyFactoryContract_v1_3_0 is the implementation specific to the Safe Proxy Factory contract version 1.3.0.
7
7
  *
@@ -11,7 +11,6 @@ import { SafeVersion, SafeProxyFactoryContract_v1_3_0_Abi, SafeProxyFactoryContr
11
11
  * @implements SafeProxyFactoryContract_v1_3_0_Contract - Implements the interface specific to Safe Proxy Factory contract version 1.3.0.
12
12
  */
13
13
  declare class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContract<SafeProxyFactoryContract_v1_3_0_Abi> implements SafeProxyFactoryContract_v1_3_0_Contract {
14
- safeVersion: SafeVersion;
15
14
  /**
16
15
  * Constructs an instance of SafeProxyFactoryContract_v1_3_0
17
16
  *
@@ -19,8 +18,9 @@ declare class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContra
19
18
  * @param safeProvider - An instance of SafeProvider.
20
19
  * @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.
21
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.
22
22
  */
23
- constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SafeProxyFactoryContract_v1_3_0_Abi, runner?: ContractRunner | null);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SafeProxyFactoryContract_v1_3_0_Abi, deploymentType?: DeploymentType);
24
24
  /**
25
25
  * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
26
26
  * @returns Array[creationCode]
@@ -55,11 +55,5 @@ declare class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContra
55
55
  * @returns Array[proxyAddress]
56
56
  */
57
57
  createProxyWithNonce: SafeProxyFactoryContract_v1_3_0_Function<'createProxyWithNonce'>;
58
- /**
59
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
60
- * @param {CreateProxyProps} props - Properties for the new proxy contract.
61
- * @returns The address of the new proxy contract.
62
- */
63
- createProxyWithOptions({ safeSingletonAddress, initializer, saltNonce, options, callback }: CreateProxyProps): Promise<string>;
64
58
  }
65
59
  export default SafeProxyFactoryContract_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 SafeProxyFactoryBaseContract_1 = __importDefault(require("../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract"));
7
- const safe_core_sdk_types_1 = require("@safe-global/safe-core-sdk-types");
7
+ const types_kit_1 = require("@safe-global/types-kit");
8
8
  /**
9
9
  * SafeProxyFactoryContract_v1_3_0 is the implementation specific to the Safe Proxy Factory contract version 1.3.0.
10
10
  *
@@ -21,24 +21,25 @@ class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContract_1.def
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 Safe 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, runner) {
26
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
26
27
  const safeVersion = '1.3.0';
27
- const defaultAbi = safe_core_sdk_types_1.safeProxyFactory_1_3_0_ContractArtifacts.abi;
28
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, runner);
28
+ const defaultAbi = types_kit_1.safeProxyFactory_1_3_0_ContractArtifacts.abi;
29
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
29
30
  /**
30
31
  * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
31
32
  * @returns Array[creationCode]
32
33
  */
33
34
  this.proxyCreationCode = async () => {
34
- return [await this.contract.proxyCreationCode()];
35
+ return [await this.read('proxyCreationCode')];
35
36
  };
36
37
  /**
37
38
  * Allows to retrieve the runtime code of a deployed Proxy. This can be used to check that the expected Proxy was deployed.
38
39
  * @returns Array[runtimeCode]
39
40
  */
40
41
  this.proxyRuntimeCode = async () => {
41
- return [await this.contract.proxyRuntimeCode()];
42
+ return [await this.read('proxyRuntimeCode')];
42
43
  };
43
44
  /**
44
45
  * Allows to get the address for a new proxy contact created via `createProxyWithNonce`.
@@ -46,7 +47,7 @@ class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContract_1.def
46
47
  * @returns Array[proxyAddress]
47
48
  */
48
49
  this.calculateCreateProxyWithNonceAddress = async (args) => {
49
- return [await this.contract.calculateCreateProxyWithNonceAddress(...args)];
50
+ return [await this.write('calculateCreateProxyWithNonceAddress', args)];
50
51
  };
51
52
  /**
52
53
  * Allows to create new proxy contact and execute a message call to the new proxy within one transaction.
@@ -54,7 +55,7 @@ class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContract_1.def
54
55
  * @returns Array[proxyAddress]
55
56
  */
56
57
  this.createProxy = async (args) => {
57
- return [await this.contract.createProxy(...args)];
58
+ return [await this.write('createProxy', args)];
58
59
  };
59
60
  /**
60
61
  * Allows to create new proxy contract, execute a message call to the new proxy and call a specified callback within one transaction.
@@ -62,7 +63,7 @@ class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContract_1.def
62
63
  * @returns Array[proxyAddress]
63
64
  */
64
65
  this.createProxyWithCallback = async (args) => {
65
- return [await this.contract.createProxyWithCallback(...args)];
66
+ return [await this.write('createProxyWithCallback', args)];
66
67
  };
67
68
  /**
68
69
  * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
@@ -70,38 +71,8 @@ class SafeProxyFactoryContract_v1_3_0 extends SafeProxyFactoryBaseContract_1.def
70
71
  * @returns Array[proxyAddress]
71
72
  */
72
73
  this.createProxyWithNonce = async (args) => {
73
- return [await this.contract.createProxyWithNonce(...args)];
74
+ return [await this.write('createProxyWithNonce', args)];
74
75
  };
75
- this.safeVersion = safeVersion;
76
- }
77
- /**
78
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
79
- * @param {CreateProxyProps} props - Properties for the new proxy contract.
80
- * @returns The address of the new proxy contract.
81
- */
82
- async createProxyWithOptions({ safeSingletonAddress, initializer, saltNonce, options, callback }) {
83
- const saltNonceBigInt = BigInt(saltNonce);
84
- if (saltNonceBigInt < 0)
85
- throw new Error('saltNonce must be greater than or equal to 0');
86
- if (options && !options.gasLimit) {
87
- options.gasLimit = (await this.estimateGas('createProxyWithNonce', [safeSingletonAddress, initializer, saltNonceBigInt], { ...options })).toString();
88
- }
89
- const proxyAddress = this.contract
90
- .createProxyWithNonce(safeSingletonAddress, initializer, saltNonce, { ...options })
91
- .then(async (txResponse) => {
92
- if (callback) {
93
- callback(txResponse.hash);
94
- }
95
- const txReceipt = await txResponse.wait();
96
- const events = txReceipt?.logs;
97
- const proxyCreationEvent = events.find((event) => event?.eventName === 'ProxyCreation');
98
- if (!proxyCreationEvent || !proxyCreationEvent.args) {
99
- throw new Error('SafeProxy was not deployed correctly');
100
- }
101
- const proxyAddress = proxyCreationEvent.args[0];
102
- return proxyAddress;
103
- });
104
- return proxyAddress;
105
76
  }
106
77
  }
107
78
  exports.default = SafeProxyFactoryContract_v1_3_0;
@@ -1 +1 @@
1
- {"version":3,"file":"SafeProxyFactoryContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AACA,qJAE0F;AAE1F,0EAMyC;AAEzC;;;;;;;GAOG;AACH,MAAM,+BACJ,SAAQ,sCAAiE;IAKzE;;;;;;;OAOG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAuD,EACvD,MAA8B;QAE9B,MA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;YACvD,OAAO,YAAY,CAAA;QACrB,CAAC,CAAC,CAAA;QACJ,OAAO,YAAY,CAAA;IACrB,CAAC;CACF;AAED,kBAAe,+BAA+B,CAAA"}
1
+ {"version":3,"file":"SafeProxyFactoryContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,qJAA4H;AAG5H,sDAK+B;AAE/B;;;;;;;GAOG;AACH,MAAM,+BACJ,SAAQ,sCAAiE;IAGzE;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAuD,EACvD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,oDAAwC,CAAC,GAAG,CAAA;QAE/D,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;WAGG;QACH,sBAAiB,GAAkE,KAAK,IAAI,EAAE;YAC5F,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAC/C,CAAC,CAAA;QAED;;;WAGG;QACH,qBAAgB,GAAiE,KAAK,IAAI,EAAE;YAC1F,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAA;QAC9C,CAAC,CAAA;QAED;;;;WAIG;QACH,yCAAoC,GAClC,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,sCAAsC,EAAE,IAAI,CAAC,CAAC,CAAA;QACzE,CAAC,CAAA;QAEH;;;;WAIG;QACH,gBAAW,GAA4D,KAAK,EAAE,IAAI,EAAE,EAAE;YACpF,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAA;QAChD,CAAC,CAAA;QAED;;;;WAIG;QACH,4BAAuB,GACrB,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC,CAAA;QAC5D,CAAC,CAAA;QAEH;;;;WAIG;QACH,yBAAoB,GAAqE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAA;QACzD,CAAC,CAAA;IAxDD,CAAC;CAyDF;AAED,kBAAe,+BAA+B,CAAA"}
@@ -1,6 +1,6 @@
1
- import { ContractRunner } from 'ethers';
2
- import SafeProxyFactoryBaseContract, { CreateProxyProps } from '../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract';
3
- import { SafeVersion, SafeProxyFactoryContract_v1_4_1_Abi, SafeProxyFactoryContract_v1_4_1_Contract, SafeProxyFactoryContract_v1_4_1_Function } from '@safe-global/safe-core-sdk-types';
1
+ import SafeProxyFactoryBaseContract from '../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract';
2
+ import { DeploymentType } from '../../../types';
3
+ import { SafeProxyFactoryContract_v1_4_1_Abi, SafeProxyFactoryContract_v1_4_1_Contract, SafeProxyFactoryContract_v1_4_1_Function } from '@safe-global/types-kit';
4
4
  import SafeProvider from '../../../SafeProvider';
5
5
  /**
6
6
  * SafeProxyFactoryContract_v1_4_1 is the implementation specific to the Safe Proxy Factory contract version 1.4.1.
@@ -11,7 +11,6 @@ import SafeProvider from '../../../SafeProvider';
11
11
  * @implements SafeProxyFactoryContract_v1_4_1_Contract - Implements the interface specific to Safe Proxy Factory contract version 1.4.1.
12
12
  */
13
13
  declare class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContract<SafeProxyFactoryContract_v1_4_1_Abi> implements SafeProxyFactoryContract_v1_4_1_Contract {
14
- safeVersion: SafeVersion;
15
14
  /**
16
15
  * Constructs an instance of SafeProxyFactoryContract_v1_4_1
17
16
  *
@@ -19,8 +18,9 @@ declare class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContra
19
18
  * @param safeProvider - An instance of SafeProvider.
20
19
  * @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.
21
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.
22
22
  */
23
- constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SafeProxyFactoryContract_v1_4_1_Abi, runner?: ContractRunner | null);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SafeProxyFactoryContract_v1_4_1_Abi, deploymentType?: DeploymentType);
24
24
  /**
25
25
  * Returns the ID of the chain the contract is currently deployed on.
26
26
  * @returns Array[chainId]
@@ -50,11 +50,5 @@ declare class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContra
50
50
  * @returns Array[proxy]
51
51
  */
52
52
  createProxyWithNonce: SafeProxyFactoryContract_v1_4_1_Function<'createProxyWithNonce'>;
53
- /**
54
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
55
- * @param {CreateProxyProps} props - Properties for the new proxy contract.
56
- * @returns The address of the new proxy contract.
57
- */
58
- createProxyWithOptions({ safeSingletonAddress, initializer, saltNonce, options, callback }: CreateProxyProps): Promise<string>;
59
53
  }
60
54
  export default SafeProxyFactoryContract_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 SafeProxyFactoryBaseContract_1 = __importDefault(require("../../../contracts/SafeProxyFactory/SafeProxyFactoryBaseContract"));
7
- const safe_core_sdk_types_1 = require("@safe-global/safe-core-sdk-types");
7
+ const types_kit_1 = require("@safe-global/types-kit");
8
8
  /**
9
9
  * SafeProxyFactoryContract_v1_4_1 is the implementation specific to the Safe Proxy Factory contract version 1.4.1.
10
10
  *
@@ -21,24 +21,25 @@ class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContract_1.def
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 Safe 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, runner) {
26
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
26
27
  const safeVersion = '1.4.1';
27
- const defaultAbi = safe_core_sdk_types_1.safeProxyFactory_1_4_1_ContractArtifacts.abi;
28
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, runner);
28
+ const defaultAbi = types_kit_1.safeProxyFactory_1_4_1_ContractArtifacts.abi;
29
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
29
30
  /**
30
31
  * Returns the ID of the chain the contract is currently deployed on.
31
32
  * @returns Array[chainId]
32
33
  */
33
34
  this.getChainId = async () => {
34
- return [await this.contract.getChainId()];
35
+ return [await this.read('getChainId')];
35
36
  };
36
37
  /**
37
38
  * Allows to retrieve the creation code used for the Proxy deployment. With this it is easily possible to calculate predicted address.
38
39
  * @returns Array[creationCode]
39
40
  */
40
41
  this.proxyCreationCode = async () => {
41
- return [await this.contract.proxyCreationCode()];
42
+ return [await this.read('proxyCreationCode')];
42
43
  };
43
44
  /**
44
45
  * Deploys a new chain-specific proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
@@ -46,7 +47,7 @@ class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContract_1.def
46
47
  * @returns Array[proxy]
47
48
  */
48
49
  this.createChainSpecificProxyWithNonce = async (args) => {
49
- return [await this.contract.createChainSpecificProxyWithNonce(...args)];
50
+ return [await this.write('createChainSpecificProxyWithNonce', args)];
50
51
  };
51
52
  /**
52
53
  * Deploy a new proxy with singleton and salt.
@@ -55,7 +56,7 @@ class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContract_1.def
55
56
  * @returns Array[proxy]
56
57
  */
57
58
  this.createProxyWithCallback = async (args) => {
58
- return [await this.contract.createProxyWithCallback(...args)];
59
+ return [await this.write('createProxyWithCallback', args)];
59
60
  };
60
61
  /**
61
62
  * Deploys a new proxy with singleton and salt. Optionally executes an initializer call to a new proxy.
@@ -63,38 +64,8 @@ class SafeProxyFactoryContract_v1_4_1 extends SafeProxyFactoryBaseContract_1.def
63
64
  * @returns Array[proxy]
64
65
  */
65
66
  this.createProxyWithNonce = async (args) => {
66
- return [await this.contract.createProxyWithNonce(...args)];
67
+ return [await this.write('createProxyWithNonce', args)];
67
68
  };
68
- this.safeVersion = safeVersion;
69
- }
70
- /**
71
- * Allows to create new proxy contract and execute a message call to the new proxy within one transaction.
72
- * @param {CreateProxyProps} props - Properties for the new proxy contract.
73
- * @returns The address of the new proxy contract.
74
- */
75
- async createProxyWithOptions({ safeSingletonAddress, initializer, saltNonce, options, callback }) {
76
- const saltNonceBigInt = BigInt(saltNonce);
77
- if (saltNonceBigInt < 0)
78
- throw new Error('saltNonce must be greater than or equal to 0');
79
- if (options && !options.gasLimit) {
80
- options.gasLimit = (await this.estimateGas('createProxyWithNonce', [safeSingletonAddress, initializer, saltNonceBigInt], { ...options })).toString();
81
- }
82
- const proxyAddress = this.contract
83
- .createProxyWithNonce(safeSingletonAddress, initializer, saltNonce, { ...options })
84
- .then(async (txResponse) => {
85
- if (callback) {
86
- callback(txResponse.hash);
87
- }
88
- const txReceipt = await txResponse.wait();
89
- const events = txReceipt?.logs;
90
- const proxyCreationEvent = events.find((event) => event?.eventName === 'ProxyCreation');
91
- if (!proxyCreationEvent || !proxyCreationEvent.args) {
92
- throw new Error('SafeProxy was not deployed correctly');
93
- }
94
- const proxyAddress = proxyCreationEvent.args[0];
95
- return proxyAddress;
96
- });
97
- return proxyAddress;
98
69
  }
99
70
  }
100
71
  exports.default = SafeProxyFactoryContract_v1_4_1;
@@ -1 +1 @@
1
- {"version":3,"file":"SafeProxyFactoryContract_v1_4_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.ts"],"names":[],"mappings":";;;;;AACA,qJAE0F;AAC1F,0EAMyC;AAGzC;;;;;;;GAOG;AACH,MAAM,+BACJ,SAAQ,sCAAiE;IAKzE;;;;;;;OAOG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAuD,EACvD,MAA8B;QAE9B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,8DAAwC,CAAC,GAAG,CAAA;QAE/D,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,CACP,CAAA;QAKH;;;WAGG;QACH,eAAU,GAA2D,KAAK,IAAI,EAAE;YAC9E,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAA;QAC3C,CAAC,CAAA;QAED;;;WAGG;QACH,sBAAiB,GAAkE,KAAK,IAAI,EAAE;YAC5F,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAA;QAClD,CAAC,CAAA;QAED;;;;WAIG;QACH,sCAAiC,GAC/B,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,iCAAiC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACzE,CAAC,CAAA;QAEH;;;;;W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AI,EAAE,CAAA;YACzC,MAAM,MAAM,GAAG,SAAS,EAAE,IAAkB,CAAA;YAC5C,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,eAAe,CAAC,CAAA;YACvF,IAAI,CAAC,kBAAkB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;YACzD,CAAC;YACD,MAAM,YAAY,GAAW,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACvD,OAAO,YAAY,CAAA;QACrB,CAAC,CAAC,CAAA;QACJ,OAAO,YAAY,CAAA;IACrB,CAAC;CACF;AAED,kBAAe,+BAA+B,CAAA"}
1
+ {"version":3,"file":"SafeProxyFactoryContract_v1_4_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_v1_4_1.ts"],"names":[],"mappings":";;;;;AAAA,qJAA4H;AAE5H,sDAK+B;AAG/B;;;;;;;GAOG;AACH,MAAM,+BACJ,SAAQ,sCAAiE;IAGzE;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAuD,EACvD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,oDAAwC,CAAC,GAAG,CAAA;QAE/D,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;WAGG;QACH,eAAU,GAA2D,KAAK,IAAI,EAAE;YAC9E,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAA;QACxC,CAAC,CAAA;QAED;;;WAGG;QACH,sBAAiB,GAAkE,KAAK,IAAI,EAAE;YAC5F,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAC/C,CAAC,CAAA;QAED;;;;WAIG;QACH,sCAAiC,GAC/B,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,mCAAmC,EAAE,IAAI,CAAC,CAAC,CAAA;QACtE,CAAC,CAAA;QAEH;;;;;WAKG;QACH,4BAAuB,GACrB,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,CAAC,CAAC,CAAA;QAC5D,CAAC,CAAA;QAEH;;;;WAIG;QACH,yBAAoB,GAAqE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAA;QACzD,CAAC,CAAA;IAhDD,CAAC;CAiDF;AAED,kBAAe,+BAA+B,CAAA"}
@@ -1,12 +1,9 @@
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, TransactionOptions, CreateProxyProps as CreateProxyPropsGeneral } from '@safe-global/safe-core-sdk-types';
5
+ import { SafeVersion } from '@safe-global/types-kit';
6
6
  import { contractName } from '../../contracts/config';
7
- export interface CreateProxyProps extends CreateProxyPropsGeneral {
8
- options?: TransactionOptions;
9
- }
10
7
  /**
11
8
  * Abstract class SafeWebAuthnSharedSignerBaseContract extends BaseContract to specifically integrate with the SafeWebAuthnSharedSigner contract.
12
9
  * It is designed to be instantiated for different versions of the Safe contract.
@@ -19,7 +16,7 @@ export interface CreateProxyProps extends CreateProxyPropsGeneral {
19
16
  * Example subclasses:
20
17
  * - SafeWebAuthnSharedSignerContract_v0_2_1 extends SafeWebAuthnSharedSignerBaseContract<SafeWebAuthnSharedSignerContract_v0_2_1_Abi>
21
18
  */
22
- declare abstract class SafeWebAuthnSharedSignerBaseContract<SafeWebAuthnSharedSignerContractAbiType extends InterfaceAbi & Abi> extends BaseContract<SafeWebAuthnSharedSignerContractAbiType> {
19
+ declare abstract class SafeWebAuthnSharedSignerBaseContract<SafeWebAuthnSharedSignerContractAbiType extends Abi> extends BaseContract<SafeWebAuthnSharedSignerContractAbiType> {
23
20
  contractName: contractName;
24
21
  /**
25
22
  * @constructor
@@ -31,7 +28,8 @@ declare abstract class SafeWebAuthnSharedSignerBaseContract<SafeWebAuthnSharedSi
31
28
  * @param safeVersion - The version of the Safe contract.
32
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.
33
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.
34
32
  */
35
- constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: SafeWebAuthnSharedSignerContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSharedSignerContractAbiType, runner?: ContractRunner | null);
33
+ constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: SafeWebAuthnSharedSignerContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSharedSignerContractAbiType, deploymentType?: DeploymentType);
36
34
  }
37
35
  export default SafeWebAuthnSharedSignerBaseContract;
@@ -27,10 +27,11 @@ class SafeWebAuthnSharedSignerBaseContract extends BaseContract_1.default {
27
27
  * @param safeVersion - The version of the Safe contract.
28
28
  * @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.
29
29
  * @param customContractAbi - Optional custom ABI for the contract. If not provided, the ABI is derived from the Safe deployments or the defaultAbi is used.
30
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
30
31
  */
31
- constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, runner) {
32
+ constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
32
33
  const contractName = 'safeWebAuthnSharedSignerVersion';
33
- super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, runner);
34
+ super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
34
35
  this.contractName = contractName;
35
36
  }
36
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SafeWebAuthnSharedSignerBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.ts"],"names":[],"mappings":";;;;;AAGA,oGAA2E;AAY3E;;;;;;;;;;;GAWG;AACH,MAAe,oCAEb,SAAQ,sBAAqD;IAG7D;;;;;;;;;;OAUG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAmD,EACnD,WAAwB,EACxB,qBAA8B,EAC9B,iBAA2D,EAC3D,MAA8B;QAE9B,MAAM,YAAY,GAAG,iCAAiC,CAAA;QAEtD,KAAK,CACH,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,CACP,CAAA;QAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;CACF;AAED,kBAAe,oCAAoC,CAAA"}
1
+ {"version":3,"file":"SafeWebAuthnSharedSignerBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract.ts"],"names":[],"mappings":";;;;;AAGA,oGAA2E;AAI3E;;;;;;;;;;;GAWG;AACH,MAAe,oCAEb,SAAQ,sBAAqD;IAG7D;;;;;;;;;;;OAWG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAmD,EACnD,WAAwB,EACxB,qBAA8B,EAC9B,iBAA2D,EAC3D,cAA+B;QAE/B,MAAM,YAAY,GAAG,iCAAiC,CAAA;QAEtD,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,oCAAoC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import SafeWebAuthnSharedSignerBaseContract from '../../../contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract';
2
- import { SafeVersion, SafeWebAuthnSharedSignerContract_v0_2_1_Abi, SafeWebAuthnSharedSignerContract_v0_2_1_Contract, SafeWebAuthnSharedSignerContract_v0_2_1_Function } from '@safe-global/safe-core-sdk-types';
2
+ import { SafeVersion, SafeWebAuthnSharedSignerContract_v0_2_1_Abi, SafeWebAuthnSharedSignerContract_v0_2_1_Contract, SafeWebAuthnSharedSignerContract_v0_2_1_Function } from '@safe-global/types-kit';
3
3
  import SafeProvider from '../../../SafeProvider';
4
+ import { DeploymentType } from '../../../types';
4
5
  /**
5
6
  * SafeWebAuthnSharedSignerContract_v0_2_1 is the implementation specific to the SafeWebAuthnSharedSigner contract version 0.2.1.
6
7
  *
@@ -10,7 +11,6 @@ import SafeProvider from '../../../SafeProvider';
10
11
  * @implements SafeWebAuthnSharedSignerContract_v0_2_1_Contract - Implements the interface specific to SafeWebAuthnSharedSigner contract version 0.2.1.
11
12
  */
12
13
  declare class SafeWebAuthnSharedSignerContract_v0_2_1 extends SafeWebAuthnSharedSignerBaseContract<SafeWebAuthnSharedSignerContract_v0_2_1_Abi> implements SafeWebAuthnSharedSignerContract_v0_2_1_Contract {
13
- safeVersion: SafeVersion;
14
14
  /**
15
15
  * Constructs an instance of SafeWebAuthnSharedSignerContract_v0_2_1
16
16
  *
@@ -19,8 +19,9 @@ declare class SafeWebAuthnSharedSignerContract_v0_2_1 extends SafeWebAuthnShared
19
19
  * @param safeVersion - The version of the Safe contract.
20
20
  * @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.
21
21
  * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 0.2.1 is used.
22
+ * @param deploymentType - Optional deployment type for the contract. If not provided, the first deployment retrieved from the safe-deployments array will be used.
22
23
  */
23
- constructor(chainId: bigint, safeProvider: SafeProvider, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSharedSignerContract_v0_2_1_Abi);
24
+ constructor(chainId: bigint, safeProvider: SafeProvider, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSharedSignerContract_v0_2_1_Abi, deploymentType?: DeploymentType);
24
25
  /**
25
26
  * Return the signer configuration for the specified account.
26
27
  * @param args - Array[address]