@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
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const SafeWebAuthnSharedSignerBaseContract_1 = __importDefault(require("../../../contracts/SafeWebAuthnSharedSigner/SafeWebAuthnSharedSignerBaseContract"));
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
  * SafeWebAuthnSharedSignerContract_v0_2_1 is the implementation specific to the SafeWebAuthnSharedSigner contract version 0.2.1.
10
10
  *
@@ -22,17 +22,18 @@ class SafeWebAuthnSharedSignerContract_v0_2_1 extends SafeWebAuthnSharedSignerBa
22
22
  * @param safeVersion - The version of the Safe contract.
23
23
  * @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.
24
24
  * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 0.2.1 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, safeVersion, customContractAddress, customContractAbi) {
27
- const defaultAbi = safe_core_sdk_types_1.SafeWebAuthnSharedSigner_0_2_1_ContractArtifacts.abi;
28
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
27
+ constructor(chainId, safeProvider, safeVersion, customContractAddress, customContractAbi, deploymentType) {
28
+ const defaultAbi = types_kit_1.SafeWebAuthnSharedSigner_0_2_1_ContractArtifacts.abi;
29
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
29
30
  /**
30
31
  * Return the signer configuration for the specified account.
31
32
  * @param args - Array[address]
32
33
  * @returns Array[signer]
33
34
  */
34
35
  this.getConfiguration = async (args) => {
35
- return [await this.contract.getConfiguration(...args)];
36
+ return [await this.read('getConfiguration', args)];
36
37
  };
37
38
  /**
38
39
  * Sets the signer configuration for the calling account.
@@ -40,19 +41,18 @@ class SafeWebAuthnSharedSignerContract_v0_2_1 extends SafeWebAuthnSharedSignerBa
40
41
  * @returns Array[]
41
42
  */
42
43
  this.configure = async (args) => {
43
- await this.contract.configure(...args);
44
+ await this.write('configure', args);
44
45
  return [];
45
46
  };
46
47
  this.isValidSignature = async (args) => {
47
- return [await this.contract.isValidSignature(...args)];
48
+ return [await this.read('isValidSignature', args)];
48
49
  };
49
50
  /**
50
51
  * @returns The starting storage slot on the account containing the signer data.
51
52
  */
52
53
  this.SIGNER_SLOT = async () => {
53
- return [await this.contract.SIGNER_SLOT()];
54
+ return [await this.read('SIGNER_SLOT')];
54
55
  };
55
- this.safeVersion = safeVersion;
56
56
  }
57
57
  }
58
58
  exports.default = SafeWebAuthnSharedSignerContract_v0_2_1;
@@ -1 +1 @@
1
- {"version":3,"file":"SafeWebAuthnSharedSignerContract_v0_2_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.ts"],"names":[],"mappings":";;;;;AAAA,6KAAoJ;AACpJ,0EAMyC;AAGzC;;;;;;;GAOG;AACH,MAAM,uCACJ,SAAQ,8CAAiF;IAKzF;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,WAAwB,EACxB,qBAA8B,EAC9B,iBAA+D;QAE/D,MAAM,UAAU,GAAG,sEAAgD,CAAC,GAAG,CAAA;QAEvE,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAA;QAKjG;;;;WAIG;QACH,qBAAgB,GAAyE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACxD,CAAC,CAAA;QAED;;;;WAIG;QACH,cAAS,GAAkE,KAAK,EAAE,IAAI,EAAE,EAAE;YACxF,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAA;YACtC,OAAO,EAAE,CAAA;QACX,CAAC,CAAA;QAED,qBAAgB,GAAyE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACxD,CAAC,CAAA;QAED;;WAEG;QACH,gBAAW,GAAoE,KAAK,IAAI,EAAE;YACxF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;QAC5C,CAAC,CAAA;QAnCC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CAmCF;AAED,kBAAe,uCAAuC,CAAA"}
1
+ {"version":3,"file":"SafeWebAuthnSharedSignerContract_v0_2_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeWebAuthnSharedSigner/v0.2.1/SafeWebAuthnSharedSignerContract_v0_2_1.ts"],"names":[],"mappings":";;;;;AAAA,6KAAoJ;AACpJ,sDAM+B;AAI/B;;;;;;;GAOG;AACH,MAAM,uCACJ,SAAQ,8CAAiF;IAGzF;;;;;;;;;OASG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,WAAwB,EACxB,qBAA8B,EAC9B,iBAA+D,EAC/D,cAA+B;QAE/B,MAAM,UAAU,GAAG,4DAAgD,CAAC,GAAG,CAAA;QAEvE,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;;WAIG;QACH,qBAAgB,GAAyE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC,CAAA;QACpD,CAAC,CAAA;QAED;;;;WAIG;QACH,cAAS,GAAkE,KAAK,EAAE,IAAI,EAAE,EAAE;YACxF,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;YAEnC,OAAO,EAAE,CAAA;QACX,CAAC,CAAA;QAED,qBAAgB,GAAyE,KAAK,EAC5F,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC,CAAA;QACpD,CAAC,CAAA;QAED;;WAEG;QACH,gBAAW,GAAoE,KAAK,IAAI,EAAE;YACxF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;QACzC,CAAC,CAAA;IAnCD,CAAC;CAoCF;AAED,kBAAe,uCAAuC,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 SafeWebAuthnSignerFactoryBaseContract extends BaseContract to specifically integrate with the SafeWebAuthnSignerFactory 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
  * - SafeWebAuthnSignerFactoryContract_v0_2_1 extends SafeWebAuthnSignerFactoryBaseContract<SafeWebAuthnSignerFactoryContract_v0_2_1_Abi>
