@layerzerolabs/protocol-stellar-v2 0.2.13 → 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,1809 @@
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 ExecutorError: {
9
+ 1: {
10
+ message: string;
11
+ };
12
+ 2: {
13
+ message: string;
14
+ };
15
+ 3: {
16
+ message: string;
17
+ };
18
+ };
19
+ /**
20
+ * Destination chain configuration for executor fee calculation.
21
+ *
22
+ * Contains gas costs and fee parameters specific to each destination chain.
23
+ * These parameters are used by the fee library to calculate accurate execution fees.
24
+ */
25
+ export interface DstConfig {
26
+ /**
27
+ * Minimum fee margin in USD (scaled) to ensure profitability.
28
+ */
29
+ floor_margin_usd: u128;
30
+ /**
31
+ * Base gas cost per lzCompose call on the destination chain.
32
+ */
33
+ lz_compose_base_gas: u64;
34
+ /**
35
+ * Base gas cost for lzReceive execution on the destination chain.
36
+ */
37
+ lz_receive_base_gas: u64;
38
+ /**
39
+ * Fee multiplier in basis points for this destination (0 = use default multiplier).
40
+ */
41
+ multiplier_bps: u32;
42
+ /**
43
+ * Maximum native token value that can be transferred to the destination.
44
+ */
45
+ native_cap: u128;
46
+ }
47
+ /**
48
+ * Parameters for setting destination configuration.
49
+ *
50
+ * Used when configuring executor settings for a specific destination chain.
51
+ */
52
+ export interface SetDstConfigParam {
53
+ /**
54
+ * Configuration for the destination chain.
55
+ */
56
+ dst_config: DstConfig;
57
+ /**
58
+ * Destination endpoint ID (chain identifier).
59
+ */
60
+ dst_eid: u32;
61
+ }
62
+ /**
63
+ * Parameters for a native token drop.
64
+ *
65
+ * Used to specify native token transfers as part of executor options.
66
+ */
67
+ export interface NativeDropParams {
68
+ /**
69
+ * Amount of native tokens to transfer.
70
+ */
71
+ amount: i128;
72
+ /**
73
+ * Receiver address for the native token transfer.
74
+ */
75
+ receiver: string;
76
+ }
77
+ /**
78
+ * Signature data for Custom Account authorization.
79
+ * Contains the admin's public key and their Ed25519 signature over the authorization payload.
80
+ */
81
+ export interface ExecutorSignature {
82
+ /**
83
+ * Admin's Ed25519 public key (32 bytes) - must correspond to a registered admin
84
+ */
85
+ public_key: Buffer;
86
+ /**
87
+ * Ed25519 signature (64 bytes) over the signature_payload
88
+ */
89
+ signature: Buffer;
90
+ }
91
+ export type ExecutorStorage = {
92
+ tag: "DstConfig";
93
+ values: readonly [u32];
94
+ } | {
95
+ tag: "Endpoint";
96
+ values: void;
97
+ } | {
98
+ tag: "WhitelistedFn";
99
+ values: readonly [string, string];
100
+ };
101
+ export declare const EndpointError: {
102
+ 1: {
103
+ message: string;
104
+ };
105
+ 2: {
106
+ message: string;
107
+ };
108
+ 3: {
109
+ message: string;
110
+ };
111
+ 4: {
112
+ message: string;
113
+ };
114
+ 5: {
115
+ message: string;
116
+ };
117
+ 6: {
118
+ message: string;
119
+ };
120
+ 7: {
121
+ message: string;
122
+ };
123
+ 8: {
124
+ message: string;
125
+ };
126
+ 9: {
127
+ message: string;
128
+ };
129
+ 10: {
130
+ message: string;
131
+ };
132
+ 11: {
133
+ message: string;
134
+ };
135
+ 12: {
136
+ message: string;
137
+ };
138
+ 13: {
139
+ message: string;
140
+ };
141
+ 14: {
142
+ message: string;
143
+ };
144
+ 15: {
145
+ message: string;
146
+ };
147
+ 16: {
148
+ message: string;
149
+ };
150
+ 17: {
151
+ message: string;
152
+ };
153
+ 18: {
154
+ message: string;
155
+ };
156
+ 19: {
157
+ message: string;
158
+ };
159
+ 20: {
160
+ message: string;
161
+ };
162
+ 21: {
163
+ message: string;
164
+ };
165
+ 22: {
166
+ message: string;
167
+ };
168
+ 23: {
169
+ message: string;
170
+ };
171
+ 24: {
172
+ message: string;
173
+ };
174
+ };
175
+ /**
176
+ * Parameters for sending a cross-chain message.
177
+ */
178
+ export interface MessagingParams {
179
+ /**
180
+ * Destination endpoint ID (chain identifier).
181
+ */
182
+ dst_eid: u32;
183
+ /**
184
+ * The message payload to send.
185
+ */
186
+ message: Buffer;
187
+ /**
188
+ * Encoded executor and DVN options.
189
+ */
190
+ options: Buffer;
191
+ /**
192
+ * Whether to pay fees in ZRO token instead of native token.
193
+ */
194
+ pay_in_zro: boolean;
195
+ /**
196
+ * Receiver address on the destination chain (32 bytes).
197
+ */
198
+ receiver: Buffer;
199
+ }
200
+ /**
201
+ * Source message information identifying where a cross-chain message came from.
202
+ */
203
+ export interface Origin {
204
+ /**
205
+ * Nonce for this pathway.
206
+ */
207
+ nonce: u64;
208
+ /**
209
+ * Sender address on the source chain (32 bytes).
210
+ */
211
+ sender: Buffer;
212
+ /**
213
+ * Source endpoint ID (chain identifier).
214
+ */
215
+ src_eid: u32;
216
+ }
217
+ /**
218
+ * Fee structure for cross-chain messaging.
219
+ */
220
+ export interface MessagingFee {
221
+ /**
222
+ * Fee paid in native token (XLM).
223
+ */
224
+ native_fee: i128;
225
+ /**
226
+ * Fee paid in ZRO token (LayerZero token).
227
+ */
228
+ zro_fee: i128;
229
+ }
230
+ /**
231
+ * Receipt returned after successfully sending a cross-chain message.
232
+ */
233
+ export interface MessagingReceipt {
234
+ /**
235
+ * The fees charged for sending the message.
236
+ */
237
+ fee: MessagingFee;
238
+ /**
239
+ * Globally unique identifier for the message.
240
+ */
241
+ guid: Buffer;
242
+ /**
243
+ * The outbound nonce for this pathway.
244
+ */
245
+ nonce: u64;
246
+ }
247
+ /**
248
+ * Type of message library indicating supported operations.
249
+ */
250
+ export type MessageLibType = {
251
+ tag: "Send";
252
+ values: void;
253
+ } | {
254
+ tag: "Receive";
255
+ values: void;
256
+ } | {
257
+ tag: "SendAndReceive";
258
+ values: void;
259
+ };
260
+ /**
261
+ * Version information for a message library.
262
+ *
263
+ * Note: `minor` and `endpoint_version` use `u32` instead of `u8` because Stellar does not
264
+ * support `u8` types in contract interface functions.
265
+ */
266
+ export interface MessageLibVersion {
267
+ /**
268
+ * Endpoint version (should not exceed u8::MAX = 255).
269
+ */
270
+ endpoint_version: u32;
271
+ /**
272
+ * Major version number.
273
+ */
274
+ major: u64;
275
+ /**
276
+ * Minor version number (should not exceed u8::MAX = 255).
277
+ */
278
+ minor: u32;
279
+ }
280
+ /**
281
+ * Timeout configuration for receive library transitions.
282
+ */
283
+ export interface Timeout {
284
+ /**
285
+ * Unix timestamp when the timeout expires.
286
+ */
287
+ expiry: u64;
288
+ /**
289
+ * The new library address to transition to.
290
+ */
291
+ lib: string;
292
+ }
293
+ /**
294
+ * Parameters for setting message library configuration.
295
+ */
296
+ export interface SetConfigParam {
297
+ /**
298
+ * XDR-encoded configuration data.
299
+ */
300
+ config: Buffer;
301
+ /**
302
+ * The type of configuration (e.g., executor, ULN).
303
+ */
304
+ config_type: u32;
305
+ /**
306
+ * The endpoint ID this config applies to.
307
+ */
308
+ eid: u32;
309
+ }
310
+ /**
311
+ * Resolved library information with default status.
312
+ */
313
+ export interface ResolvedLibrary {
314
+ /**
315
+ * Whether this is the default library (true) or OApp-specific (false).
316
+ */
317
+ is_default: boolean;
318
+ /**
319
+ * The resolved library address.
320
+ */
321
+ lib: string;
322
+ }
323
+ /**
324
+ * Outbound packet containing all information for cross-chain transmission.
325
+ */
326
+ export interface OutboundPacket {
327
+ /**
328
+ * Destination endpoint ID.
329
+ */
330
+ dst_eid: u32;
331
+ /**
332
+ * Globally unique identifier for this message.
333
+ */
334
+ guid: Buffer;
335
+ /**
336
+ * The message payload.
337
+ */
338
+ message: Buffer;
339
+ /**
340
+ * Outbound nonce for this pathway.
341
+ */
342
+ nonce: u64;
343
+ /**
344
+ * Receiver address on destination chain (32 bytes).
345
+ */
346
+ receiver: Buffer;
347
+ /**
348
+ * Sender address on source chain.
349
+ */
350
+ sender: string;
351
+ /**
352
+ * Source endpoint ID.
353
+ */
354
+ src_eid: u32;
355
+ }
356
+ /**
357
+ * A fee recipient with the amount to be paid.
358
+ */
359
+ export interface FeeRecipient {
360
+ /**
361
+ * Amount of fee to pay.
362
+ */
363
+ amount: i128;
364
+ /**
365
+ * The address to send the fee to.
366
+ */
367
+ to: string;
368
+ }
369
+ /**
370
+ * Result of send operation containing fees and encoded packet.
371
+ */
372
+ export interface FeesAndPacket {
373
+ /**
374
+ * The encoded packet ready for transmission.
375
+ */
376
+ encoded_packet: Buffer;
377
+ /**
378
+ * List of native token fee recipients (executor, DVNs, treasury).
379
+ */
380
+ native_fee_recipients: Array<FeeRecipient>;
381
+ /**
382
+ * List of ZRO token fee recipients (treasury).
383
+ */
384
+ zro_fee_recipients: Array<FeeRecipient>;
385
+ }
386
+ export declare const PacketCodecV1Error: {
387
+ 1001: {
388
+ message: string;
389
+ };
390
+ 1002: {
391
+ message: string;
392
+ };
393
+ };
394
+ export declare const WorkerOptionsError: {
395
+ 1101: {
396
+ message: string;
397
+ };
398
+ 1102: {
399
+ message: string;
400
+ };
401
+ 1103: {
402
+ message: string;
403
+ };
404
+ 1104: {
405
+ message: string;
406
+ };
407
+ 1105: {
408
+ message: string;
409
+ };
410
+ 1106: {
411
+ message: string;
412
+ };
413
+ 1107: {
414
+ message: string;
415
+ };
416
+ 1108: {
417
+ message: string;
418
+ };
419
+ 1109: {
420
+ message: string;
421
+ };
422
+ };
423
+ export declare const BufferReaderError: {
424
+ 1000: {
425
+ message: string;
426
+ };
427
+ 1001: {
428
+ message: string;
429
+ };
430
+ };
431
+ export declare const BufferWriterError: {
432
+ 1100: {
433
+ message: string;
434
+ };
435
+ };
436
+ export declare const TtlConfigurableError: {
437
+ 1200: {
438
+ message: string;
439
+ };
440
+ 1201: {
441
+ message: string;
442
+ };
443
+ 1202: {
444
+ message: string;
445
+ };
446
+ };
447
+ export declare const OwnableError: {
448
+ 1300: {
449
+ message: string;
450
+ };
451
+ 1301: {
452
+ message: string;
453
+ };
454
+ };
455
+ export declare const BytesExtError: {
456
+ 1400: {
457
+ message: string;
458
+ };
459
+ };
460
+ export declare const UpgradeableError: {
461
+ 1500: {
462
+ message: string;
463
+ };
464
+ };
465
+ export type OwnableStorage = {
466
+ tag: "Owner";
467
+ values: void;
468
+ };
469
+ /**
470
+ * TTL configuration: threshold (when to extend) and extend_to (target TTL).
471
+ */
472
+ export interface TtlConfig {
473
+ /**
474
+ * Target TTL after extension (in ledgers).
475
+ */
476
+ extend_to: u32;
477
+ /**
478
+ * TTL threshold that triggers extension (in ledgers).
479
+ */
480
+ threshold: u32;
481
+ }
482
+ export type TtlConfigStorage = {
483
+ tag: "Frozen";
484
+ values: void;
485
+ } | {
486
+ tag: "Instance";
487
+ values: void;
488
+ } | {
489
+ tag: "Persistent";
490
+ values: void;
491
+ };
492
+ export type UpgradeableStorage = {
493
+ tag: "Migrating";
494
+ values: void;
495
+ };
496
+ export declare const WorkerError: {
497
+ 1200: {
498
+ message: string;
499
+ };
500
+ 1201: {
501
+ message: string;
502
+ };
503
+ 1202: {
504
+ message: string;
505
+ };
506
+ 1203: {
507
+ message: string;
508
+ };
509
+ 1204: {
510
+ message: string;
511
+ };
512
+ 1205: {
513
+ message: string;
514
+ };
515
+ 1206: {
516
+ message: string;
517
+ };
518
+ 1207: {
519
+ message: string;
520
+ };
521
+ 1208: {
522
+ message: string;
523
+ };
524
+ 1209: {
525
+ message: string;
526
+ };
527
+ 1210: {
528
+ message: string;
529
+ };
530
+ 1211: {
531
+ message: string;
532
+ };
533
+ 1212: {
534
+ message: string;
535
+ };
536
+ 1213: {
537
+ message: string;
538
+ };
539
+ 1214: {
540
+ message: string;
541
+ };
542
+ 1215: {
543
+ message: string;
544
+ };
545
+ 1216: {
546
+ message: string;
547
+ };
548
+ 1217: {
549
+ message: string;
550
+ };
551
+ 1218: {
552
+ message: string;
553
+ };
554
+ };
555
+ /**
556
+ * Parameters for DVN fee calculation.
557
+ *
558
+ * Contains all inputs needed by the fee library to calculate verification fees
559
+ * for cross-chain messages. Includes message parameters, common configuration,
560
+ * and destination-specific settings.
561
+ */
562
+ export interface DvnFeeParams {
563
+ /**
564
+ * Number of block confirmations required.
565
+ */
566
+ confirmations: u64;
567
+ /**
568
+ * Default fee multiplier in basis points (used if no dst-specific multiplier).
569
+ */
570
+ default_multiplier_bps: u32;
571
+ /**
572
+ * Destination endpoint ID (chain identifier).
573
+ */
574
+ dst_eid: u32;
575
+ /**
576
+ * Minimum fee margin in USD (scaled).
577
+ */
578
+ floor_margin_usd: u128;
579
+ /**
580
+ * ============================================================================================
581
+ * Destination-Specific Configuration
582
+ * ============================================================================================
583
+ * Gas estimate for verification on destination chain.
584
+ */
585
+ gas: u128;
586
+ /**
587
+ * Destination-specific fee multiplier in basis points (0 = use default).
588
+ */
589
+ multiplier_bps: u32;
590
+ /**
591
+ * DVN options
592
+ */
593
+ options: Buffer;
594
+ /**
595
+ * ============================================================================================
596
+ * Common Configuration
597
+ * ============================================================================================
598
+ * Price feed contract address for gas price and exchange rate data.
599
+ */
600
+ price_feed: string;
601
+ /**
602
+ * Number of required signatures (quorum).
603
+ */
604
+ quorum: u32;
605
+ /**
606
+ * ============================================================================================
607
+ * Message Parameters
608
+ * ============================================================================================
609
+ * The OApp sender address.
610
+ */
611
+ sender: string;
612
+ }
613
+ /**
614
+ * Parameters for executor fee calculation.
615
+ *
616
+ * Contains all inputs needed by the fee library to calculate execution fees
617
+ * for cross-chain messages. Includes message parameters, common configuration,
618
+ * and destination-specific settings.
619
+ */
620
+ export interface FeeParams {
621
+ /**
622
+ * Size of the message calldata in bytes.
623
+ */
624
+ calldata_size: u32;
625
+ /**
626
+ * Default fee multiplier in basis points (used if no dst-specific multiplier).
627
+ */
628
+ default_multiplier_bps: u32;
629
+ /**
630
+ * Destination endpoint ID (chain identifier).
631
+ */
632
+ dst_eid: u32;
633
+ /**
634
+ * Minimum fee margin in USD (scaled).
635
+ */
636
+ floor_margin_usd: u128;
637
+ /**
638
+ * Base gas for each lzCompose call on destination chain.
639
+ */
640
+ lz_compose_base_gas: u64;
641
+ /**
642
+ * ============================================================================================
643
+ * Destination-Specific Configuration
644
+ * ============================================================================================
645
+ * Base gas for lzReceive execution on destination chain.
646
+ */
647
+ lz_receive_base_gas: u64;
648
+ /**
649
+ * Destination-specific fee multiplier in basis points (0 = use default).
650
+ */
651
+ multiplier_bps: u32;
652
+ /**
653
+ * Maximum native token value that can be sent.
654
+ */
655
+ native_cap: u128;
656
+ /**
657
+ * Encoded executor options (lzReceive gas, lzCompose, nativeDrop, etc.).
658
+ */
659
+ options: Buffer;
660
+ /**
661
+ * ============================================================================================
662
+ * Common Configuration
663
+ * ============================================================================================
664
+ * Price feed contract address for gas price and exchange rate data.
665
+ */
666
+ price_feed: string;
667
+ /**
668
+ * ============================================================================================
669
+ * Message Parameters
670
+ * ============================================================================================
671
+ * The OApp sender address.
672
+ */
673
+ sender: string;
674
+ }
675
+ /**
676
+ * Gas price information for a destination endpoint.
677
+ *
678
+ * Contains the exchange rate and gas costs needed for cross-chain fee calculations.
679
+ */
680
+ export interface Price {
681
+ /**
682
+ * Gas cost per byte of calldata on the destination chain.
683
+ */
684
+ gas_per_byte: u32;
685
+ /**
686
+ * Gas price in the smallest unit (wei for EVM, stroops for Stellar).
687
+ */
688
+ gas_price_in_unit: u64;
689
+ /**
690
+ * Price ratio = (remote native token price / local native token price) * PRICE_RATIO_DENOMINATOR.
691
+ * Used to convert destination chain gas costs to source chain native token.
692
+ */
693
+ price_ratio: u128;
694
+ }
695
+ /**
696
+ * Fee estimation result with detailed breakdown.
697
+ *
698
+ * Contains the calculated fee and all intermediate values used in the calculation.
699
+ */
700
+ export interface FeeEstimate {
701
+ /**
702
+ * Source chain native token price in USD (scaled).
703
+ */
704
+ native_price_usd: u128;
705
+ /**
706
+ * Price ratio used for the calculation.
707
+ */
708
+ price_ratio: u128;
709
+ /**
710
+ * Denominator for the price ratio (typically 10^20).
711
+ */
712
+ price_ratio_denominator: u128;
713
+ /**
714
+ * Total gas fee in source chain native token units.
715
+ */
716
+ total_gas_fee: i128;
717
+ }
718
+ export type WorkerStorage = {
719
+ tag: "Paused";
720
+ values: void;
721
+ } | {
722
+ tag: "DepositAddress";
723
+ values: void;
724
+ } | {
725
+ tag: "PriceFeed";
726
+ values: void;
727
+ } | {
728
+ tag: "WorkerFeeLib";
729
+ values: void;
730
+ } | {
731
+ tag: "DefaultMultiplierBps";
732
+ values: void;
733
+ } | {
734
+ tag: "SupportedOptionTypes";
735
+ values: readonly [u32];
736
+ } | {
737
+ tag: "MessageLibs";
738
+ values: void;
739
+ } | {
740
+ tag: "Allowlist";
741
+ values: readonly [string];
742
+ } | {
743
+ tag: "Denylist";
744
+ values: readonly [string];
745
+ } | {
746
+ tag: "AllowlistSize";
747
+ values: void;
748
+ } | {
749
+ tag: "Admins";
750
+ values: void;
751
+ };
752
+ export interface Client {
753
+ /**
754
+ * Construct and simulate a set_paused 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.
755
+ * Sets the paused state of the worker.
756
+ *
757
+ * When paused, the worker will reject new job assignments (e.g., assign_job, get_fee).
758
+ * Existing jobs in progress are not affected.
759
+ *
760
+ * # Arguments
761
+ * * `paused` - `true` to pause, `false` to unpause
762
+ */
763
+ set_paused: ({ paused }: {
764
+ paused: boolean;
765
+ }, txnOptions?: {
766
+ /**
767
+ * The fee to pay for the transaction. Default: BASE_FEE
768
+ */
769
+ fee?: number;
770
+ /**
771
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
772
+ */
773
+ timeoutInSeconds?: number;
774
+ /**
775
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
776
+ */
777
+ simulate?: boolean;
778
+ }) => Promise<AssembledTransaction<null>>;
779
+ /**
780
+ * Construct and simulate a set_supported_message_lib 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.
781
+ * Sets whether a message library is supported by this worker.
782
+ *
783
+ * Message libraries (e.g., ULN302) call workers to assign jobs. Only supported
784
+ * libraries can interact with this worker.
785
+ *
786
+ * # Arguments
787
+ * * `message_lib` - The message library contract address
788
+ * * `supported` - `true` to add support, `false` to remove support
789
+ */
790
+ set_supported_message_lib: ({ message_lib, supported }: {
791
+ message_lib: string;
792
+ supported: boolean;
793
+ }, txnOptions?: {
794
+ /**
795
+ * The fee to pay for the transaction. Default: BASE_FEE
796
+ */
797
+ fee?: number;
798
+ /**
799
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
800
+ */
801
+ timeoutInSeconds?: number;
802
+ /**
803
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
804
+ */
805
+ simulate?: boolean;
806
+ }) => Promise<AssembledTransaction<null>>;
807
+ /**
808
+ * Construct and simulate a set_allowlist 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.
809
+ * Sets allowlist status for an OApp address.
810
+ *
811
+ * When the allowlist is empty, all OApps are allowed (unless on denylist).
812
+ * When the allowlist is not empty, only allowlisted OApps are allowed.
813
+ * Denylist always takes precedence over allowlist.
814
+ *
815
+ * # Arguments
816
+ * * `oapp` - The OApp contract address
817
+ * * `allowed` - `true` to add to allowlist, `false` to remove
818
+ */
819
+ set_allowlist: ({ oapp, allowed }: {
820
+ oapp: string;
821
+ allowed: boolean;
822
+ }, txnOptions?: {
823
+ /**
824
+ * The fee to pay for the transaction. Default: BASE_FEE
825
+ */
826
+ fee?: number;
827
+ /**
828
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
829
+ */
830
+ timeoutInSeconds?: number;
831
+ /**
832
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
833
+ */
834
+ simulate?: boolean;
835
+ }) => Promise<AssembledTransaction<null>>;
836
+ /**
837
+ * Construct and simulate a set_denylist 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.
838
+ * Sets denylist status for an OApp address.
839
+ *
840
+ * Denylisted OApps are blocked from using this worker, even if they're on
841
+ * the allowlist (denylist takes precedence).
842
+ *
843
+ * # Arguments
844
+ * * `oapp` - The OApp contract address
845
+ * * `denied` - `true` to add to denylist, `false` to remove
846
+ */
847
+ set_denylist: ({ oapp, denied }: {
848
+ oapp: string;
849
+ denied: boolean;
850
+ }, txnOptions?: {
851
+ /**
852
+ * The fee to pay for the transaction. Default: BASE_FEE
853
+ */
854
+ fee?: number;
855
+ /**
856
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
857
+ */
858
+ timeoutInSeconds?: number;
859
+ /**
860
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
861
+ */
862
+ simulate?: boolean;
863
+ }) => Promise<AssembledTransaction<null>>;
864
+ /**
865
+ * Construct and simulate a set_default_multiplier_bps 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.
866
+ * Sets the default fee multiplier in basis points.
867
+ *
868
+ * The multiplier is applied to base fees during fee calculation. Used when
869
+ * no destination-specific multiplier is configured.
870
+ *
871
+ * # Arguments
872
+ * * `admin` - Admin address (must provide authorization)
873
+ * * `multiplier_bps` - Multiplier in basis points (10000 = 1x, 12000 = 1.2x)
874
+ */
875
+ set_default_multiplier_bps: ({ admin, multiplier_bps }: {
876
+ admin: string;
877
+ multiplier_bps: u32;
878
+ }, txnOptions?: {
879
+ /**
880
+ * The fee to pay for the transaction. Default: BASE_FEE
881
+ */
882
+ fee?: number;
883
+ /**
884
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
885
+ */
886
+ timeoutInSeconds?: number;
887
+ /**
888
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
889
+ */
890
+ simulate?: boolean;
891
+ }) => Promise<AssembledTransaction<null>>;
892
+ /**
893
+ * Construct and simulate a set_deposit_address 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.
894
+ * Sets the deposit address where worker fees are collected.
895
+ *
896
+ * When jobs are assigned, fees are directed to this address.
897
+ *
898
+ * # Arguments
899
+ * * `admin` - Admin address (must provide authorization)
900
+ * * `deposit_address` - Address to receive collected fees
901
+ */
902
+ set_deposit_address: ({ admin, deposit_address }: {
903
+ admin: string;
904
+ deposit_address: string;
905
+ }, txnOptions?: {
906
+ /**
907
+ * The fee to pay for the transaction. Default: BASE_FEE
908
+ */
909
+ fee?: number;
910
+ /**
911
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
912
+ */
913
+ timeoutInSeconds?: number;
914
+ /**
915
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
916
+ */
917
+ simulate?: boolean;
918
+ }) => Promise<AssembledTransaction<null>>;
919
+ /**
920
+ * Construct and simulate a set_supported_option_types 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.
921
+ * Sets supported executor option types for a destination endpoint.
922
+ *
923
+ * # Arguments
924
+ * * `admin` - Admin address (must provide authorization)
925
+ * * `eid` - Destination endpoint ID (chain identifier)
926
+ * * `option_types` - Encoded supported option types
927
+ */
928
+ set_supported_option_types: ({ admin, eid, option_types }: {
929
+ admin: string;
930
+ eid: u32;
931
+ option_types: Buffer;
932
+ }, txnOptions?: {
933
+ /**
934
+ * The fee to pay for the transaction. Default: BASE_FEE
935
+ */
936
+ fee?: number;
937
+ /**
938
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
939
+ */
940
+ timeoutInSeconds?: number;
941
+ /**
942
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
943
+ */
944
+ simulate?: boolean;
945
+ }) => Promise<AssembledTransaction<null>>;
946
+ /**
947
+ * Construct and simulate a set_worker_fee_lib 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.
948
+ * Sets the worker fee library contract address.
949
+ *
950
+ * The fee library calculates fees based on executor options and price feed data.
951
+ *
952
+ * # Arguments
953
+ * * `admin` - Admin address (must provide authorization)
954
+ * * `worker_fee_lib` - Fee library contract address implementing `IExecutorFeeLib`
955
+ */
956
+ set_worker_fee_lib: ({ admin, worker_fee_lib }: {
957
+ admin: string;
958
+ worker_fee_lib: string;
959
+ }, txnOptions?: {
960
+ /**
961
+ * The fee to pay for the transaction. Default: BASE_FEE
962
+ */
963
+ fee?: number;
964
+ /**
965
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
966
+ */
967
+ timeoutInSeconds?: number;
968
+ /**
969
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
970
+ */
971
+ simulate?: boolean;
972
+ }) => Promise<AssembledTransaction<null>>;
973
+ /**
974
+ * Construct and simulate a set_price_feed 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.
975
+ * Sets the price feed contract address.
976
+ *
977
+ * The price feed provides gas prices and exchange rates for cross-chain
978
+ * fee calculations.
979
+ *
980
+ * # Arguments
981
+ * * `admin` - Admin address (must provide authorization)
982
+ * * `price_feed` - Price feed contract address implementing `ILayerZeroPriceFeed`
983
+ */
984
+ set_price_feed: ({ admin, price_feed }: {
985
+ admin: string;
986
+ price_feed: string;
987
+ }, txnOptions?: {
988
+ /**
989
+ * The fee to pay for the transaction. Default: BASE_FEE
990
+ */
991
+ fee?: number;
992
+ /**
993
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
994
+ */
995
+ timeoutInSeconds?: number;
996
+ /**
997
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
998
+ */
999
+ simulate?: boolean;
1000
+ }) => Promise<AssembledTransaction<null>>;
1001
+ /**
1002
+ * Construct and simulate a is_admin 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.
1003
+ * Returns whether an address is an admin.
1004
+ *
1005
+ * # Arguments
1006
+ * * `admin` - The address to check
1007
+ */
1008
+ is_admin: ({ admin }: {
1009
+ admin: string;
1010
+ }, txnOptions?: {
1011
+ /**
1012
+ * The fee to pay for the transaction. Default: BASE_FEE
1013
+ */
1014
+ fee?: number;
1015
+ /**
1016
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1017
+ */
1018
+ timeoutInSeconds?: number;
1019
+ /**
1020
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1021
+ */
1022
+ simulate?: boolean;
1023
+ }) => Promise<AssembledTransaction<boolean>>;
1024
+ /**
1025
+ * Construct and simulate a admins 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.
1026
+ * Returns all admin addresses.
1027
+ */
1028
+ admins: (txnOptions?: {
1029
+ /**
1030
+ * The fee to pay for the transaction. Default: BASE_FEE
1031
+ */
1032
+ fee?: number;
1033
+ /**
1034
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1035
+ */
1036
+ timeoutInSeconds?: number;
1037
+ /**
1038
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1039
+ */
1040
+ simulate?: boolean;
1041
+ }) => Promise<AssembledTransaction<Array<string>>>;
1042
+ /**
1043
+ * Construct and simulate a paused 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.
1044
+ * Returns whether the worker is paused.
1045
+ */
1046
+ paused: (txnOptions?: {
1047
+ /**
1048
+ * The fee to pay for the transaction. Default: BASE_FEE
1049
+ */
1050
+ fee?: number;
1051
+ /**
1052
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1053
+ */
1054
+ timeoutInSeconds?: number;
1055
+ /**
1056
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1057
+ */
1058
+ simulate?: boolean;
1059
+ }) => Promise<AssembledTransaction<boolean>>;
1060
+ /**
1061
+ * Construct and simulate a is_supported_message_lib 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.
1062
+ * Returns whether a message library is supported.
1063
+ *
1064
+ * # Arguments
1065
+ * * `message_lib` - Message library contract address
1066
+ */
1067
+ is_supported_message_lib: ({ message_lib }: {
1068
+ message_lib: string;
1069
+ }, txnOptions?: {
1070
+ /**
1071
+ * The fee to pay for the transaction. Default: BASE_FEE
1072
+ */
1073
+ fee?: number;
1074
+ /**
1075
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1076
+ */
1077
+ timeoutInSeconds?: number;
1078
+ /**
1079
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1080
+ */
1081
+ simulate?: boolean;
1082
+ }) => Promise<AssembledTransaction<boolean>>;
1083
+ /**
1084
+ * Construct and simulate a message_libs 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.
1085
+ * Returns all supported message library addresses.
1086
+ *
1087
+ * # Returns
1088
+ * Vector of supported message library contract addresses.
1089
+ */
1090
+ message_libs: (txnOptions?: {
1091
+ /**
1092
+ * The fee to pay for the transaction. Default: BASE_FEE
1093
+ */
1094
+ fee?: number;
1095
+ /**
1096
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1097
+ */
1098
+ timeoutInSeconds?: number;
1099
+ /**
1100
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1101
+ */
1102
+ simulate?: boolean;
1103
+ }) => Promise<AssembledTransaction<Array<string>>>;
1104
+ /**
1105
+ * Construct and simulate a is_on_allowlist 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.
1106
+ * Returns whether an OApp is on the allowlist.
1107
+ *
1108
+ * # Arguments
1109
+ * * `oapp` - OApp contract address
1110
+ */
1111
+ is_on_allowlist: ({ oapp }: {
1112
+ oapp: string;
1113
+ }, txnOptions?: {
1114
+ /**
1115
+ * The fee to pay for the transaction. Default: BASE_FEE
1116
+ */
1117
+ fee?: number;
1118
+ /**
1119
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1120
+ */
1121
+ timeoutInSeconds?: number;
1122
+ /**
1123
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1124
+ */
1125
+ simulate?: boolean;
1126
+ }) => Promise<AssembledTransaction<boolean>>;
1127
+ /**
1128
+ * Construct and simulate a is_on_denylist 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.
1129
+ * Returns whether an OApp is on the denylist.
1130
+ *
1131
+ * # Arguments
1132
+ * * `oapp` - OApp contract address
1133
+ */
1134
+ is_on_denylist: ({ oapp }: {
1135
+ oapp: string;
1136
+ }, txnOptions?: {
1137
+ /**
1138
+ * The fee to pay for the transaction. Default: BASE_FEE
1139
+ */
1140
+ fee?: number;
1141
+ /**
1142
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1143
+ */
1144
+ timeoutInSeconds?: number;
1145
+ /**
1146
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1147
+ */
1148
+ simulate?: boolean;
1149
+ }) => Promise<AssembledTransaction<boolean>>;
1150
+ /**
1151
+ * Construct and simulate a has_acl 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.
1152
+ * Returns whether an OApp has access control list (ACL) permission.
1153
+ *
1154
+ * ACL evaluation order:
1155
+ * 1. If on denylist → denied
1156
+ * 2. If allowlist is empty OR on allowlist → allowed
1157
+ * 3. Otherwise → denied
1158
+ *
1159
+ * # Arguments
1160
+ * * `sender` - OApp contract address to check
1161
+ */
1162
+ has_acl: ({ sender }: {
1163
+ sender: string;
1164
+ }, txnOptions?: {
1165
+ /**
1166
+ * The fee to pay for the transaction. Default: BASE_FEE
1167
+ */
1168
+ fee?: number;
1169
+ /**
1170
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1171
+ */
1172
+ timeoutInSeconds?: number;
1173
+ /**
1174
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1175
+ */
1176
+ simulate?: boolean;
1177
+ }) => Promise<AssembledTransaction<boolean>>;
1178
+ /**
1179
+ * Construct and simulate a allowlist_size 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.
1180
+ * Returns the number of addresses on the allowlist.
1181
+ */
1182
+ allowlist_size: (txnOptions?: {
1183
+ /**
1184
+ * The fee to pay for the transaction. Default: BASE_FEE
1185
+ */
1186
+ fee?: number;
1187
+ /**
1188
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1189
+ */
1190
+ timeoutInSeconds?: number;
1191
+ /**
1192
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1193
+ */
1194
+ simulate?: boolean;
1195
+ }) => Promise<AssembledTransaction<u32>>;
1196
+ /**
1197
+ * Construct and simulate a default_multiplier_bps 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.
1198
+ * Returns the default fee multiplier in basis points.
1199
+ */
1200
+ default_multiplier_bps: (txnOptions?: {
1201
+ /**
1202
+ * The fee to pay for the transaction. Default: BASE_FEE
1203
+ */
1204
+ fee?: number;
1205
+ /**
1206
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1207
+ */
1208
+ timeoutInSeconds?: number;
1209
+ /**
1210
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1211
+ */
1212
+ simulate?: boolean;
1213
+ }) => Promise<AssembledTransaction<u32>>;
1214
+ /**
1215
+ * Construct and simulate a deposit_address 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.
1216
+ * Returns the deposit address where fees are collected.
1217
+ */
1218
+ deposit_address: (txnOptions?: {
1219
+ /**
1220
+ * The fee to pay for the transaction. Default: BASE_FEE
1221
+ */
1222
+ fee?: number;
1223
+ /**
1224
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1225
+ */
1226
+ timeoutInSeconds?: number;
1227
+ /**
1228
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1229
+ */
1230
+ simulate?: boolean;
1231
+ }) => Promise<AssembledTransaction<string>>;
1232
+ /**
1233
+ * Construct and simulate a price_feed 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.
1234
+ * Returns the price feed contract address.
1235
+ */
1236
+ price_feed: (txnOptions?: {
1237
+ /**
1238
+ * The fee to pay for the transaction. Default: BASE_FEE
1239
+ */
1240
+ fee?: number;
1241
+ /**
1242
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1243
+ */
1244
+ timeoutInSeconds?: number;
1245
+ /**
1246
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1247
+ */
1248
+ simulate?: boolean;
1249
+ }) => Promise<AssembledTransaction<string>>;
1250
+ /**
1251
+ * Construct and simulate a get_supported_option_types 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.
1252
+ * Returns supported option types for a destination endpoint.
1253
+ *
1254
+ * # Arguments
1255
+ * * `eid` - Destination endpoint ID (chain identifier)
1256
+ */
1257
+ get_supported_option_types: ({ eid }: {
1258
+ eid: u32;
1259
+ }, txnOptions?: {
1260
+ /**
1261
+ * The fee to pay for the transaction. Default: BASE_FEE
1262
+ */
1263
+ fee?: number;
1264
+ /**
1265
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1266
+ */
1267
+ timeoutInSeconds?: number;
1268
+ /**
1269
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1270
+ */
1271
+ simulate?: boolean;
1272
+ }) => Promise<AssembledTransaction<Option<Buffer>>>;
1273
+ /**
1274
+ * Construct and simulate a worker_fee_lib 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.
1275
+ * Returns the worker fee library contract address.
1276
+ */
1277
+ worker_fee_lib: (txnOptions?: {
1278
+ /**
1279
+ * The fee to pay for the transaction. Default: BASE_FEE
1280
+ */
1281
+ fee?: number;
1282
+ /**
1283
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1284
+ */
1285
+ timeoutInSeconds?: number;
1286
+ /**
1287
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1288
+ */
1289
+ simulate?: boolean;
1290
+ }) => Promise<AssembledTransaction<string>>;
1291
+ /**
1292
+ * Construct and simulate a assign_job 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.
1293
+ * Assigns a job to the executor and returns fee recipient information.
1294
+ */
1295
+ assign_job: ({ send_lib, sender, dst_eid, calldata_size, options }: {
1296
+ send_lib: string;
1297
+ sender: string;
1298
+ dst_eid: u32;
1299
+ calldata_size: u32;
1300
+ options: Buffer;
1301
+ }, txnOptions?: {
1302
+ /**
1303
+ * The fee to pay for the transaction. Default: BASE_FEE
1304
+ */
1305
+ fee?: number;
1306
+ /**
1307
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1308
+ */
1309
+ timeoutInSeconds?: number;
1310
+ /**
1311
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1312
+ */
1313
+ simulate?: boolean;
1314
+ }) => Promise<AssembledTransaction<FeeRecipient>>;
1315
+ /**
1316
+ * 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.
1317
+ * Calculates the execution fee for a cross-chain message.
1318
+ */
1319
+ get_fee: ({ send_lib, sender, dst_eid, calldata_size, options }: {
1320
+ send_lib: string;
1321
+ sender: string;
1322
+ dst_eid: u32;
1323
+ calldata_size: u32;
1324
+ options: Buffer;
1325
+ }, txnOptions?: {
1326
+ /**
1327
+ * The fee to pay for the transaction. Default: BASE_FEE
1328
+ */
1329
+ fee?: number;
1330
+ /**
1331
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1332
+ */
1333
+ timeoutInSeconds?: number;
1334
+ /**
1335
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1336
+ */
1337
+ simulate?: boolean;
1338
+ }) => Promise<AssembledTransaction<i128>>;
1339
+ /**
1340
+ * Construct and simulate a set_dst_config 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.
1341
+ * Sets destination-specific configurations for multiple endpoints.
1342
+ */
1343
+ set_dst_config: ({ admin, params }: {
1344
+ admin: string;
1345
+ params: Array<SetDstConfigParam>;
1346
+ }, txnOptions?: {
1347
+ /**
1348
+ * The fee to pay for the transaction. Default: BASE_FEE
1349
+ */
1350
+ fee?: number;
1351
+ /**
1352
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1353
+ */
1354
+ timeoutInSeconds?: number;
1355
+ /**
1356
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1357
+ */
1358
+ simulate?: boolean;
1359
+ }) => Promise<AssembledTransaction<null>>;
1360
+ /**
1361
+ * Construct and simulate a dst_config 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.
1362
+ * Returns the destination configuration for a specific endpoint.
1363
+ */
1364
+ dst_config: ({ dst_eid }: {
1365
+ dst_eid: u32;
1366
+ }, txnOptions?: {
1367
+ /**
1368
+ * The fee to pay for the transaction. Default: BASE_FEE
1369
+ */
1370
+ fee?: number;
1371
+ /**
1372
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1373
+ */
1374
+ timeoutInSeconds?: number;
1375
+ /**
1376
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1377
+ */
1378
+ simulate?: boolean;
1379
+ }) => Promise<AssembledTransaction<Option<DstConfig>>>;
1380
+ /**
1381
+ * Construct and simulate a native_drop 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.
1382
+ * Native token drops.
1383
+ *
1384
+ * Transfers native tokens to each receiver specified in the parameters and
1385
+ * tracks the success/failure status of each transfer.
1386
+ */
1387
+ native_drop: ({ admin, origin, dst_eid, oapp, native_drop_params }: {
1388
+ admin: string;
1389
+ origin: Origin;
1390
+ dst_eid: u32;
1391
+ oapp: string;
1392
+ native_drop_params: Array<NativeDropParams>;
1393
+ }, txnOptions?: {
1394
+ /**
1395
+ * The fee to pay for the transaction. Default: BASE_FEE
1396
+ */
1397
+ fee?: number;
1398
+ /**
1399
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1400
+ */
1401
+ timeoutInSeconds?: number;
1402
+ /**
1403
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1404
+ */
1405
+ simulate?: boolean;
1406
+ }) => Promise<AssembledTransaction<null>>;
1407
+ /**
1408
+ * Construct and simulate a endpoint 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.
1409
+ * Returns the endpoint address from storage.
1410
+ */
1411
+ endpoint: (txnOptions?: {
1412
+ /**
1413
+ * The fee to pay for the transaction. Default: BASE_FEE
1414
+ */
1415
+ fee?: number;
1416
+ /**
1417
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1418
+ */
1419
+ timeoutInSeconds?: number;
1420
+ /**
1421
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1422
+ */
1423
+ simulate?: boolean;
1424
+ }) => Promise<AssembledTransaction<string>>;
1425
+ /**
1426
+ * Construct and simulate a set_whitelisted_fn 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.
1427
+ * Sets whether a (contract, function) pair is whitelisted.
1428
+ * When `allowed` is false, the entry is removed from storage to save space.
1429
+ *
1430
+ * Only the contract owner can call this function.
1431
+ */
1432
+ set_whitelisted_fn: ({ contract, fn_name, allowed }: {
1433
+ contract: string;
1434
+ fn_name: string;
1435
+ allowed: boolean;
1436
+ }, txnOptions?: {
1437
+ /**
1438
+ * The fee to pay for the transaction. Default: BASE_FEE
1439
+ */
1440
+ fee?: number;
1441
+ /**
1442
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1443
+ */
1444
+ timeoutInSeconds?: number;
1445
+ /**
1446
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1447
+ */
1448
+ simulate?: boolean;
1449
+ }) => Promise<AssembledTransaction<null>>;
1450
+ /**
1451
+ * Construct and simulate a is_whitelisted_fn 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.
1452
+ * Returns whether a (contract, function) pair is whitelisted.
1453
+ */
1454
+ is_whitelisted_fn: ({ contract, fn_name }: {
1455
+ contract: string;
1456
+ fn_name: string;
1457
+ }, txnOptions?: {
1458
+ /**
1459
+ * The fee to pay for the transaction. Default: BASE_FEE
1460
+ */
1461
+ fee?: number;
1462
+ /**
1463
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1464
+ */
1465
+ timeoutInSeconds?: number;
1466
+ /**
1467
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1468
+ */
1469
+ simulate?: boolean;
1470
+ }) => Promise<AssembledTransaction<boolean>>;
1471
+ /**
1472
+ * Construct and simulate a withdraw_token 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.
1473
+ * Withdraws a token from the contract to a specified address.
1474
+ *
1475
+ * # Arguments
1476
+ * * `token` - The token contract address
1477
+ * * `to` - The recipient address
1478
+ * * `amount` - The amount to withdraw
1479
+ */
1480
+ withdraw_token: ({ admin, token, to, amount }: {
1481
+ admin: string;
1482
+ token: string;
1483
+ to: string;
1484
+ amount: i128;
1485
+ }, txnOptions?: {
1486
+ /**
1487
+ * The fee to pay for the transaction. Default: BASE_FEE
1488
+ */
1489
+ fee?: number;
1490
+ /**
1491
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1492
+ */
1493
+ timeoutInSeconds?: number;
1494
+ /**
1495
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1496
+ */
1497
+ simulate?: boolean;
1498
+ }) => Promise<AssembledTransaction<null>>;
1499
+ /**
1500
+ * Construct and simulate a set_admin 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.
1501
+ * Sets admin status for an address. Requires owner authorization.
1502
+ *
1503
+ * This is the multisig/quorum path for admin management.
1504
+ *
1505
+ * # Arguments
1506
+ * * `admin` - The address to set admin status for
1507
+ * * `active` - Whether the address should be an admin
1508
+ */
1509
+ set_admin: ({ admin, active }: {
1510
+ admin: string;
1511
+ active: boolean;
1512
+ }, txnOptions?: {
1513
+ /**
1514
+ * The fee to pay for the transaction. Default: BASE_FEE
1515
+ */
1516
+ fee?: number;
1517
+ /**
1518
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1519
+ */
1520
+ timeoutInSeconds?: number;
1521
+ /**
1522
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1523
+ */
1524
+ simulate?: boolean;
1525
+ }) => Promise<AssembledTransaction<null>>;
1526
+ /**
1527
+ * 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.
1528
+ */
1529
+ upgrade: ({ new_wasm_hash }: {
1530
+ new_wasm_hash: Buffer;
1531
+ }, txnOptions?: {
1532
+ /**
1533
+ * The fee to pay for the transaction. Default: BASE_FEE
1534
+ */
1535
+ fee?: number;
1536
+ /**
1537
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1538
+ */
1539
+ timeoutInSeconds?: number;
1540
+ /**
1541
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1542
+ */
1543
+ simulate?: boolean;
1544
+ }) => Promise<AssembledTransaction<null>>;
1545
+ /**
1546
+ * 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.
1547
+ */
1548
+ migrate: ({ migration_data }: {
1549
+ migration_data: MigrationData;
1550
+ }, txnOptions?: {
1551
+ /**
1552
+ * The fee to pay for the transaction. Default: BASE_FEE
1553
+ */
1554
+ fee?: number;
1555
+ /**
1556
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1557
+ */
1558
+ timeoutInSeconds?: number;
1559
+ /**
1560
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1561
+ */
1562
+ simulate?: boolean;
1563
+ }) => Promise<AssembledTransaction<null>>;
1564
+ /**
1565
+ * 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.
1566
+ * Extends the instance TTL.
1567
+ *
1568
+ * # Arguments
1569
+ *
1570
+ * * `threshold` - The threshold to extend the TTL.
1571
+ * * `extend_to` - The TTL to extend to.
1572
+ */
1573
+ extend_instance_ttl: ({ threshold, extend_to }: {
1574
+ threshold: u32;
1575
+ extend_to: u32;
1576
+ }, txnOptions?: {
1577
+ /**
1578
+ * The fee to pay for the transaction. Default: BASE_FEE
1579
+ */
1580
+ fee?: number;
1581
+ /**
1582
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1583
+ */
1584
+ timeoutInSeconds?: number;
1585
+ /**
1586
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1587
+ */
1588
+ simulate?: boolean;
1589
+ }) => Promise<AssembledTransaction<null>>;
1590
+ /**
1591
+ * 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.
1592
+ * Sets TTL configs for instance and persistent storage.
1593
+ *
1594
+ * - `None` values remove the corresponding config (disables auto-extension for that type)
1595
+ * - Validates that `threshold <= extend_to <= MAX_TTL`
1596
+ *
1597
+ * # Arguments
1598
+ * - `instance` - TTL config for instance storage
1599
+ * - `persistent` - TTL config for persistent storage
1600
+ *
1601
+ * # Panics
1602
+ * - `TtlConfigFrozen` if configs are frozen
1603
+ * - `InvalidTtlConfig` if validation fails
1604
+ */
1605
+ set_ttl_configs: ({ instance, persistent }: {
1606
+ instance: Option<TtlConfig>;
1607
+ persistent: Option<TtlConfig>;
1608
+ }, txnOptions?: {
1609
+ /**
1610
+ * The fee to pay for the transaction. Default: BASE_FEE
1611
+ */
1612
+ fee?: number;
1613
+ /**
1614
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1615
+ */
1616
+ timeoutInSeconds?: number;
1617
+ /**
1618
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1619
+ */
1620
+ simulate?: boolean;
1621
+ }) => Promise<AssembledTransaction<null>>;
1622
+ /**
1623
+ * 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.
1624
+ * Returns the current TTL configs as (instance_config, persistent_config).
1625
+ */
1626
+ ttl_configs: (txnOptions?: {
1627
+ /**
1628
+ * The fee to pay for the transaction. Default: BASE_FEE
1629
+ */
1630
+ fee?: number;
1631
+ /**
1632
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1633
+ */
1634
+ timeoutInSeconds?: number;
1635
+ /**
1636
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1637
+ */
1638
+ simulate?: boolean;
1639
+ }) => Promise<AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>>;
1640
+ /**
1641
+ * 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.
1642
+ * Permanently freezes TTL configs, preventing any future modifications.
1643
+ *
1644
+ * This is irreversible and provides immutability guarantees to users.
1645
+ * Emits `TtlConfigsFrozen` event.
1646
+ *
1647
+ * # Panics
1648
+ * - `TtlConfigAlreadyFrozen` if already frozen
1649
+ */
1650
+ freeze_ttl_configs: (txnOptions?: {
1651
+ /**
1652
+ * The fee to pay for the transaction. Default: BASE_FEE
1653
+ */
1654
+ fee?: number;
1655
+ /**
1656
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1657
+ */
1658
+ timeoutInSeconds?: number;
1659
+ /**
1660
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1661
+ */
1662
+ simulate?: boolean;
1663
+ }) => Promise<AssembledTransaction<null>>;
1664
+ /**
1665
+ * 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.
1666
+ * Returns whether TTL configs are frozen.
1667
+ */
1668
+ is_ttl_configs_frozen: (txnOptions?: {
1669
+ /**
1670
+ * The fee to pay for the transaction. Default: BASE_FEE
1671
+ */
1672
+ fee?: number;
1673
+ /**
1674
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1675
+ */
1676
+ timeoutInSeconds?: number;
1677
+ /**
1678
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1679
+ */
1680
+ simulate?: boolean;
1681
+ }) => Promise<AssembledTransaction<boolean>>;
1682
+ /**
1683
+ * 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.
1684
+ * Returns the current owner address, or None if no owner is set.
1685
+ */
1686
+ owner: (txnOptions?: {
1687
+ /**
1688
+ * The fee to pay for the transaction. Default: BASE_FEE
1689
+ */
1690
+ fee?: number;
1691
+ /**
1692
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1693
+ */
1694
+ timeoutInSeconds?: number;
1695
+ /**
1696
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1697
+ */
1698
+ simulate?: boolean;
1699
+ }) => Promise<AssembledTransaction<Option<string>>>;
1700
+ /**
1701
+ * 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.
1702
+ * Transfers ownership to a new address. Requires current owner authorization.
1703
+ */
1704
+ transfer_ownership: ({ new_owner }: {
1705
+ new_owner: string;
1706
+ }, txnOptions?: {
1707
+ /**
1708
+ * The fee to pay for the transaction. Default: BASE_FEE
1709
+ */
1710
+ fee?: number;
1711
+ /**
1712
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1713
+ */
1714
+ timeoutInSeconds?: number;
1715
+ /**
1716
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1717
+ */
1718
+ simulate?: boolean;
1719
+ }) => Promise<AssembledTransaction<null>>;
1720
+ /**
1721
+ * 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.
1722
+ * Permanently renounces ownership. Requires current owner authorization.
1723
+ */
1724
+ renounce_ownership: (txnOptions?: {
1725
+ /**
1726
+ * The fee to pay for the transaction. Default: BASE_FEE
1727
+ */
1728
+ fee?: number;
1729
+ /**
1730
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1731
+ */
1732
+ timeoutInSeconds?: number;
1733
+ /**
1734
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1735
+ */
1736
+ simulate?: boolean;
1737
+ }) => Promise<AssembledTransaction<null>>;
1738
+ }
1739
+ export declare class Client extends ContractClient {
1740
+ readonly options: ContractClientOptions;
1741
+ static deploy<T = Client>(
1742
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
1743
+ { endpoint, owner, admins, message_libs, price_feed, default_multiplier_bps, whitelist, worker_fee_lib, deposit_address }: {
1744
+ endpoint: string;
1745
+ owner: string;
1746
+ admins: Array<string>;
1747
+ message_libs: Array<string>;
1748
+ price_feed: string;
1749
+ default_multiplier_bps: u32;
1750
+ whitelist: Array<readonly [string, string]>;
1751
+ worker_fee_lib: string;
1752
+ deposit_address: string;
1753
+ },
1754
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
1755
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
1756
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
1757
+ wasmHash: Buffer | string;
1758
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
1759
+ salt?: Buffer | Uint8Array;
1760
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
1761
+ format?: "hex" | "base64";
1762
+ }): Promise<AssembledTransaction<T>>;
1763
+ constructor(options: ContractClientOptions);
1764
+ readonly fromJSON: {
1765
+ set_paused: (json: string) => AssembledTransaction<null>;
1766
+ set_supported_message_lib: (json: string) => AssembledTransaction<null>;
1767
+ set_allowlist: (json: string) => AssembledTransaction<null>;
1768
+ set_denylist: (json: string) => AssembledTransaction<null>;
1769
+ set_default_multiplier_bps: (json: string) => AssembledTransaction<null>;
1770
+ set_deposit_address: (json: string) => AssembledTransaction<null>;
1771
+ set_supported_option_types: (json: string) => AssembledTransaction<null>;
1772
+ set_worker_fee_lib: (json: string) => AssembledTransaction<null>;
1773
+ set_price_feed: (json: string) => AssembledTransaction<null>;
1774
+ is_admin: (json: string) => AssembledTransaction<boolean>;
1775
+ admins: (json: string) => AssembledTransaction<string[]>;
1776
+ paused: (json: string) => AssembledTransaction<boolean>;
1777
+ is_supported_message_lib: (json: string) => AssembledTransaction<boolean>;
1778
+ message_libs: (json: string) => AssembledTransaction<string[]>;
1779
+ is_on_allowlist: (json: string) => AssembledTransaction<boolean>;
1780
+ is_on_denylist: (json: string) => AssembledTransaction<boolean>;
1781
+ has_acl: (json: string) => AssembledTransaction<boolean>;
1782
+ allowlist_size: (json: string) => AssembledTransaction<number>;
1783
+ default_multiplier_bps: (json: string) => AssembledTransaction<number>;
1784
+ deposit_address: (json: string) => AssembledTransaction<string>;
1785
+ price_feed: (json: string) => AssembledTransaction<string>;
1786
+ get_supported_option_types: (json: string) => AssembledTransaction<Option<Buffer<ArrayBufferLike>>>;
1787
+ worker_fee_lib: (json: string) => AssembledTransaction<string>;
1788
+ assign_job: (json: string) => AssembledTransaction<FeeRecipient>;
1789
+ get_fee: (json: string) => AssembledTransaction<bigint>;
1790
+ set_dst_config: (json: string) => AssembledTransaction<null>;
1791
+ dst_config: (json: string) => AssembledTransaction<Option<DstConfig>>;
1792
+ native_drop: (json: string) => AssembledTransaction<null>;
1793
+ endpoint: (json: string) => AssembledTransaction<string>;
1794
+ set_whitelisted_fn: (json: string) => AssembledTransaction<null>;
1795
+ is_whitelisted_fn: (json: string) => AssembledTransaction<boolean>;
1796
+ withdraw_token: (json: string) => AssembledTransaction<null>;
1797
+ set_admin: (json: string) => AssembledTransaction<null>;
1798
+ upgrade: (json: string) => AssembledTransaction<null>;
1799
+ migrate: (json: string) => AssembledTransaction<null>;
1800
+ extend_instance_ttl: (json: string) => AssembledTransaction<null>;
1801
+ set_ttl_configs: (json: string) => AssembledTransaction<null>;
1802
+ ttl_configs: (json: string) => AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>;
1803
+ freeze_ttl_configs: (json: string) => AssembledTransaction<null>;
1804
+ is_ttl_configs_frozen: (json: string) => AssembledTransaction<boolean>;
1805
+ owner: (json: string) => AssembledTransaction<Option<string>>;
1806
+ transfer_ownership: (json: string) => AssembledTransaction<null>;
1807
+ renounce_ownership: (json: string) => AssembledTransaction<null>;
1808
+ };
1809
+ }