@layerzerolabs/protocol-stellar-v2 0.2.12 → 0.2.15

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 (319) hide show
  1. package/.turbo/turbo-build.log +384 -278
  2. package/.turbo/turbo-lint.log +110 -78
  3. package/.turbo/turbo-test.log +1248 -1014
  4. package/Cargo.lock +130 -3
  5. package/Cargo.toml +2 -1
  6. package/contracts/common-macros/src/contract_impl.rs +6 -1
  7. package/contracts/common-macros/src/lib.rs +47 -8
  8. package/contracts/common-macros/src/ownable.rs +7 -25
  9. package/contracts/common-macros/src/storage.rs +1 -1
  10. package/contracts/common-macros/src/tests/contract_impl.rs +5 -0
  11. package/contracts/common-macros/src/tests/mod.rs +1 -0
  12. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__contract_impl__snapshot_generated_contract_impl_code.snap +23 -7
  13. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ownable__snapshot_generated_ownable_code.snap +5 -25
  14. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__storage__snapshot_generated_storage_code.snap +48 -48
  15. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ttl_configurable__snapshot_generated_ttl_configurable_code.snap +5 -25
  16. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__upgradeable__snapshot_generated_upgradeable_code.snap +21 -0
  17. package/contracts/common-macros/src/tests/upgradeable.rs +31 -0
  18. package/contracts/common-macros/src/ttl_configurable.rs +14 -44
  19. package/contracts/common-macros/src/upgradeable.rs +76 -0
  20. package/contracts/endpoint-v2/src/endpoint_v2.rs +25 -1
  21. package/contracts/endpoint-v2/src/tests/endpoint_setup.rs +175 -8
  22. package/contracts/endpoint-v2/src/tests/endpoint_v2/build_outbound_packet.rs +76 -0
  23. package/contracts/endpoint-v2/src/tests/endpoint_v2/clear.rs +342 -159
  24. package/contracts/endpoint-v2/src/tests/endpoint_v2/delegate.rs +3 -15
  25. package/contracts/endpoint-v2/src/tests/endpoint_v2/initializable.rs +20 -31
  26. package/contracts/endpoint-v2/src/tests/endpoint_v2/lz_receive_alert.rs +126 -164
  27. package/contracts/endpoint-v2/src/tests/endpoint_v2/mod.rs +1 -0
  28. package/contracts/endpoint-v2/src/tests/endpoint_v2/native_token.rs +0 -1
  29. package/contracts/endpoint-v2/src/tests/endpoint_v2/owner.rs +0 -1
  30. package/contracts/endpoint-v2/src/tests/endpoint_v2/pay_messaging_fees.rs +311 -304
  31. package/contracts/endpoint-v2/src/tests/endpoint_v2/quote.rs +423 -96
  32. package/contracts/endpoint-v2/src/tests/endpoint_v2/recover_token.rs +1 -1
  33. package/contracts/endpoint-v2/src/tests/endpoint_v2/require_oapp_auth.rs +47 -20
  34. package/contracts/endpoint-v2/src/tests/endpoint_v2/send.rs +373 -403
  35. package/contracts/endpoint-v2/src/tests/endpoint_v2/set_delegate.rs +96 -22
  36. package/contracts/endpoint-v2/src/tests/endpoint_v2/set_zro.rs +61 -9
  37. package/contracts/endpoint-v2/src/tests/endpoint_v2/transfer_ownership.rs +4 -4
  38. package/contracts/endpoint-v2/src/tests/endpoint_v2/ttl_config.rs +8 -11
  39. package/contracts/endpoint-v2/src/tests/endpoint_v2/verifiable.rs +81 -30
  40. package/contracts/endpoint-v2/src/tests/endpoint_v2/verify.rs +209 -76
  41. package/contracts/endpoint-v2/src/tests/endpoint_v2/zro.rs +0 -1
  42. package/contracts/endpoint-v2/src/tests/message_lib_manager/default_receive_library.rs +24 -0
  43. package/contracts/endpoint-v2/src/tests/message_lib_manager/default_receive_library_timeout.rs +40 -0
  44. package/contracts/endpoint-v2/src/tests/message_lib_manager/default_send_library.rs +24 -0
  45. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_config.rs +108 -0
  46. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_library_index.rs +52 -0
  47. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_receive_library.rs +92 -0
  48. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_registered_libraries.rs +74 -0
  49. package/contracts/endpoint-v2/src/tests/message_lib_manager/get_send_library.rs +83 -0
  50. package/contracts/endpoint-v2/src/tests/message_lib_manager/is_registered_library.rs +32 -0
  51. package/contracts/endpoint-v2/src/tests/message_lib_manager/is_supported_eid.rs +28 -0
  52. package/contracts/endpoint-v2/src/tests/message_lib_manager/is_valid_receive_library.rs +261 -0
  53. package/contracts/endpoint-v2/src/tests/message_lib_manager/mod.rs +16 -0
  54. package/contracts/endpoint-v2/src/tests/message_lib_manager/receive_library_timeout.rs +62 -0
  55. package/contracts/endpoint-v2/src/tests/message_lib_manager/register_library.rs +65 -43
  56. package/contracts/endpoint-v2/src/tests/message_lib_manager/registered_libraries_count.rs +42 -0
  57. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_receive_lib_for_eid.rs +61 -0
  58. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_registered.rs +3 -5
  59. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_send_lib_for_eid.rs +59 -0
  60. package/contracts/endpoint-v2/src/tests/message_lib_manager/require_supported_eid.rs +15 -1
  61. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_config.rs +155 -51
  62. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_default_receive_lib_timeout.rs +114 -92
  63. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_default_receive_library.rs +235 -132
  64. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_default_send_library.rs +93 -87
  65. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_receive_library.rs +346 -245
  66. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_receive_library_timeout.rs +406 -60
  67. package/contracts/endpoint-v2/src/tests/message_lib_manager/set_send_library.rs +252 -78
  68. package/contracts/endpoint-v2/src/tests/message_lib_manager/timeout.rs +102 -0
  69. package/contracts/endpoint-v2/src/tests/messaging_channel/burn.rs +212 -273
  70. package/contracts/endpoint-v2/src/tests/messaging_channel/clear_payload.rs +203 -0
  71. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound.rs +94 -0
  72. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound_nonce.rs +78 -248
  73. package/contracts/endpoint-v2/src/tests/messaging_channel/inbound_payload_hash.rs +7 -282
  74. package/contracts/endpoint-v2/src/tests/messaging_channel/lazy_inbound_nonce.rs +6 -274
  75. package/contracts/endpoint-v2/src/tests/messaging_channel/mod.rs +3 -2
  76. package/contracts/endpoint-v2/src/tests/messaging_channel/next_guid.rs +86 -178
  77. package/contracts/endpoint-v2/src/tests/messaging_channel/nilify.rs +328 -212
  78. package/contracts/endpoint-v2/src/tests/messaging_channel/outbound.rs +68 -0
  79. package/contracts/endpoint-v2/src/tests/messaging_channel/outbound_nonce.rs +6 -209
  80. package/contracts/endpoint-v2/src/tests/messaging_channel/skip.rs +207 -159
  81. package/contracts/endpoint-v2/src/tests/messaging_composer/clear_compose.rs +142 -153
  82. package/contracts/endpoint-v2/src/tests/messaging_composer/compose_queue.rs +6 -179
  83. package/contracts/endpoint-v2/src/tests/messaging_composer/lz_compose_alert.rs +163 -221
  84. package/contracts/endpoint-v2/src/tests/messaging_composer/send_compose.rs +90 -121
  85. package/contracts/endpoint-v2/src/tests/mock.rs +18 -4
  86. package/contracts/endpoint-v2/src/tests/util/build_payload.rs +4 -70
  87. package/contracts/endpoint-v2/src/tests/util/compute_guid.rs +2 -1
  88. package/contracts/endpoint-v2/src/tests/util/keccak256.rs +17 -106
  89. package/contracts/layerzero-views/Cargo.toml +35 -0
  90. package/contracts/layerzero-views/src/errors.rs +10 -0
  91. package/contracts/layerzero-views/src/layerzero_view.rs +229 -0
  92. package/contracts/layerzero-views/src/lib.rs +38 -0
  93. package/contracts/layerzero-views/src/storage.rs +18 -0
  94. package/contracts/layerzero-views/src/tests/layerzero_view_tests.rs +423 -0
  95. package/contracts/layerzero-views/src/tests/mod.rs +4 -0
  96. package/contracts/layerzero-views/src/tests/setup.rs +377 -0
  97. package/contracts/layerzero-views/src/types.rs +50 -0
  98. package/contracts/macro-integration-tests/Cargo.toml +30 -0
  99. package/contracts/macro-integration-tests/src/lib.rs +1 -0
  100. package/contracts/macro-integration-tests/tests/runtime/ownable/initialization.rs +62 -0
  101. package/contracts/macro-integration-tests/tests/runtime/ownable/mod.rs +22 -0
  102. package/contracts/macro-integration-tests/tests/runtime/ownable/only_owner_guard.rs +97 -0
  103. package/contracts/macro-integration-tests/tests/runtime/ownable/ownership_transfer.rs +101 -0
  104. package/contracts/macro-integration-tests/tests/runtime/storage/keyed_roundtrip.rs +225 -0
  105. package/contracts/macro-integration-tests/tests/runtime/storage/mod.rs +4 -0
  106. package/contracts/macro-integration-tests/tests/runtime/storage/name_override_runtime.rs +52 -0
  107. package/contracts/macro-integration-tests/tests/runtime/storage/ttl_extension.rs +261 -0
  108. package/contracts/macro-integration-tests/tests/runtime/storage/unkeyed_roundtrip.rs +137 -0
  109. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/configuration.rs +113 -0
  110. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/extend_instance_ttl.rs +50 -0
  111. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/freeze.rs +139 -0
  112. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/mod.rs +3 -0
  113. package/contracts/macro-integration-tests/tests/runtime.rs +5 -0
  114. package/contracts/macro-integration-tests/tests/ui/error/fail/attr_not_empty.rs +12 -0
  115. package/contracts/macro-integration-tests/tests/ui/error/fail/attr_not_empty.stderr +7 -0
  116. package/contracts/macro-integration-tests/tests/ui/error/fail/decreasing_discriminant.rs +12 -0
  117. package/contracts/macro-integration-tests/tests/ui/error/fail/decreasing_discriminant.stderr +7 -0
  118. package/contracts/macro-integration-tests/tests/ui/error/fail/non_int_discriminant.rs +21 -0
  119. package/contracts/macro-integration-tests/tests/ui/error/fail/non_int_discriminant.stderr +7 -0
  120. package/contracts/macro-integration-tests/tests/ui/error/fail/non_unit_variant.rs +13 -0
  121. package/contracts/macro-integration-tests/tests/ui/error/fail/non_unit_variant.stderr +7 -0
  122. package/contracts/macro-integration-tests/tests/ui/error/pass/attr_on_variant_allowed.rs +20 -0
  123. package/contracts/macro-integration-tests/tests/ui/error/pass/basic_auto_discriminants.rs +15 -0
  124. package/contracts/macro-integration-tests/tests/ui/error/pass/mixed_discriminants.rs +16 -0
  125. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_owner_missing_env.rs +22 -0
  126. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_owner_missing_env.stderr +16 -0
  127. package/contracts/macro-integration-tests/tests/ui/ownable/pass/minimal_contract.rs +26 -0
  128. package/contracts/macro-integration-tests/tests/ui/ownable/pass/namespacing_and_imports.rs +22 -0
  129. package/contracts/macro-integration-tests/tests/ui/ownable/pass/only_owner_env_param_variants.rs +46 -0
  130. package/contracts/macro-integration-tests/tests/ui/storage/fail/invalid_storage_type_param.rs +13 -0
  131. package/contracts/macro-integration-tests/tests/ui/storage/fail/invalid_storage_type_param.stderr +7 -0
  132. package/contracts/macro-integration-tests/tests/ui/storage/fail/missing_storage_type_param.rs +13 -0
  133. package/contracts/macro-integration-tests/tests/ui/storage/fail/missing_storage_type_param.stderr +7 -0
  134. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_storage_kinds.rs +10 -0
  135. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_storage_kinds.stderr +7 -0
  136. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_type_params.rs +12 -0
  137. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_type_params.stderr +7 -0
  138. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_on_non_persistent.rs +10 -0
  139. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_on_non_persistent.stderr +7 -0
  140. package/contracts/macro-integration-tests/tests/ui/storage/fail/non_enum_input.rs +10 -0
  141. package/contracts/macro-integration-tests/tests/ui/storage/fail/non_enum_input.stderr +7 -0
  142. package/contracts/macro-integration-tests/tests/ui/storage/fail/storage_attr_rejects_args.rs +12 -0
  143. package/contracts/macro-integration-tests/tests/ui/storage/fail/storage_attr_rejects_args.stderr +7 -0
  144. package/contracts/macro-integration-tests/tests/ui/storage/fail/tuple_variant_rejected.rs +13 -0
  145. package/contracts/macro-integration-tests/tests/ui/storage/fail/tuple_variant_rejected.stderr +7 -0
  146. package/contracts/macro-integration-tests/tests/ui/storage/fail/unknown_variant_attr.rs +13 -0
  147. package/contracts/macro-integration-tests/tests/ui/storage/fail/unknown_variant_attr.stderr +7 -0
  148. package/contracts/macro-integration-tests/tests/ui/storage/pass/default_value_on_variant.rs +14 -0
  149. package/contracts/macro-integration-tests/tests/ui/storage/pass/enum_instance_unit_basic.rs +14 -0
  150. package/contracts/macro-integration-tests/tests/ui/storage/pass/enum_persistent_named_fields_keyed.rs +16 -0
  151. package/contracts/macro-integration-tests/tests/ui/storage/pass/enum_temporary_unit_option.rs +15 -0
  152. package/contracts/macro-integration-tests/tests/ui/storage/pass/name_override.rs +14 -0
  153. package/contracts/macro-integration-tests/tests/ui/storage/pass/no_auto_ttl_extension.rs +19 -0
  154. package/contracts/macro-integration-tests/tests/ui/storage/pass/ttl_provider_basic.rs +15 -0
  155. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/pass/minimal_contract.rs +44 -0
  156. package/contracts/macro-integration-tests/tests/ui_error.rs +11 -0
  157. package/contracts/macro-integration-tests/tests/ui_ownable.rs +11 -0
  158. package/contracts/macro-integration-tests/tests/ui_storage.rs +11 -0
  159. package/contracts/macro-integration-tests/tests/ui_ttl_configurable.rs +12 -0
  160. package/contracts/message-libs/blocked-message-lib/src/lib.rs +17 -17
  161. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/decode_packet_header.rs +64 -0
  162. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/encode_packet.rs +58 -0
  163. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/encode_packet_header.rs +138 -0
  164. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/mod.rs +6 -0
  165. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/payload.rs +30 -0
  166. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/payload_hash.rs +15 -0
  167. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1/test_helper.rs +39 -0
  168. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_dvn_option.rs +57 -0
  169. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_lz_receive_option.rs +50 -0
  170. package/contracts/message-libs/message-lib-common/src/tests/worker_options/append_native_drop_option.rs +74 -0
  171. package/contracts/message-libs/message-lib-common/src/tests/worker_options/convert_legacy_options.rs +280 -0
  172. package/contracts/message-libs/message-lib-common/src/tests/worker_options/extract_type_3_options.rs +126 -0
  173. package/contracts/message-libs/message-lib-common/src/tests/worker_options/left_pad_to_bytes32.rs +48 -0
  174. package/contracts/message-libs/message-lib-common/src/tests/worker_options/mod.rs +7 -0
  175. package/contracts/message-libs/message-lib-common/src/tests/worker_options/split_worker_options.rs +139 -0
  176. package/contracts/message-libs/message-lib-common/src/worker_options.rs +31 -1
  177. package/contracts/message-libs/simple-message-lib/src/simple_message_lib.rs +2 -2
  178. package/contracts/message-libs/treasury/src/errors.rs +0 -1
  179. package/contracts/message-libs/treasury/src/lib.rs +3 -3
  180. package/contracts/message-libs/treasury/src/storage.rs +2 -0
  181. package/contracts/message-libs/treasury/src/treasury.rs +12 -13
  182. package/contracts/message-libs/uln-302/Cargo.toml +1 -1
  183. package/contracts/message-libs/uln-302/src/errors.rs +0 -5
  184. package/contracts/message-libs/uln-302/src/events.rs +5 -6
  185. package/contracts/message-libs/uln-302/src/receive_uln.rs +24 -54
  186. package/contracts/message-libs/uln-302/src/send_uln.rs +89 -135
  187. package/contracts/message-libs/uln-302/src/storage.rs +5 -5
  188. package/contracts/message-libs/uln-302/src/tests/receive_uln302/effective_receive_uln_config.rs +5 -7
  189. package/contracts/message-libs/uln-302/src/tests/receive_uln302/set_default_receive_uln_configs.rs +3 -3
  190. package/contracts/message-libs/uln-302/src/tests/send_uln302/effective_send_uln_config.rs +6 -9
  191. package/contracts/message-libs/uln-302/src/tests/send_uln302/set_default_executor_configs.rs +2 -2
  192. package/contracts/message-libs/uln-302/src/tests/send_uln302/set_default_send_uln_configs.rs +3 -3
  193. package/contracts/message-libs/uln-302/src/tests/setup.rs +9 -0
  194. package/contracts/message-libs/uln-302/src/tests/testing_utils.rs +5 -0
  195. package/contracts/message-libs/uln-302/src/tests/uln302/get_app_receive_uln_config.rs +1 -2
  196. package/contracts/message-libs/uln-302/src/tests/uln302/get_app_send_uln_config.rs +1 -2
  197. package/contracts/message-libs/uln-302/src/tests/uln302/set_config.rs +37 -55
  198. package/contracts/message-libs/uln-302/src/uln302.rs +8 -5
  199. package/contracts/oapps/counter/src/counter.rs +0 -1
  200. package/contracts/oapps/oapp/src/macro_tests/test_macros.rs +306 -224
  201. package/contracts/oapps/oapp/src/tests/test_oapp_core.rs +0 -1
  202. package/contracts/oapps/oapp/src/tests/test_oapp_options_type3.rs +0 -1
  203. package/contracts/oapps/oapp/src/tests/test_oapp_receiver.rs +0 -1
  204. package/contracts/oapps/oapp/src/tests/test_oapp_sender.rs +0 -1
  205. package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_core.rs +1 -0
  206. package/contracts/oapps/oft/integration-tests/setup.rs +10 -3
  207. package/contracts/oapps/oft/integration-tests/utils.rs +1 -1
  208. package/contracts/oapps/oft/src/default_oft_impl.rs +9 -3
  209. package/contracts/oapps/oft/src/extensions/oft_fee.rs +5 -5
  210. package/contracts/oapps/oft/src/extensions/pausable.rs +1 -1
  211. package/contracts/oapps/oft/src/extensions/rate_limiter.rs +18 -18
  212. package/contracts/oapps/oft/src/oft.rs +9 -9
  213. package/contracts/oapps/oft/src/oft_types/lock_unlock.rs +1 -1
  214. package/contracts/oapps/oft/src/tests/extensions/setup.rs +26 -11
  215. package/contracts/oapps/oft/src/tests/extensions/test_rate_limiter.rs +1 -1
  216. package/contracts/oapps/oft/src/tests/test_send.rs +4 -4
  217. package/contracts/oapps/oft/src/tests/test_utils.rs +93 -74
  218. package/contracts/oapps/oft-std/Cargo.toml +6 -0
  219. package/contracts/oapps/oft-std/integration-tests/extensions/mod.rs +3 -0
  220. package/contracts/oapps/oft-std/integration-tests/extensions/test_oft_fee.rs +157 -0
  221. package/contracts/oapps/oft-std/integration-tests/extensions/test_pausable.rs +162 -0
  222. package/contracts/oapps/oft-std/integration-tests/extensions/test_rate_limiter.rs +186 -0
  223. package/contracts/oapps/oft-std/integration-tests/mod.rs +3 -0
  224. package/contracts/oapps/oft-std/integration-tests/setup.rs +245 -0
  225. package/contracts/oapps/oft-std/integration-tests/utils.rs +427 -0
  226. package/contracts/oapps/oft-std/src/lib.rs +12 -1
  227. package/contracts/oapps/oft-std/src/oft.rs +122 -25
  228. package/contracts/upgrader/Cargo.toml +19 -0
  229. package/contracts/upgrader/src/lib.rs +96 -0
  230. package/contracts/upgrader/src/tests/mod.rs +1 -0
  231. package/contracts/upgrader/src/tests/test_data/test_upgradeable_contract1.wasm +0 -0
  232. package/contracts/upgrader/src/tests/test_data/test_upgradeable_contract2.wasm +0 -0
  233. package/contracts/upgrader/src/tests/test_upgrader.rs +120 -0
  234. package/contracts/utils/src/errors.rs +6 -1
  235. package/contracts/utils/src/lib.rs +2 -1
  236. package/contracts/utils/src/ownable.rs +49 -61
  237. package/contracts/utils/src/tests/mod.rs +3 -1
  238. package/contracts/utils/src/tests/option_ext.rs +21 -0
  239. package/contracts/utils/src/tests/ownable.rs +10 -69
  240. package/contracts/utils/src/tests/ttl_configurable.rs +596 -0
  241. package/contracts/utils/src/tests/upgradeable.rs +288 -0
  242. package/contracts/utils/src/{ttl.rs → ttl_configurable.rs} +67 -52
  243. package/contracts/utils/src/upgradeable.rs +54 -0
  244. package/contracts/workers/dvn/Cargo.toml +1 -1
  245. package/contracts/workers/dvn/src/auth.rs +21 -32
  246. package/contracts/workers/dvn/src/dvn.rs +40 -3
  247. package/contracts/workers/dvn/src/errors.rs +1 -0
  248. package/contracts/workers/dvn/src/multisig.rs +10 -6
  249. package/contracts/workers/dvn/src/tests/multisig/set_threshold.rs +2 -2
  250. package/contracts/workers/dvn/src/tests/multisig/verify_signatures.rs +4 -4
  251. package/contracts/workers/dvn-fee-lib/Cargo.toml +1 -2
  252. package/contracts/workers/dvn-fee-lib/src/dvn_fee_lib.rs +46 -14
  253. package/contracts/workers/dvn-fee-lib/src/errors.rs +3 -2
  254. package/contracts/workers/dvn-fee-lib/src/lib.rs +5 -11
  255. package/contracts/workers/dvn-fee-lib/src/tests/dvn_fee_lib.rs +30 -16
  256. package/contracts/workers/executor/src/executor.rs +16 -2
  257. package/contracts/workers/executor-fee-lib/src/errors.rs +9 -7
  258. package/contracts/workers/executor-fee-lib/src/executor_fee_lib.rs +154 -119
  259. package/contracts/workers/executor-helper/Cargo.toml +0 -5
  260. package/contracts/workers/executor-helper/src/lib.rs +1 -7
  261. package/contracts/workers/price-feed/Cargo.toml +0 -1
  262. package/contracts/workers/price-feed/src/errors.rs +3 -2
  263. package/contracts/workers/price-feed/src/lib.rs +5 -6
  264. package/contracts/workers/price-feed/src/price_feed.rs +39 -17
  265. package/contracts/workers/worker/Cargo.toml +4 -0
  266. package/contracts/workers/worker/src/interfaces/price_feed.rs +3 -3
  267. package/contracts/workers/worker/src/lib.rs +2 -2
  268. package/contracts/workers/worker/src/tests/mod.rs +4 -0
  269. package/contracts/workers/worker/src/tests/setup.rs +147 -0
  270. package/contracts/workers/worker/src/tests/worker.rs +501 -0
  271. package/contracts/workers/worker/src/worker.rs +10 -16
  272. package/package.json +3 -3
  273. package/sdk/dist/generated/bml.d.ts +40 -30
  274. package/sdk/dist/generated/bml.js +16 -11
  275. package/sdk/dist/generated/counter.d.ts +168 -134
  276. package/sdk/dist/generated/counter.js +26 -21
  277. package/sdk/dist/generated/dvn.d.ts +1932 -0
  278. package/sdk/dist/generated/dvn.js +288 -0
  279. package/sdk/dist/generated/dvn_fee_lib.d.ts +615 -0
  280. package/sdk/dist/generated/dvn_fee_lib.js +123 -0
  281. package/sdk/dist/generated/endpoint.d.ts +75 -41
  282. package/sdk/dist/generated/endpoint.js +22 -17
  283. package/sdk/dist/generated/executor.d.ts +1809 -0
  284. package/sdk/dist/generated/executor.js +269 -0
  285. package/sdk/dist/generated/executor_fee_lib.d.ts +999 -0
  286. package/sdk/dist/generated/executor_fee_lib.js +208 -0
  287. package/sdk/dist/generated/executor_helper.d.ts +869 -0
  288. package/sdk/dist/generated/executor_helper.js +187 -0
  289. package/sdk/dist/generated/oft_std.d.ts +1544 -0
  290. package/sdk/dist/generated/oft_std.js +271 -0
  291. package/sdk/dist/generated/price_feed.d.ts +1002 -0
  292. package/sdk/dist/generated/price_feed.js +170 -0
  293. package/sdk/dist/generated/sml.d.ts +75 -41
  294. package/sdk/dist/generated/sml.js +22 -17
  295. package/sdk/dist/generated/uln302.d.ts +79 -60
  296. package/sdk/dist/generated/uln302.js +37 -37
  297. package/sdk/dist/generated/upgrader.d.ts +70 -0
  298. package/sdk/dist/generated/upgrader.js +19 -0
  299. package/sdk/dist/index.d.ts +8 -0
  300. package/sdk/dist/index.js +11 -0
  301. package/sdk/package.json +4 -3
  302. package/sdk/src/index.ts +13 -0
  303. package/sdk/test/index.test.ts +0 -1
  304. package/sdk/test/oft.test.ts +12 -23
  305. package/sdk/test/suites/testUpgradeable.ts +169 -0
  306. package/sdk/test/upgrader.test.ts +309 -0
  307. package/tools/ts-bindings-gen/src/main.rs +11 -1
  308. package/contracts/endpoint-v2/src/tests/messaging_channel/clear.rs +0 -316
  309. package/contracts/endpoint-v2/src/tests/messaging_channel/internal.rs +0 -388
  310. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1.rs +0 -162
  311. package/contracts/message-libs/message-lib-common/src/tests/worker_options.rs +0 -319
  312. package/contracts/utils/src/tests/ttl.rs +0 -421
  313. /package/contracts/{oapp-macros → oapps/oapp-macros}/Cargo.toml +0 -0
  314. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/lib.rs +0 -0
  315. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_full.rs +0 -0
  316. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_options_type3.rs +0 -0
  317. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_receiver.rs +0 -0
  318. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/oapp_sender.rs +0 -0
  319. /package/contracts/{oapp-macros → oapps/oapp-macros}/src/util.rs +0 -0