21
18
  */
22
- declare abstract class SafeWebAuthnSignerFactoryBaseContract<SafeWebAuthnSignerFactoryContractAbiType extends InterfaceAbi & Abi> extends BaseContract<SafeWebAuthnSignerFactoryContractAbiType> {
19
+ declare abstract class SafeWebAuthnSignerFactoryBaseContract<SafeWebAuthnSignerFactoryContractAbiType extends Abi> extends BaseContract<SafeWebAuthnSignerFactoryContractAbiType> {
23
20
  contractName: contractName;
24
21
  /**
25
22
  * @constructor
@@ -31,7 +28,8 @@ declare abstract class SafeWebAuthnSignerFactoryBaseContract<SafeWebAuthnSignerF
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: SafeWebAuthnSignerFactoryContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSignerFactoryContractAbiType, runner?: ContractRunner | null);
33
+ constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: SafeWebAuthnSignerFactoryContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSignerFactoryContractAbiType, deploymentType?: DeploymentType);
36
34
  }
37
35
  export default SafeWebAuthnSignerFactoryBaseContract;
@@ -27,10 +27,11 @@ class SafeWebAuthnSignerFactoryBaseContract 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 = 'safeWebAuthnSignerFactoryVersion';
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":"SafeWebAuthnSignerFactoryBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.ts"],"names":[],"mappings":";;;;;AAGA,oGAA2E;AAY3E;;;;;;;;;;;GAWG;AACH,MAAe,qCAEb,SAAQ,sBAAsD;IAG9D;;;;;;;;;;OAUG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAoD,EACpD,WAAwB,EACxB,qBAA8B,EAC9B,iBAA4D,EAC5D,MAA8B;QAE9B,MAAM,YAAY,GAAG,kCAAkC,CAAA;QAEvD,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,qCAAqC,CAAA"}
1
+ {"version":3,"file":"SafeWebAuthnSignerFactoryBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract.ts"],"names":[],"mappings":";;;;;AAGA,oGAA2E;AAI3E;;;;;;;;;;;GAWG;AACH,MAAe,qCAEb,SAAQ,sBAAsD;IAG9D;;;;;;;;;;;OAWG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAoD,EACpD,WAAwB,EACxB,qBAA8B,EAC9B,iBAA4D,EAC5D,cAA+B;QAE/B,MAAM,YAAY,GAAG,kCAAkC,CAAA;QAEvD,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,qCAAqC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import SafeWebAuthnSignerFactoryBaseContract from '../../../contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract';
2
- import { SafeVersion, SafeWebAuthnSignerFactoryContract_v0_2_1_Abi, SafeWebAuthnSignerFactoryContract_v0_2_1_Contract, SafeWebAuthnSignerFactoryContract_v0_2_1_Function } from '@safe-global/safe-core-sdk-types';
2
+ import { SafeVersion, SafeWebAuthnSignerFactoryContract_v0_2_1_Abi, SafeWebAuthnSignerFactoryContract_v0_2_1_Contract, SafeWebAuthnSignerFactoryContract_v0_2_1_Function } from '@safe-global/types-kit';
3
3
  import SafeProvider from '../../../SafeProvider';
4
+ import { DeploymentType } from '../../../types';
4
5
  /**
5
6
  * SafeWebAuthnSignerFactoryContract_v0_2_1 is the implementation specific to the SafeWebAuthnSigner Factory contract version 0.2.1.
6
7
  *
@@ -10,7 +11,6 @@ import SafeProvider from '../../../SafeProvider';
10
11
  * @implements SafeWebAuthnSignerFactoryContract_v0_2_1_Contract - Implements the interface specific to SafeWebAuthnSigner Factory contract version 0.2.1.
11
12
  */
12
13
  declare class SafeWebAuthnSignerFactoryContract_v0_2_1 extends SafeWebAuthnSignerFactoryBaseContract<SafeWebAuthnSignerFactoryContract_v0_2_1_Abi> implements SafeWebAuthnSignerFactoryContract_v0_2_1_Contract {
13
- safeVersion: SafeVersion;
14
14
  /**
15
15
  * Constructs an instance of SafeWebAuthnSignerFactoryContract_v0_2_1
16
16
  *
@@ -19,8 +19,9 @@ declare class SafeWebAuthnSignerFactoryContract_v0_2_1 extends SafeWebAuthnSigne
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?: SafeWebAuthnSignerFactoryContract_v0_2_1_Abi);
24
+ constructor(chainId: bigint, safeProvider: SafeProvider, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SafeWebAuthnSignerFactoryContract_v0_2_1_Abi, deploymentType?: DeploymentType);
24
25
  /**
25
26
  * Returns the address of the Signer.
26
27
  * @param args - Array[x, y, verifiers]
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const SafeWebAuthnSignerFactoryBaseContract_1 = __importDefault(require("../../../contracts/SafeWebAuthnSignerFactory/SafeWebAuthnSignerFactoryBaseContract"));
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
  * SafeWebAuthnSignerFactoryContract_v0_2_1 is the implementation specific to the SafeWebAuthnSigner Factory contract version 0.2.1.
10
10
  *
@@ -22,17 +22,18 @@ class SafeWebAuthnSignerFactoryContract_v0_2_1 extends SafeWebAuthnSignerFactory
22
22
  * @param safeVersion - The version of the Safe contract.
23
23
  * @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.
24
24
  * @param customContractAbi - Optional custom ABI for the contract. If not provided, the default ABI for version 0.2.1 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, safeVersion, customContractAddress, customContractAbi) {
27
- const defaultAbi = safe_core_sdk_types_1.SafeWebAuthnSignerFactory_0_2_1_ContractArtifacts.abi;
28
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
27
+ constructor(chainId, safeProvider, safeVersion, customContractAddress, customContractAbi, deploymentType) {
28
+ const defaultAbi = types_kit_1.SafeWebAuthnSignerFactory_0_2_1_ContractArtifacts.abi;
29
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
29
30
  /**
30
31
  * Returns the address of the Signer.
31
32
  * @param args - Array[x, y, verifiers]
32
33
  * @returns Array[signer]
33
34
  */
34
35
  this.getSigner = async (args) => {
35
- return [await this.contract.getSigner(...args)];
36
+ return [await this.read('getSigner', args)];
36
37
  };
37
38
  /**
38
39
  * Returns the address of the Signer and deploy the signer contract if its not deployed yet.
@@ -40,12 +41,11 @@ class SafeWebAuthnSignerFactoryContract_v0_2_1 extends SafeWebAuthnSignerFactory
40
41
  * @returns Array[signer]
41
42
  */
42
43
  this.createSigner = async (args) => {
43
- return [await this.contract.createSigner(...args)];
44
+ return [await this.write('createSigner', args)];
44
45
  };
45
46
  this.isValidSignatureForSigner = async (args) => {
46
- return [await this.contract.isValidSignatureForSigner(...args)];
47
+ return [await this.read('isValidSignatureForSigner', args)];
47
48
  };
48
- this.safeVersion = safeVersion;
49
49
  }
50
50
  }
51
51
  exports.default = SafeWebAuthnSignerFactoryContract_v0_2_1;
@@ -1 +1 @@
1
- {"version":3,"file":"SafeWebAuthnSignerFactoryContract_v0_2_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.ts"],"names":[],"mappings":";;;;;AAAA,gLAAuJ;AACvJ,0EAMyC;AAGzC;;;;;;;GAOG;AACH,MAAM,wCACJ,SAAQ,+CAAmF;IAK3F;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,WAAwB,EACxB,qBAA8B,EAC9B,iBAAgE;QAEhE,MAAM,UAAU,GAAG,uEAAiD,CAAC,GAAG,CAAA;QAExE,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAA;QAKjG;;;;WAIG;QACH,cAAS,GAAmE,KAAK,EAAE,IAAI,EAAE,EAAE;YACzF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACjD,CAAC,CAAA;QAED;;;;WAIG;QACH,iBAAY,GAAsE,KAAK,EACrF,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACpD,CAAC,CAAA;QAED,8BAAyB,GACvB,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACjE,CAAC,CAAA;QA1BD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CA0BF;AAED,kBAAe,wCAAwC,CAAA"}
1
+ {"version":3,"file":"SafeWebAuthnSignerFactoryContract_v0_2_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SafeWebAuthnSignerFactory/v0.2.1/SafeWebAuthnSignerFactoryContract_v0_2_1.ts"],"names":[],"mappings":";;;;;AAAA,gLAAuJ;AACvJ,sDAM+B;AAI/B;;;;;;;GAOG;AACH,MAAM,wCACJ,SAAQ,+CAAmF;IAG3F;;;;;;;;;OASG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,WAAwB,EACxB,qBAA8B,EAC9B,iBAAgE,EAChE,cAA+B;QAE/B,MAAM,UAAU,GAAG,6DAAiD,CAAC,GAAG,CAAA;QAExE,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;;WAIG;QACH,cAAS,GAAmE,KAAK,EAAE,IAAI,EAAE,EAAE;YACzF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAA;QAC7C,CAAC,CAAA;QAED;;;;WAIG;QACH,iBAAY,GAAsE,KAAK,EACrF,IAAI,EACJ,EAAE;YACF,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAA;QACjD,CAAC,CAAA;QAED,8BAAyB,GACvB,KAAK,EAAE,IAAI,EAAE,EAAE;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC,CAAA;QAC7D,CAAC,CAAA;IAzBH,CAAC;CA0BF;AAED,kBAAe,wCAAwC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { Abi } from 'abitype';
2
- import { InterfaceAbi } from 'ethers';
3
2
  import SafeProvider from '../../SafeProvider';
