@safe-global/protocol-kit 1.2.0 → 2.0.0-alpha.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 (501) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +1033 -1033
  3. package/dist/src/Safe.d.ts +57 -8
  4. package/dist/src/Safe.js +192 -34
  5. package/dist/src/Safe.js.map +1 -1
  6. package/dist/src/adapters/ethers/EthersAdapter.d.ts +6 -10
  7. package/dist/src/adapters/ethers/EthersAdapter.js +18 -20
  8. package/dist/src/adapters/ethers/EthersAdapter.js.map +1 -1
  9. package/dist/src/adapters/ethers/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerEthersContract.d.ts +3 -3
  10. package/dist/src/adapters/ethers/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerEthersContract.js +1 -1
  11. package/dist/src/adapters/ethers/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerEthersContract.js.map +1 -1
  12. package/dist/src/adapters/ethers/contracts/CompatibilityFallbackHandler/v1.3.0/CompatibilityFallbackHandler_V1_3_0_Ethers.d.ts +1 -1
  13. package/dist/src/adapters/ethers/contracts/CompatibilityFallbackHandler/v1.4.1/CompatibilityFallbackHandler_V1_4_1_Ethers.d.ts +1 -1
  14. package/dist/src/adapters/ethers/contracts/CreateCall/CreateCallEthersContract.d.ts +3 -3
  15. package/dist/src/adapters/ethers/contracts/CreateCall/CreateCallEthersContract.js +5 -4
  16. package/dist/src/adapters/ethers/contracts/CreateCall/CreateCallEthersContract.js.map +1 -1
  17. package/dist/src/adapters/ethers/contracts/CreateCall/v1.3.0/CreateCallEthersContract_V1_3_0_Ethers.d.ts +1 -1
  18. package/dist/src/adapters/ethers/contracts/CreateCall/v1.4.1/CreateCallEthersContract_V1_4_1_Ethers.d.ts +1 -1
  19. package/dist/src/adapters/ethers/contracts/MultiSend/MultiSendEthersContract.d.ts +4 -4
  20. package/dist/src/adapters/ethers/contracts/MultiSend/MultiSendEthersContract.js +1 -1
  21. package/dist/src/adapters/ethers/contracts/MultiSend/MultiSendEthersContract.js.map +1 -1
  22. package/dist/src/adapters/ethers/contracts/MultiSend/v1.1.1/MultiSendContract_V1_1_1_Ethers.d.ts +1 -1
  23. package/dist/src/adapters/ethers/contracts/MultiSend/v1.3.0/MultiSendContract_V1_3_0_Ethers.d.ts +1 -1
  24. package/dist/src/adapters/ethers/contracts/MultiSend/v1.4.1/MultiSendContract_V1_4_1_Ethers.d.ts +1 -1
  25. package/dist/src/adapters/ethers/contracts/MultiSendCallOnly/MultiSendCallOnlyEthersContract.d.ts +3 -3
  26. package/dist/src/adapters/ethers/contracts/MultiSendCallOnly/MultiSendCallOnlyEthersContract.js +1 -1
  27. package/dist/src/adapters/ethers/contracts/MultiSendCallOnly/MultiSendCallOnlyEthersContract.js.map +1 -1
  28. package/dist/src/adapters/ethers/contracts/MultiSendCallOnly/v1.3.0/MultiSendCallOnlyContract_V1_3_0_Ethers.d.ts +1 -1
  29. package/dist/src/adapters/ethers/contracts/MultiSendCallOnly/v1.4.1/MultiSendCallOnlyContract_V1_4_1_Ethers.d.ts +1 -1
  30. package/dist/src/adapters/ethers/contracts/Safe/SafeContractEthers.d.ts +7 -8
  31. package/dist/src/adapters/ethers/contracts/Safe/SafeContractEthers.js +8 -8
  32. package/dist/src/adapters/ethers/contracts/Safe/SafeContractEthers.js.map +1 -1
  33. package/dist/src/adapters/ethers/contracts/Safe/v1.0.0/SafeContract_V1_0_0_Ethers.d.ts +1 -1
  34. package/dist/src/adapters/ethers/contracts/Safe/v1.0.0/SafeContract_V1_0_0_Ethers.js +1 -1
  35. package/dist/src/adapters/ethers/contracts/Safe/v1.0.0/SafeContract_V1_0_0_Ethers.js.map +1 -1
  36. package/dist/src/adapters/ethers/contracts/Safe/v1.1.1/SafeContract_V1_1_1_Ethers.d.ts +1 -1
  37. package/dist/src/adapters/ethers/contracts/Safe/v1.1.1/SafeContract_V1_1_1_Ethers.js +1 -1
  38. package/dist/src/adapters/ethers/contracts/Safe/v1.1.1/SafeContract_V1_1_1_Ethers.js.map +1 -1
  39. package/dist/src/adapters/ethers/contracts/Safe/v1.2.0/SafeContract_V1_2_0_Ethers.d.ts +1 -1
  40. package/dist/src/adapters/ethers/contracts/Safe/v1.2.0/SafeContract_V1_2_0_Ethers.js +1 -1
  41. package/dist/src/adapters/ethers/contracts/Safe/v1.2.0/SafeContract_V1_2_0_Ethers.js.map +1 -1
  42. package/dist/src/adapters/ethers/contracts/Safe/v1.3.0/SafeContract_V1_3_0_Ethers.d.ts +1 -1
  43. package/dist/src/adapters/ethers/contracts/Safe/v1.3.0/SafeContract_V1_3_0_Ethers.js +1 -1
  44. package/dist/src/adapters/ethers/contracts/Safe/v1.3.0/SafeContract_V1_3_0_Ethers.js.map +1 -1
  45. package/dist/src/adapters/ethers/contracts/Safe/v1.4.1/SafeContract_V1_4_1_Ethers.d.ts +1 -1
  46. package/dist/src/adapters/ethers/contracts/Safe/v1.4.1/SafeContract_V1_4_1_Ethers.js +1 -1
  47. package/dist/src/adapters/ethers/contracts/Safe/v1.4.1/SafeContract_V1_4_1_Ethers.js.map +1 -1
  48. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/SafeProxyFactoryEthersContract.d.ts +7 -7
  49. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/SafeProxyFactoryEthersContract.js +9 -9
  50. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/SafeProxyFactoryEthersContract.js.map +1 -1
  51. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/v1.0.0/SafeProxyFactoryContract_V1_0_0_Ethers.d.ts +1 -1
  52. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/v1.1.1/SafeProxyFactoryContract_V1_1_1_Ethers.d.ts +1 -1
  53. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/v1.3.0/SafeProxyFactoryContract_V1_3_0_Ethers.d.ts +1 -1
  54. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/v1.4.1/SafeProxyFactoryContract_V1_4_1_Ethers.d.ts +1 -1
  55. package/dist/src/adapters/ethers/contracts/SignMessageLib/SignMessageLibEthersContract.d.ts +3 -3
  56. package/dist/src/adapters/ethers/contracts/SignMessageLib/SignMessageLibEthersContract.js +4 -3
  57. package/dist/src/adapters/ethers/contracts/SignMessageLib/SignMessageLibEthersContract.js.map +1 -1
  58. package/dist/src/adapters/ethers/contracts/SignMessageLib/v1.3.0/SignMessageLibContract_V1_3_0_Ethers.d.ts +1 -1
  59. package/dist/src/adapters/ethers/contracts/SignMessageLib/v1.4.1/SignMessageLibContract_V1_4_1_Ethers.d.ts +1 -1
  60. package/dist/src/adapters/ethers/contracts/SimulateTxAccessor/SimulateTxAccessorEthersContract.d.ts +3 -3
  61. package/dist/src/adapters/ethers/contracts/SimulateTxAccessor/SimulateTxAccessorEthersContract.js +1 -1
  62. package/dist/src/adapters/ethers/contracts/SimulateTxAccessor/SimulateTxAccessorEthersContract.js.map +1 -1
  63. package/dist/src/adapters/ethers/contracts/SimulateTxAccessor/v1.3.0/SimulateTxAccessorContract_V1_3_0_Ethers.d.ts +1 -1
  64. package/dist/src/adapters/ethers/contracts/SimulateTxAccessor/v1.4.1/SimulateTxAccessorContract_V1_4_1_Ethers.d.ts +1 -1
  65. package/dist/src/adapters/ethers/contracts/contractInstancesEthers.d.ts +9 -10
  66. package/dist/src/adapters/ethers/contracts/contractInstancesEthers.js +22 -22
  67. package/dist/src/adapters/ethers/contracts/contractInstancesEthers.js.map +1 -1
  68. package/dist/src/adapters/ethers/types.d.ts +2 -2
  69. package/dist/src/adapters/ethers/utils/index.d.ts +4 -7
  70. package/dist/src/adapters/ethers/utils/index.js +5 -6
  71. package/dist/src/adapters/ethers/utils/index.js.map +1 -1
  72. package/dist/src/adapters/web3/Web3Adapter.d.ts +2 -3
  73. package/dist/src/adapters/web3/Web3Adapter.js +19 -21
  74. package/dist/src/adapters/web3/Web3Adapter.js.map +1 -1
  75. package/dist/src/adapters/web3/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerWeb3Contract.d.ts +1 -1
  76. package/dist/src/adapters/web3/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerWeb3Contract.js +1 -1
  77. package/dist/src/adapters/web3/contracts/CompatibilityFallbackHandler/CompatibilityFallbackHandlerWeb3Contract.js.map +1 -1
  78. package/dist/src/adapters/web3/contracts/CreateCall/CreateCallWeb3Contract.d.ts +1 -1
  79. package/dist/src/adapters/web3/contracts/CreateCall/CreateCallWeb3Contract.js +1 -1
  80. package/dist/src/adapters/web3/contracts/CreateCall/CreateCallWeb3Contract.js.map +1 -1
  81. package/dist/src/adapters/web3/contracts/MultiSend/MultiSendWeb3Contract.d.ts +1 -1
  82. package/dist/src/adapters/web3/contracts/MultiSend/MultiSendWeb3Contract.js +1 -1
  83. package/dist/src/adapters/web3/contracts/MultiSend/MultiSendWeb3Contract.js.map +1 -1
  84. package/dist/src/adapters/web3/contracts/MultiSendCallOnly/MultiSendCallOnlyWeb3Contract.d.ts +1 -1
  85. package/dist/src/adapters/web3/contracts/MultiSendCallOnly/MultiSendCallOnlyWeb3Contract.js +1 -1
  86. package/dist/src/adapters/web3/contracts/MultiSendCallOnly/MultiSendCallOnlyWeb3Contract.js.map +1 -1
  87. package/dist/src/adapters/web3/contracts/Safe/SafeContractWeb3.d.ts +2 -3
  88. package/dist/src/adapters/web3/contracts/Safe/SafeContractWeb3.js +2 -3
  89. package/dist/src/adapters/web3/contracts/Safe/SafeContractWeb3.js.map +1 -1
  90. package/dist/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.d.ts +3 -3
  91. package/dist/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.js +6 -8
  92. package/dist/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.js.map +1 -1
  93. package/dist/src/adapters/web3/contracts/SignMessageLib/SignMessageLibWeb3Contract.d.ts +1 -1
  94. package/dist/src/adapters/web3/contracts/SignMessageLib/SignMessageLibWeb3Contract.js +1 -1
  95. package/dist/src/adapters/web3/contracts/SignMessageLib/SignMessageLibWeb3Contract.js.map +1 -1
  96. package/dist/src/adapters/web3/contracts/SimulateTxAccessor/SimulateTxAccessorWeb3Contract.d.ts +1 -1
  97. package/dist/src/adapters/web3/contracts/SimulateTxAccessor/SimulateTxAccessorWeb3Contract.js +1 -1
  98. package/dist/src/adapters/web3/contracts/SimulateTxAccessor/SimulateTxAccessorWeb3Contract.js.map +1 -1
  99. package/dist/src/adapters/web3/contracts/contractInstancesWeb3.d.ts +6 -6
  100. package/dist/src/adapters/web3/contracts/contractInstancesWeb3.js.map +1 -1
  101. package/dist/src/contracts/config.d.ts +3 -3
  102. package/dist/src/contracts/config.js +11 -11
  103. package/dist/src/contracts/config.js.map +1 -1
  104. package/dist/src/contracts/safeDeploymentContracts.d.ts +10 -10
  105. package/dist/src/contracts/safeDeploymentContracts.js +29 -29
  106. package/dist/src/contracts/safeDeploymentContracts.js.map +1 -1
  107. package/dist/src/contracts/utils.d.ts +23 -2
  108. package/dist/src/contracts/utils.js +72 -12
  109. package/dist/src/contracts/utils.js.map +1 -1
  110. package/dist/src/index.d.ts +3 -2
  111. package/dist/src/index.js +10 -1
  112. package/dist/src/index.js.map +1 -1
  113. package/dist/src/managers/contractManager.d.ts +1 -1
  114. package/dist/src/managers/contractManager.js +26 -21
  115. package/dist/src/managers/contractManager.js.map +1 -1
  116. package/dist/src/managers/fallbackHandlerManager.js +1 -1
  117. package/dist/src/managers/fallbackHandlerManager.js.map +1 -1
  118. package/dist/src/managers/guardManager.js +1 -1
  119. package/dist/src/managers/guardManager.js.map +1 -1
  120. package/dist/src/managers/ownerManager.js +2 -2
  121. package/dist/src/managers/ownerManager.js.map +1 -1
  122. package/dist/src/safeFactory/index.d.ts +5 -5
  123. package/dist/src/safeFactory/index.js +22 -21
  124. package/dist/src/safeFactory/index.js.map +1 -1
  125. package/dist/src/types/index.d.ts +8 -8
  126. package/dist/src/utils/eip-3770/config.d.ts +1 -1
  127. package/dist/src/utils/eip-3770/config.js +155 -132
  128. package/dist/src/utils/eip-3770/config.js.map +1 -1
  129. package/dist/src/utils/eip-3770/index.d.ts +3 -3
  130. package/dist/src/utils/eip-712/index.js +1 -1
  131. package/dist/src/utils/eip-712/index.js.map +1 -1
  132. package/dist/src/utils/erc-20/index.d.ts +33 -0
  133. package/dist/src/utils/erc-20/index.js +77 -0
  134. package/dist/src/utils/erc-20/index.js.map +1 -0
  135. package/dist/src/utils/signatures/utils.js +1 -1
  136. package/dist/src/utils/transactions/SafeTransaction.js +2 -2
  137. package/dist/src/utils/transactions/SafeTransaction.js.map +1 -1
  138. package/dist/src/utils/transactions/gas.d.ts +48 -1
  139. package/dist/src/utils/transactions/gas.js +312 -41
  140. package/dist/src/utils/transactions/gas.js.map +1 -1
  141. package/dist/src/utils/transactions/utils.js +11 -15
  142. package/dist/src/utils/transactions/utils.js.map +1 -1
  143. package/dist/tsconfig.build.tsbuildinfo +1 -1
  144. package/dist/typechain/src/ethers-v6/v1.0.0/Gnosis_safe.d.ts +496 -0
  145. package/dist/typechain/src/ethers-v6/v1.0.0/Gnosis_safe.js.map +1 -0
  146. package/dist/typechain/src/ethers-v6/v1.0.0/Proxy_factory.d.ts +75 -0
  147. package/dist/typechain/src/ethers-v6/v1.0.0/Proxy_factory.js.map +1 -0
  148. package/dist/typechain/src/ethers-v6/v1.0.0/common.d.ts +50 -0
  149. package/dist/typechain/src/ethers-v6/v1.0.0/common.js.map +1 -0
  150. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/Gnosis_safe__factory.d.ts +2 -3
  151. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/Gnosis_safe__factory.js +3 -3
  152. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/Gnosis_safe__factory.js.map +1 -1
  153. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/Proxy_factory__factory.d.ts +2 -3
  154. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/Proxy_factory__factory.js +3 -3
  155. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/Proxy_factory__factory.js.map +1 -1
  156. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/index.js.map +1 -1
  157. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/index.js.map +1 -1
  158. package/dist/typechain/src/ethers-v6/v1.1.1/Gnosis_safe.d.ts +604 -0
  159. package/dist/typechain/src/ethers-v6/v1.1.1/Gnosis_safe.js.map +1 -0
  160. package/dist/typechain/src/ethers-v6/v1.1.1/Multi_send.d.ts +29 -0
  161. package/dist/typechain/src/ethers-v6/v1.1.1/Multi_send.js.map +1 -0
  162. package/dist/typechain/src/ethers-v6/v1.1.1/Multi_send.ts +91 -0
  163. package/dist/typechain/src/ethers-v6/v1.1.1/Proxy_factory.d.ts +109 -0
  164. package/dist/typechain/src/ethers-v6/v1.1.1/Proxy_factory.js.map +1 -0
  165. package/dist/typechain/src/ethers-v6/v1.1.1/common.d.ts +50 -0
  166. package/dist/typechain/src/ethers-v6/v1.1.1/common.js.map +1 -0
  167. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Gnosis_safe__factory.d.ts +2 -3
  168. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Gnosis_safe__factory.js +3 -3
  169. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Gnosis_safe__factory.js.map +1 -1
  170. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Multi_send__factory.d.ts +2 -3
  171. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Multi_send__factory.js +3 -3
  172. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Multi_send__factory.js.map +1 -1
  173. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Proxy_factory__factory.d.ts +2 -3
  174. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Proxy_factory__factory.js +3 -3
  175. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/Proxy_factory__factory.js.map +1 -1
  176. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/index.js.map +1 -1
  177. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/index.js.map +1 -1
  178. package/dist/typechain/src/ethers-v6/v1.2.0/Gnosis_safe.d.ts +612 -0
  179. package/dist/typechain/src/ethers-v6/v1.2.0/Gnosis_safe.js.map +1 -0
  180. package/dist/typechain/src/ethers-v6/v1.2.0/common.d.ts +50 -0
  181. package/dist/typechain/src/ethers-v6/v1.2.0/common.js.map +1 -0
  182. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/factories/Gnosis_safe__factory.d.ts +2 -3
  183. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/factories/Gnosis_safe__factory.js +3 -3
  184. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/factories/Gnosis_safe__factory.js.map +1 -1
  185. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/factories/index.js.map +1 -1
  186. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/index.js.map +1 -1
  187. package/dist/typechain/src/ethers-v6/v1.3.0/Compatibility_fallback_handler.d.ts +194 -0
  188. package/dist/typechain/src/ethers-v6/v1.3.0/Compatibility_fallback_handler.js.map +1 -0
  189. package/dist/typechain/src/ethers-v6/v1.3.0/Create_call.d.ts +67 -0
  190. package/dist/typechain/src/ethers-v6/v1.3.0/Create_call.js.map +1 -0
  191. package/dist/typechain/src/ethers-v6/v1.3.0/Gnosis_safe.d.ts +703 -0
  192. package/dist/typechain/src/ethers-v6/v1.3.0/Gnosis_safe.js.map +1 -0
  193. package/dist/typechain/src/ethers-v6/v1.3.0/Multi_send.d.ts +25 -0
  194. package/dist/typechain/src/ethers-v6/v1.3.0/Multi_send.js.map +1 -0
  195. package/dist/typechain/src/ethers-v6/v1.3.0/Multi_send.ts +87 -0
  196. package/dist/typechain/src/ethers-v6/v1.3.0/Multi_send_call_only.d.ts +25 -0
  197. package/dist/typechain/src/ethers-v6/v1.3.0/Multi_send_call_only.js.map +1 -0
  198. package/dist/typechain/src/ethers-v6/v1.3.0/Proxy_factory.d.ts +110 -0
  199. package/dist/typechain/src/ethers-v6/v1.3.0/Proxy_factory.js.map +1 -0
  200. package/dist/typechain/src/ethers-v6/v1.3.0/Sign_message_lib.d.ts +45 -0
  201. package/dist/typechain/src/ethers-v6/v1.3.0/Sign_message_lib.js.map +1 -0
  202. package/dist/typechain/src/ethers-v6/v1.3.0/Simulate_tx_accessor.d.ts +55 -0
  203. package/dist/typechain/src/ethers-v6/v1.3.0/Simulate_tx_accessor.js.map +1 -0
  204. package/dist/typechain/src/ethers-v6/v1.3.0/common.d.ts +50 -0
  205. package/dist/typechain/src/ethers-v6/v1.3.0/common.js.map +1 -0
  206. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Compatibility_fallback_handler__factory.d.ts +2 -3
  207. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Compatibility_fallback_handler__factory.js +3 -3
  208. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Compatibility_fallback_handler__factory.js.map +1 -1
  209. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Create_call__factory.d.ts +2 -3
  210. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Create_call__factory.js +3 -3
  211. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Create_call__factory.js.map +1 -1
  212. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Gnosis_safe__factory.d.ts +2 -3
  213. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Gnosis_safe__factory.js +3 -3
  214. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Gnosis_safe__factory.js.map +1 -1
  215. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Multi_send__factory.d.ts +2 -3
  216. package/dist/typechain/src/{ethers-v5/v1.4.1 → ethers-v6/v1.3.0}/factories/Multi_send__factory.js +3 -3
  217. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Multi_send__factory.js.map +1 -1
  218. package/dist/typechain/src/{ethers-v5/v1.4.1 → ethers-v6/v1.3.0}/factories/Multi_send_call_only__factory.d.ts +2 -3
  219. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Multi_send_call_only__factory.js +3 -3
  220. package/dist/typechain/src/ethers-v6/v1.3.0/factories/Multi_send_call_only__factory.js.map +1 -0
  221. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Proxy_factory__factory.d.ts +2 -3
  222. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Proxy_factory__factory.js +3 -3
  223. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Proxy_factory__factory.js.map +1 -1
  224. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Sign_message_lib__factory.d.ts +2 -3
  225. package/dist/typechain/src/{ethers-v5/v1.4.1 → ethers-v6/v1.3.0}/factories/Sign_message_lib__factory.js +3 -3
  226. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Sign_message_lib__factory.js.map +1 -1
  227. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Simulate_tx_accessor__factory.d.ts +2 -3
  228. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Simulate_tx_accessor__factory.js +3 -3
  229. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/Simulate_tx_accessor__factory.js.map +1 -1
  230. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/index.js.map +1 -1
  231. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/index.js.map +1 -1
  232. package/dist/typechain/src/ethers-v6/v1.4.1/Compatibility_fallback_handler.d.ts +200 -0
  233. package/dist/typechain/src/ethers-v6/v1.4.1/Compatibility_fallback_handler.js.map +1 -0
  234. package/dist/typechain/src/ethers-v6/v1.4.1/Create_call.d.ts +67 -0
  235. package/dist/typechain/src/ethers-v6/v1.4.1/Create_call.js.map +1 -0
  236. package/dist/typechain/src/ethers-v6/v1.4.1/Multi_send.d.ts +25 -0
  237. package/dist/typechain/src/ethers-v6/v1.4.1/Multi_send.js.map +1 -0
  238. package/dist/typechain/src/ethers-v6/v1.4.1/Multi_send.ts +87 -0
  239. package/dist/typechain/src/ethers-v6/v1.4.1/Multi_send_call_only.d.ts +25 -0
  240. package/dist/typechain/src/ethers-v6/v1.4.1/Multi_send_call_only.js.map +1 -0
  241. package/dist/typechain/src/ethers-v6/v1.4.1/Safe.d.ts +685 -0
  242. package/dist/typechain/src/ethers-v6/v1.4.1/Safe.js.map +1 -0
  243. package/dist/typechain/src/ethers-v6/v1.4.1/Safe_proxy_factory.d.ts +96 -0
  244. package/dist/typechain/src/ethers-v6/v1.4.1/Safe_proxy_factory.js.map +1 -0
  245. package/dist/typechain/src/ethers-v6/v1.4.1/Sign_message_lib.d.ts +45 -0
  246. package/dist/typechain/src/ethers-v6/v1.4.1/Sign_message_lib.js.map +1 -0
  247. package/dist/typechain/src/ethers-v6/v1.4.1/Simulate_tx_accessor.d.ts +55 -0
  248. package/dist/typechain/src/ethers-v6/v1.4.1/Simulate_tx_accessor.js.map +1 -0
  249. package/dist/typechain/src/ethers-v6/v1.4.1/common.d.ts +50 -0
  250. package/dist/typechain/src/ethers-v6/v1.4.1/common.js.map +1 -0
  251. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Compatibility_fallback_handler__factory.d.ts +2 -3
  252. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Compatibility_fallback_handler__factory.js +3 -3
  253. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Compatibility_fallback_handler__factory.js.map +1 -1
  254. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Create_call__factory.d.ts +2 -3
  255. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Create_call__factory.js +3 -3
  256. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Create_call__factory.js.map +1 -1
  257. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Multi_send__factory.d.ts +2 -3
  258. package/dist/typechain/src/{ethers-v5/v1.3.0 → ethers-v6/v1.4.1}/factories/Multi_send__factory.js +3 -3
  259. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Multi_send__factory.js.map +1 -1
  260. package/dist/typechain/src/{ethers-v5/v1.3.0 → ethers-v6/v1.4.1}/factories/Multi_send_call_only__factory.d.ts +2 -3
  261. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Multi_send_call_only__factory.js +3 -3
  262. package/dist/typechain/src/ethers-v6/v1.4.1/factories/Multi_send_call_only__factory.js.map +1 -0
  263. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Safe__factory.d.ts +2 -3
  264. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Safe__factory.js +3 -3
  265. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Safe__factory.js.map +1 -1
  266. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Safe_proxy_factory__factory.d.ts +2 -3
  267. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Safe_proxy_factory__factory.js +3 -3
  268. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Safe_proxy_factory__factory.js.map +1 -1
  269. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Sign_message_lib__factory.d.ts +2 -3
  270. package/dist/typechain/src/{ethers-v5/v1.3.0 → ethers-v6/v1.4.1}/factories/Sign_message_lib__factory.js +3 -3
  271. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Sign_message_lib__factory.js.map +1 -1
  272. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Simulate_tx_accessor__factory.d.ts +2 -3
  273. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Simulate_tx_accessor__factory.js +3 -3
  274. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/Simulate_tx_accessor__factory.js.map +1 -1
  275. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/index.js.map +1 -1
  276. package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/index.js.map +1 -1
  277. package/dist/typechain/tests/ethers-v6/v1.2.0/@gnosis.pm/index.js.map +1 -0
  278. package/dist/typechain/tests/ethers-v6/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule.d.ts +158 -0
  279. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule.js.map +1 -1
  280. package/dist/typechain/tests/ethers-v6/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule.d.ts +167 -0
  281. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule.js.map +1 -1
  282. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/index.js.map +1 -1
  283. package/dist/typechain/tests/ethers-v6/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/index.js.map +1 -0
  284. package/dist/typechain/tests/ethers-v6/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/index.js.map +1 -0
  285. package/dist/typechain/tests/ethers-v6/v1.2.0/common.d.ts +50 -0
  286. package/dist/typechain/tests/ethers-v6/v1.2.0/common.js.map +1 -0
  287. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/index.js.map +1 -1
  288. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule__factory.d.ts +13 -12
  289. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule__factory.js +7 -10
  290. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule__factory.js.map +1 -1
  291. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule__factory.d.ts +13 -12
  292. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule__factory.js +7 -10
  293. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule__factory.js.map +1 -1
  294. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/index.js.map +1 -1
  295. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/index.js.map +1 -1
  296. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/index.js.map +1 -1
  297. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/index.js.map +1 -1
  298. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/contracts/ERC20Mintable__factory.d.ts +13 -12
  299. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/contracts/ERC20Mintable__factory.js +7 -10
  300. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/contracts/ERC20Mintable__factory.js.map +1 -1
  301. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/contracts/index.js.map +1 -1
  302. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/index.js.map +1 -1
  303. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/index.js.map +1 -1
  304. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/index.js.map +1 -1
  305. package/dist/typechain/tests/ethers-v6/v1.2.0/openzeppelin-solidity/build/contracts/ERC20Mintable.d.ts +211 -0
  306. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/build/contracts/ERC20Mintable.js.map +1 -1
  307. package/dist/typechain/tests/ethers-v6/v1.2.0/openzeppelin-solidity/build/contracts/index.js.map +1 -0
  308. package/dist/typechain/tests/ethers-v6/v1.2.0/openzeppelin-solidity/build/index.js.map +1 -0
  309. package/dist/typechain/tests/ethers-v6/v1.2.0/openzeppelin-solidity/index.js.map +1 -0
  310. package/dist/typechain/tests/ethers-v6/v1.3.0/DebugTransactionGuard.d.ts +154 -0
  311. package/dist/typechain/tests/ethers-v6/v1.3.0/DebugTransactionGuard.js.map +1 -0
  312. package/dist/typechain/tests/ethers-v6/v1.3.0/common.d.ts +50 -0
  313. package/dist/typechain/tests/ethers-v6/v1.3.0/common.js.map +1 -0
  314. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/factories/DebugTransactionGuard__factory.d.ts +13 -12
  315. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/factories/DebugTransactionGuard__factory.js +7 -10
  316. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/factories/DebugTransactionGuard__factory.js.map +1 -1
  317. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/factories/index.js.map +1 -1
  318. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/index.js.map +1 -1
  319. package/dist/typechain/tests/ethers-v6/v1.4.1/DebugTransactionGuard.d.ts +168 -0
  320. package/dist/typechain/tests/ethers-v6/v1.4.1/DebugTransactionGuard.js.map +1 -0
  321. package/dist/typechain/tests/ethers-v6/v1.4.1/common.d.ts +50 -0
  322. package/dist/typechain/tests/ethers-v6/v1.4.1/common.js.map +1 -0
  323. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/factories/DebugTransactionGuard__factory.d.ts +13 -12
  324. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/factories/DebugTransactionGuard__factory.js +7 -10
  325. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/factories/DebugTransactionGuard__factory.js.map +1 -1
  326. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/factories/index.js.map +1 -1
  327. package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/index.js.map +1 -1
  328. package/package.json +94 -96
  329. package/dist/typechain/src/ethers-v5/v1.0.0/Gnosis_safe.d.ts +0 -534
  330. package/dist/typechain/src/ethers-v5/v1.0.0/Gnosis_safe.js.map +0 -1
  331. package/dist/typechain/src/ethers-v5/v1.0.0/Proxy_factory.d.ts +0 -97
  332. package/dist/typechain/src/ethers-v5/v1.0.0/Proxy_factory.js.map +0 -1
  333. package/dist/typechain/src/ethers-v5/v1.0.0/common.d.ts +0 -22
  334. package/dist/typechain/src/ethers-v5/v1.0.0/common.js.map +0 -1
  335. package/dist/typechain/src/ethers-v5/v1.1.1/Gnosis_safe.d.ts +0 -611
  336. package/dist/typechain/src/ethers-v5/v1.1.1/Gnosis_safe.js.map +0 -1
  337. package/dist/typechain/src/ethers-v5/v1.1.1/Multi_send.d.ts +0 -50
  338. package/dist/typechain/src/ethers-v5/v1.1.1/Multi_send.js.map +0 -1
  339. package/dist/typechain/src/ethers-v5/v1.1.1/Multi_send.ts +0 -102
  340. package/dist/typechain/src/ethers-v5/v1.1.1/Proxy_factory.d.ts +0 -138
  341. package/dist/typechain/src/ethers-v5/v1.1.1/Proxy_factory.js.map +0 -1
  342. package/dist/typechain/src/ethers-v5/v1.1.1/common.d.ts +0 -22
  343. package/dist/typechain/src/ethers-v5/v1.1.1/common.js.map +0 -1
  344. package/dist/typechain/src/ethers-v5/v1.2.0/Gnosis_safe.d.ts +0 -619
  345. package/dist/typechain/src/ethers-v5/v1.2.0/Gnosis_safe.js.map +0 -1
  346. package/dist/typechain/src/ethers-v5/v1.2.0/common.d.ts +0 -22
  347. package/dist/typechain/src/ethers-v5/v1.2.0/common.js.map +0 -1
  348. package/dist/typechain/src/ethers-v5/v1.3.0/Compatibility_fallback_handler.d.ts +0 -170
  349. package/dist/typechain/src/ethers-v5/v1.3.0/Compatibility_fallback_handler.js.map +0 -1
  350. package/dist/typechain/src/ethers-v5/v1.3.0/Create_call.d.ts +0 -83
  351. package/dist/typechain/src/ethers-v5/v1.3.0/Create_call.js.map +0 -1
  352. package/dist/typechain/src/ethers-v5/v1.3.0/Gnosis_safe.d.ts +0 -661
  353. package/dist/typechain/src/ethers-v5/v1.3.0/Gnosis_safe.js.map +0 -1
  354. package/dist/typechain/src/ethers-v5/v1.3.0/Multi_send.d.ts +0 -50
  355. package/dist/typechain/src/ethers-v5/v1.3.0/Multi_send.js.map +0 -1
  356. package/dist/typechain/src/ethers-v5/v1.3.0/Multi_send.ts +0 -102
  357. package/dist/typechain/src/ethers-v5/v1.3.0/Multi_send_call_only.d.ts +0 -50
  358. package/dist/typechain/src/ethers-v5/v1.3.0/Multi_send_call_only.js.map +0 -1
  359. package/dist/typechain/src/ethers-v5/v1.3.0/Proxy_factory.d.ts +0 -142
  360. package/dist/typechain/src/ethers-v5/v1.3.0/Proxy_factory.js.map +0 -1
  361. package/dist/typechain/src/ethers-v5/v1.3.0/Sign_message_lib.d.ts +0 -69
  362. package/dist/typechain/src/ethers-v5/v1.3.0/Sign_message_lib.js.map +0 -1
  363. package/dist/typechain/src/ethers-v5/v1.3.0/Simulate_tx_accessor.d.ts +0 -63
  364. package/dist/typechain/src/ethers-v5/v1.3.0/Simulate_tx_accessor.js.map +0 -1
  365. package/dist/typechain/src/ethers-v5/v1.3.0/common.d.ts +0 -22
  366. package/dist/typechain/src/ethers-v5/v1.3.0/common.js.map +0 -1
  367. package/dist/typechain/src/ethers-v5/v1.3.0/factories/Multi_send_call_only__factory.js.map +0 -1
  368. package/dist/typechain/src/ethers-v5/v1.4.1/Compatibility_fallback_handler.d.ts +0 -162
  369. package/dist/typechain/src/ethers-v5/v1.4.1/Compatibility_fallback_handler.js.map +0 -1
  370. package/dist/typechain/src/ethers-v5/v1.4.1/Create_call.d.ts +0 -83
  371. package/dist/typechain/src/ethers-v5/v1.4.1/Create_call.js.map +0 -1
  372. package/dist/typechain/src/ethers-v5/v1.4.1/Multi_send.d.ts +0 -50
  373. package/dist/typechain/src/ethers-v5/v1.4.1/Multi_send.js.map +0 -1
  374. package/dist/typechain/src/ethers-v5/v1.4.1/Multi_send.ts +0 -102
  375. package/dist/typechain/src/ethers-v5/v1.4.1/Multi_send_call_only.d.ts +0 -50
  376. package/dist/typechain/src/ethers-v5/v1.4.1/Multi_send_call_only.js.map +0 -1
  377. package/dist/typechain/src/ethers-v5/v1.4.1/Safe.d.ts +0 -640
  378. package/dist/typechain/src/ethers-v5/v1.4.1/Safe.js.map +0 -1
  379. package/dist/typechain/src/ethers-v5/v1.4.1/Safe_proxy_factory.d.ts +0 -126
  380. package/dist/typechain/src/ethers-v5/v1.4.1/Safe_proxy_factory.js.map +0 -1
  381. package/dist/typechain/src/ethers-v5/v1.4.1/Sign_message_lib.d.ts +0 -69
  382. package/dist/typechain/src/ethers-v5/v1.4.1/Sign_message_lib.js.map +0 -1
  383. package/dist/typechain/src/ethers-v5/v1.4.1/Simulate_tx_accessor.d.ts +0 -63
  384. package/dist/typechain/src/ethers-v5/v1.4.1/Simulate_tx_accessor.js.map +0 -1
  385. package/dist/typechain/src/ethers-v5/v1.4.1/common.d.ts +0 -22
  386. package/dist/typechain/src/ethers-v5/v1.4.1/common.js.map +0 -1
  387. package/dist/typechain/src/ethers-v5/v1.4.1/factories/Multi_send_call_only__factory.js.map +0 -1
  388. package/dist/typechain/tests/ethers-v5/v1.2.0/@gnosis.pm/index.js.map +0 -1
  389. package/dist/typechain/tests/ethers-v5/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule.d.ts +0 -304
  390. package/dist/typechain/tests/ethers-v5/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule.d.ts +0 -345
  391. package/dist/typechain/tests/ethers-v5/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/index.js.map +0 -1
  392. package/dist/typechain/tests/ethers-v5/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/index.js.map +0 -1
  393. package/dist/typechain/tests/ethers-v5/v1.2.0/common.d.ts +0 -22
  394. package/dist/typechain/tests/ethers-v5/v1.2.0/common.js.map +0 -1
  395. package/dist/typechain/tests/ethers-v5/v1.2.0/openzeppelin-solidity/build/contracts/ERC20Mintable.d.ts +0 -248
  396. package/dist/typechain/tests/ethers-v5/v1.2.0/openzeppelin-solidity/build/contracts/index.js.map +0 -1
  397. package/dist/typechain/tests/ethers-v5/v1.2.0/openzeppelin-solidity/build/index.js.map +0 -1
  398. package/dist/typechain/tests/ethers-v5/v1.2.0/openzeppelin-solidity/index.js.map +0 -1
  399. package/dist/typechain/tests/ethers-v5/v1.3.0/DebugTransactionGuard.d.ts +0 -132
  400. package/dist/typechain/tests/ethers-v5/v1.3.0/DebugTransactionGuard.js.map +0 -1
  401. package/dist/typechain/tests/ethers-v5/v1.3.0/common.d.ts +0 -22
  402. package/dist/typechain/tests/ethers-v5/v1.3.0/common.js.map +0 -1
  403. package/dist/typechain/tests/ethers-v5/v1.4.1/DebugTransactionGuard.d.ts +0 -144
  404. package/dist/typechain/tests/ethers-v5/v1.4.1/DebugTransactionGuard.js.map +0 -1
  405. package/dist/typechain/tests/ethers-v5/v1.4.1/common.d.ts +0 -22
  406. package/dist/typechain/tests/ethers-v5/v1.4.1/common.js.map +0 -1
  407. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/Gnosis_safe.js +0 -0
  408. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/Proxy_factory.js +0 -0
  409. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/common.js +0 -0
  410. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/index.d.ts +0 -0
  411. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/factories/index.js +0 -0
  412. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/index.d.ts +0 -0
  413. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.0.0/index.js +0 -0
  414. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/Gnosis_safe.js +0 -0
  415. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/Multi_send.js +0 -0
  416. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/Proxy_factory.js +0 -0
  417. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/common.js +0 -0
  418. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/index.d.ts +0 -0
  419. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/factories/index.js +0 -0
  420. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/index.d.ts +0 -0
  421. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.1.1/index.js +0 -0
  422. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/Gnosis_safe.js +0 -0
  423. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/common.js +0 -0
  424. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/factories/index.d.ts +0 -0
  425. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/factories/index.js +0 -0
  426. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/index.d.ts +0 -0
  427. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.2.0/index.js +0 -0
  428. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Compatibility_fallback_handler.js +0 -0
  429. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Create_call.js +0 -0
  430. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Gnosis_safe.js +0 -0
  431. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Multi_send.js +0 -0
  432. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Multi_send_call_only.js +0 -0
  433. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Proxy_factory.js +0 -0
  434. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Sign_message_lib.js +0 -0
  435. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/Simulate_tx_accessor.js +0 -0
  436. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/common.js +0 -0
  437. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/index.d.ts +0 -0
  438. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/factories/index.js +0 -0
  439. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/index.d.ts +0 -0
  440. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.3.0/index.js +0 -0
  441. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Compatibility_fallback_handler.js +0 -0
  442. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Create_call.js +0 -0
  443. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Multi_send.js +0 -0
  444. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Multi_send_call_only.js +0 -0
  445. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Safe.js +0 -0
  446. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Safe_proxy_factory.js +0 -0
  447. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Sign_message_lib.js +0 -0
  448. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/Simulate_tx_accessor.js +0 -0
  449. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/common.js +0 -0
  450. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/index.d.ts +0 -0
  451. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/factories/index.js +0 -0
  452. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/index.d.ts +0 -0
  453. /package/dist/typechain/src/{ethers-v5 → ethers-v6}/v1.4.1/index.js +0 -0
  454. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/index.d.ts +0 -0
  455. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/index.js +0 -0
  456. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/DailyLimitModule.js +0 -0
  457. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/SocialRecoveryModule.js +0 -0
  458. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/index.d.ts +0 -0
  459. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/index.js +0 -0
  460. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/index.d.ts +0 -0
  461. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/build/index.js +0 -0
  462. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/index.d.ts +0 -0
  463. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/@gnosis.pm/safe-contracts-v1.2.0/index.js +0 -0
  464. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/common.js +0 -0
  465. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/index.d.ts +0 -0
  466. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/index.js +0 -0
  467. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/index.d.ts +0 -0
  468. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/contracts/index.js +0 -0
  469. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/index.d.ts +0 -0
  470. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/build/index.js +0 -0
  471. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/index.d.ts +0 -0
  472. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/@gnosis.pm/safe-contracts-v1.2.0/index.js +0 -0
  473. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/index.d.ts +0 -0
  474. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/index.js +0 -0
  475. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/contracts/index.d.ts +0 -0
  476. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/contracts/index.js +0 -0
  477. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/index.d.ts +0 -0
  478. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/build/index.js +0 -0
  479. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/index.d.ts +0 -0
  480. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/factories/openzeppelin-solidity/index.js +0 -0
  481. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/index.d.ts +0 -0
  482. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/index.js +0 -0
  483. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/build/contracts/ERC20Mintable.js +0 -0
  484. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/build/contracts/index.d.ts +0 -0
  485. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/build/contracts/index.js +0 -0
  486. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/build/index.d.ts +0 -0
  487. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/build/index.js +0 -0
  488. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/index.d.ts +0 -0
  489. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.2.0/openzeppelin-solidity/index.js +0 -0
  490. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/DebugTransactionGuard.js +0 -0
  491. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/common.js +0 -0
  492. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/factories/index.d.ts +0 -0
  493. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/factories/index.js +0 -0
  494. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/index.d.ts +0 -0
  495. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.3.0/index.js +0 -0
  496. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/DebugTransactionGuard.js +0 -0
  497. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/common.js +0 -0
  498. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/factories/index.d.ts +0 -0
  499. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/factories/index.js +0 -0
  500. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/index.d.ts +0 -0
  501. /package/dist/typechain/tests/{ethers-v5 → ethers-v6}/v1.4.1/index.js +0 -0