@@ -0,0 +1,615 @@
1
+ import { Buffer } from "buffer";
2
+ import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions } from '@stellar/stellar-sdk/contract';
3
+ import type { u32, u64, u128, i128, Option } from '@stellar/stellar-sdk/contract';
4
+ export * from '@stellar/stellar-sdk';
5
+ export * as contract from '@stellar/stellar-sdk/contract';
6
+ export * as rpc from '@stellar/stellar-sdk/rpc';
7
+ export type MigrationData = void;
8
+ export declare const DvnFeeLibError: {
9
+ 1: {
10
+ message: string;
11
+ };
12
+ 2: {
13
+ message: string;
14
+ };
15
+ 3: {
16
+ message: string;
17
+ };
18
+ 4: {
19
+ message: string;
20
+ };
21
+ };
22
+ export declare const BufferReaderError: {
23
+ 1000: {
24
+ message: string;
25
+ };
26
+ 1001: {
27
+ message: string;
28
+ };
29
+ };
30
+ export declare const BufferWriterError: {
31
+ 1100: {
32
+ message: string;
33
+ };
34
+ };
35
+ export declare const TtlConfigurableError: {
36
+ 1200: {
37
+ message: string;
38
+ };
39
+ 1201: {
40
+ message: string;
41
+ };
42
+ 1202: {
43
+ message: string;
44
+ };
45
+ };
46
+ export declare const OwnableError: {
47
+ 1300: {
48
+ message: string;
49
+ };
50
+ 1301: {
51
+ message: string;
52
+ };
53
+ };
54
+ export declare const BytesExtError: {
55
+ 1400: {
56
+ message: string;
57
+ };
58
+ };
59
+ export declare const UpgradeableError: {
60
+ 1500: {
61
+ message: string;
62
+ };
63
+ };
64
+ export type OwnableStorage = {
65
+ tag: "Owner";
66
+ values: void;
67
+ };
68
+ /**
69
+ * TTL configuration: threshold (when to extend) and extend_to (target TTL).
70
+ */
71
+ export interface TtlConfig {
72
+ /**
73
+ * Target TTL after extension (in ledgers).
74
+ */
75
+ extend_to: u32;
76
+ /**
77
+ * TTL threshold that triggers extension (in ledgers).
78
+ */
79
+ threshold: u32;
80
+ }
81
+ export type TtlConfigStorage = {
82
+ tag: "Frozen";
83
+ values: void;
84
+ } | {
85
+ tag: "Instance";
86
+ values: void;
87
+ } | {
88
+ tag: "Persistent";
89
+ values: void;
90
+ };
91
+ export type UpgradeableStorage = {
92
+ tag: "Migrating";
93
+ values: void;
94
+ };
95
+ export declare const WorkerError: {
96
+ 1200: {
97
+ message: string;
98
+ };
99
+ 1201: {
100
+ message: string;
101
+ };
102
+ 1202: {
103
+ message: string;
104
+ };
105
+ 1203: {
106
+ message: string;
107
+ };
108
+ 1204: {
109
+ message: string;
110
+ };
111
+ 1205: {
112
+ message: string;
113
+ };
114
+ 1206: {
115
+ message: string;
116
+ };
117
+ 1207: {
118
+ message: string;
119
+ };
120
+ 1208: {
121
+ message: string;
122
+ };
123
+ 1209: {
124
+ message: string;
125
+ };
126
+ 1210: {
127
+ message: string;
128
+ };
129
+ 1211: {
130
+ message: string;
131
+ };
132
+ 1212: {
133
+ message: string;
134
+ };
135
+ 1213: {
136
+ message: string;
137
+ };
138
+ 1214: {
139
+ message: string;
140
+ };
141
+ 1215: {
142
+ message: string;
143
+ };
144
+ 1216: {
145
+ message: string;
146
+ };
147
+ 1217: {
148
+ message: string;
149
+ };
150
+ 1218: {
151
+ message: string;
152
+ };
153
+ };
154
+ /**
155
+ * Parameters for DVN fee calculation.
156
+ *
157
+ * Contains all inputs needed by the fee library to calculate verification fees
158
+ * for cross-chain messages. Includes message parameters, common configuration,
159
+ * and destination-specific settings.
160
+ */
161
+ export interface DvnFeeParams {
162
+ /**
163
+ * Number of block confirmations required.
164
+ */
165
+ confirmations: u64;
166
+ /**
167
+ * Default fee multiplier in basis points (used if no dst-specific multiplier).
168
+ */
169
+ default_multiplier_bps: u32;
170
+ /**
171
+ * Destination endpoint ID (chain identifier).
172
+ */
173
+ dst_eid: u32;
174
+ /**
175
+ * Minimum fee margin in USD (scaled).
176
+ */
177
+ floor_margin_usd: u128;
178
+ /**
179
+ * ============================================================================================
180
+ * Destination-Specific Configuration
181
+ * ============================================================================================
182
+ * Gas estimate for verification on destination chain.
183
+ */
184
+ gas: u128;
185
+ /**
186
+ * Destination-specific fee multiplier in basis points (0 = use default).
187
+ */
188
+ multiplier_bps: u32;
189
+ /**
190
+ * DVN options
191
+ */
192
+ options: Buffer;
193
+ /**
194
+ * ============================================================================================
195
+ * Common Configuration
196
+ * ============================================================================================
197
+ * Price feed contract address for gas price and exchange rate data.
198
+ */
199
+ price_feed: string;
200
+ /**
201
+ * Number of required signatures (quorum).
202
+ */
203
+ quorum: u32;
204
+ /**
205
+ * ============================================================================================
206
+ * Message Parameters
207
+ * ============================================================================================
208
+ * The OApp sender address.
209
+ */
210
+ sender: string;
211
+ }
212
+ /**
213
+ * Parameters for executor fee calculation.
214
+ *
215
+ * Contains all inputs needed by the fee library to calculate execution fees
216
+ * for cross-chain messages. Includes message parameters, common configuration,
217
+ * and destination-specific settings.
218
+ */
219
+ export interface FeeParams {
220
+ /**
221
+ * Size of the message calldata in bytes.
222
+ */
223
+ calldata_size: u32;
224
+ /**
225
+ * Default fee multiplier in basis points (used if no dst-specific multiplier).
226
+ */
227
+ default_multiplier_bps: u32;
228
+ /**
229
+ * Destination endpoint ID (chain identifier).
230
+ */
231
+ dst_eid: u32;
232
+ /**
233
+ * Minimum fee margin in USD (scaled).
234
+ */
235
+ floor_margin_usd: u128;
236
+ /**
237
+ * Base gas for each lzCompose call on destination chain.
238
+ */
239
+ lz_compose_base_gas: u64;
240
+ /**
241
+ * ============================================================================================
242
+ * Destination-Specific Configuration
243
+ * ============================================================================================
244
+ * Base gas for lzReceive execution on destination chain.
245
+ */
246
+ lz_receive_base_gas: u64;
247
+ /**
248
+ * Destination-specific fee multiplier in basis points (0 = use default).
249
+ */
250
+ multiplier_bps: u32;
251
+ /**
252
+ * Maximum native token value that can be sent.
253
+ */
254
+ native_cap: u128;
255
+ /**
256
+ * Encoded executor options (lzReceive gas, lzCompose, nativeDrop, etc.).
257
+ */
258
+ options: Buffer;
259
+ /**
260
+ * ============================================================================================
261
+ * Common Configuration
262
+ * ============================================================================================
263
+ * Price feed contract address for gas price and exchange rate data.
264
+ */
265
+ price_feed: string;
266
+ /**
267
+ * ============================================================================================
268
+ * Message Parameters
269
+ * ============================================================================================
270
+ * The OApp sender address.
271
+ */
272
+ sender: string;
273
+ }
274
+ /**
275
+ * Gas price information for a destination endpoint.
276
+ *
277
+ * Contains the exchange rate and gas costs needed for cross-chain fee calculations.
278
+ */
279
+ export interface Price {
280
+ /**
281
+ * Gas cost per byte of calldata on the destination chain.
282
+ */
283
+ gas_per_byte: u32;
284
+ /**
285
+ * Gas price in the smallest unit (wei for EVM, stroops for Stellar).
286
+ */
287
+ gas_price_in_unit: u64;
288
+ /**
289
+ * Price ratio = (remote native token price / local native token price) * PRICE_RATIO_DENOMINATOR.
290
+ * Used to convert destination chain gas costs to source chain native token.
291
+ */
292
+ price_ratio: u128;
293
+ }
294
+ /**
295
+ * Fee estimation result with detailed breakdown.
296
+ *
297
+ * Contains the calculated fee and all intermediate values used in the calculation.
298
+ */
299
+ export interface FeeEstimate {
300
+ /**
301
+ * Source chain native token price in USD (scaled).
302
+ */
303
+ native_price_usd: u128;
304
+ /**
305
+ * Price ratio used for the calculation.
306
+ */
307
+ price_ratio: u128;
308
+ /**
309
+ * Denominator for the price ratio (typically 10^20).
310
+ */
311
+ price_ratio_denominator: u128;
312
+ /**
313
+ * Total gas fee in source chain native token units.
314
+ */
315
+ total_gas_fee: i128;
316
+ }
317
+ export type WorkerStorage = {
318
+ tag: "Paused";
319
+ values: void;
320
+ } | {
321
+ tag: "DepositAddress";
322
+ values: void;
323
+ } | {
324
+ tag: "PriceFeed";
325
+ values: void;
326
+ } | {
327
+ tag: "WorkerFeeLib";
328
+ values: void;
329
+ } | {
330
+ tag: "DefaultMultiplierBps";
331
+ values: void;
332
+ } | {
333
+ tag: "SupportedOptionTypes";
334
+ values: readonly [u32];
335
+ } | {
336
+ tag: "MessageLibs";
337
+ values: void;
338
+ } | {
339
+ tag: "Allowlist";
340
+ values: readonly [string];
341
+ } | {
342
+ tag: "Denylist";
343
+ values: readonly [string];
344
+ } | {
345
+ tag: "AllowlistSize";
346
+ values: void;
347
+ } | {
348
+ tag: "Admins";
349
+ values: void;
350
+ };
351
+ export interface Client {
352
+ /**
353
+ * Construct and simulate a upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
354
+ */
355
+ upgrade: ({ new_wasm_hash }: {
356
+ new_wasm_hash: Buffer;
357
+ }, txnOptions?: {
358
+ /**
359
+ * The fee to pay for the transaction. Default: BASE_FEE
360
+ */
361
+ fee?: number;
362
+ /**
363
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
364
+ */
365
+ timeoutInSeconds?: number;
366
+ /**
367
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
368
+ */
369
+ simulate?: boolean;
370
+ }) => Promise<AssembledTransaction<null>>;
371
+ /**
372
+ * Construct and simulate a migrate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
373
+ */
374
+ migrate: ({ migration_data }: {
375
+ migration_data: MigrationData;
376
+ }, txnOptions?: {
377
+ /**
378
+ * The fee to pay for the transaction. Default: BASE_FEE
379
+ */
380
+ fee?: number;
381
+ /**
382
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
383
+ */
384
+ timeoutInSeconds?: number;
385
+ /**
386
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
387
+ */
388
+ simulate?: boolean;
389
+ }) => Promise<AssembledTransaction<null>>;
390
+ /**
391
+ * Construct and simulate a extend_instance_ttl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
392
+ * Extends the instance TTL.
393
+ *
394
+ * # Arguments
395
+ *
396
+ * * `threshold` - The threshold to extend the TTL.
397
+ * * `extend_to` - The TTL to extend to.
398
+ */
399
+ extend_instance_ttl: ({ threshold, extend_to }: {
400
+ threshold: u32;
401
+ extend_to: u32;
402
+ }, txnOptions?: {
403
+ /**
404
+ * The fee to pay for the transaction. Default: BASE_FEE
405
+ */
406
+ fee?: number;
407
+ /**
408
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
409
+ */
410
+ timeoutInSeconds?: number;
411
+ /**
412
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
413
+ */
414
+ simulate?: boolean;
415
+ }) => Promise<AssembledTransaction<null>>;
416
+ /**
417
+ * Construct and simulate a get_fee transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
418
+ */
419
+ get_fee: ({ dvn, params }: {
420
+ dvn: string;
421
+ params: DvnFeeParams;
422
+ }, txnOptions?: {
423
+ /**
424
+ * The fee to pay for the transaction. Default: BASE_FEE
425
+ */
426
+ fee?: number;
427
+ /**
428
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
429
+ */
430
+ timeoutInSeconds?: number;
431
+ /**
432
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
433
+ */
434
+ simulate?: boolean;
435
+ }) => Promise<AssembledTransaction<i128>>;
436
+ /**
437
+ * Construct and simulate a owner transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
438
+ * Returns the current owner address, or None if no owner is set.
439
+ */
440
+ owner: (txnOptions?: {
441
+ /**
442
+ * The fee to pay for the transaction. Default: BASE_FEE
443
+ */
444
+ fee?: number;
445
+ /**
446
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
447
+ */
448
+ timeoutInSeconds?: number;
449
+ /**
450
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
451
+ */
452
+ simulate?: boolean;
453
+ }) => Promise<AssembledTransaction<Option<string>>>;
454
+ /**
455
+ * Construct and simulate a transfer_ownership transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
456
+ * Transfers ownership to a new address. Requires current owner authorization.
457
+ */
458
+ transfer_ownership: ({ new_owner }: {
459
+ new_owner: string;
460
+ }, txnOptions?: {
461
+ /**
462
+ * The fee to pay for the transaction. Default: BASE_FEE
463
+ */
464
+ fee?: number;
465
+ /**
466
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
467
+ */
468
+ timeoutInSeconds?: number;
469
+ /**
470
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
471
+ */
472
+ simulate?: boolean;
473
+ }) => Promise<AssembledTransaction<null>>;
474
+ /**
475
+ * Construct and simulate a renounce_ownership transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
476
+ * Permanently renounces ownership. Requires current owner authorization.
477
+ */
478
+ renounce_ownership: (txnOptions?: {
479
+ /**
480
+ * The fee to pay for the transaction. Default: BASE_FEE
481
+ */
482
+ fee?: number;
483
+ /**
484
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
485
+ */
486
+ timeoutInSeconds?: number;
487
+ /**
488
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
489
+ */
490
+ simulate?: boolean;
491
+ }) => Promise<AssembledTransaction<null>>;
492
+ /**
493
+ * Construct and simulate a set_ttl_configs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
494
+ * Sets TTL configs for instance and persistent storage.
495
+ *
496
+ * - `None` values remove the corresponding config (disables auto-extension for that type)
497
+ * - Validates that `threshold <= extend_to <= MAX_TTL`
498
+ *
499
+ * # Arguments
500
+ * - `instance` - TTL config for instance storage
501
+ * - `persistent` - TTL config for persistent storage
502
+ *
503
+ * # Panics
504
+ * - `TtlConfigFrozen` if configs are frozen
505
+ * - `InvalidTtlConfig` if validation fails
506
+ */
507
+ set_ttl_configs: ({ instance, persistent }: {
508
+ instance: Option<TtlConfig>;
509
+ persistent: Option<TtlConfig>;
510
+ }, txnOptions?: {
511
+ /**
512
+ * The fee to pay for the transaction. Default: BASE_FEE
513
+ */
514
+ fee?: number;
515
+ /**
516
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
517
+ */
518
+ timeoutInSeconds?: number;
519
+ /**
520
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
521
+ */
522
+ simulate?: boolean;
523
+ }) => Promise<AssembledTransaction<null>>;
524
+ /**
525
+ * Construct and simulate a ttl_configs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
526
+ * Returns the current TTL configs as (instance_config, persistent_config).
527
+ */
528
+ ttl_configs: (txnOptions?: {
529
+ /**
530
+ * The fee to pay for the transaction. Default: BASE_FEE
531
+ */
532
+ fee?: number;
533
+ /**
534
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
535
+ */
536
+ timeoutInSeconds?: number;
537
+ /**
538
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
539
+ */
540
+ simulate?: boolean;
541
+ }) => Promise<AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>>;
542
+ /**
543
+ * Construct and simulate a freeze_ttl_configs transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
544
+ * Permanently freezes TTL configs, preventing any future modifications.
545
+ *
546
+ * This is irreversible and provides immutability guarantees to users.
547
+ * Emits `TtlConfigsFrozen` event.
548
+ *
549
+ * # Panics
550
+ * - `TtlConfigAlreadyFrozen` if already frozen
551
+ */
552
+ freeze_ttl_configs: (txnOptions?: {
553
+ /**
554
+ * The fee to pay for the transaction. Default: BASE_FEE
555
+ */
556
+ fee?: number;
557
+ /**
558
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
559
+ */
560
+ timeoutInSeconds?: number;
561
+ /**
562
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
563
+ */
564
+ simulate?: boolean;
565
+ }) => Promise<AssembledTransaction<null>>;
566
+ /**
567
+ * Construct and simulate a is_ttl_configs_frozen transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
568
+ * Returns whether TTL configs are frozen.
569
+ */
570
+ is_ttl_configs_frozen: (txnOptions?: {
571
+ /**
572
+ * The fee to pay for the transaction. Default: BASE_FEE
573
+ */
574
+ fee?: number;
575
+ /**
576
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
577
+ */
578
+ timeoutInSeconds?: number;
579
+ /**
580
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
581
+ */
582
+ simulate?: boolean;
583
+ }) => Promise<AssembledTransaction<boolean>>;
584
+ }
585
+ export declare class Client extends ContractClient {
586
+ readonly options: ContractClientOptions;
587
+ static deploy<T = Client>(
588
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
589
+ { owner }: {
590
+ owner: string;
591
+ },
592
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
593
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
594
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
595
+ wasmHash: Buffer | string;
596
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
597
+ salt?: Buffer | Uint8Array;
598
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
599
+ format?: "hex" | "base64";
600
+ }): Promise<AssembledTransaction<T>>;
601
+ constructor(options: ContractClientOptions);
602
+ readonly fromJSON: {
603
+ upgrade: (json: string) => AssembledTransaction<null>;
604
+ migrate: (json: string) => AssembledTransaction<null>;
605
+ extend_instance_ttl: (json: string) => AssembledTransaction<null>;
606
+ get_fee: (json: string) => AssembledTransaction<bigint>;
607
+ owner: (json: string) => AssembledTransaction<Option<string>>;
608
+ transfer_ownership: (json: string) => AssembledTransaction<null>;
609
+ renounce_ownership: (json: string) => AssembledTransaction<null>;
610
+ set_ttl_configs: (json: string) => AssembledTransaction<null>;
611
+ ttl_configs: (json: string) => AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>;
612
+ freeze_ttl_configs: (json: string) => AssembledTransaction<null>;
613
+ is_ttl_configs_frozen: (json: string) => AssembledTransaction<boolean>;
614
+ };
615
+ }