4
- import { SafeVersion } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../types';
4
+ import { SafeVersion } from '@safe-global/types-kit';
5
5
  import BaseContract from '../../contracts/BaseContract';
6
6
  import { contractName } from '../../contracts/config';
7
7
  /**
@@ -17,7 +17,7 @@ import { contractName } from '../../contracts/config';
17
17
  * - SignMessageLibContract_v1_4_1 extends SignMessageLibBaseContract<SignMessageLibContract_v1_4_1_Abi>
18
18
  * - SignMessageLibContract_v1_3_0 extends SignMessageLibBaseContract<SignMessageLibContract_v1_3_0_Abi>
19
19
  */
20
- declare abstract class SignMessageLibBaseContract<SignMessageLibContractAbiType extends InterfaceAbi & Abi> extends BaseContract<SignMessageLibContractAbiType> {
20
+ declare abstract class SignMessageLibBaseContract<SignMessageLibContractAbiType extends Abi> extends BaseContract<SignMessageLibContractAbiType> {
21
21
  contractName: contractName;
22
22
  /**
23
23
  * @constructor
@@ -29,7 +29,8 @@ declare abstract class SignMessageLibBaseContract<SignMessageLibContractAbiType
29
29
  * @param safeVersion - The version of the SignMessageLib contract.
30
30
  * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the SignMessageLib 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 SignMessageLib 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: SignMessageLibContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SignMessageLibContractAbiType);
34
+ constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: SignMessageLibContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SignMessageLibContractAbiType, deploymentType?: DeploymentType);
34
35
  }
35
36
  export default SignMessageLibBaseContract;
@@ -28,10 +28,11 @@ class SignMessageLibBaseContract extends BaseContract_1.default {
28
28
  * @param safeVersion - The version of the SignMessageLib contract.
29
29
  * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the SignMessageLib 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 SignMessageLib 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 = 'signMessageLibVersion';
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":"SignMessageLibBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SignMessageLib/SignMessageLibBaseContract.ts"],"names":[],"mappings":";;;;;AAKA,oGAA2E;AAG3E;;;;;;;;;;;;GAYG;AACH,MAAe,0BAEb,SAAQ,sBAA2C;IAGnD;;;;;;;;;;OAUG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAyC,EACzC,WAAwB,EACxB,qBAA8B,EAC9B,iBAAiD;QAEjD,MAAM,YAAY,GAAG,uBAAuB,CAAA;QAE5C,KAAK,CACH,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,CAClB,CAAA;QAED,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;CACF;AAED,kBAAe,0BAA0B,CAAA"}
1
+ {"version":3,"file":"SignMessageLibBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SignMessageLib/SignMessageLibBaseContract.ts"],"names":[],"mappings":";;;;;AAKA,oGAA2E;AAG3E;;;;;;;;;;;;GAYG;AACH,MAAe,0BAEb,SAAQ,sBAA2C;IAGnD;;;;;;;;;;;OAWG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAAyC,EACzC,WAAwB,EACxB,qBAA8B,EAC9B,iBAAiD,EACjD,cAA+B;QAE/B,MAAM,YAAY,GAAG,uBAAuB,CAAA;QAE5C,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,0BAA0B,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import SignMessageLibBaseContract from '../../../contracts/SignMessageLib/SignMessageLibBaseContract';
2
2
  import SafeProvider from '../../../SafeProvider';
3
- import { SafeVersion, SafeContractFunction, SignMessageLibContract_v1_3_0_Abi, SignMessageLibContract_v1_3_0_Contract, SignMessageLibContract_v1_3_0_Function } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../../types';
4
+ import { SafeContractFunction, SignMessageLibContract_v1_3_0_Abi, SignMessageLibContract_v1_3_0_Contract, SignMessageLibContract_v1_3_0_Function } from '@safe-global/types-kit';
4
5
  /**
5
6
  * SignMessageLibContract_v1_3_0 is the implementation specific to the SignMessageLib contract version 1.3.0.
6
7
  *
@@ -10,7 +11,6 @@ import { SafeVersion, SafeContractFunction, SignMessageLibContract_v1_3_0_Abi, S
10
11
  * @implements SignMessageLibContract_v1_3_0_Contract - Implements the interface specific to SignMessageLib contract version 1.3.0.
11
12
  */
12
13
  declare class SignMessageLibContract_v1_3_0 extends SignMessageLibBaseContract<SignMessageLibContract_v1_3_0_Abi> implements SignMessageLibContract_v1_3_0_Contract {
13
- safeVersion: SafeVersion;
14
14
  /**
15
15
  * Constructs an instance of SignMessageLibContract_v1_3_0
16
16
  *
@@ -18,8 +18,9 @@ declare class SignMessageLibContract_v1_3_0 extends SignMessageLibBaseContract<S
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 SignMessageLib 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?: SignMessageLibContract_v1_3_0_Abi);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SignMessageLibContract_v1_3_0_Abi, deploymentType?: DeploymentType);
23
24
  /**
24
25
  * @param args - Array[message]
25
26
  */
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const utils_1 = require("../../../contracts/utils");
7
7
  const SignMessageLibBaseContract_1 = __importDefault(require("../../../contracts/SignMessageLib/SignMessageLibBaseContract"));
8
- const safe_core_sdk_types_1 = require("@safe-global/safe-core-sdk-types");
8
+ const types_kit_1 = require("@safe-global/types-kit");
9
9
  /**
10
10
  * SignMessageLibContract_v1_3_0 is the implementation specific to the SignMessageLib contract version 1.3.0.
11
11
  *
@@ -22,16 +22,17 @@ class SignMessageLibContract_v1_3_0 extends SignMessageLibBaseContract_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 SignMessageLib 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 = safe_core_sdk_types_1.signMessageLib_1_3_0_ContractArtifacts.abi;
29
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
29
+ const defaultAbi = types_kit_1.signMessageLib_1_3_0_ContractArtifacts.abi;
30
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
30
31
  /**
31
32
  * @param args - Array[message]
32
33
  */
33
34
  this.getMessageHash = async (args) => {
34
- return [await this.contract.getMessageHash(...args)];
35
+ return [await this.read('getMessageHash', args)];
35
36
  };
36
37
  /**
37
38
  * @param args - Array[data]
@@ -40,10 +41,8 @@ class SignMessageLibContract_v1_3_0 extends SignMessageLibBaseContract_1.default
40
41
  if (options && !options.gasLimit) {
41
42
  options.gasLimit = Number(await this.estimateGas('signMessage', data, { ...options }));
42
43
  }
43
- const txResponse = await this.contract.signMessage(data, { ...options });
44
- return (0, utils_1.toTxResult)(txResponse, options);
44
+ return (0, utils_1.toTxResult)(this.runner, await this.write('signMessage', data, options), options);
45
45
  };
46
- this.safeVersion = safeVersion;
47
46
  }
48
47
  }
49
48
  exports.default = SignMessageLibContract_v1_3_0;
@@ -1 +1 @@
1
- {"version":3,"file":"SignMessageLibContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,qEAAsE;AACtE,+IAAsH;AAEtH,0EAOyC;AAEzC;;;;;;;GAOG;AACH,MAAM,6BACJ,SAAQ,oCAA6D;IAKrE;;;;;;;OAOG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAqD;QAErD,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,4DAAsC,CAAC,GAAG,CAAA;QAE7D,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAA;QAIjG;;WAEG;QACH,mBAAc,GAA6D,KAAK,EAAE,IAAI,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACtD,CAAC,CAAA;QAED;;WAEG;QACH,gBAAW,GAA2E,KAAK,EACzF,IAAI,EACJ,OAAO,EACP,EAAE;YACF,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;YAExE,OAAO,IAAA,kBAAU,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;QACxC,CAAC,CAAA;QAvBC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CAuBF;AAED,kBAAe,6BAA6B,CAAA"}
1
+ {"version":3,"file":"SignMessageLibContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,qEAAsE;AACtE,+IAAsH;AAGtH,sDAM+B;AAE/B;;;;;;;GAOG;AACH,MAAM,6BACJ,SAAQ,oCAA6D;IAGrE;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAqD,EACrD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,kDAAsC,CAAC,GAAG,CAAA;QAE7D,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAEH;;WAEG;QACH,mBAAc,GAA6D,KAAK,EAAE,IAAI,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAA;QAClD,CAAC,CAAA;QAED;;WAEG;QACH,gBAAW,GAA2E,KAAK,EACzF,IAAI,EACJ,OAAO,EACP,EAAE;YACF,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,CAAC;YAED,OAAO,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;QAC1F,CAAC,CAAA;IApBD,CAAC;CAqBF;AAED,kBAAe,6BAA6B,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import SignMessageLibBaseContract from '../../../contracts/SignMessageLib/SignMessageLibBaseContract';
2
2
  import SafeProvider from '../../../SafeProvider';
3
- import { SafeVersion, SafeContractFunction, SignMessageLibContract_v1_4_1_Abi, SignMessageLibContract_v1_4_1_Contract, SignMessageLibContract_v1_4_1_Function } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../../types';
4
+ import { SafeContractFunction, SignMessageLibContract_v1_4_1_Abi, SignMessageLibContract_v1_4_1_Contract, SignMessageLibContract_v1_4_1_Function } from '@safe-global/types-kit';
4
5
  /**
5
6
  * SignMessageLibContract_v1_4_1 is the implementation specific to the SignMessageLib contract version 1.4.1.
6
7
  *
@@ -10,7 +11,6 @@ import { SafeVersion, SafeContractFunction, SignMessageLibContract_v1_4_1_Abi, S
10
11
  * @implements SignMessageLibContract_v1_4_1_Contract - Implements the interface specific to SignMessageLib contract version 1.4.1.
11
12
  */
12
13
  declare class SignMessageLibContract_v1_4_1 extends SignMessageLibBaseContract<SignMessageLibContract_v1_4_1_Abi> implements SignMessageLibContract_v1_4_1_Contract {
13
- safeVersion: SafeVersion;
14
14
  /**
15
15
  * Constructs an instance of SignMessageLibContract_v1_4_1
16
16
  *
@@ -18,8 +18,9 @@ declare class SignMessageLibContract_v1_4_1 extends SignMessageLibBaseContract<S
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 SignMessageLib 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?: SignMessageLibContract_v1_4_1_Abi);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SignMessageLibContract_v1_4_1_Abi, deploymentType?: DeploymentType);
23
24
  /**
24
25
  * @param args - Array[message]
25
26
  */
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const utils_1 = require("../../../contracts/utils");
7
7
  const SignMessageLibBaseContract_1 = __importDefault(require("../../../contracts/SignMessageLib/SignMessageLibBaseContract"));
8
- const safe_core_sdk_types_1 = require("@safe-global/safe-core-sdk-types");
8
+ const types_kit_1 = require("@safe-global/types-kit");
9
9
  /**
10
10
  * SignMessageLibContract_v1_4_1 is the implementation specific to the SignMessageLib contract version 1.4.1.
11
11
  *
@@ -22,16 +22,17 @@ class SignMessageLibContract_v1_4_1 extends SignMessageLibBaseContract_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 SignMessageLib 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.4.1 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.4.1';
28
- const defaultAbi = safe_core_sdk_types_1.signMessageLib_1_4_1_ContractArtifacts.abi;
29
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
29
+ const defaultAbi = types_kit_1.signMessageLib_1_4_1_ContractArtifacts.abi;
30
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
30
31
  /**
31
32
  * @param args - Array[message]
32
33
  */
33
34
  this.getMessageHash = async (args) => {
34
- return [await this.contract.getMessageHash(...args)];
35
+ return [await this.read('getMessageHash', args)];
35
36
  };
36
37
  /**
37
38
  * @param args - Array[data]
@@ -40,10 +41,8 @@ class SignMessageLibContract_v1_4_1 extends SignMessageLibBaseContract_1.default
40
41
  if (options && !options.gasLimit) {
41
42
  options.gasLimit = Number(await this.estimateGas('signMessage', data, { ...options }));
42
43
  }
43
- const txResponse = await this.contract.signMessage(data, { ...options });
44
- return (0, utils_1.toTxResult)(txResponse, options);
44
+ return (0, utils_1.toTxResult)(this.runner, await this.write('signMessage', data, options), options);
45
45
  };
46
- this.safeVersion = safeVersion;
47
46
  }
48
47
  }
49
48
  exports.default = SignMessageLibContract_v1_4_1;
@@ -1 +1 @@
1
- {"version":3,"file":"SignMessageLibContract_v1_4_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.ts"],"names":[],"mappings":";;;;;AAAA,qEAAsE;AACtE,+IAAsH;AAEtH,0EAOyC;AAEzC;;;;;;;GAOG;AACH,MAAM,6BACJ,SAAQ,oCAA6D;IAKrE;;;;;;;OAOG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAqD;QAErD,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,4DAAsC,CAAC,GAAG,CAAA;QAE7D,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAA;QAKjG;;WAEG;QACH,mBAAc,GAA6D,KAAK,EAAE,IAAI,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;QACtD,CAAC,CAAA;QAED;;WAEG;QACH,gBAAW,GAA2E,KAAK,EACzF,IAAI,EACJ,OAAO,EACP,EAAE;YACF,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;YAExE,OAAO,IAAA,kBAAU,EAAC,UAAU,EAAE,OAAO,CAAC,CAAA;QACxC,CAAC,CAAA;QAxBC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CAwBF;AAED,kBAAe,6BAA6B,CAAA"}
1
+ {"version":3,"file":"SignMessageLibContract_v1_4_1.js","sourceRoot":"","sources":["../../../../../src/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_v1_4_1.ts"],"names":[],"mappings":";;;;;AAAA,qEAAsE;AACtE,+IAAsH;AAGtH,sDAM+B;AAE/B;;;;;;;GAOG;AACH,MAAM,6BACJ,SAAQ,oCAA6D;IAGrE;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAqD,EACrD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,kDAAsC,CAAC,GAAG,CAAA;QAE7D,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;WAEG;QACH,mBAAc,GAA6D,KAAK,EAAE,IAAI,EAAE,EAAE;YACxF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAA;QAClD,CAAC,CAAA;QAED;;WAEG;QACH,gBAAW,GAA2E,KAAK,EACzF,IAAI,EACJ,OAAO,EACP,EAAE;YACF,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACjC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,CAAC;YAED,OAAO,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAO,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;QAC1F,CAAC,CAAA;IArBD,CAAC;CAsBF;AAED,kBAAe,6BAA6B,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { Abi } from 'abitype';
2
- import { ContractRunner, InterfaceAbi } from 'ethers';
3
2
  import BaseContract from '../../contracts/BaseContract';
4
3
  import SafeProvider from '../../SafeProvider';
5
- import { SafeVersion } from '@safe-global/safe-core-sdk-types';
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 SimulateTxAccessorBaseContract extends BaseContract to specifically integrate with the SimulateTxAccessor contract.
@@ -17,7 +17,7 @@ import { contractName } from '../../contracts/config';
17
17
  * - SimulateTxAccessorContract_v1_4_1 extends SimulateTxAccessorBaseContract<SimulateTxAccessorContract_v1_4_1_Abi>
18
18
  * - SimulateTxAccessorContract_v1_3_0 extends SimulateTxAccessorBaseContract<SimulateTxAccessorContract_v1_3_0_Abi>
19
19
  */
20
- declare abstract class SimulateTxAccessorBaseContract<SimulateTxAccessorContractAbiType extends InterfaceAbi & Abi> extends BaseContract<SimulateTxAccessorContractAbiType> {
20
+ declare abstract class SimulateTxAccessorBaseContract<SimulateTxAccessorContractAbiType extends Abi> extends BaseContract<SimulateTxAccessorContractAbiType> {
21
21
  contractName: contractName;
22
22
  /**
23
23
  * @constructor
@@ -29,7 +29,8 @@ declare abstract class SimulateTxAccessorBaseContract<SimulateTxAccessorContract
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: SimulateTxAccessorContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SimulateTxAccessorContractAbiType, runner?: ContractRunner | null);
34
+ constructor(chainId: bigint, safeProvider: SafeProvider, defaultAbi: SimulateTxAccessorContractAbiType, safeVersion: SafeVersion, customContractAddress?: string, customContractAbi?: SimulateTxAccessorContractAbiType, deploymentType?: DeploymentType);
34
35
  }
35
36
  export default SimulateTxAccessorBaseContract;
@@ -28,10 +28,11 @@ class SimulateTxAccessorBaseContract 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, runner) {
33
+ constructor(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType) {
33
34
  const contractName = 'simulateTxAccessorVersion';
34
- super(contractName, chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, runner);
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":"SimulateTxAccessorBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.ts"],"names":[],"mappings":";;;;;AAGA,oGAA2E;AAK3E;;;;;;;;;;;;GAYG;AACH,MAAe,8BAEb,SAAQ,sBAA+C;IAGvD;;;;;;;;;;OAUG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAA6C,EAC7C,WAAwB,EACxB,qBAA8B,EAC9B,iBAAqD,EACrD,MAA8B;QAE9B,MAAM,YAAY,GAAG,2BAA2B,CAAA;QAEhD,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,8BAA8B,CAAA"}
1
+ {"version":3,"file":"SimulateTxAccessorBaseContract.js","sourceRoot":"","sources":["../../../../src/contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract.ts"],"names":[],"mappings":";;;;;AAEA,oGAA2E;AAM3E;;;;;;;;;;;;GAYG;AACH,MAAe,8BAEb,SAAQ,sBAA+C;IAGvD;;;;;;;;;;;OAWG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,UAA6C,EAC7C,WAAwB,EACxB,qBAA8B,EAC9B,iBAAqD,EACrD,cAA+B;QAE/B,MAAM,YAAY,GAAG,2BAA2B,CAAA;QAEhD,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,8BAA8B,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import SimulateTxAccessorBaseContract from '../../../contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract';
2
2
  import SafeProvider from '../../../SafeProvider';
3
- import { SafeVersion, SimulateTxAccessorContract_v1_3_0_Abi, SimulateTxAccessorContract_v1_3_0_Contract, SimulateTxAccessorContract_v1_3_0_Function } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../../types';
4
+ import { SimulateTxAccessorContract_v1_3_0_Abi, SimulateTxAccessorContract_v1_3_0_Contract, SimulateTxAccessorContract_v1_3_0_Function } from '@safe-global/types-kit';
4
5
  /**
5
6
  * SimulateTxAccessorContract_v1_3_0 is the implementation specific to the SimulateTxAccessor contract version 1.3.0.
6
7
  *
@@ -10,7 +11,6 @@ import { SafeVersion, SimulateTxAccessorContract_v1_3_0_Abi, SimulateTxAccessorC
10
11
  * @implements SimulateTxAccessorContract_v1_3_0_Contract - Implements the interface specific to SimulateTxAccessor contract version 1.3.0.
11
12
  */
12
13
  declare class SimulateTxAccessorContract_v1_3_0 extends SimulateTxAccessorBaseContract<SimulateTxAccessorContract_v1_3_0_Abi> implements SimulateTxAccessorContract_v1_3_0_Contract {
13
- safeVersion: SafeVersion;
14
14
  /**
15
15
  * Constructs an instance of SimulateTxAccessorContract_v1_3_0
16
16
  *
@@ -18,8 +18,9 @@ declare class SimulateTxAccessorContract_v1_3_0 extends SimulateTxAccessorBaseCo
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 SimulateTxAccessor 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?: SimulateTxAccessorContract_v1_3_0_Abi);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SimulateTxAccessorContract_v1_3_0_Abi, deploymentType?: DeploymentType);
23
24
  /**
24
25
  * @param args - Array[to, value, data, operation]
25
26
  * @returns Array[estimate, success, returnData]
@@ -4,7 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const SimulateTxAccessorBaseContract_1 = __importDefault(require("../../../contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract"));
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
+ const types_1 = require("../../../utils/types");
8
9
  /**
9
10
  * SimulateTxAccessorContract_v1_3_0 is the implementation specific to the SimulateTxAccessor contract version 1.3.0.
10
11
  *
@@ -21,19 +22,20 @@ class SimulateTxAccessorContract_v1_3_0 extends SimulateTxAccessorBaseContract_1
21
22
  * @param safeProvider - An instance of SafeProvider.
22
23
  * @param customContractAddress - Optional custom address for the contract. If not provided, the address is derived from the SimulateTxAccessor deployments based on the chainId and safeVersion.
23
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.
24
26
  */
25
- constructor(chainId, safeProvider, customContractAddress, customContractAbi) {
27
+ constructor(chainId, safeProvider, customContractAddress, customContractAbi, deploymentType) {
26
28
  const safeVersion = '1.3.0';
27
- const defaultAbi = safe_core_sdk_types_1.simulateTxAccessor_1_3_0_ContractArtifacts.abi;
28
- super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi);
29
+ const defaultAbi = types_kit_1.simulateTxAccessor_1_3_0_ContractArtifacts.abi;
30
+ super(chainId, safeProvider, defaultAbi, safeVersion, customContractAddress, customContractAbi, deploymentType);
29
31
  /**
30
32
  * @param args - Array[to, value, data, operation]
31
33
  * @returns Array[estimate, success, returnData]
32
34
  */
33
- this.simulate = (args) => {
34
- return this.contract.simulate(...args);
35
+ this.simulate = async (args) => {
36
+ const [estimate, success, returnData] = await this.write('simulate', args);
37
+ return [BigInt(estimate), !!success, (0, types_1.asHex)(returnData)];
35
38
  };
36
- this.safeVersion = safeVersion;
37
39
  }
38
40
  }
39
41
  exports.default = SimulateTxAccessorContract_v1_3_0;
@@ -1 +1 @@
1
- {"version":3,"file":"SimulateTxAccessorContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,2JAAkI;AAElI,0EAMyC;AAEzC;;;;;;;GAOG;AACH,MAAM,iCACJ,SAAQ,wCAAqE;IAK7E;;;;;;;OAOG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAyD;QAEzD,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,gEAA0C,CAAC,GAAG,CAAA;QAEjE,KAAK,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,CAAA;QAKjG;;;WAGG;QACH,aAAQ,GAA2D,CAAC,IAAI,EAAE,EAAE;YAC1E,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAA;QACxC,CAAC,CAAA;QATC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CASF;AAED,kBAAe,iCAAiC,CAAA"}
1
+ {"version":3,"file":"SimulateTxAccessorContract_v1_3_0.js","sourceRoot":"","sources":["../../../../../src/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_v1_3_0.ts"],"names":[],"mappings":";;;;;AAAA,2JAAkI;AAGlI,sDAK+B;AAE/B,iEAA6D;AAE7D;;;;;;;GAOG;AACH,MAAM,iCACJ,SAAQ,wCAAqE;IAG7E;;;;;;;;OAQG;IACH,YACE,OAAe,EACf,YAA0B,EAC1B,qBAA8B,EAC9B,iBAAyD,EACzD,cAA+B;QAE/B,MAAM,WAAW,GAAG,OAAO,CAAA;QAC3B,MAAM,UAAU,GAAG,sDAA0C,CAAC,GAAG,CAAA;QAEjE,KAAK,CACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CACf,CAAA;QAGH;;;WAGG;QACH,aAAQ,GAA2D,KAAK,EAAE,IAAI,EAAE,EAAE;YAChF,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;YAC1E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,IAAA,aAAK,EAAC,UAAU,CAAC,CAAC,CAAA;QACzD,CAAC,CAAA;IATD,CAAC;CAUF;AAED,kBAAe,iCAAiC,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import SimulateTxAccessorBaseContract from '../../../contracts/SimulateTxAccessor/SimulateTxAccessorBaseContract';
2
2
  import SafeProvider from '../../../SafeProvider';
3
- import { SafeVersion, SimulateTxAccessorContract_v1_4_1_Abi, SimulateTxAccessorContract_v1_4_1_Contract, SimulateTxAccessorContract_v1_4_1_Function } from '@safe-global/safe-core-sdk-types';
3
+ import { DeploymentType } from '../../../types';
4
+ import { SimulateTxAccessorContract_v1_4_1_Abi, SimulateTxAccessorContract_v1_4_1_Contract, SimulateTxAccessorContract_v1_4_1_Function } from '@safe-global/types-kit';
4
5
  /**
5
6
  * SimulateTxAccessorContract_v1_4_1 is the implementation specific to the SimulateTxAccessor contract version 1.4.1.
6
7
  *
@@ -10,7 +11,6 @@ import { SafeVersion, SimulateTxAccessorContract_v1_4_1_Abi, SimulateTxAccessorC
10
11
  * @implements SimulateTxAccessorContract_v1_4_1_Contract - Implements the interface specific to SimulateTxAccessor contract version 1.4.1.
11
12
  */
12
13
  declare class SimulateTxAccessorContract_v1_4_1 extends SimulateTxAccessorBaseContract<SimulateTxAccessorContract_v1_4_1_Abi> implements SimulateTxAccessorContract_v1_4_1_Contract {
13
- safeVersion: SafeVersion;
14
14
  /**
15
15
  * Constructs an instance of SimulateTxAccessorContract_v1_4_1
16
16
  *
@@ -18,8 +18,9 @@ declare class SimulateTxAccessorContract_v1_4_1 extends SimulateTxAccessorBaseCo
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 SimulateTxAccessor 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?: SimulateTxAccessorContract_v1_4_1_Abi);
23
+ constructor(chainId: bigint, safeProvider: SafeProvider, customContractAddress?: string, customContractAbi?: SimulateTxAccessorContract_v1_4_1_Abi, deploymentType?: DeploymentType);
23
24
  /**
24
25
  * @param args - Array[to, value, data, operation]
25
26
  * @returns Array[estimate, success, returnData]