package/README.md CHANGED
@@ -1,1033 +1,1033 @@
1
- # Protocol Kit
2
-
3
- [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit)
4
- [![GitHub Release](https://img.shields.io/github/release/safe-global/safe-core-sdk.svg?style=flat)](https://github.com/safe-global/safe-core-sdk/releases)
5
- [![GitHub](https://img.shields.io/github/license/safe-global/safe-core-sdk)](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md)
6
-
7
- Software development kit that facilitates the interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts).
8
-
9
- ## Table of contents
10
-
11
- - [Installation](#installation)
12
- - [Build](#build)
13
- - [Tests](#tests)
14
- - [Getting Started](#getting-started)
15
- - [Safe Factory API Reference](#factory-api)
16
- - [Safe Core SDK API Reference](#sdk-api)
17
- - [License](#license)
18
- - [Contributors](#contributors)
19
-
20
- ## <a name="installation">Installation</a>
21
-
22
- Install the package with yarn or npm:
23
-
24
- ```bash
25
- yarn add @safe-global/protocol-kit
26
- npm install @safe-global/protocol-kit
27
- ```
28
-
29
- ## <a name="build">Build</a>
30
-
31
- Build the package with yarn or npm:
32
-
33
- ```bash
34
- yarn build
35
- npm run build
36
- ```
37
-
38
- ## <a name="tests">Tests</a>
39
-
40
- Create a `.env` file with environment variables. You can use the `.env.example` file as a reference.
41
-
42
- Test the package with yarn or npm:
43
-
44
- ```bash
45
- yarn test
46
- npm run test
47
- ```
48
-
49
- ## <a name="getting-started">Getting Started</a>
50
-
51
- The following steps show how to set up the Protocol Kit, deploy a new Safe, create a Safe transaction, generate the required signatures from owners and execute the transaction. However, using the Protocol Kit alone will not allow for the collection of owner signatures off-chain. To do this and be able to see and confirm the pending transactions shown in the [Safe Web App](https://app.safe.global/), it is recommended that you follow this other [guide](/guides/integrating-the-safe-core-sdk.md) that covers the use of the Protocol Kit, combined with the API Kit.
52
-
53
- ### 1. Instantiate an EthAdapter
54
-
55
- First of all, we need to create an `EthAdapter`, which contains all the required utilities for the SDKs to interact with the blockchain. It acts as a wrapper for [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.io/v5/) Ethereum libraries.
56
-
57
- Depending on the library used by the Dapp, there are two options:
58
-
59
- - [Create an `EthersAdapter` instance](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit/src/adapters/ethers)
60
- - [Create a `Web3Adapter` instance](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit/src/adapters/web3)
61
-
62
- Once the instance of `EthersAdapter` or `Web3Adapter` is created, it can be used in the SDK initialization.
63
-
64
- ### 2. Deploy a new Safe
65
-
66
- To deploy a new Safe account instantiate the `SafeFactory` class and call the `deploySafe` method with the right params to configure the new Safe. This includes defining the list of owners and the threshold of the Safe. A Safe account with three owners and threshold equal three will be used as the starting point for this example but any Safe configuration is valid.
67
-
68
- ```js
69
- import Safe, { SafeFactory, SafeAccountConfig } from '@safe-global/protocol-kit'
70
-
71
- const safeFactory = await SafeFactory.create({ ethAdapter })
72
-
73
- const owners = ['0x<address>', '0x<address>', '0x<address>']
74
- const threshold = 3
75
- const safeAccountConfig: SafeAccountConfig = {
76
- owners,
77
- threshold
78
- // ...
79
- }
80
-
81
- const safeSdk: Safe = await safeFactory.deploySafe({ safeAccountConfig })
82
- ```
83
-
84
- The `deploySafe` method executes a transaction from the `owner1` account, deploys a new Safe and returns an instance of the Protocol Kit connected to the new Safe. Check the `deploySafe` method in the [API Reference](#factory-api) for more details on additional configuration parameters and callbacks.
85
-
86
- Call the `getAddress` method, for example, to check the address of the newly deployed Safe.
87
-
88
- ```js
89
- const newSafeAddress = await safeSdk.getAddress()
90
- ```
91
-
92
- To instantiate the Protocol Kit from an existing Safe just pass to it an instance of the `EthAdapter` class and the Safe address.
93
-
94
- ```js
95
- import Safe from '@safe-global/protocol-kit'
96
-
97
- const safeSdk: Safe = await Safe.create({ ethAdapter: ethAdapterOwner1, safeAddress })
98
- ```
99
-
100
- Check the `create` method in the [API Reference](#sdk-api) for more details on additional configuration parameters.
101
-
102
- ### 3. Create a Safe transaction
103
-
104
- ```js
105
- import { SafeTransactionDataPartial } from '@safe-global/safe-core-sdk-types'
106
-
107
- const safeTransactionData: SafeTransactionDataPartial = {
108
- to: '0x<address>',
109
- value: '<eth_value_in_wei>',
110
- data: '0x<data>'
111
- }
112
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
113
- ```
114
-
115
- Check the `createTransaction` method in the [API Reference](#sdk-api) for additional details on creating MultiSend transactions.
116
-
117
- Before executing this transaction, it must be signed by the owners and this can be done off-chain or on-chain. In this example `owner1` will sign it off-chain, `owner2` will sign it on-chain and `owner3` will execute it (the executor also signs the transaction transparently).
118
-
119
- ### 3.a. Off-chain signatures
120
-
121
- The `owner1` account signs the transaction off-chain.
122
-
123
- ```js
124
- const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
125
- ```
126
-
127
- Because the signature is off-chain, there is no interaction with the contract and the signature becomes available at `signedSafeTransaction.signatures`.
128
-
129
- ### 3.b. On-chain signatures
130
-
131
- To connect `owner2` to the Safe we need to create a new instance of the class `EthAdapter` passing to its constructor the owner we would like to connect. After `owner2` account is connected to the SDK as a signer the transaction hash will be approved on-chain.
132
-
133
- ```js
134
- const ethAdapterOwner2 = new EthersAdapter({ ethers, signerOrProvider: owner2 })
135
- const safeSdk2 = await safeSdk.connect({ ethAdapter: ethAdapterOwner2, safeAddress })
136
- const txHash = await safeSdk2.getTransactionHash(safeTransaction)
137
- const approveTxResponse = await safeSdk2.approveTransactionHash(txHash)
138
- await approveTxResponse.transactionResponse?.wait()
139
- ```
140
-
141
- ### 4. Transaction execution
142
-
143
- Lastly, `owner3` account is connected to the SDK as a signer and executor of the Safe transaction to execute it.
144
-
145
- ```js
146
- const ethAdapterOwner3 = new EthersAdapter({ ethers, signerOrProvider: owner3 })
147
- const safeSdk3 = await safeSdk2.connect({ ethAdapter: ethAdapterOwner3, safeAddress })
148
- const executeTxResponse = await safeSdk3.executeTransaction(safeTransaction)
149
- await executeTxResponse.transactionResponse?.wait()
150
- ```
151
-
152
- All the signatures used to execute the transaction are now available at `safeTransaction.signatures`.
153
-
154
- ## <a name="factory-api">Safe Factory API Reference</a>
155
-
156
- ### create
157
-
158
- Returns an instance of the Safe Factory.
159
-
160
- ```js
161
- import { SafeFactory } from '@safe-global/protocol-kit'
162
-
163
- const safeFactory = await SafeFactory.create({ ethAdapter })
164
- ```
165
-
166
- - The `isL1SafeMasterCopy` flag
167
-
168
- There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
169
-
170
- By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeMasterCopy` flag to force the use of the `Safe.sol` contract.
171
-
172
- ```js
173
- const safeFactory = await SafeFactory.create({ ethAdapter, isL1SafeMasterCopy: true })
174
- ```
175
-
176
- - The `contractNetworks` property
177
-
178
- If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
179
-
180
- ```js
181
- import { ContractNetworksConfig } from '@safe-global/protocol-kit'
182
-
183
- const chainId = await ethAdapter.getChainId()
184
- const contractNetworks: ContractNetworksConfig = {
185
- [chainId]: {
186
- safeMasterCopyAddress: '<MASTER_COPY_ADDRESS>',
187
- safeProxyFactoryAddress: '<PROXY_FACTORY_ADDRESS>',
188
- multiSendAddress: '<MULTI_SEND_ADDRESS>',
189
- multiSendCallOnlyAddress: '<MULTI_SEND_CALL_ONLY_ADDRESS>',
190
- fallbackHandlerAddress: '<FALLBACK_HANDLER_ADDRESS>',
191
- signMessageLibAddress: '<SIGN_MESSAGE_LIB_ADDRESS>',
192
- createCallAddress: '<CREATE_CALL_ADDRESS>',
193
- simulateTxAccessorAddress: '<SIMULATE_TX_ACCESSOR_ADDRESS>',
194
- safeMasterCopyAbi: '<MASTER_COPY_ABI>', // Optional. Only needed with web3.js
195
- safeProxyFactoryAbi: '<PROXY_FACTORY_ABI>', // Optional. Only needed with web3.js
196
- multiSendAbi: '<MULTI_SEND_ABI>', // Optional. Only needed with web3.js
197
- multiSendCallOnlyAbi: '<MULTI_SEND_CALL_ONLY_ABI>', // Optional. Only needed with web3.js
198
- fallbackHandlerAbi: '<FALLBACK_HANDLER_ABI>', // Optional. Only needed with web3.js
199
- signMessageLibAbi: '<SIGN_MESSAGE_LIB_ABI>', // Optional. Only needed with web3.js
200
- createCallAbi: '<CREATE_CALL_ABI>', // Optional. Only needed with web3.js
201
- simulateTxAccessorAbi: '<SIMULATE_TX_ACCESSOR_ABI>' // Optional. Only needed with web3.js
202
- }
203
- }
204
-
205
- const safeFactory = await SafeFactory.create({ ethAdapter, contractNetworks })
206
- ```
207
-
208
- - The `safeVersion` property
209
-
210
- The `SafeFactory` constructor also accepts the `safeVersion` property to specify the Safe contract version that will be deployed. This string can take the values `1.0.0`, `1.1.1`, `1.2.0`, `1.3.0` or `1.4.1`. If not specified, the `DEFAULT_SAFE_VERSION` value will be used.
211
-
212
- ```js
213
- const safeVersion = 'X.Y.Z'
214
- const safeFactory = await SafeFactory.create({ ethAdapter, safeVersion })
215
- ```
216
-
217
- ### deploySafe
218
-
219
- Deploys a new Safe and returns an instance of the Protocol Kit connected to the deployed Safe. The address of the Master Copy, Safe contract version and the contract (`Safe.sol` or `SafeL2.sol`) of the deployed Safe will depend on the initialization of the `safeFactory` instance.
220
-
221
- ```js
222
- const safeAccountConfig: SafeAccountConfig = {
223
- owners,
224
- threshold,
225
- to, // Optional
226
- data, // Optional
227
- fallbackHandler, // Optional
228
- paymentToken, // Optional
229
- payment, // Optional
230
- paymentReceiver // Optional
231
- }
232
-
233
- const safeSdk = await safeFactory.deploySafe({ safeAccountConfig })
234
- ```
235
-
236
- This method can optionally receive the `saltNonce` parameter.
237
-
238
- ```js
239
- const safeAccountConfig: SafeAccountConfig = {
240
- owners,
241
- threshold,
242
- to, // Optional
243
- data, // Optional
244
- fallbackHandler, // Optional
245
- paymentToken, // Optional
246
- payment, // Optional
247
- paymentReceiver // Optional
248
- }
249
-
250
- const saltNonce = '<YOUR_CUSTOM_VALUE>'
251
-
252
- const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, saltNonce })
253
- ```
254
-
255
- Optionally, some properties can be passed as execution options:
256
-
257
- ```js
258
- const options: Web3TransactionOptions = {
259
- from, // Optional
260
- gas, // Optional
261
- gasPrice, // Optional
262
- maxFeePerGas, // Optional
263
- maxPriorityFeePerGas // Optional
264
- nonce // Optional
265
- }
266
- ```
267
-
268
- ```js
269
- const options: EthersTransactionOptions = {
270
- from, // Optional
271
- gasLimit, // Optional
272
- gasPrice, // Optional
273
- maxFeePerGas, // Optional
274
- maxPriorityFeePerGas // Optional
275
- nonce // Optional
276
- }
277
- ```
278
-
279
- ```js
280
- const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, safeDeploymentConfig, options })
281
- ```
282
-
283
- It can also take an optional callback which receives the `txHash` of the Safe deployment transaction prior to returning a new instance of the Protocol Kit:
284
-
285
- ```js
286
- const callback = (txHash: string): void => {
287
- console.log({ txHash })
288
- }
289
-
290
- const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, callback })
291
- ```
292
-
293
- ## <a name="sdk-api">Safe Core SDK API Reference</a>
294
-
295
- ### create
296
-
297
- Returns an instance of the Protocol Kit connected to a Safe. The provided Safe must be a `safeAddress` or a `predictedSafe`.
298
-
299
- Initialization of a deployed Safe using the `safeAddress` property:
300
-
301
- ```js
302
- import Safe from '@safe-global/protocol-kit'
303
-
304
- const safeSdk = await Safe.create({ ethAdapter, safeAddress })
305
- ```
306
-
307
- Initialization of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to initialize the SDK with the Safe configuration and use it to some extent before it is deployed:
308
-
309
- ```js
310
- import Safe, { PredictedSafeProps } from '@safe-global/protocol-kit'
311
-
312
- const predictedSafe: PredictedSafeProps = {
313
- safeAccountConfig,
314
- safeDeploymentConfig
315
- }
316
-
317
- const safeSdk = await Safe.create({ ethAdapter, predictedSafe })
318
- ```
319
-
320
- - The `isL1SafeMasterCopy` flag
321
-
322
- There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
323
-
324
- By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeMasterCopy` flag to force the use of the `Safe.sol` contract.
325
-
326
- ```js
327
- const safeSdk = await Safe.create({ ethAdapter, safeAddress, isL1SafeMasterCopy: true })
328
- ```
329
-
330
- - The `contractNetworks` property
331
-
332
- If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
333
-
334
- ```js
335
- import { ContractNetworksConfig } from '@safe-global/protocol-kit'
336
-
337
- const chainId = await ethAdapter.getChainId()
338
- const contractNetworks: ContractNetworksConfig = {
339
- [chainId]: {
340
- safeMasterCopyAddress: '<MASTER_COPY_ADDRESS>',
341
- safeProxyFactoryAddress: '<PROXY_FACTORY_ADDRESS>',
342
- multiSendAddress: '<MULTI_SEND_ADDRESS>',
343
- multiSendCallOnlyAddress: '<MULTI_SEND_CALL_ONLY_ADDRESS>',
344
- fallbackHandlerAddress: '<FALLBACK_HANDLER_ADDRESS>',
345
- signMessageLibAddress: '<SIGN_MESSAGE_LIB_ADDRESS>',
346
- createCallAddress: '<CREATE_CALL_ADDRESS>',
347
- simulateTxAccessorAddress: '<SIMULATE_TX_ACCESSOR_ADDRESS>',
348
- safeMasterCopyAbi: '<MASTER_COPY_ABI>', // Optional. Only needed with web3.js
349
- safeProxyFactoryAbi: '<PROXY_FACTORY_ABI>', // Optional. Only needed with web3.js
350
- multiSendAbi: '<MULTI_SEND_ABI>', // Optional. Only needed with web3.js
351
- multiSendCallOnlyAbi: '<MULTI_SEND_CALL_ONLY_ABI>', // Optional. Only needed with web3.js
352
- fallbackHandlerAbi: '<FALLBACK_HANDLER_ABI>', // Optional. Only needed with web3.js
353
- signMessageLibAbi: '<SIGN_MESSAGE_LIB_ABI>', // Optional. Only needed with web3.js
354
- createCallAbi: '<CREATE_CALL_ABI>', // Optional. Only needed with web3.js
355
- simulateTxAccessorAbi: '<SIMULATE_TX_ACCESSOR_ABI>' // Optional. Only needed with web3.js
356
- }
357
- }
358
-
359
- const safeSdk = await Safe.create({ ethAdapter, safeAddress, contractNetworks })
360
- ```
361
-
362
- ### connect
363
-
364
- Returns a new instance of the Protocol Kit connected to a new Safe or a new Signer. The new connected signer can be passed via the `ethAdapter` property while the new connected Safe can be passed using a `safeAddress` or a `predictedSafe`.
365
-
366
- Connection of a deployed Safe using the `safeAddress` property:
367
-
368
- ```js
369
- const safeSdk = await safeSdk.connect({ ethAdapter, safeAddress })
370
- ```
371
-
372
- Connection of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to connect a Safe to the SDK with the Safe configuration:
373
-
374
- ```js
375
- import { PredictedSafeProps } from '@safe-global/protocol-kit'
376
-
377
- const predictedSafe: PredictedSafeProps = {
378
- safeAccountConfig,
379
- safeDeploymentConfig
380
- }
381
-
382
- const safeSdk = await safeSdk.connect({ ethAdapter, predictedSafe })
383
- ```
384
-
385
- - The `isL1SafeMasterCopy` flag
386
-
387
- There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
388
-
389
- By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeMasterCopy` flag to force the use of the `Safe.sol` contract.
390
-
391
- ```js
392
- const safeSdk = await Safe.connect({ ethAdapter, safeAddress, isL1SafeMasterCopy: true })
393
- ```
394
-
395
- - The `contractNetworks` property
396
-
397
- If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
398
-
399
- ```js
400
- import { ContractNetworksConfig } from '@safe-global/protocol-kit'
401
-
402
- const chainId = await ethAdapter.getChainId()
403
- const contractNetworks: ContractNetworksConfig = {
404
- [chainId]: {
405
- safeMasterCopyAddress: '<MASTER_COPY_ADDRESS>',
406
- safeProxyFactoryAddress: '<PROXY_FACTORY_ADDRESS>',
407
- multiSendAddress: '<MULTI_SEND_ADDRESS>',
408
- multiSendCallOnlyAddress: '<MULTI_SEND_CALL_ONLY_ADDRESS>',
409
- fallbackHandlerAddress: '<FALLBACK_HANDLER_ADDRESS>',
410
- signMessageLibAddress: '<SIGN_MESSAGE_LIB_ADDRESS>',
411
- createCallAddress: '<CREATE_CALL_ADDRESS>',
412
- simulateTxAccessorAddress: '<SIMULATE_TX_ACCESSOR_ADDRESS>',
413
- safeMasterCopyAbi: '<MASTER_COPY_ABI>', // Optional. Only needed with web3.js
414
- safeProxyFactoryAbi: '<PROXY_FACTORY_ABI>', // Optional. Only needed with web3.js
415
- multiSendAbi: '<MULTI_SEND_ABI>', // Optional. Only needed with web3.js
416
- multiSendCallOnlyAbi: '<MULTI_SEND_CALL_ONLY_ABI>', // Optional. Only needed with web3.js
417
- fallbackHandlerAbi: '<FALLBACK_HANDLER_ABI>', // Optional. Only needed with web3.js
418
- signMessageLibAbi: '<SIGN_MESSAGE_LIB_ABI>', // Optional. Only needed with web3.js
419
- createCallAbi: '<CREATE_CALL_ABI>', // Optional. Only needed with web3.js
420
- simulateTxAccessorAbi: '<SIMULATE_TX_ACCESSOR_ABI>' // Optional. Only needed with web3.js
421
- }
422
- }
423
- const safeSdk = await Safe.connect({ ethAdapter, safeAddress, contractNetworks })
424
- ```
425
-
426
- ### getAddress
427
-
428
- Returns the address of the current SafeProxy contract.
429
-
430
- ```js
431
- const safeAddress = await safeSdk.getAddress()
432
- ```
433
-
434
- ### getContractVersion
435
-
436
- Returns the Safe Master Copy contract version.
437
-
438
- ```js
439
- const contractVersion = await safeSdk.getContractVersion()
440
- ```
441
-
442
- ### getOwners
443
-
444
- Returns the list of Safe owner accounts.
445
-
446
- ```js
447
- const ownerAddresses = await safeSdk.getOwners()
448
- ```
449
-
450
- ### getNonce
451
-
452
- Returns the Safe nonce.
453
-
454
- ```js
455
- const nonce = await safeSdk.getNonce()
456
- ```
457
-
458
- ### getThreshold
459
-
460
- Returns the Safe threshold.
461
-
462
- ```js
463
- const threshold = await safeSdk.getThreshold()
464
- ```
465
-
466
- ### getChainId
467
-
468
- Returns the chainId of the connected network.
469
-
470
- ```js
471
- const chainId = await safeSdk.getChainId()
472
- ```
473
-
474
- ### getBalance
475
-
476
- Returns the ETH balance of the Safe.
477
-
478
- ```js
479
- const balance = await safeSdk.getBalance()
480
- ```
481
-
482
- ### getGuard
483
-
484
- Returns the enabled Safe guard or 0x address if no guards are enabled.
485
-
486
- ```js
487
- const guardAddress = await safeSdk.getGuard()
488
- ```
489
-
490
- ### getModules
491
-
492
- Returns the list of addresses of all the enabled Safe modules.
493
-
494
- ```js
495
- const moduleAddresses = await safeSdk.getModules()
496
- ```
497
-
498
- ### isModuleEnabled
499
-
500
- Checks if a specific Safe module is enabled for the current Safe.
501
-
502
- ```js
503
- const isEnabled = await safeSdk.isModuleEnabled(moduleAddress)
504
- ```
505
-
506
- ### isOwner
507
-
508
- Checks if a specific address is an owner of the current Safe.
509
-
510
- ```js
511
- const isOwner = await safeSdk.isOwner(address)
512
- ```
513
-
514
- ### createTransaction
515
-
516
- Returns a Safe transaction ready to be signed by the owners and executed. The Protocol Kit supports the creation of single Safe transactions but also MultiSend transactions.
517
-
518
- - **Single transactions**
519
-
520
- This method can take an object of type `SafeTransactionDataPartial` that represents the transaction we want to execute (once the signatures are collected). It accepts some optional properties as follows.
521
-
522
- ```js
523
- import { SafeTransactionDataPartial } from '@safe-global/safe-core-sdk-types'
524
-
525
- const safeTransactionData: SafeTransactionDataPartial = {
526
- to,
527
- data,
528
- value,
529
- operation, // Optional
530
- safeTxGas, // Optional
531
- baseGas, // Optional
532
- gasPrice, // Optional
533
- gasToken, // Optional
534
- refundReceiver, // Optional
535
- nonce // Optional
536
- }
537
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
538
- ```
539
-
540
- - **MultiSend transactions**
541
-
542
- This method can take an array of `MetaTransactionData` objects that represent the multiple transactions we want to include in our MultiSend transaction. If we want to specify some of the optional properties in our MultiSend transaction, we can pass a second argument to the `createTransaction` method with the `SafeTransactionOptionalProps` object.
543
-
544
- ```js
545
- const safeTransactionData: MetaTransactionData[] = [
546
- {
547
- to,
548
- data,
549
- value,
550
- operation // Optional
551
- },
552
- {
553
- to,
554
- data,
555
- value,
556
- operation // Optional
557
- }
558
- // ...
559
- ]
560
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
561
- ```
562
-
563
- This method can also receive the `options` parameter to set the optional properties in the MultiSend transaction:
564
-
565
- ```js
566
- const safeTransactionData: MetaTransactionData[] = [
567
- {
568
- to,
569
- data,
570
- value,
571
- operation // Optional
572
- },
573
- {
574
- to,
575
- data,
576
- value,
577
- operation // Optional
578
- }
579
- // ...
580
- ]
581
- const options: SafeTransactionOptionalProps = {
582
- safeTxGas, // Optional
583
- baseGas, // Optional
584
- gasPrice, // Optional
585
- gasToken, // Optional
586
- refundReceiver, // Optional
587
- nonce // Optional
588
- }
589
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData, options })
590
- ```
591
-
592
- In addition, the optional `callsOnly` parameter, which is `false` by default, allows to force the use of the `MultiSendCallOnly` instead of the `MultiSend` contract when sending a batch transaction:
593
-
594
- ```js
595
- const callsOnly = true
596
- const safeTransaction = await safeSdk.createTransaction({
597
- safeTransactionData,
598
- options,
599
- callsOnly
600
- })
601
- ```
602
-
603
- If the optional properties are not manually set, the Safe transaction returned will have the default value for each one:
604
-
605
- - `operation`: `OperationType.Call` (0) is the default value.
606
- - `safeTxGas`: The right gas estimation is the default value.
607
- - `baseGas`: 0 is the default value.
608
- - `gasPrice`: 0 is the default value.
609
- - `gasToken`: 0x address is the default value.
610
- - `refundReceiver`: 0x address is the default value.
611
- - `nonce`: The current Safe nonce is the default value.
612
-
613
- Read more about [create transactions from a Safe](https://docs.safe.global/learn/safe-core-account-abstraction-sdk/protocol-kit#making-a-transaction-from-a-safe).
614
-
615
- ### createRejectionTransaction
616
-
617
- Returns a Safe transaction ready to be signed by the owners that invalidates the pending Safe transaction/s with a specific nonce.
618
-
619
- ```js
620
- const safeTransactionData: SafeTransactionDataPartial = {
621
- // ...
622
- }
623
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
624
- const rejectionTransaction = await safeSdk.createRejectionTransaction(safeTransaction.data.nonce)
625
- ```
626
-
627
- ### copyTransaction
628
-
629
- Copies a Safe transaction.
630
-
631
- ```js
632
- const safeTransaction1 = await safeSdk.createTransaction({ safeTransactionData })
633
- const safeTransaction2 = await copyTransaction(safeTransaction1)
634
- ```
635
-
636
- ### getTransactionHash
637
-
638
- Returns the transaction hash of a Safe transaction.
639
-
640
- ```js
641
- const safeTransactionData: SafeTransactionDataPartial = {
642
- // ...
643
- }
644
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
645
- const txHash = await safeSdk.getTransactionHash(safeTransaction)
646
- ```
647
-
648
- ### signTransactionHash
649
-
650
- Signs a hash using the current owner account.
651
-
652
- ```js
653
- const safeTransactionData: SafeTransactionDataPartial = {
654
- // ...
655
- }
656
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
657
- const txHash = await safeSdk.getTransactionHash(safeTransaction)
658
- const signature = await safeSdk.signTransactionHash(txHash)
659
- ```
660
-
661
- ### signTypedData
662
-
663
- Signs a transaction according to the EIP-712 using the current signer account.
664
-
665
- ```js
666
- const safeTransactionData: SafeTransactionDataPartial = {
667
- // ...
668
- }
669
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
670
- const signature = await safeSdk.signTypedData(safeTransaction)
671
- ```
672
-
673
- ### signTransaction
674
-
675
- Returns a new `SafeTransaction` object that includes the signature of the current owner. `eth_sign` will be used by default to generate the signature.
676
-
677
- ```js
678
- const safeTransactionData: SafeTransactionDataPartial = {
679
- // ...
680
- }
681
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
682
- const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
683
- ```
684
-
685
- Optionally, an additional parameter can be passed to specify a different way of signing:
686
-
687
- ```js
688
- const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction, 'eth_signTypedData')
689
- ```
690
-
691
- ```js
692
- const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction, 'eth_sign') // default option.
693
- ```
694
-
695
- ### approveTransactionHash
696
-
697
- Approves a hash on-chain using the current owner account.
698
-
699
- ```js
700
- const safeTransactionData: SafeTransactionDataPartial = {
701
- // ...
702
- }
703
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
704
- const txHash = await safeSdk.getTransactionHash(safeTransaction)
705
- const txResponse = await safeSdk.approveTransactionHash(txHash)
706
- await txResponse.transactionResponse?.wait()
707
- ```
708
-
709
- Optionally, some properties can be passed as execution options:
710
-
711
- ```js
712
- const options: Web3TransactionOptions = {
713
- from, // Optional
714
- gas, // Optional
715
- gasPrice, // Optional
716
- maxFeePerGas, // Optional
717
- maxPriorityFeePerGas // Optional
718
- nonce // Optional
719
- }
720
- ```
721
-
722
- ```js
723
- const options: EthersTransactionOptions = {
724
- from, // Optional
725
- gasLimit, // Optional
726
- gasPrice, // Optional
727
- maxFeePerGas, // Optional
728
- maxPriorityFeePerGas // Optional
729
- nonce // Optional
730
- }
731
- ```
732
-
733
- ```js
734
- const txResponse = await safeSdk.approveTransactionHash(txHash, options)
735
- ```
736
-
737
- ### getOwnersWhoApprovedTx
738
-
739
- Returns a list of owners who have approved a specific Safe transaction.
740
-
741
- ```js
742
- const safeTransactionData: SafeTransactionDataPartial = {
743
- // ...
744
- }
745
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
746
- const txHash = await safeSdk.getTransactionHash(safeTransaction)
747
- const ownerAddresses = await safeSdk.getOwnersWhoApprovedTx(txHash)
748
- ```
749
-
750
- ### createEnableFallbackHandlerTx
751
-
752
- Returns the Safe transaction to enable the fallback handler.
753
-
754
- ```js
755
- const safeTransaction = await safeSdk.createEnableFallbackHandlerTx(fallbackHandlerAddress)
756
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
757
- await txResponse.transactionResponse?.wait()
758
- ```
759
-
760
- This method can optionally receive the `options` parameter:
761
-
762
- ```js
763
- const options: SafeTransactionOptionalProps = {
764
- safeTxGas, // Optional
765
- baseGas, // Optional
766
- gasPrice, // Optional
767
- gasToken, // Optional
768
- refundReceiver, // Optional
769
- nonce // Optional
770
- }
771
- const safeTransaction = await safeSdk.createEnableFallbackHandlerTx(fallbackHandlerAddress, options)
772
- ```
773
-
774
- ### createDisableFallbackHandlerTx
775
-
776
- Returns the Safe transaction to disable the fallback handler.
777
-
778
- ```js
779
- const safeTransaction = await safeSdk.createDisableFallbackHandlerTx()
780
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
781
- await txResponse.transactionResponse?.wait()
782
- ```
783
-
784
- This method can optionally receive the `options` parameter:
785
-
786
- ```js
787
- const options: SafeTransactionOptionalProps = { ... }
788
- const safeTransaction = await safeSdk.createDisableFallbackHandlerTx(options)
789
- ```
790
-
791
- ### createEnableGuardTx
792
-
793
- Returns the Safe transaction to enable a Safe guard.
794
-
795
- ```js
796
- const safeTransaction = await safeSdk.createEnableGuardTx(guardAddress)
797
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
798
- await txResponse.transactionResponse?.wait()
799
- ```
800
-
801
- This method can optionally receive the `options` parameter:
802
-
803
- ```js
804
- const options: SafeTransactionOptionalProps = {
805
- safeTxGas, // Optional
806
- baseGas, // Optional
807
- gasPrice, // Optional
808
- gasToken, // Optional
809
- refundReceiver, // Optional
810
- nonce // Optional
811
- }
812
- const safeTransaction = await safeSdk.createEnableGuardTx(guardAddress, options)
813
- ```
814
-
815
- ### createDisableGuardTx
816
-
817
- Returns the Safe transaction to disable a Safe guard.
818
-
819
- ```js
820
- const safeTransaction = await safeSdk.createDisableGuardTx()
821
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
822
- await txResponse.transactionResponse?.wait()
823
- ```
824
-
825
- This method can optionally receive the `options` parameter:
826
-
827
- ```js
828
- const options: SafeTransactionOptionalProps = { ... }
829
- const safeTransaction = await safeSdk.createDisableGuardTx(options)
830
- ```
831
-
832
- ### createEnableModuleTx
833
-
834
- Returns a Safe transaction ready to be signed that will enable a Safe module.
835
-
836
- ```js
837
- const safeTransaction = await safeSdk.createEnableModuleTx(moduleAddress)
838
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
839
- await txResponse.transactionResponse?.wait()
840
- ```
841
-
842
- This method can optionally receive the `options` parameter:
843
-
844
- ```js
845
- const options: SafeTransactionOptionalProps = { ... }
846
- const safeTransaction = await safeSdk.createEnableModuleTx(moduleAddress, options)
847
- ```
848
-
849
- ### createDisableModuleTx
850
-
851
- Returns a Safe transaction ready to be signed that will disable a Safe module.
852
-
853
- ```js
854
- const safeTransaction = await safeSdk.createDisableModuleTx(moduleAddress)
855
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
856
- await txResponse.transactionResponse?.wait()
857
- ```
858
-
859
- This method can optionally receive the `options` parameter:
860
-
861
- ```js
862
- const options: SafeTransactionOptionalProps = { ... }
863
- const safeTransaction = await safeSdk.createDisableModuleTx(moduleAddress, options)
864
- ```
865
-
866
- ### createAddOwnerTx
867
-
868
- Returns the Safe transaction to add an owner and optionally change the threshold.
869
-
870
- ```js
871
- const params: AddOwnerTxParams = {
872
- ownerAddress,
873
- threshold // Optional. If `threshold` is not provided the current threshold will not change.
874
- }
875
- const safeTransaction = await safeSdk.createAddOwnerTx(params)
876
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
877
- await txResponse.transactionResponse?.wait()
878
- ```
879
-
880
- This method can optionally receive the `options` parameter:
881
-
882
- ```js
883
- const options: SafeTransactionOptionalProps = { ... }
884
- const safeTransaction = await safeSdk.createAddOwnerTx(params, options)
885
- ```
886
-
887
- ### createRemoveOwnerTx
888
-
889
- Returns the Safe transaction to remove an owner and optionally change the threshold.
890
-
891
- ```js
892
- const params: RemoveOwnerTxParams = {
893
- ownerAddress,
894
- newThreshold // Optional. If `newThreshold` is not provided, the current threshold will be decreased by one.
895
- }
896
- const safeTransaction = await safeSdk.createRemoveOwnerTx(params)
897
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
898
- await txResponse.transactionResponse?.wait()
899
- ```
900
-
901
- This method can optionally receive the `options` parameter:
902
-
903
- ```js
904
- const options: SafeTransactionOptionalProps = { ... }
905
- const safeTransaction = await safeSdk.createRemoveOwnerTx(params, options)
906
- ```
907
-
908
- ### createSwapOwnerTx
909
-
910
- Returns the Safe transaction to replace an owner of the Safe with a new one.
911
-
912
- ```js
913
- const params: SwapOwnerTxParams = {
914
- oldOwnerAddress,
915
- newOwnerAddress
916
- }
917
- const safeTransaction = await safeSdk.createSwapOwnerTx(params)
918
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
919
- await txResponse.transactionResponse?.wait()
920
- ```
921
-
922
- This method can optionally receive the `options` parameter:
923
-
924
- ```js
925
- const options: SafeTransactionOptionalProps = { ... }
926
- const safeTransaction = await safeSdk.createSwapOwnerTx(params, options)
927
- ```
928
-
929
- ### createChangeThresholdTx
930
-
931
- Returns the Safe transaction to change the threshold.
932
-
933
- ```js
934
- const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold)
935
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
936
- await txResponse.transactionResponse?.wait()
937
- ```
938
-
939
- This method can optionally receive the `options` parameter:
940
-
941
- ```js
942
- const options: SafeTransactionOptionalProps = { ... }
943
- const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold, options)
944
- ```
945
-
946
- ### isValidTransaction
947
-
948
- Checks if a Safe transaction can be executed successfully with no errors.
949
-
950
- ```js
951
- const safeTransactionData: SafeTransactionDataPartial = {
952
- // ...
953
- }
954
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
955
- const isValidTx = await safeSdk.isValidTransaction(safeTransaction)
956
- ```
957
-
958
- Optionally, some properties can be passed as execution options:
959
-
960
- ```js
961
- const options: Web3TransactionOptions = {
962
- from, // Optional
963
- gas, // Optional
964
- gasPrice, // Optional
965
- maxFeePerGas, // Optional
966
- maxPriorityFeePerGas // Optional
967
- nonce // Optional
968
- }
969
- ```
970
-
971
- ```js
972
- const options: EthersTransactionOptions = {
973
- from, // Optional
974
- gasLimit, // Optional
975
- gasPrice, // Optional
976
- maxFeePerGas, // Optional
977
- maxPriorityFeePerGas // Optional
978
- nonce // Optional
979
- }
980
- ```
981
-
982
- ```js
983
- const isValidTx = await safeSdk.isValidTransaction(safeTransaction, options)
984
- ```
985
-
986
- ### executeTransaction
987
-
988
- Executes a Safe transaction.
989
-
990
- ```js
991
- const safeTransactionData: SafeTransactionDataPartial = {
992
- // ...
993
- }
994
- const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
995
- const txResponse = await safeSdk.executeTransaction(safeTransaction)
996
- await txResponse.transactionResponse?.wait()
997
- ```
998
-
999
- Optionally, some properties can be passed as execution options:
1000
-
1001
- ```js
1002
- const options: Web3TransactionOptions = {
1003
- from, // Optional
1004
- gas, // Optional
1005
- gasPrice, // Optional
1006
- maxFeePerGas, // Optional
1007
- maxPriorityFeePerGas // Optional
1008
- nonce // Optional
1009
- }
1010
- ```
1011
-
1012
- ```js
1013
- const options: EthersTransactionOptions = {
1014
- from, // Optional
1015
- gasLimit, // Optional
1016
- gasPrice, // Optional
1017
- maxFeePerGas, // Optional
1018
- maxPriorityFeePerGas // Optional
1019
- nonce // Optional
1020
- }
1021
- ```
1022
-
1023
- ```js
1024
- const txResponse = await safeSdk.executeTransaction(safeTransaction, options)
1025
- ```
1026
-
1027
- ## <a name="license">License</a>
1028
-
1029
- This library is released under MIT.
1030
-
1031
- ## <a name="contributors">Contributors</a>
1032
-
1033
- - Germán Martínez ([germartinez](https://github.com/germartinez))
1
+ # Protocol Kit
2
+
3
+ [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit)
4
+ [![GitHub Release](https://img.shields.io/github/release/safe-global/safe-core-sdk.svg?style=flat)](https://github.com/safe-global/safe-core-sdk/releases)
5
+ [![GitHub](https://img.shields.io/github/license/safe-global/safe-core-sdk)](https://github.com/safe-global/safe-core-sdk/blob/main/LICENSE.md)
6
+
7
+ Software development kit that facilitates the interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts).
8
+
9
+ ## Table of contents
10
+
11
+ - [Installation](#installation)
12
+ - [Build](#build)
13
+ - [Tests](#tests)
14
+ - [Getting Started](#getting-started)
15
+ - [Safe Factory API Reference](#factory-api)
16
+ - [Safe Core SDK API Reference](#sdk-api)
17
+ - [License](#license)
18
+ - [Contributors](#contributors)
19
+
20
+ ## <a name="installation">Installation</a>
21
+
22
+ Install the package with yarn or npm:
23
+
24
+ ```bash
25
+ yarn add @safe-global/protocol-kit
26
+ npm install @safe-global/protocol-kit
27
+ ```
28
+
29
+ ## <a name="build">Build</a>
30
+
31
+ Build the package with yarn or npm:
32
+
33
+ ```bash
34
+ yarn build
35
+ npm run build
36
+ ```
37
+
38
+ ## <a name="tests">Tests</a>
39
+
40
+ Create a `.env` file with environment variables. You can use the `.env.example` file as a reference.
41
+
42
+ Test the package with yarn or npm:
43
+
44
+ ```bash
45
+ yarn test
46
+ npm run test
47
+ ```
48
+
49
+ ## <a name="getting-started">Getting Started</a>
50
+
51
+ The following steps show how to set up the Protocol Kit, deploy a new Safe, create a Safe transaction, generate the required signatures from owners and execute the transaction. However, using the Protocol Kit alone will not allow for the collection of owner signatures off-chain. To do this and be able to see and confirm the pending transactions shown in the [Safe Web App](https://app.safe.global/), it is recommended that you follow this other [guide](/guides/integrating-the-safe-core-sdk.md) that covers the use of the Protocol Kit, combined with the API Kit.
52
+
53
+ ### 1. Instantiate an EthAdapter
54
+
55
+ First of all, we need to create an `EthAdapter`, which contains all the required utilities for the SDKs to interact with the blockchain. It acts as a wrapper for [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/v6/) Ethereum libraries.
56
+
57
+ Depending on the library used by the Dapp, there are two options:
58
+
59
+ - [Create an `EthersAdapter` instance](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit/src/adapters/ethers)
60
+ - [Create a `Web3Adapter` instance](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit/src/adapters/web3)
61
+
62
+ Once the instance of `EthersAdapter` or `Web3Adapter` is created, it can be used in the SDK initialization.
63
+
64
+ ### 2. Deploy a new Safe
65
+
66
+ To deploy a new Safe account instantiate the `SafeFactory` class and call the `deploySafe` method with the right params to configure the new Safe. This includes defining the list of owners and the threshold of the Safe. A Safe account with three owners and threshold equal three will be used as the starting point for this example but any Safe configuration is valid.
67
+
68
+ ```js
69
+ import Safe, { SafeFactory, SafeAccountConfig } from '@safe-global/protocol-kit'
70
+
71
+ const safeFactory = await SafeFactory.create({ ethAdapter })
72
+
73
+ const owners = ['0x<address>', '0x<address>', '0x<address>']
74
+ const threshold = 3
75
+ const safeAccountConfig: SafeAccountConfig = {
76
+ owners,
77
+ threshold
78
+ // ...
79
+ }
80
+
81
+ const safeSdk: Safe = await safeFactory.deploySafe({ safeAccountConfig })
82
+ ```
83
+
84
+ The `deploySafe` method executes a transaction from the `owner1` account, deploys a new Safe and returns an instance of the Protocol Kit connected to the new Safe. Check the `deploySafe` method in the [API Reference](#factory-api) for more details on additional configuration parameters and callbacks.
85
+
86
+ Call the `getAddress` method, for example, to check the address of the newly deployed Safe.
87
+
88
+ ```js
89
+ const newSafeAddress = await safeSdk.getAddress()
90
+ ```
91
+
92
+ To instantiate the Protocol Kit from an existing Safe just pass to it an instance of the `EthAdapter` class and the Safe address.
93
+
94
+ ```js
95
+ import Safe from '@safe-global/protocol-kit'
96
+
97
+ const safeSdk: Safe = await Safe.create({ ethAdapter: ethAdapterOwner1, safeAddress })
98
+ ```
99
+
100
+ Check the `create` method in the [API Reference](#sdk-api) for more details on additional configuration parameters.
101
+
102
+ ### 3. Create a Safe transaction
103
+
104
+ ```js
105
+ import { SafeTransactionDataPartial } from '@safe-global/safe-core-sdk-types'
106
+
107
+ const safeTransactionData: SafeTransactionDataPartial = {
108
+ to: '0x<address>',
109
+ value: '<eth_value_in_wei>',
110
+ data: '0x<data>'
111
+ }
112
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
113
+ ```
114
+
115
+ Check the `createTransaction` method in the [API Reference](#sdk-api) for additional details on creating MultiSend transactions.
116
+
117
+ Before executing this transaction, it must be signed by the owners and this can be done off-chain or on-chain. In this example `owner1` will sign it off-chain, `owner2` will sign it on-chain and `owner3` will execute it (the executor also signs the transaction transparently).
118
+
119
+ ### 3.a. Off-chain signatures
120
+
121
+ The `owner1` account signs the transaction off-chain.
122
+
123
+ ```js
124
+ const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
125
+ ```
126
+
127
+ Because the signature is off-chain, there is no interaction with the contract and the signature becomes available at `signedSafeTransaction.signatures`.
128
+
129
+ ### 3.b. On-chain signatures
130
+
131
+ To connect `owner2` to the Safe we need to create a new instance of the class `EthAdapter` passing to its constructor the owner we would like to connect. After `owner2` account is connected to the SDK as a signer the transaction hash will be approved on-chain.
132
+
133
+ ```js
134
+ const ethAdapterOwner2 = new EthersAdapter({ ethers, signerOrProvider: owner2 })
135
+ const safeSdk2 = await safeSdk.connect({ ethAdapter: ethAdapterOwner2, safeAddress })
136
+ const txHash = await safeSdk2.getTransactionHash(safeTransaction)
137
+ const approveTxResponse = await safeSdk2.approveTransactionHash(txHash)
138
+ await approveTxResponse.transactionResponse?.wait()
139
+ ```
140
+
141
+ ### 4. Transaction execution
142
+
143
+ Lastly, `owner3` account is connected to the SDK as a signer and executor of the Safe transaction to execute it.
144
+
145
+ ```js
146
+ const ethAdapterOwner3 = new EthersAdapter({ ethers, signerOrProvider: owner3 })
147
+ const safeSdk3 = await safeSdk2.connect({ ethAdapter: ethAdapterOwner3, safeAddress })
148
+ const executeTxResponse = await safeSdk3.executeTransaction(safeTransaction)
149
+ await executeTxResponse.transactionResponse?.wait()
150
+ ```
151
+
152
+ All the signatures used to execute the transaction are now available at `safeTransaction.signatures`.
153
+
154
+ ## <a name="factory-api">Safe Factory API Reference</a>
155
+
156
+ ### create
157
+
158
+ Returns an instance of the Safe Factory.
159
+
160
+ ```js
161
+ import { SafeFactory } from '@safe-global/protocol-kit'
162
+
163
+ const safeFactory = await SafeFactory.create({ ethAdapter })
164
+ ```
165
+
166
+ - The `isL1SafeSingleton` flag
167
+
168
+ There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
169
+
170
+ By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeSingleton` flag to force the use of the `Safe.sol` contract.
171
+
172
+ ```js
173
+ const safeFactory = await SafeFactory.create({ ethAdapter, isL1SafeSingleton: true })
174
+ ```
175
+
176
+ - The `contractNetworks` property
177
+
178
+ If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
179
+
180
+ ```js
181
+ import { ContractNetworksConfig } from '@safe-global/protocol-kit'
182
+
183
+ const chainId = await ethAdapter.getChainId()
184
+ const contractNetworks: ContractNetworksConfig = {
185
+ [chainId]: {
186
+ safeSingletonAddress: '<SINGLETON_ADDRESS>',
187
+ safeProxyFactoryAddress: '<PROXY_FACTORY_ADDRESS>',
188
+ multiSendAddress: '<MULTI_SEND_ADDRESS>',
189
+ multiSendCallOnlyAddress: '<MULTI_SEND_CALL_ONLY_ADDRESS>',
190
+ fallbackHandlerAddress: '<FALLBACK_HANDLER_ADDRESS>',
191
+ signMessageLibAddress: '<SIGN_MESSAGE_LIB_ADDRESS>',
192
+ createCallAddress: '<CREATE_CALL_ADDRESS>',
193
+ simulateTxAccessorAddress: '<SIMULATE_TX_ACCESSOR_ADDRESS>',
194
+ safeSingletonAbi: '<SINGLETON_ABI>', // Optional. Only needed with web3.js
195
+ safeProxyFactoryAbi: '<PROXY_FACTORY_ABI>', // Optional. Only needed with web3.js
196
+ multiSendAbi: '<MULTI_SEND_ABI>', // Optional. Only needed with web3.js
197
+ multiSendCallOnlyAbi: '<MULTI_SEND_CALL_ONLY_ABI>', // Optional. Only needed with web3.js
198
+ fallbackHandlerAbi: '<FALLBACK_HANDLER_ABI>', // Optional. Only needed with web3.js
199
+ signMessageLibAbi: '<SIGN_MESSAGE_LIB_ABI>', // Optional. Only needed with web3.js
200
+ createCallAbi: '<CREATE_CALL_ABI>', // Optional. Only needed with web3.js
201
+ simulateTxAccessorAbi: '<SIMULATE_TX_ACCESSOR_ABI>' // Optional. Only needed with web3.js
202
+ }
203
+ }
204
+
205
+ const safeFactory = await SafeFactory.create({ ethAdapter, contractNetworks })
206
+ ```
207
+
208
+ - The `safeVersion` property
209
+
210
+ The `SafeFactory` constructor also accepts the `safeVersion` property to specify the Safe contract version that will be deployed. This string can take the values `1.0.0`, `1.1.1`, `1.2.0`, `1.3.0` or `1.4.1`. If not specified, the `DEFAULT_SAFE_VERSION` value will be used.
211
+
212
+ ```js
213
+ const safeVersion = 'X.Y.Z'
214
+ const safeFactory = await SafeFactory.create({ ethAdapter, safeVersion })
215
+ ```
216
+
217
+ ### deploySafe
218
+
219
+ Deploys a new Safe and returns an instance of the Protocol Kit connected to the deployed Safe. The Singleton address, contract version and layer instance (`Safe.sol` or `SafeL2.sol`) of the deployed Safe will depend on the configuration used to create the `safeFactory`.
220
+
221
+ ```js
222
+ const safeAccountConfig: SafeAccountConfig = {
223
+ owners,
224
+ threshold,
225
+ to, // Optional
226
+ data, // Optional
227
+ fallbackHandler, // Optional
228
+ paymentToken, // Optional
229
+ payment, // Optional
230
+ paymentReceiver // Optional
231
+ }
232
+
233
+ const safeSdk = await safeFactory.deploySafe({ safeAccountConfig })
234
+ ```
235
+
236
+ This method can optionally receive the `saltNonce` parameter.
237
+
238
+ ```js
239
+ const safeAccountConfig: SafeAccountConfig = {
240
+ owners,
241
+ threshold,
242
+ to, // Optional
243
+ data, // Optional
244
+ fallbackHandler, // Optional
245
+ paymentToken, // Optional
246
+ payment, // Optional
247
+ paymentReceiver // Optional
248
+ }
249
+
250
+ const saltNonce = '<YOUR_CUSTOM_VALUE>'
251
+
252
+ const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, saltNonce })
253
+ ```
254
+
255
+ Optionally, some properties can be passed as execution options:
256
+
257
+ ```js
258
+ const options: Web3TransactionOptions = {
259
+ from, // Optional
260
+ gas, // Optional
261
+ gasPrice, // Optional
262
+ maxFeePerGas, // Optional
263
+ maxPriorityFeePerGas // Optional
264
+ nonce // Optional
265
+ }
266
+ ```
267
+
268
+ ```js
269
+ const options: EthersTransactionOptions = {
270
+ from, // Optional
271
+ gasLimit, // Optional
272
+ gasPrice, // Optional
273
+ maxFeePerGas, // Optional
274
+ maxPriorityFeePerGas // Optional
275
+ nonce // Optional
276
+ }
277
+ ```
278
+
279
+ ```js
280
+ const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, safeDeploymentConfig, options })
281
+ ```
282
+
283
+ It can also take an optional callback which receives the `txHash` of the Safe deployment transaction prior to returning a new instance of the Protocol Kit:
284
+
285
+ ```js
286
+ const callback = (txHash: string): void => {
287
+ console.log({ txHash })
288
+ }
289
+
290
+ const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, callback })
291
+ ```
292
+
293
+ ## <a name="sdk-api">Safe Core SDK API Reference</a>
294
+
295
+ ### create
296
+
297
+ Returns an instance of the Protocol Kit connected to a Safe. The provided Safe must be a `safeAddress` or a `predictedSafe`.
298
+
299
+ Initialization of a deployed Safe using the `safeAddress` property:
300
+
301
+ ```js
302
+ import Safe from '@safe-global/protocol-kit'
303
+
304
+ const safeSdk = await Safe.create({ ethAdapter, safeAddress })
305
+ ```
306
+
307
+ Initialization of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to initialize the SDK with the Safe configuration and use it to some extent before it is deployed:
308
+
309
+ ```js
310
+ import Safe, { PredictedSafeProps } from '@safe-global/protocol-kit'
311
+
312
+ const predictedSafe: PredictedSafeProps = {
313
+ safeAccountConfig,
314
+ safeDeploymentConfig
315
+ }
316
+
317
+ const safeSdk = await Safe.create({ ethAdapter, predictedSafe })
318
+ ```
319
+
320
+ - The `isL1SafeSingleton` flag
321
+
322
+ There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
323
+
324
+ By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeSingleton` flag to force the use of the `Safe.sol` contract.
325
+
326
+ ```js
327
+ const safeSdk = await Safe.create({ ethAdapter, safeAddress, isL1SafeSingleton: true })
328
+ ```
329
+
330
+ - The `contractNetworks` property
331
+
332
+ If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
333
+
334
+ ```js
335
+ import { ContractNetworksConfig } from '@safe-global/protocol-kit'
336
+
337
+ const chainId = await ethAdapter.getChainId()
338
+ const contractNetworks: ContractNetworksConfig = {
339
+ [chainId]: {
340
+ safeSingletonAddress: '<SINGLETON_ADDRESS>',
341
+ safeProxyFactoryAddress: '<PROXY_FACTORY_ADDRESS>',
342
+ multiSendAddress: '<MULTI_SEND_ADDRESS>',
343
+ multiSendCallOnlyAddress: '<MULTI_SEND_CALL_ONLY_ADDRESS>',
344
+ fallbackHandlerAddress: '<FALLBACK_HANDLER_ADDRESS>',
345
+ signMessageLibAddress: '<SIGN_MESSAGE_LIB_ADDRESS>',
346
+ createCallAddress: '<CREATE_CALL_ADDRESS>',
347
+ simulateTxAccessorAddress: '<SIMULATE_TX_ACCESSOR_ADDRESS>',
348
+ safeSingletonAbi: '<SINGLETON_ABI>', // Optional. Only needed with web3.js
349
+ safeProxyFactoryAbi: '<PROXY_FACTORY_ABI>', // Optional. Only needed with web3.js
350
+ multiSendAbi: '<MULTI_SEND_ABI>', // Optional. Only needed with web3.js
351
+ multiSendCallOnlyAbi: '<MULTI_SEND_CALL_ONLY_ABI>', // Optional. Only needed with web3.js
352
+ fallbackHandlerAbi: '<FALLBACK_HANDLER_ABI>', // Optional. Only needed with web3.js
353
+ signMessageLibAbi: '<SIGN_MESSAGE_LIB_ABI>', // Optional. Only needed with web3.js
354
+ createCallAbi: '<CREATE_CALL_ABI>', // Optional. Only needed with web3.js
355
+ simulateTxAccessorAbi: '<SIMULATE_TX_ACCESSOR_ABI>' // Optional. Only needed with web3.js
356
+ }
357
+ }
358
+
359
+ const safeSdk = await Safe.create({ ethAdapter, safeAddress, contractNetworks })
360
+ ```
361
+
362
+ ### connect
363
+
364
+ Returns a new instance of the Protocol Kit connected to a new Safe or a new Signer. The new connected signer can be passed via the `ethAdapter` property while the new connected Safe can be passed using a `safeAddress` or a `predictedSafe`.
365
+
366
+ Connection of a deployed Safe using the `safeAddress` property:
367
+
368
+ ```js
369
+ const safeSdk = await safeSdk.connect({ ethAdapter, safeAddress })
370
+ ```
371
+
372
+ Connection of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to connect a Safe to the SDK with the Safe configuration:
373
+
374
+ ```js
375
+ import { PredictedSafeProps } from '@safe-global/protocol-kit'
376
+
377
+ const predictedSafe: PredictedSafeProps = {
378
+ safeAccountConfig,
379
+ safeDeploymentConfig
380
+ }
381
+
382
+ const safeSdk = await safeSdk.connect({ ethAdapter, predictedSafe })
383
+ ```
384
+
385
+ - The `isL1SafeSingleton` flag
386
+
387
+ There are two versions of the Safe contracts: [Safe.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/Safe.sol) that does not trigger events in order to save gas and [SafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.4.1/contracts/SafeL2.sol) that does, which is more appropriate for L2 networks.
388
+
389
+ By default `Safe.sol` will be only used on Ethereum Mainnet. For the rest of the networks where the Safe contracts are already deployed, the `SafeL2.sol` contract will be used unless you add the `isL1SafeSingleton` flag to force the use of the `Safe.sol` contract.
390
+
391
+ ```js
392
+ const safeSdk = await Safe.connect({ ethAdapter, safeAddress, isL1SafeSingleton: true })
393
+ ```
394
+
395
+ - The `contractNetworks` property
396
+
397
+ If the Safe contracts are not deployed to your current network, the `contractNetworks` property will be required to point to the addresses of the Safe contracts previously deployed by you.
398
+
399
+ ```js
400
+ import { ContractNetworksConfig } from '@safe-global/protocol-kit'
401
+
402
+ const chainId = await ethAdapter.getChainId()
403
+ const contractNetworks: ContractNetworksConfig = {
404
+ [chainId]: {
405
+ safeSingletonAddress: '<SINGLETON_ADDRESS>',
406
+ safeProxyFactoryAddress: '<PROXY_FACTORY_ADDRESS>',
407
+ multiSendAddress: '<MULTI_SEND_ADDRESS>',
408
+ multiSendCallOnlyAddress: '<MULTI_SEND_CALL_ONLY_ADDRESS>',
409
+ fallbackHandlerAddress: '<FALLBACK_HANDLER_ADDRESS>',
410
+ signMessageLibAddress: '<SIGN_MESSAGE_LIB_ADDRESS>',
411
+ createCallAddress: '<CREATE_CALL_ADDRESS>',
412
+ simulateTxAccessorAddress: '<SIMULATE_TX_ACCESSOR_ADDRESS>',
413
+ safeSingletonAbi: '<SINGLETON_ABI>', // Optional. Only needed with web3.js
414
+ safeProxyFactoryAbi: '<PROXY_FACTORY_ABI>', // Optional. Only needed with web3.js
415
+ multiSendAbi: '<MULTI_SEND_ABI>', // Optional. Only needed with web3.js
416
+ multiSendCallOnlyAbi: '<MULTI_SEND_CALL_ONLY_ABI>', // Optional. Only needed with web3.js
417
+ fallbackHandlerAbi: '<FALLBACK_HANDLER_ABI>', // Optional. Only needed with web3.js
418
+ signMessageLibAbi: '<SIGN_MESSAGE_LIB_ABI>', // Optional. Only needed with web3.js
419
+ createCallAbi: '<CREATE_CALL_ABI>', // Optional. Only needed with web3.js
420
+ simulateTxAccessorAbi: '<SIMULATE_TX_ACCESSOR_ABI>' // Optional. Only needed with web3.js
421
+ }
422
+ }
423
+ const safeSdk = await Safe.connect({ ethAdapter, safeAddress, contractNetworks })
424
+ ```
425
+
426
+ ### getAddress
427
+
428
+ Returns the address of the current SafeProxy contract.
429
+
430
+ ```js
431
+ const safeAddress = await safeSdk.getAddress()
432
+ ```
433
+
434
+ ### getContractVersion
435
+
436
+ Returns the Safe Singleton contract version.
437
+
438
+ ```js
439
+ const contractVersion = await safeSdk.getContractVersion()
440
+ ```
441
+
442
+ ### getOwners
443
+
444
+ Returns the list of Safe owner accounts.
445
+
446
+ ```js
447
+ const ownerAddresses = await safeSdk.getOwners()
448
+ ```
449
+
450
+ ### getNonce
451
+
452
+ Returns the Safe nonce.
453
+
454
+ ```js
455
+ const nonce = await safeSdk.getNonce()
456
+ ```
457
+
458
+ ### getThreshold
459
+
460
+ Returns the Safe threshold.
461
+
462
+ ```js
463
+ const threshold = await safeSdk.getThreshold()
464
+ ```
465
+
466
+ ### getChainId
467
+
468
+ Returns the chainId of the connected network.
469
+
470
+ ```js
471
+ const chainId = await safeSdk.getChainId()
472
+ ```
473
+
474
+ ### getBalance
475
+
476
+ Returns the ETH balance of the Safe.
477
+
478
+ ```js
479
+ const balance = await safeSdk.getBalance()
480
+ ```
481
+
482
+ ### getGuard
483
+
484
+ Returns the enabled Safe guard or 0x address if no guards are enabled.
485
+
486
+ ```js
487
+ const guardAddress = await safeSdk.getGuard()
488
+ ```
489
+
490
+ ### getModules
491
+
492
+ Returns the list of addresses of all the enabled Safe modules.
493
+
494
+ ```js
495
+ const moduleAddresses = await safeSdk.getModules()
496
+ ```
497
+
498
+ ### isModuleEnabled
499
+
500
+ Checks if a specific Safe module is enabled for the current Safe.
501
+
502
+ ```js
503
+ const isEnabled = await safeSdk.isModuleEnabled(moduleAddress)
504
+ ```
505
+
506
+ ### isOwner
507
+
508
+ Checks if a specific address is an owner of the current Safe.
509
+
510
+ ```js
511
+ const isOwner = await safeSdk.isOwner(address)
512
+ ```
513
+
514
+ ### createTransaction
515
+
516
+ Returns a Safe transaction ready to be signed by the owners and executed. The Protocol Kit supports the creation of single Safe transactions but also MultiSend transactions.
517
+
518
+ - **Single transactions**
519
+
520
+ This method can take an object of type `SafeTransactionDataPartial` that represents the transaction we want to execute (once the signatures are collected). It accepts some optional properties as follows.
521
+
522
+ ```js
523
+ import { SafeTransactionDataPartial } from '@safe-global/safe-core-sdk-types'
524
+
525
+ const safeTransactionData: SafeTransactionDataPartial = {
526
+ to,
527
+ data,
528
+ value,
529
+ operation, // Optional
530
+ safeTxGas, // Optional
531
+ baseGas, // Optional
532
+ gasPrice, // Optional
533
+ gasToken, // Optional
534
+ refundReceiver, // Optional
535
+ nonce // Optional
536
+ }
537
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
538
+ ```
539
+
540
+ - **MultiSend transactions**
541
+
542
+ This method can take an array of `MetaTransactionData` objects that represent the multiple transactions we want to include in our MultiSend transaction. If we want to specify some of the optional properties in our MultiSend transaction, we can pass a second argument to the `createTransaction` method with the `SafeTransactionOptionalProps` object.
543
+
544
+ ```js
545
+ const safeTransactionData: MetaTransactionData[] = [
546
+ {
547
+ to,
548
+ data,
549
+ value,
550
+ operation // Optional
551
+ },
552
+ {
553
+ to,
554
+ data,
555
+ value,
556
+ operation // Optional
557
+ }
558
+ // ...
559
+ ]
560
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
561
+ ```
562
+
563
+ This method can also receive the `options` parameter to set the optional properties in the MultiSend transaction:
564
+
565
+ ```js
566
+ const safeTransactionData: MetaTransactionData[] = [
567
+ {
568
+ to,
569
+ data,
570
+ value,
571
+ operation // Optional
572
+ },
573
+ {
574
+ to,
575
+ data,
576
+ value,
577
+ operation // Optional
578
+ }
579
+ // ...
580
+ ]
581
+ const options: SafeTransactionOptionalProps = {
582
+ safeTxGas, // Optional
583
+ baseGas, // Optional
584
+ gasPrice, // Optional
585
+ gasToken, // Optional
586
+ refundReceiver, // Optional
587
+ nonce // Optional
588
+ }
589
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData, options })
590
+ ```
591
+
592
+ In addition, the optional `callsOnly` parameter, which is `false` by default, allows to force the use of the `MultiSendCallOnly` instead of the `MultiSend` contract when sending a batch transaction:
593
+
594
+ ```js
595
+ const callsOnly = true
596
+ const safeTransaction = await safeSdk.createTransaction({
597
+ safeTransactionData,
598
+ options,
599
+ callsOnly
600
+ })
601
+ ```
602
+
603
+ If the optional properties are not manually set, the Safe transaction returned will have the default value for each one:
604
+
605
+ - `operation`: `OperationType.Call` (0) is the default value.
606
+ - `safeTxGas`: The right gas estimation is the default value.
607
+ - `baseGas`: 0 is the default value.
608
+ - `gasPrice`: 0 is the default value.
609
+ - `gasToken`: 0x address is the default value.
610
+ - `refundReceiver`: 0x address is the default value.
611
+ - `nonce`: The current Safe nonce is the default value.
612
+
613
+ Read more about [create transactions from a Safe](https://docs.safe.global/safe-core-aa-sdk/protocol-kit#making-a-transaction-from-a-safe).
614
+
615
+ ### createRejectionTransaction
616
+
617
+ Returns a Safe transaction ready to be signed by the owners that invalidates the pending Safe transaction/s with a specific nonce.
618
+
619
+ ```js
620
+ const safeTransactionData: SafeTransactionDataPartial = {
621
+ // ...
622
+ }
623
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
624
+ const rejectionTransaction = await safeSdk.createRejectionTransaction(safeTransaction.data.nonce)
625
+ ```
626
+
627
+ ### copyTransaction
628
+
629
+ Copies a Safe transaction.
630
+
631
+ ```js
632
+ const safeTransaction1 = await safeSdk.createTransaction({ safeTransactionData })
633
+ const safeTransaction2 = await copyTransaction(safeTransaction1)
634
+ ```
635
+
636
+ ### getTransactionHash
637
+
638
+ Returns the transaction hash of a Safe transaction.
639
+
640
+ ```js
641
+ const safeTransactionData: SafeTransactionDataPartial = {
642
+ // ...
643
+ }
644
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
645
+ const txHash = await safeSdk.getTransactionHash(safeTransaction)
646
+ ```
647
+
648
+ ### signTransactionHash
649
+
650
+ Signs a hash using the current owner account.
651
+
652
+ ```js
653
+ const safeTransactionData: SafeTransactionDataPartial = {
654
+ // ...
655
+ }
656
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
657
+ const txHash = await safeSdk.getTransactionHash(safeTransaction)
658
+ const signature = await safeSdk.signTransactionHash(txHash)
659
+ ```
660
+
661
+ ### signTypedData
662
+
663
+ Signs a transaction according to the EIP-712 using the current signer account.
664
+
665
+ ```js
666
+ const safeTransactionData: SafeTransactionDataPartial = {
667
+ // ...
668
+ }
669
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
670
+ const signature = await safeSdk.signTypedData(safeTransaction)
671
+ ```
672
+
673
+ ### signTransaction
674
+
675
+ Returns a new `SafeTransaction` object that includes the signature of the current owner. `eth_sign` will be used by default to generate the signature.
676
+
677
+ ```js
678
+ const safeTransactionData: SafeTransactionDataPartial = {
679
+ // ...
680
+ }
681
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
682
+ const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction)
683
+ ```
684
+
685
+ Optionally, an additional parameter can be passed to specify a different way of signing:
686
+
687
+ ```js
688
+ const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction, 'eth_signTypedData')
689
+ ```
690
+
691
+ ```js
692
+ const signedSafeTransaction = await safeSdk.signTransaction(safeTransaction, 'eth_sign') // default option.
693
+ ```
694
+
695
+ ### approveTransactionHash
696
+
697
+ Approves a hash on-chain using the current owner account.
698
+
699
+ ```js
700
+ const safeTransactionData: SafeTransactionDataPartial = {
701
+ // ...
702
+ }
703
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
704
+ const txHash = await safeSdk.getTransactionHash(safeTransaction)
705
+ const txResponse = await safeSdk.approveTransactionHash(txHash)
706
+ await txResponse.transactionResponse?.wait()
707
+ ```
708
+
709
+ Optionally, some properties can be passed as execution options:
710
+
711
+ ```js
712
+ const options: Web3TransactionOptions = {
713
+ from, // Optional
714
+ gas, // Optional
715
+ gasPrice, // Optional
716
+ maxFeePerGas, // Optional
717
+ maxPriorityFeePerGas // Optional
718
+ nonce // Optional
719
+ }
720
+ ```
721
+
722
+ ```js
723
+ const options: EthersTransactionOptions = {
724
+ from, // Optional
725
+ gasLimit, // Optional
726
+ gasPrice, // Optional
727
+ maxFeePerGas, // Optional
728
+ maxPriorityFeePerGas // Optional
729
+ nonce // Optional
730
+ }
731
+ ```
732
+
733
+ ```js
734
+ const txResponse = await safeSdk.approveTransactionHash(txHash, options)
735
+ ```
736
+
737
+ ### getOwnersWhoApprovedTx
738
+
739
+ Returns a list of owners who have approved a specific Safe transaction.
740
+
741
+ ```js
742
+ const safeTransactionData: SafeTransactionDataPartial = {
743
+ // ...
744
+ }
745
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
746
+ const txHash = await safeSdk.getTransactionHash(safeTransaction)
747
+ const ownerAddresses = await safeSdk.getOwnersWhoApprovedTx(txHash)
748
+ ```
749
+
750
+ ### createEnableFallbackHandlerTx
751
+
752
+ Returns the Safe transaction to enable the fallback handler.
753
+
754
+ ```js
755
+ const safeTransaction = await safeSdk.createEnableFallbackHandlerTx(fallbackHandlerAddress)
756
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
757
+ await txResponse.transactionResponse?.wait()
758
+ ```
759
+
760
+ This method can optionally receive the `options` parameter:
761
+
762
+ ```js
763
+ const options: SafeTransactionOptionalProps = {
764
+ safeTxGas, // Optional
765
+ baseGas, // Optional
766
+ gasPrice, // Optional
767
+ gasToken, // Optional
768
+ refundReceiver, // Optional
769
+ nonce // Optional
770
+ }
771
+ const safeTransaction = await safeSdk.createEnableFallbackHandlerTx(fallbackHandlerAddress, options)
772
+ ```
773
+
774
+ ### createDisableFallbackHandlerTx
775
+
776
+ Returns the Safe transaction to disable the fallback handler.
777
+
778
+ ```js
779
+ const safeTransaction = await safeSdk.createDisableFallbackHandlerTx()
780
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
781
+ await txResponse.transactionResponse?.wait()
782
+ ```
783
+
784
+ This method can optionally receive the `options` parameter:
785
+
786
+ ```js
787
+ const options: SafeTransactionOptionalProps = { ... }
788
+ const safeTransaction = await safeSdk.createDisableFallbackHandlerTx(options)
789
+ ```
790
+
791
+ ### createEnableGuardTx
792
+
793
+ Returns the Safe transaction to enable a Safe guard.
794
+
795
+ ```js
796
+ const safeTransaction = await safeSdk.createEnableGuardTx(guardAddress)
797
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
798
+ await txResponse.transactionResponse?.wait()
799
+ ```
800
+
801
+ This method can optionally receive the `options` parameter:
802
+
803
+ ```js
804
+ const options: SafeTransactionOptionalProps = {
805
+ safeTxGas, // Optional
806
+ baseGas, // Optional
807
+ gasPrice, // Optional
808
+ gasToken, // Optional
809
+ refundReceiver, // Optional
810
+ nonce // Optional
811
+ }
812
+ const safeTransaction = await safeSdk.createEnableGuardTx(guardAddress, options)
813
+ ```
814
+
815
+ ### createDisableGuardTx
816
+
817
+ Returns the Safe transaction to disable a Safe guard.
818
+
819
+ ```js
820
+ const safeTransaction = await safeSdk.createDisableGuardTx()
821
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
822
+ await txResponse.transactionResponse?.wait()
823
+ ```
824
+
825
+ This method can optionally receive the `options` parameter:
826
+
827
+ ```js
828
+ const options: SafeTransactionOptionalProps = { ... }
829
+ const safeTransaction = await safeSdk.createDisableGuardTx(options)
830
+ ```
831
+
832
+ ### createEnableModuleTx
833
+
834
+ Returns a Safe transaction ready to be signed that will enable a Safe module.
835
+
836
+ ```js
837
+ const safeTransaction = await safeSdk.createEnableModuleTx(moduleAddress)
838
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
839
+ await txResponse.transactionResponse?.wait()
840
+ ```
841
+
842
+ This method can optionally receive the `options` parameter:
843
+
844
+ ```js
845
+ const options: SafeTransactionOptionalProps = { ... }
846
+ const safeTransaction = await safeSdk.createEnableModuleTx(moduleAddress, options)
847
+ ```
848
+
849
+ ### createDisableModuleTx
850
+
851
+ Returns a Safe transaction ready to be signed that will disable a Safe module.
852
+
853
+ ```js
854
+ const safeTransaction = await safeSdk.createDisableModuleTx(moduleAddress)
855
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
856
+ await txResponse.transactionResponse?.wait()
857
+ ```
858
+
859
+ This method can optionally receive the `options` parameter:
860
+
861
+ ```js
862
+ const options: SafeTransactionOptionalProps = { ... }
863
+ const safeTransaction = await safeSdk.createDisableModuleTx(moduleAddress, options)
864
+ ```
865
+
866
+ ### createAddOwnerTx
867
+
868
+ Returns the Safe transaction to add an owner and optionally change the threshold.
869
+
870
+ ```js
871
+ const params: AddOwnerTxParams = {
872
+ ownerAddress,
873
+ threshold // Optional. If `threshold` is not provided the current threshold will not change.
874
+ }
875
+ const safeTransaction = await safeSdk.createAddOwnerTx(params)
876
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
877
+ await txResponse.transactionResponse?.wait()
878
+ ```
879
+
880
+ This method can optionally receive the `options` parameter:
881
+
882
+ ```js
883
+ const options: SafeTransactionOptionalProps = { ... }
884
+ const safeTransaction = await safeSdk.createAddOwnerTx(params, options)
885
+ ```
886
+
887
+ ### createRemoveOwnerTx
888
+
889
+ Returns the Safe transaction to remove an owner and optionally change the threshold.
890
+
891
+ ```js
892
+ const params: RemoveOwnerTxParams = {
893
+ ownerAddress,
894
+ newThreshold // Optional. If `newThreshold` is not provided, the current threshold will be decreased by one.
895
+ }
896
+ const safeTransaction = await safeSdk.createRemoveOwnerTx(params)
897
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
898
+ await txResponse.transactionResponse?.wait()
899
+ ```
900
+
901
+ This method can optionally receive the `options` parameter:
902
+
903
+ ```js
904
+ const options: SafeTransactionOptionalProps = { ... }
905
+ const safeTransaction = await safeSdk.createRemoveOwnerTx(params, options)
906
+ ```
907
+
908
+ ### createSwapOwnerTx
909
+
910
+ Returns the Safe transaction to replace an owner of the Safe with a new one.
911
+
912
+ ```js
913
+ const params: SwapOwnerTxParams = {
914
+ oldOwnerAddress,
915
+ newOwnerAddress
916
+ }
917
+ const safeTransaction = await safeSdk.createSwapOwnerTx(params)
918
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
919
+ await txResponse.transactionResponse?.wait()
920
+ ```
921
+
922
+ This method can optionally receive the `options` parameter:
923
+
924
+ ```js
925
+ const options: SafeTransactionOptionalProps = { ... }
926
+ const safeTransaction = await safeSdk.createSwapOwnerTx(params, options)
927
+ ```
928
+
929
+ ### createChangeThresholdTx
930
+
931
+ Returns the Safe transaction to change the threshold.
932
+
933
+ ```js
934
+ const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold)
935
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
936
+ await txResponse.transactionResponse?.wait()
937
+ ```
938
+
939
+ This method can optionally receive the `options` parameter:
940
+
941
+ ```js
942
+ const options: SafeTransactionOptionalProps = { ... }
943
+ const safeTransaction = await safeSdk.createChangeThresholdTx(newThreshold, options)
944
+ ```
945
+
946
+ ### isValidTransaction
947
+
948
+ Checks if a Safe transaction can be executed successfully with no errors.
949
+
950
+ ```js
951
+ const safeTransactionData: SafeTransactionDataPartial = {
952
+ // ...
953
+ }
954
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
955
+ const isValidTx = await safeSdk.isValidTransaction(safeTransaction)
956
+ ```
957
+
958
+ Optionally, some properties can be passed as execution options:
959
+
960
+ ```js
961
+ const options: Web3TransactionOptions = {
962
+ from, // Optional
963
+ gas, // Optional
964
+ gasPrice, // Optional
965
+ maxFeePerGas, // Optional
966
+ maxPriorityFeePerGas // Optional
967
+ nonce // Optional
968
+ }
969
+ ```
970
+
971
+ ```js
972
+ const options: EthersTransactionOptions = {
973
+ from, // Optional
974
+ gasLimit, // Optional
975
+ gasPrice, // Optional
976
+ maxFeePerGas, // Optional
977
+ maxPriorityFeePerGas // Optional
978
+ nonce // Optional
979
+ }
980
+ ```
981
+
982
+ ```js
983
+ const isValidTx = await safeSdk.isValidTransaction(safeTransaction, options)
984
+ ```
985
+
986
+ ### executeTransaction
987
+
988
+ Executes a Safe transaction.
989
+
990
+ ```js
991
+ const safeTransactionData: SafeTransactionDataPartial = {
992
+ // ...
993
+ }
994
+ const safeTransaction = await safeSdk.createTransaction({ safeTransactionData })
995
+ const txResponse = await safeSdk.executeTransaction(safeTransaction)
996
+ await txResponse.transactionResponse?.wait()
997
+ ```
998
+
999
+ Optionally, some properties can be passed as execution options:
1000
+
1001
+ ```js
1002
+ const options: Web3TransactionOptions = {
1003
+ from, // Optional
1004
+ gas, // Optional
1005
+ gasPrice, // Optional
1006
+ maxFeePerGas, // Optional
1007
+ maxPriorityFeePerGas // Optional
1008
+ nonce // Optional
1009
+ }
1010
+ ```
1011
+
1012
+ ```js
1013
+ const options: EthersTransactionOptions = {
1014
+ from, // Optional
1015
+ gasLimit, // Optional
1016
+ gasPrice, // Optional
1017
+ maxFeePerGas, // Optional
1018
+ maxPriorityFeePerGas // Optional
1019
+ nonce // Optional
1020
+ }
1021
+ ```
1022
+
1023
+ ```js
1024
+ const txResponse = await safeSdk.executeTransaction(safeTransaction, options)
1025
+ ```
1026
+
1027
+ ## <a name="license">License</a>
1028
+
1029
+ This library is released under MIT.
1030
+
1031
+ ## <a name="contributors">Contributors</a>
1032
+
1033
+ - Germán Martínez ([germartinez](https://github.com/germartinez))