@layerzerolabs/protocol-stellar-v2 0.2.121 → 0.2.122

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 (752) hide show
  1. package/Cargo.toml +22 -37
  2. package/docs/error-spec.md +24 -24
  3. package/docs/layerzero-v2-on-stellar.md +8 -6
  4. package/docs/oapp-guide.md +2 -402
  5. package/docs/oft-guide.md +2 -401
  6. package/{contracts/endpoint-v2 → endpoint-v2}/Cargo.toml +3 -2
  7. package/{contracts/layerzero-views → layerzero-views}/Cargo.toml +1 -6
  8. package/{contracts/message-libs → message-libs}/blocked-message-lib/Cargo.toml +0 -1
  9. package/{contracts/message-libs → message-libs}/message-lib-common/Cargo.toml +2 -2
  10. package/{contracts/message-libs → message-libs}/simple-message-lib/Cargo.toml +1 -2
  11. package/{contracts/message-libs → message-libs}/treasury/Cargo.toml +1 -2
  12. package/{contracts/message-libs → message-libs}/uln-302/Cargo.toml +3 -2
  13. package/package.json +32 -15
  14. package/rustfmt.toml +0 -2
  15. package/{contracts/upgrader → upgrader}/Cargo.toml +0 -1
  16. package/{contracts/workers → workers}/dvn/Cargo.toml +1 -2
  17. package/{contracts/workers → workers}/dvn-fee-lib/Cargo.toml +1 -2
  18. package/{contracts/workers → workers}/executor/Cargo.toml +3 -2
  19. package/{contracts/workers → workers}/executor-fee-lib/Cargo.toml +1 -2
  20. package/{contracts/workers → workers}/executor-helper/Cargo.toml +0 -1
  21. package/{contracts/workers → workers}/fee-lib-interfaces/Cargo.toml +0 -1
  22. package/{contracts/workers → workers}/price-feed/Cargo.toml +1 -2
  23. package/{contracts/workers → workers}/worker/Cargo.toml +0 -1
  24. package/.turbo/turbo-build.log +0 -1363
  25. package/.turbo/turbo-lint.log +0 -401
  26. package/.turbo/turbo-test.log +0 -1952
  27. package/Cargo.lock +0 -2357
  28. package/contracts/common-macros/Cargo.toml +0 -20
  29. package/contracts/common-macros/src/auth.rs +0 -95
  30. package/contracts/common-macros/src/contract_ttl.rs +0 -92
  31. package/contracts/common-macros/src/error.rs +0 -43
  32. package/contracts/common-macros/src/lib.rs +0 -585
  33. package/contracts/common-macros/src/lz_contract.rs +0 -105
  34. package/contracts/common-macros/src/rbac.rs +0 -90
  35. package/contracts/common-macros/src/storage.rs +0 -522
  36. package/contracts/common-macros/src/tests/auth.rs +0 -230
  37. package/contracts/common-macros/src/tests/contract_ttl.rs +0 -695
  38. package/contracts/common-macros/src/tests/error.rs +0 -156
  39. package/contracts/common-macros/src/tests/lz_contract.rs +0 -87
  40. package/contracts/common-macros/src/tests/mod.rs +0 -11
  41. package/contracts/common-macros/src/tests/rbac.rs +0 -523
  42. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__auth__snapshot_generated_multisig_code.snap +0 -31
  43. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__auth__snapshot_generated_ownable_code.snap +0 -39
  44. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__auth__snapshot_only_auth_preserves_function_signature.snap +0 -19
  45. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__contract_ttl__snapshot_generated_contractimpl_code.snap +0 -77
  46. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__contract_ttl__snapshot_generated_contracttrait_code.snap +0 -46
  47. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__error__snapshot_generated_contract_error_code.snap +0 -20
  48. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__lz_contract__snapshot_generated_lz_contract_code.snap +0 -51
  49. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__rbac__snapshot_authorizer_role.snap +0 -21
  50. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__rbac__snapshot_preserve_function_signature.snap +0 -21
  51. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ttl_configurable__snapshot_generated_ttl_configurable_code.snap +0 -10
  52. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ttl_extendable__snapshot_generated_ttl_extendable_code.snap +0 -8
  53. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__upgradeable__snapshot_generated_upgradeable_code.snap +0 -28
  54. package/contracts/common-macros/src/tests/storage/extract_fields.rs +0 -87
  55. package/contracts/common-macros/src/tests/storage/gen_accessor_methods.rs +0 -223
  56. package/contracts/common-macros/src/tests/storage/gen_args.rs +0 -65
  57. package/contracts/common-macros/src/tests/storage/gen_enum_variant.rs +0 -78
  58. package/contracts/common-macros/src/tests/storage/gen_key.rs +0 -108
  59. package/contracts/common-macros/src/tests/storage/gen_params.rs +0 -105
  60. package/contracts/common-macros/src/tests/storage/generate_storage.rs +0 -410
  61. package/contracts/common-macros/src/tests/storage/is_primitive_type.rs +0 -48
  62. package/contracts/common-macros/src/tests/storage/mod.rs +0 -16
  63. package/contracts/common-macros/src/tests/storage/parse_default.rs +0 -164
  64. package/contracts/common-macros/src/tests/storage/parse_name.rs +0 -158
  65. package/contracts/common-macros/src/tests/storage/parse_no_ttl_extension.rs +0 -124
  66. package/contracts/common-macros/src/tests/storage/parse_storage_type.rs +0 -174
  67. package/contracts/common-macros/src/tests/storage/snapshots/common_macros__tests__storage__generate_storage__snapshot_generated_storage_code.snap +0 -412
  68. package/contracts/common-macros/src/tests/storage/storage_kind.rs +0 -39
  69. package/contracts/common-macros/src/tests/storage/test_setup.rs +0 -25
  70. package/contracts/common-macros/src/tests/storage/validate_attrs.rs +0 -138
  71. package/contracts/common-macros/src/tests/storage/variant_config.rs +0 -226
  72. package/contracts/common-macros/src/tests/test_helpers.rs +0 -87
  73. package/contracts/common-macros/src/tests/ttl_configurable.rs +0 -34
  74. package/contracts/common-macros/src/tests/ttl_extendable.rs +0 -32
  75. package/contracts/common-macros/src/tests/upgradeable.rs +0 -169
  76. package/contracts/common-macros/src/tests/utils.rs +0 -267
  77. package/contracts/common-macros/src/ttl_configurable.rs +0 -24
  78. package/contracts/common-macros/src/ttl_extendable.rs +0 -28
  79. package/contracts/common-macros/src/upgradeable.rs +0 -136
  80. package/contracts/common-macros/src/utils.rs +0 -56
  81. package/contracts/macro-integration-tests/Cargo.toml +0 -20
  82. package/contracts/macro-integration-tests/src/lib.rs +0 -1
  83. package/contracts/macro-integration-tests/tests/runtime/contract_ttl/constructor.rs +0 -61
  84. package/contracts/macro-integration-tests/tests/runtime/contract_ttl/contract_impl_ttl_extension.rs +0 -97
  85. package/contracts/macro-integration-tests/tests/runtime/contract_ttl/contract_trait_ttl_extension.rs +0 -99
  86. package/contracts/macro-integration-tests/tests/runtime/contract_ttl/mod.rs +0 -3
  87. package/contracts/macro-integration-tests/tests/runtime/lz_contract/mod.rs +0 -5
  88. package/contracts/macro-integration-tests/tests/runtime/lz_contract/wrapper_default.rs +0 -86
  89. package/contracts/macro-integration-tests/tests/runtime/lz_contract/wrapper_multisig.rs +0 -47
  90. package/contracts/macro-integration-tests/tests/runtime/lz_contract/wrapper_multisig_upgradeable.rs +0 -77
  91. package/contracts/macro-integration-tests/tests/runtime/lz_contract/wrapper_upgradeable.rs +0 -114
  92. package/contracts/macro-integration-tests/tests/runtime/lz_contract/wrapper_upgradeable_no_migration.rs +0 -105
  93. package/contracts/macro-integration-tests/tests/runtime/multisig/admin_entrypoints.rs +0 -242
  94. package/contracts/macro-integration-tests/tests/runtime/multisig/mod.rs +0 -9
  95. package/contracts/macro-integration-tests/tests/runtime/multisig/self_auth.rs +0 -54
  96. package/contracts/macro-integration-tests/tests/runtime/oapp/mod.rs +0 -46
  97. package/contracts/macro-integration-tests/tests/runtime/oapp/oapp_core.rs +0 -170
  98. package/contracts/macro-integration-tests/tests/runtime/oapp/options_type3.rs +0 -154
  99. package/contracts/macro-integration-tests/tests/runtime/oapp/receiver.rs +0 -338
  100. package/contracts/macro-integration-tests/tests/runtime/oapp/sender.rs +0 -437
  101. package/contracts/macro-integration-tests/tests/runtime/ownable/initialization.rs +0 -78
  102. package/contracts/macro-integration-tests/tests/runtime/ownable/mod.rs +0 -23
  103. package/contracts/macro-integration-tests/tests/runtime/ownable/only_auth_guard.rs +0 -97
  104. package/contracts/macro-integration-tests/tests/runtime/ownable/ownership_transfer.rs +0 -170
  105. package/contracts/macro-integration-tests/tests/runtime/ownable/two_step_transfer.rs +0 -221
  106. package/contracts/macro-integration-tests/tests/runtime/rbac/guard_behavior.rs +0 -91
  107. package/contracts/macro-integration-tests/tests/runtime/rbac/mod.rs +0 -30
  108. package/contracts/macro-integration-tests/tests/runtime/storage/keyed_roundtrip.rs +0 -266
  109. package/contracts/macro-integration-tests/tests/runtime/storage/mod.rs +0 -4
  110. package/contracts/macro-integration-tests/tests/runtime/storage/name_override_runtime.rs +0 -52
  111. package/contracts/macro-integration-tests/tests/runtime/storage/ttl_extension.rs +0 -293
  112. package/contracts/macro-integration-tests/tests/runtime/storage/unkeyed_roundtrip.rs +0 -147
  113. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/configuration.rs +0 -206
  114. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/freeze.rs +0 -143
  115. package/contracts/macro-integration-tests/tests/runtime/ttl_configurable/mod.rs +0 -2
  116. package/contracts/macro-integration-tests/tests/runtime/ttl_extendable/extend_instance_ttl.rs +0 -64
  117. package/contracts/macro-integration-tests/tests/runtime/ttl_extendable/mod.rs +0 -16
  118. package/contracts/macro-integration-tests/tests/runtime/upgradeable/migrate_guard_and_state.rs +0 -243
  119. package/contracts/macro-integration-tests/tests/runtime/upgradeable/mod.rs +0 -3
  120. package/contracts/macro-integration-tests/tests/runtime/upgradeable/no_migration.rs +0 -59
  121. package/contracts/macro-integration-tests/tests/runtime/upgradeable/upgrade_then_migrate.rs +0 -88
  122. package/contracts/macro-integration-tests/tests/runtime.rs +0 -11
  123. package/contracts/macro-integration-tests/tests/ui/contract_impl/fail/not_impl_item.rs +0 -6
  124. package/contracts/macro-integration-tests/tests/ui/contract_impl/fail/not_impl_item.stderr +0 -7
  125. package/contracts/macro-integration-tests/tests/ui/contract_impl/pass/basic.rs +0 -102
  126. package/contracts/macro-integration-tests/tests/ui/contract_trait/fail/not_a_trait.rs +0 -6
  127. package/contracts/macro-integration-tests/tests/ui/contract_trait/fail/not_a_trait.stderr +0 -7
  128. package/contracts/macro-integration-tests/tests/ui/contract_trait/pass/basic.rs +0 -83
  129. package/contracts/macro-integration-tests/tests/ui/error/fail/decreasing_discriminant.rs +0 -12
  130. package/contracts/macro-integration-tests/tests/ui/error/fail/decreasing_discriminant.stderr +0 -7
  131. package/contracts/macro-integration-tests/tests/ui/error/fail/discriminant_too_large.rs +0 -11
  132. package/contracts/macro-integration-tests/tests/ui/error/fail/discriminant_too_large.stderr +0 -7
  133. package/contracts/macro-integration-tests/tests/ui/error/fail/non_enum_input.rs +0 -11
  134. package/contracts/macro-integration-tests/tests/ui/error/fail/non_enum_input.stderr +0 -7
  135. package/contracts/macro-integration-tests/tests/ui/error/fail/non_int_discriminant.rs +0 -21
  136. package/contracts/macro-integration-tests/tests/ui/error/fail/non_int_discriminant.stderr +0 -7
  137. package/contracts/macro-integration-tests/tests/ui/error/fail/non_unit_variant.rs +0 -13
  138. package/contracts/macro-integration-tests/tests/ui/error/fail/non_unit_variant.stderr +0 -7
  139. package/contracts/macro-integration-tests/tests/ui/error/pass/basic.rs +0 -22
  140. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/invalid_option.rs +0 -6
  141. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/invalid_option.stderr +0 -7
  142. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/multisig_rejects_ownable_api.rs +0 -20
  143. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/multisig_rejects_ownable_api.stderr +0 -20
  144. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/not_a_struct.rs +0 -8
  145. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/not_a_struct.stderr +0 -7
  146. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/upgradeable_invalid_inner_option.rs +0 -10
  147. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/upgradeable_invalid_inner_option.stderr +0 -30
  148. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/upgradeable_missing_internal.rs +0 -20
  149. package/contracts/macro-integration-tests/tests/ui/lz_contract/fail/upgradeable_missing_internal.stderr +0 -56
  150. package/contracts/macro-integration-tests/tests/ui/lz_contract/pass/basic.rs +0 -45
  151. package/contracts/macro-integration-tests/tests/ui/lz_contract/pass/multisig.rs +0 -34
  152. package/contracts/macro-integration-tests/tests/ui/lz_contract/pass/multisig_upgradeable.rs +0 -30
  153. package/contracts/macro-integration-tests/tests/ui/lz_contract/pass/upgradeable.rs +0 -39
  154. package/contracts/macro-integration-tests/tests/ui/lz_contract/pass/upgradeable_no_migration.rs +0 -28
  155. package/contracts/macro-integration-tests/tests/ui/lz_contract/pass/upgradeable_rbac.rs +0 -44
  156. package/contracts/macro-integration-tests/tests/ui/multisig/fail/non_struct_input.rs +0 -8
  157. package/contracts/macro-integration-tests/tests/ui/multisig/fail/non_struct_input.stderr +0 -7
  158. package/contracts/macro-integration-tests/tests/ui/multisig/fail/rejects_ownable_api.rs +0 -20
  159. package/contracts/macro-integration-tests/tests/ui/multisig/fail/rejects_ownable_api.stderr +0 -12
  160. package/contracts/macro-integration-tests/tests/ui/multisig/fail/rejects_ownable_trait.rs +0 -20
  161. package/contracts/macro-integration-tests/tests/ui/multisig/fail/rejects_ownable_trait.stderr +0 -5
  162. package/contracts/macro-integration-tests/tests/ui/multisig/pass/basic.rs +0 -49
  163. package/contracts/macro-integration-tests/tests/ui/oapp/fail/custom_wrong_value.rs +0 -8
  164. package/contracts/macro-integration-tests/tests/ui/oapp/fail/custom_wrong_value.stderr +0 -7
  165. package/contracts/macro-integration-tests/tests/ui/oapp/fail/missing_auth_trait.rs +0 -28
  166. package/contracts/macro-integration-tests/tests/ui/oapp/fail/missing_auth_trait.stderr +0 -397
  167. package/contracts/macro-integration-tests/tests/ui/oapp/fail/missing_lz_receive_internal.rs +0 -9
  168. package/contracts/macro-integration-tests/tests/ui/oapp/fail/missing_lz_receive_internal.stderr +0 -71
  169. package/contracts/macro-integration-tests/tests/ui/oapp/fail/non_struct_input.rs +0 -10
  170. package/contracts/macro-integration-tests/tests/ui/oapp/fail/non_struct_input.stderr +0 -7
  171. package/contracts/macro-integration-tests/tests/ui/oapp/fail/unknown_custom_option.rs +0 -8
  172. package/contracts/macro-integration-tests/tests/ui/oapp/fail/unknown_custom_option.stderr +0 -7
  173. package/contracts/macro-integration-tests/tests/ui/oapp/fail/wrong_key.rs +0 -8
  174. package/contracts/macro-integration-tests/tests/ui/oapp/fail/wrong_key.stderr +0 -7
  175. package/contracts/macro-integration-tests/tests/ui/oapp/pass/custom_all.rs +0 -42
  176. package/contracts/macro-integration-tests/tests/ui/oapp/pass/custom_single_trait.rs +0 -103
  177. package/contracts/macro-integration-tests/tests/ui/oapp/pass/minimal_contract.rs +0 -65
  178. package/contracts/macro-integration-tests/tests/ui/oapp/pass/struct_with_fields.rs +0 -48
  179. package/contracts/macro-integration-tests/tests/ui/ownable/fail/non_struct_input.rs +0 -8
  180. package/contracts/macro-integration-tests/tests/ui/ownable/fail/non_struct_input.stderr +0 -7
  181. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_auth_missing_auth.rs +0 -19
  182. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_auth_missing_auth.stderr +0 -12
  183. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_auth_missing_env.rs +0 -22
  184. package/contracts/macro-integration-tests/tests/ui/ownable/fail/only_auth_missing_env.stderr +0 -16
  185. package/contracts/macro-integration-tests/tests/ui/ownable/pass/basic.rs +0 -39
  186. package/contracts/macro-integration-tests/tests/ui/ownable/pass/only_auth_env_param_variants.rs +0 -52
  187. package/contracts/macro-integration-tests/tests/ui/rbac/fail/missing_env.rs +0 -18
  188. package/contracts/macro-integration-tests/tests/ui/rbac/fail/missing_env.stderr +0 -16
  189. package/contracts/macro-integration-tests/tests/ui/rbac/fail/param_not_address.rs +0 -18
  190. package/contracts/macro-integration-tests/tests/ui/rbac/fail/param_not_address.stderr +0 -24
  191. package/contracts/macro-integration-tests/tests/ui/rbac/fail/param_not_found.rs +0 -18
  192. package/contracts/macro-integration-tests/tests/ui/rbac/fail/param_not_found.stderr +0 -24
  193. package/contracts/macro-integration-tests/tests/ui/rbac/pass/basic.rs +0 -80
  194. package/contracts/macro-integration-tests/tests/ui/storage/fail/invalid_storage_type_param.rs +0 -13
  195. package/contracts/macro-integration-tests/tests/ui/storage/fail/invalid_storage_type_param.stderr +0 -7
  196. package/contracts/macro-integration-tests/tests/ui/storage/fail/missing_storage_type_param.rs +0 -13
  197. package/contracts/macro-integration-tests/tests/ui/storage/fail/missing_storage_type_param.stderr +0 -7
  198. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_default_values.rs +0 -11
  199. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_default_values.stderr +0 -7
  200. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_name_attrs.rs +0 -11
  201. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_name_attrs.stderr +0 -7
  202. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_no_ttl_extension.rs +0 -11
  203. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_no_ttl_extension.stderr +0 -7
  204. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_storage_kinds.rs +0 -10
  205. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_storage_kinds.stderr +0 -7
  206. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_type_params.rs +0 -12
  207. package/contracts/macro-integration-tests/tests/ui/storage/fail/multiple_type_params.stderr +0 -7
  208. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_on_non_persistent.rs +0 -10
  209. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_on_non_persistent.stderr +0 -7
  210. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_rejects_args.rs +0 -13
  211. package/contracts/macro-integration-tests/tests/ui/storage/fail/no_ttl_extension_rejects_args.stderr +0 -7
  212. package/contracts/macro-integration-tests/tests/ui/storage/fail/non_enum_input.rs +0 -10
  213. package/contracts/macro-integration-tests/tests/ui/storage/fail/non_enum_input.stderr +0 -7
  214. package/contracts/macro-integration-tests/tests/ui/storage/fail/tuple_variant_rejected.rs +0 -13
  215. package/contracts/macro-integration-tests/tests/ui/storage/fail/tuple_variant_rejected.stderr +0 -7
  216. package/contracts/macro-integration-tests/tests/ui/storage/fail/unknown_variant_attr.rs +0 -13
  217. package/contracts/macro-integration-tests/tests/ui/storage/fail/unknown_variant_attr.stderr +0 -7
  218. package/contracts/macro-integration-tests/tests/ui/storage/pass/api_surface.rs +0 -102
  219. package/contracts/macro-integration-tests/tests/ui/storage/pass/basic.rs +0 -43
  220. package/contracts/macro-integration-tests/tests/ui/storage/pass/multi_key.rs +0 -38
  221. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/fail/missing_auth_trait.rs +0 -14
  222. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/fail/missing_auth_trait.stderr +0 -71
  223. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/fail/non_struct_input.rs +0 -8
  224. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/fail/non_struct_input.stderr +0 -7
  225. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/pass/basic.rs +0 -46
  226. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/pass/multisig_contract.rs +0 -28
  227. package/contracts/macro-integration-tests/tests/ui/ttl_configurable/pass/ownable_contract.rs +0 -32
  228. package/contracts/macro-integration-tests/tests/ui/ttl_extendable/fail/non_struct_input.rs +0 -8
  229. package/contracts/macro-integration-tests/tests/ui/ttl_extendable/fail/non_struct_input.stderr +0 -7
  230. package/contracts/macro-integration-tests/tests/ui/ttl_extendable/pass/basic.rs +0 -23
  231. package/contracts/macro-integration-tests/tests/ui/ttl_extendable/pass/no_user_contractimpl.rs +0 -21
  232. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/attr_args.rs +0 -11
  233. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/attr_args.stderr +0 -29
  234. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/missing_auth_trait.rs +0 -20
  235. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/missing_auth_trait.stderr +0 -41
  236. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/missing_upgradeable_internal.rs +0 -10
  237. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/missing_upgradeable_internal.stderr +0 -49
  238. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/non_struct_input.rs +0 -8
  239. package/contracts/macro-integration-tests/tests/ui/upgradeable/fail/non_struct_input.stderr +0 -7
  240. package/contracts/macro-integration-tests/tests/ui/upgradeable/pass/basic.rs +0 -41
  241. package/contracts/macro-integration-tests/tests/ui/upgradeable/pass/multisig_contract.rs +0 -33
  242. package/contracts/macro-integration-tests/tests/ui/upgradeable/pass/no_migration.rs +0 -28
  243. package/contracts/macro-integration-tests/tests/ui/upgradeable/pass/no_user_contractimpl.rs +0 -27
  244. package/contracts/macro-integration-tests/tests/ui/upgradeable/pass/rbac.rs +0 -44
  245. package/contracts/macro-integration-tests/tests/ui_contract_impl.rs +0 -12
  246. package/contracts/macro-integration-tests/tests/ui_contract_trait.rs +0 -12
  247. package/contracts/macro-integration-tests/tests/ui_error.rs +0 -11
  248. package/contracts/macro-integration-tests/tests/ui_lz_contract.rs +0 -11
  249. package/contracts/macro-integration-tests/tests/ui_multisig.rs +0 -11
  250. package/contracts/macro-integration-tests/tests/ui_oapp.rs +0 -11
  251. package/contracts/macro-integration-tests/tests/ui_ownable.rs +0 -11
  252. package/contracts/macro-integration-tests/tests/ui_rbac.rs +0 -12
  253. package/contracts/macro-integration-tests/tests/ui_storage.rs +0 -11
  254. package/contracts/macro-integration-tests/tests/ui_ttl_configurable.rs +0 -12
  255. package/contracts/macro-integration-tests/tests/ui_ttl_extendable.rs +0 -12
  256. package/contracts/macro-integration-tests/tests/ui_upgradeable.rs +0 -11
  257. package/contracts/message-libs/Cargo.toml +0 -12
  258. package/contracts/message-libs/lib.rs +0 -2
  259. package/contracts/oapps/Cargo.toml +0 -12
  260. package/contracts/oapps/counter/Cargo.toml +0 -39
  261. package/contracts/oapps/counter/integration_tests/mod.rs +0 -7
  262. package/contracts/oapps/counter/integration_tests/setup_sml.rs +0 -171
  263. package/contracts/oapps/counter/integration_tests/setup_uln.rs +0 -1019
  264. package/contracts/oapps/counter/integration_tests/signing.rs +0 -62
  265. package/contracts/oapps/counter/integration_tests/test_with_blocked.rs +0 -67
  266. package/contracts/oapps/counter/integration_tests/test_with_sml.rs +0 -135
  267. package/contracts/oapps/counter/integration_tests/test_with_uln.rs +0 -314
  268. package/contracts/oapps/counter/integration_tests/utils.rs +0 -294
  269. package/contracts/oapps/counter/src/codec.rs +0 -62
  270. package/contracts/oapps/counter/src/counter.rs +0 -274
  271. package/contracts/oapps/counter/src/errors.rs +0 -9
  272. package/contracts/oapps/counter/src/lib.rs +0 -16
  273. package/contracts/oapps/counter/src/options.rs +0 -30
  274. package/contracts/oapps/counter/src/storage.rs +0 -32
  275. package/contracts/oapps/counter/src/tests/mod.rs +0 -24
  276. package/contracts/oapps/counter/src/tests/test_codec.rs +0 -64
  277. package/contracts/oapps/counter/src/tests/test_counter.rs +0 -387
  278. package/contracts/oapps/counter/src/tests/test_u256_ext.rs +0 -48
  279. package/contracts/oapps/counter/src/u256_ext.rs +0 -21
  280. package/contracts/oapps/lib.rs +0 -2
  281. package/contracts/oapps/oapp/Cargo.toml +0 -22
  282. package/contracts/oapps/oapp/src/errors.rs +0 -13
  283. package/contracts/oapps/oapp/src/interfaces/mod.rs +0 -3
  284. package/contracts/oapps/oapp/src/interfaces/oapp_msg_inspector.rs +0 -70
  285. package/contracts/oapps/oapp/src/lib.rs +0 -15
  286. package/contracts/oapps/oapp/src/oapp_core.rs +0 -143
  287. package/contracts/oapps/oapp/src/oapp_options_type3.rs +0 -133
  288. package/contracts/oapps/oapp/src/oapp_receiver.rs +0 -195
  289. package/contracts/oapps/oapp/src/oapp_sender.rs +0 -152
  290. package/contracts/oapps/oapp/src/tests/mod.rs +0 -5
  291. package/contracts/oapps/oapp/src/tests/oapp_core.rs +0 -225
  292. package/contracts/oapps/oapp/src/tests/oapp_options_type3.rs +0 -246
  293. package/contracts/oapps/oapp/src/tests/oapp_receiver.rs +0 -383
  294. package/contracts/oapps/oapp/src/tests/oapp_sender.rs +0 -570
  295. package/contracts/oapps/oapp/src/tests/test_macros.rs +0 -434
  296. package/contracts/oapps/oapp-macros/Cargo.toml +0 -18
  297. package/contracts/oapps/oapp-macros/src/generators.rs +0 -147
  298. package/contracts/oapps/oapp-macros/src/lib.rs +0 -166
  299. package/contracts/oapps/oapp-macros/src/tests/mod.rs +0 -2
  300. package/contracts/oapps/oapp-macros/src/tests/oapp.rs +0 -74
  301. package/contracts/oapps/oapp-macros/src/tests/parse_custom_impls.rs +0 -90
  302. package/contracts/oapps/oapp-macros/src/tests/snapshots/oapp_macros__tests__oapp__snapshot_generate_oapp.snap +0 -111
  303. package/contracts/oapps/oft/Cargo.toml +0 -30
  304. package/contracts/oapps/oft/integration-tests/extensions/mod.rs +0 -3
  305. package/contracts/oapps/oft/integration-tests/extensions/test_oft_fee.rs +0 -172
  306. package/contracts/oapps/oft/integration-tests/extensions/test_pausable.rs +0 -161
  307. package/contracts/oapps/oft/integration-tests/extensions/test_rate_limiter.rs +0 -336
  308. package/contracts/oapps/oft/integration-tests/mod.rs +0 -3
  309. package/contracts/oapps/oft/integration-tests/setup.rs +0 -306
  310. package/contracts/oapps/oft/integration-tests/utils.rs +0 -609
  311. package/contracts/oapps/oft/src/extensions/mod.rs +0 -3
  312. package/contracts/oapps/oft/src/extensions/oft_fee.rs +0 -281
  313. package/contracts/oapps/oft/src/extensions/pausable.rs +0 -119
  314. package/contracts/oapps/oft/src/extensions/rate_limiter.rs +0 -286
  315. package/contracts/oapps/oft/src/interfaces/mintable.rs +0 -14
  316. package/contracts/oapps/oft/src/interfaces/mod.rs +0 -3
  317. package/contracts/oapps/oft/src/lib.rs +0 -24
  318. package/contracts/oapps/oft/src/oft.rs +0 -176
  319. package/contracts/oapps/oft/src/oft_types/lock_unlock.rs +0 -50
  320. package/contracts/oapps/oft/src/oft_types/mint_burn.rs +0 -51
  321. package/contracts/oapps/oft/src/oft_types/mod.rs +0 -24
  322. package/contracts/oapps/oft/src/tests/extensions/mod.rs +0 -3
  323. package/contracts/oapps/oft/src/tests/extensions/oft_fee.rs +0 -260
  324. package/contracts/oapps/oft/src/tests/extensions/pausable.rs +0 -155
  325. package/contracts/oapps/oft/src/tests/extensions/rate_limiter.rs +0 -601
  326. package/contracts/oapps/oft/src/tests/mod.rs +0 -2
  327. package/contracts/oapps/oft/src/tests/oft_types/lock_unlock.rs +0 -185
  328. package/contracts/oapps/oft/src/tests/oft_types/mod.rs +0 -1
  329. package/contracts/oapps/oft-core/Cargo.toml +0 -24
  330. package/contracts/oapps/oft-core/integration-tests/mod.rs +0 -3
  331. package/contracts/oapps/oft-core/integration-tests/setup.rs +0 -346
  332. package/contracts/oapps/oft-core/integration-tests/test_with_sml.rs +0 -156
  333. package/contracts/oapps/oft-core/integration-tests/utils.rs +0 -220
  334. package/contracts/oapps/oft-core/src/codec/mod.rs +0 -2
  335. package/contracts/oapps/oft-core/src/codec/oft_compose_msg_codec.rs +0 -55
  336. package/contracts/oapps/oft-core/src/codec/oft_msg_codec.rs +0 -58
  337. package/contracts/oapps/oft-core/src/errors.rs +0 -15
  338. package/contracts/oapps/oft-core/src/events.rs +0 -32
  339. package/contracts/oapps/oft-core/src/lib.rs +0 -22
  340. package/contracts/oapps/oft-core/src/oft_core.rs +0 -594
  341. package/contracts/oapps/oft-core/src/storage.rs +0 -19
  342. package/contracts/oapps/oft-core/src/tests/mod.rs +0 -14
  343. package/contracts/oapps/oft-core/src/tests/test_decimals.rs +0 -124
  344. package/contracts/oapps/oft-core/src/tests/test_lz_receive.rs +0 -282
  345. package/contracts/oapps/oft-core/src/tests/test_msg_inspector.rs +0 -324
  346. package/contracts/oapps/oft-core/src/tests/test_oft_compose_msg_codec.rs +0 -68
  347. package/contracts/oapps/oft-core/src/tests/test_oft_msg_codec.rs +0 -64
  348. package/contracts/oapps/oft-core/src/tests/test_oft_version_and_approval.rs +0 -22
  349. package/contracts/oapps/oft-core/src/tests/test_quote_oft.rs +0 -159
  350. package/contracts/oapps/oft-core/src/tests/test_quote_send.rs +0 -195
  351. package/contracts/oapps/oft-core/src/tests/test_resolve_address.rs +0 -37
  352. package/contracts/oapps/oft-core/src/tests/test_send.rs +0 -915
  353. package/contracts/oapps/oft-core/src/tests/test_token.rs +0 -47
  354. package/contracts/oapps/oft-core/src/tests/test_utils.rs +0 -870
  355. package/contracts/oapps/oft-core/src/types.rs +0 -58
  356. package/contracts/oapps/oft-core/src/utils.rs +0 -71
  357. package/contracts/oapps/sac-manager/Cargo.toml +0 -24
  358. package/contracts/oapps/sac-manager/src/interfaces/mod.rs +0 -3
  359. package/contracts/oapps/sac-manager/src/interfaces/sac_admin_wrapper.rs +0 -49
  360. package/contracts/oapps/sac-manager/src/lib.rs +0 -19
  361. package/contracts/oapps/sac-manager/src/sac_manager.rs +0 -95
  362. package/contracts/oapps/sac-manager/src/storage.rs +0 -13
  363. package/contracts/oapps/sac-manager/src/tests/mod.rs +0 -10
  364. package/contracts/oapps/sac-manager/src/tests/sac_manager/clawback.rs +0 -84
  365. package/contracts/oapps/sac-manager/src/tests/sac_manager/mint.rs +0 -53
  366. package/contracts/oapps/sac-manager/src/tests/sac_manager/mod.rs +0 -6
  367. package/contracts/oapps/sac-manager/src/tests/sac_manager/set_admin.rs +0 -46
  368. package/contracts/oapps/sac-manager/src/tests/sac_manager/set_authorized.rs +0 -53
  369. package/contracts/oapps/sac-manager/src/tests/sac_manager/test_helper.rs +0 -35
  370. package/contracts/oapps/sac-manager/src/tests/sac_manager/view_functions.rs +0 -13
  371. package/contracts/oapps/sac-manager/src/tests/test_helper.rs +0 -138
  372. package/contracts/utils/Cargo.toml +0 -20
  373. package/contracts/utils/src/auth.rs +0 -48
  374. package/contracts/utils/src/buffer_reader.rs +0 -194
  375. package/contracts/utils/src/buffer_writer.rs +0 -138
  376. package/contracts/utils/src/bytes_ext.rs +0 -18
  377. package/contracts/utils/src/errors.rs +0 -82
  378. package/contracts/utils/src/lib.rs +0 -20
  379. package/contracts/utils/src/multisig.rs +0 -247
  380. package/contracts/utils/src/option_ext.rs +0 -38
  381. package/contracts/utils/src/ownable.rs +0 -227
  382. package/contracts/utils/src/rbac.rs +0 -438
  383. package/contracts/utils/src/testing_utils.rs +0 -180
  384. package/contracts/utils/src/tests/auth.rs +0 -179
  385. package/contracts/utils/src/tests/buffer_reader.rs +0 -969
  386. package/contracts/utils/src/tests/buffer_writer.rs +0 -689
  387. package/contracts/utils/src/tests/bytes_ext.rs +0 -160
  388. package/contracts/utils/src/tests/mod.rs +0 -13
  389. package/contracts/utils/src/tests/multisig.rs +0 -760
  390. package/contracts/utils/src/tests/option_ext.rs +0 -18
  391. package/contracts/utils/src/tests/ownable.rs +0 -822
  392. package/contracts/utils/src/tests/rbac.rs +0 -559
  393. package/contracts/utils/src/tests/test_helper.rs +0 -67
  394. package/contracts/utils/src/tests/testing_utils.rs +0 -522
  395. package/contracts/utils/src/tests/ttl_configurable.rs +0 -586
  396. package/contracts/utils/src/tests/ttl_extendable.rs +0 -64
  397. package/contracts/utils/src/tests/upgradeable.rs +0 -529
  398. package/contracts/utils/src/ttl_configurable.rs +0 -169
  399. package/contracts/utils/src/ttl_extendable.rs +0 -25
  400. package/contracts/utils/src/upgradeable.rs +0 -103
  401. package/contracts/workers/Cargo.toml +0 -13
  402. package/contracts/workers/lib.rs +0 -2
  403. package/sdk/.turbo/turbo-build.log +0 -5
  404. package/sdk/.turbo/turbo-test.log +0 -1507
  405. package/sdk/LICENSE +0 -23
  406. package/sdk/dist/generated/bml.d.ts +0 -670
  407. package/sdk/dist/generated/bml.d.ts.map +0 -1
  408. package/sdk/dist/generated/bml.js +0 -292
  409. package/sdk/dist/generated/bml.js.map +0 -1
  410. package/sdk/dist/generated/counter.d.ts +0 -1253
  411. package/sdk/dist/generated/counter.d.ts.map +0 -1
  412. package/sdk/dist/generated/counter.js +0 -391
  413. package/sdk/dist/generated/counter.js.map +0 -1
  414. package/sdk/dist/generated/dvn.d.ts +0 -1569
  415. package/sdk/dist/generated/dvn.d.ts.map +0 -1
  416. package/sdk/dist/generated/dvn.js +0 -459
  417. package/sdk/dist/generated/dvn.js.map +0 -1
  418. package/sdk/dist/generated/dvn_fee_lib.d.ts +0 -587
  419. package/sdk/dist/generated/dvn_fee_lib.d.ts.map +0 -1
  420. package/sdk/dist/generated/dvn_fee_lib.js +0 -186
  421. package/sdk/dist/generated/dvn_fee_lib.js.map +0 -1
  422. package/sdk/dist/generated/endpoint.d.ts +0 -1304
  423. package/sdk/dist/generated/endpoint.d.ts.map +0 -1
  424. package/sdk/dist/generated/endpoint.js +0 -396
  425. package/sdk/dist/generated/endpoint.js.map +0 -1
  426. package/sdk/dist/generated/executor.d.ts +0 -1554
  427. package/sdk/dist/generated/executor.d.ts.map +0 -1
  428. package/sdk/dist/generated/executor.js +0 -447
  429. package/sdk/dist/generated/executor.js.map +0 -1
  430. package/sdk/dist/generated/executor_fee_lib.d.ts +0 -1037
  431. package/sdk/dist/generated/executor_fee_lib.d.ts.map +0 -1
  432. package/sdk/dist/generated/executor_fee_lib.js +0 -351
  433. package/sdk/dist/generated/executor_fee_lib.js.map +0 -1
  434. package/sdk/dist/generated/executor_helper.d.ts +0 -883
  435. package/sdk/dist/generated/executor_helper.d.ts.map +0 -1
  436. package/sdk/dist/generated/executor_helper.js +0 -354
  437. package/sdk/dist/generated/executor_helper.js.map +0 -1
  438. package/sdk/dist/generated/layerzero_view.d.ts +0 -1153
  439. package/sdk/dist/generated/layerzero_view.d.ts.map +0 -1
  440. package/sdk/dist/generated/layerzero_view.js +0 -457
  441. package/sdk/dist/generated/layerzero_view.js.map +0 -1
  442. package/sdk/dist/generated/oft.d.ts +0 -1638
  443. package/sdk/dist/generated/oft.d.ts.map +0 -1
  444. package/sdk/dist/generated/oft.js +0 -463
  445. package/sdk/dist/generated/oft.js.map +0 -1
  446. package/sdk/dist/generated/price_feed.d.ts +0 -787
  447. package/sdk/dist/generated/price_feed.d.ts.map +0 -1
  448. package/sdk/dist/generated/price_feed.js +0 -231
  449. package/sdk/dist/generated/price_feed.js.map +0 -1
  450. package/sdk/dist/generated/sac_manager.d.ts +0 -567
  451. package/sdk/dist/generated/sac_manager.d.ts.map +0 -1
  452. package/sdk/dist/generated/sac_manager.js +0 -198
  453. package/sdk/dist/generated/sac_manager.js.map +0 -1
  454. package/sdk/dist/generated/sml.d.ts +0 -934
  455. package/sdk/dist/generated/sml.d.ts.map +0 -1
  456. package/sdk/dist/generated/sml.js +0 -366
  457. package/sdk/dist/generated/sml.js.map +0 -1
  458. package/sdk/dist/generated/treasury.d.ts +0 -892
  459. package/sdk/dist/generated/treasury.d.ts.map +0 -1
  460. package/sdk/dist/generated/treasury.js +0 -352
  461. package/sdk/dist/generated/treasury.js.map +0 -1
  462. package/sdk/dist/generated/uln302.d.ts +0 -1268
  463. package/sdk/dist/generated/uln302.d.ts.map +0 -1
  464. package/sdk/dist/generated/uln302.js +0 -477
  465. package/sdk/dist/generated/uln302.js.map +0 -1
  466. package/sdk/dist/generated/upgrader.d.ts +0 -292
  467. package/sdk/dist/generated/upgrader.d.ts.map +0 -1
  468. package/sdk/dist/generated/upgrader.js +0 -144
  469. package/sdk/dist/generated/upgrader.js.map +0 -1
  470. package/sdk/dist/index.d.ts +0 -17
  471. package/sdk/dist/index.d.ts.map +0 -1
  472. package/sdk/dist/index.js +0 -21
  473. package/sdk/dist/index.js.map +0 -1
  474. package/sdk/node_modules/.bin/tsc +0 -21
  475. package/sdk/node_modules/.bin/tsserver +0 -21
  476. package/sdk/node_modules/.bin/vitest +0 -21
  477. package/sdk/package.json +0 -50
  478. package/sdk/src/index.ts +0 -23
  479. package/sdk/test/counter-sml.test.ts +0 -480
  480. package/sdk/test/counter-uln.test.ts +0 -584
  481. package/sdk/test/oft-sml.test.ts +0 -750
  482. package/sdk/test/sac-manager.test.ts +0 -464
  483. package/sdk/test/secp256k1.ts +0 -59
  484. package/sdk/test/suites/constants.ts +0 -51
  485. package/sdk/test/suites/deploy.ts +0 -312
  486. package/sdk/test/suites/dummyContractClient.ts +0 -168
  487. package/sdk/test/suites/globalSetup.ts +0 -604
  488. package/sdk/test/suites/localnet.ts +0 -192
  489. package/sdk/test/suites/scan.ts +0 -202
  490. package/sdk/test/test_data/test_upgradeable_dvn.wasm +0 -0
  491. package/sdk/test/upgrader.test.ts +0 -194
  492. package/sdk/test/utils.ts +0 -671
  493. package/sdk/tsconfig.json +0 -21
  494. package/sdk/tsconfig.test.json +0 -10
  495. package/sdk/turbo.json +0 -15
  496. package/sdk/vitest.config.ts +0 -21
  497. package/ts-bindings-gen.toml +0 -67
  498. package/turbo-snapshot.lock.json +0 -194
  499. package/turbo.json +0 -26
  500. /package/{contracts/endpoint-v2 → endpoint-v2}/src/endpoint_v2.rs +0 -0
  501. /package/{contracts/endpoint-v2 → endpoint-v2}/src/errors.rs +0 -0
  502. /package/{contracts/endpoint-v2 → endpoint-v2}/src/events.rs +0 -0
  503. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/layerzero_composer.rs +0 -0
  504. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/layerzero_endpoint_v2.rs +0 -0
  505. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/layerzero_receiver.rs +0 -0
  506. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/message_lib.rs +0 -0
  507. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/message_lib_manager.rs +0 -0
  508. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/messaging_channel.rs +0 -0
  509. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/messaging_composer.rs +0 -0
  510. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/mod.rs +0 -0
  511. /package/{contracts/endpoint-v2 → endpoint-v2}/src/interfaces/send_lib.rs +0 -0
  512. /package/{contracts/endpoint-v2 → endpoint-v2}/src/lib.rs +0 -0
  513. /package/{contracts/endpoint-v2 → endpoint-v2}/src/message_lib_manager.rs +0 -0
  514. /package/{contracts/endpoint-v2 → endpoint-v2}/src/messaging_channel.rs +0 -0
  515. /package/{contracts/endpoint-v2 → endpoint-v2}/src/messaging_composer.rs +0 -0
  516. /package/{contracts/endpoint-v2 → endpoint-v2}/src/storage.rs +0 -0
  517. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_setup.rs +0 -0
  518. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/build_outbound_packet.rs +0 -0
  519. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/clear.rs +0 -0
  520. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/delegate.rs +0 -0
  521. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/initializable.rs +0 -0
  522. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/lz_receive_alert.rs +0 -0
  523. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/mod.rs +0 -0
  524. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/native_token.rs +0 -0
  525. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/owner.rs +0 -0
  526. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/pay_messaging_fees.rs +0 -0
  527. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/quote.rs +0 -0
  528. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/recover_token.rs +0 -0
  529. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/require_oapp_auth.rs +0 -0
  530. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/send.rs +0 -0
  531. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/set_delegate.rs +0 -0
  532. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/set_zro.rs +0 -0
  533. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/transfer_ownership.rs +0 -0
  534. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/ttl_config.rs +0 -0
  535. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/verifiable.rs +0 -0
  536. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/verify.rs +0 -0
  537. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/endpoint_v2/zro.rs +0 -0
  538. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/default_receive_library.rs +0 -0
  539. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/default_receive_library_timeout.rs +0 -0
  540. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/default_send_library.rs +0 -0
  541. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/get_config.rs +0 -0
  542. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/get_library_index.rs +0 -0
  543. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/get_receive_library.rs +0 -0
  544. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/get_registered_libraries.rs +0 -0
  545. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/get_send_library.rs +0 -0
  546. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/is_registered_library.rs +0 -0
  547. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/is_supported_eid.rs +0 -0
  548. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/is_valid_receive_library.rs +0 -0
  549. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/mod.rs +0 -0
  550. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/receive_library_timeout.rs +0 -0
  551. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/register_library.rs +0 -0
  552. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/registered_libraries_count.rs +0 -0
  553. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/require_receive_lib_for_eid.rs +0 -0
  554. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/require_registered.rs +0 -0
  555. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/require_send_lib_for_eid.rs +0 -0
  556. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/require_supported_eid.rs +0 -0
  557. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_config.rs +0 -0
  558. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_default_receive_lib_timeout.rs +0 -0
  559. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_default_receive_library.rs +0 -0
  560. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_default_send_library.rs +0 -0
  561. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_receive_library.rs +0 -0
  562. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_receive_library_timeout.rs +0 -0
  563. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/set_send_library.rs +0 -0
  564. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/message_lib_manager/timeout.rs +0 -0
  565. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/burn.rs +0 -0
  566. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/clear_payload.rs +0 -0
  567. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/inbound.rs +0 -0
  568. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/inbound_nonce.rs +0 -0
  569. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/inbound_payload_hash.rs +0 -0
  570. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/insert_and_drain_pending_nonces.rs +0 -0
  571. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/mod.rs +0 -0
  572. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/next_guid.rs +0 -0
  573. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/nilify.rs +0 -0
  574. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/outbound.rs +0 -0
  575. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/outbound_nonce.rs +0 -0
  576. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/pending_inbound_nonces.rs +0 -0
  577. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_channel/skip.rs +0 -0
  578. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_composer/clear_compose.rs +0 -0
  579. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_composer/compose_queue.rs +0 -0
  580. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_composer/lz_compose_alert.rs +0 -0
  581. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_composer/mod.rs +0 -0
  582. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/messaging_composer/send_compose.rs +0 -0
  583. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/mock.rs +0 -0
  584. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/mod.rs +0 -0
  585. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/util/build_payload.rs +0 -0
  586. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/util/compute_guid.rs +0 -0
  587. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/util/keccak256.rs +0 -0
  588. /package/{contracts/endpoint-v2 → endpoint-v2}/src/tests/util/mod.rs +0 -0
  589. /package/{contracts/endpoint-v2 → endpoint-v2}/src/util.rs +0 -0
  590. /package/{contracts/layerzero-views → layerzero-views}/src/errors.rs +0 -0
  591. /package/{contracts/layerzero-views → layerzero-views}/src/layerzero_view.rs +0 -0
  592. /package/{contracts/layerzero-views → layerzero-views}/src/lib.rs +0 -0
  593. /package/{contracts/layerzero-views → layerzero-views}/src/storage.rs +0 -0
  594. /package/{contracts/layerzero-views → layerzero-views}/src/tests/layerzero_view_tests.rs +0 -0
  595. /package/{contracts/layerzero-views → layerzero-views}/src/tests/mod.rs +0 -0
  596. /package/{contracts/layerzero-views → layerzero-views}/src/tests/setup.rs +0 -0
  597. /package/{contracts/layerzero-views → layerzero-views}/src/tests/types_tests.rs +0 -0
  598. /package/{contracts/layerzero-views → layerzero-views}/src/types.rs +0 -0
  599. /package/{contracts/message-libs → message-libs}/blocked-message-lib/src/lib.rs +0 -0
  600. /package/{contracts/message-libs → message-libs}/blocked-message-lib/src/tests/blocked_message_lib_tests.rs +0 -0
  601. /package/{contracts/message-libs → message-libs}/blocked-message-lib/src/tests/mod.rs +0 -0
  602. /package/{contracts/message-libs → message-libs}/blocked-message-lib/src/tests/setup.rs +0 -0
  603. /package/{contracts/message-libs → message-libs}/message-lib-common/src/errors.rs +0 -0
  604. /package/{contracts/message-libs → message-libs}/message-lib-common/src/interfaces/dvn.rs +0 -0
  605. /package/{contracts/message-libs → message-libs}/message-lib-common/src/interfaces/executor.rs +0 -0
  606. /package/{contracts/message-libs → message-libs}/message-lib-common/src/interfaces/mod.rs +0 -0
  607. /package/{contracts/message-libs → message-libs}/message-lib-common/src/interfaces/treasury.rs +0 -0
  608. /package/{contracts/message-libs → message-libs}/message-lib-common/src/lib.rs +0 -0
  609. /package/{contracts/message-libs → message-libs}/message-lib-common/src/packet_codec_v1.rs +0 -0
  610. /package/{contracts/message-libs → message-libs}/message-lib-common/src/testing_utils.rs +0 -0
  611. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/mod.rs +0 -0
  612. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/decode_packet_header.rs +0 -0
  613. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/encode_packet.rs +0 -0
  614. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/encode_packet_header.rs +0 -0
  615. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/mod.rs +0 -0
  616. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/payload.rs +0 -0
  617. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/payload_hash.rs +0 -0
  618. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/packet_codec_v1/test_helper.rs +0 -0
  619. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/append_dvn_option.rs +0 -0
  620. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/append_lz_receive_option.rs +0 -0
  621. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/append_native_drop_option.rs +0 -0
  622. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/convert_legacy_options.rs +0 -0
  623. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/extract_type_3_options.rs +0 -0
  624. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/left_pad_to_bytes32.rs +0 -0
  625. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/mod.rs +0 -0
  626. /package/{contracts/message-libs → message-libs}/message-lib-common/src/tests/worker_options/split_worker_options.rs +0 -0
  627. /package/{contracts/message-libs → message-libs}/message-lib-common/src/worker_options.rs +0 -0
  628. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/errors.rs +0 -0
  629. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/lib.rs +0 -0
  630. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/simple_message_lib.rs +0 -0
  631. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/storage.rs +0 -0
  632. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/tests/mod.rs +0 -0
  633. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/tests/setup.rs +0 -0
  634. /package/{contracts/message-libs → message-libs}/simple-message-lib/src/tests/simple_message_lib_tests.rs +0 -0
  635. /package/{contracts/message-libs → message-libs}/treasury/src/errors.rs +0 -0
  636. /package/{contracts/message-libs → message-libs}/treasury/src/events.rs +0 -0
  637. /package/{contracts/message-libs → message-libs}/treasury/src/interfaces/mod.rs +0 -0
  638. /package/{contracts/message-libs → message-libs}/treasury/src/interfaces/zro_fee_lib.rs +0 -0
  639. /package/{contracts/message-libs → message-libs}/treasury/src/lib.rs +0 -0
  640. /package/{contracts/message-libs → message-libs}/treasury/src/storage.rs +0 -0
  641. /package/{contracts/message-libs → message-libs}/treasury/src/tests/mod.rs +0 -0
  642. /package/{contracts/message-libs → message-libs}/treasury/src/tests/setup.rs +0 -0
  643. /package/{contracts/message-libs → message-libs}/treasury/src/tests/treasury_tests.rs +0 -0
  644. /package/{contracts/message-libs → message-libs}/treasury/src/treasury.rs +0 -0
  645. /package/{contracts/message-libs → message-libs}/uln-302/src/errors.rs +0 -0
  646. /package/{contracts/message-libs → message-libs}/uln-302/src/events.rs +0 -0
  647. /package/{contracts/message-libs → message-libs}/uln-302/src/interfaces/mod.rs +0 -0
  648. /package/{contracts/message-libs → message-libs}/uln-302/src/interfaces/receive_uln.rs +0 -0
  649. /package/{contracts/message-libs → message-libs}/uln-302/src/interfaces/send_uln.rs +0 -0
  650. /package/{contracts/message-libs → message-libs}/uln-302/src/lib.rs +0 -0
  651. /package/{contracts/message-libs → message-libs}/uln-302/src/receive_uln.rs +0 -0
  652. /package/{contracts/message-libs → message-libs}/uln-302/src/send_uln.rs +0 -0
  653. /package/{contracts/message-libs → message-libs}/uln-302/src/storage.rs +0 -0
  654. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/config/mod.rs +0 -0
  655. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/config/oapp_uln_config.rs +0 -0
  656. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/config/uln_config.rs +0 -0
  657. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/mod.rs +0 -0
  658. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/commit_verification.rs +0 -0
  659. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/confirmations.rs +0 -0
  660. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/effective_receive_uln_config.rs +0 -0
  661. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/mod.rs +0 -0
  662. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/set_default_receive_uln_configs.rs +0 -0
  663. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/verifiable.rs +0 -0
  664. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/receive_uln302/verify.rs +0 -0
  665. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/effective_executor_config.rs +0 -0
  666. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/effective_send_uln_config.rs +0 -0
  667. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/mod.rs +0 -0
  668. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/quote.rs +0 -0
  669. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/send.rs +0 -0
  670. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/set_default_executor_configs.rs +0 -0
  671. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/send_uln302/set_default_send_uln_configs.rs +0 -0
  672. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/setup.rs +0 -0
  673. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/testing_utils.rs +0 -0
  674. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/uln302/get_app_receive_uln_config.rs +0 -0
  675. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/uln302/get_app_send_uln_config.rs +0 -0
  676. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/uln302/get_config.rs +0 -0
  677. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/uln302/get_oapp_executor_config.rs +0 -0
  678. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/uln302/mod.rs +0 -0
  679. /package/{contracts/message-libs → message-libs}/uln-302/src/tests/uln302/set_config.rs +0 -0
  680. /package/{contracts/message-libs → message-libs}/uln-302/src/types.rs +0 -0
  681. /package/{contracts/message-libs → message-libs}/uln-302/src/uln302.rs +0 -0
  682. /package/{contracts/upgrader → upgrader}/src/lib.rs +0 -0
  683. /package/{contracts/upgrader → upgrader}/src/tests/mod.rs +0 -0
  684. /package/{contracts/upgrader → upgrader}/src/tests/test_data/test_upgradeable_contract1.wasm +0 -0
  685. /package/{contracts/upgrader → upgrader}/src/tests/test_data/test_upgradeable_contract2.wasm +0 -0
  686. /package/{contracts/upgrader → upgrader}/src/tests/test_data/test_upgradeable_contract3.wasm +0 -0
  687. /package/{contracts/upgrader → upgrader}/src/tests/test_data/test_upgradeable_contract4.wasm +0 -0
  688. /package/{contracts/upgrader → upgrader}/src/tests/test_upgrader.rs +0 -0
  689. /package/{contracts/workers → workers}/dvn/src/auth.rs +0 -0
  690. /package/{contracts/workers → workers}/dvn/src/dvn.rs +0 -0
  691. /package/{contracts/workers → workers}/dvn/src/errors.rs +0 -0
  692. /package/{contracts/workers → workers}/dvn/src/events.rs +0 -0
  693. /package/{contracts/workers → workers}/dvn/src/interfaces/dvn.rs +0 -0
  694. /package/{contracts/workers → workers}/dvn/src/interfaces/mod.rs +0 -0
  695. /package/{contracts/workers → workers}/dvn/src/lib.rs +0 -0
  696. /package/{contracts/workers → workers}/dvn/src/storage.rs +0 -0
  697. /package/{contracts/workers → workers}/dvn/src/tests/auth.rs +0 -0
  698. /package/{contracts/workers → workers}/dvn/src/tests/dvn.rs +0 -0
  699. /package/{contracts/workers → workers}/dvn/src/tests/key_pair.rs +0 -0
  700. /package/{contracts/workers → workers}/dvn/src/tests/mod.rs +0 -0
  701. /package/{contracts/workers → workers}/dvn/src/tests/setup.rs +0 -0
  702. /package/{contracts/workers → workers}/dvn-fee-lib/src/dvn_fee_lib.rs +0 -0
  703. /package/{contracts/workers → workers}/dvn-fee-lib/src/errors.rs +0 -0
  704. /package/{contracts/workers → workers}/dvn-fee-lib/src/lib.rs +0 -0
  705. /package/{contracts/workers → workers}/dvn-fee-lib/src/tests/dvn_fee_lib.rs +0 -0
  706. /package/{contracts/workers → workers}/dvn-fee-lib/src/tests/mod.rs +0 -0
  707. /package/{contracts/workers → workers}/executor/src/auth.rs +0 -0
  708. /package/{contracts/workers → workers}/executor/src/errors.rs +0 -0
  709. /package/{contracts/workers → workers}/executor/src/events.rs +0 -0
  710. /package/{contracts/workers → workers}/executor/src/executor.rs +0 -0
  711. /package/{contracts/workers → workers}/executor/src/interfaces/executor.rs +0 -0
  712. /package/{contracts/workers → workers}/executor/src/interfaces/mod.rs +0 -0
  713. /package/{contracts/workers → workers}/executor/src/lib.rs +0 -0
  714. /package/{contracts/workers → workers}/executor/src/storage.rs +0 -0
  715. /package/{contracts/workers → workers}/executor/src/tests/auth.rs +0 -0
  716. /package/{contracts/workers → workers}/executor/src/tests/executor.rs +0 -0
  717. /package/{contracts/workers → workers}/executor/src/tests/mod.rs +0 -0
  718. /package/{contracts/workers → workers}/executor/src/tests/setup.rs +0 -0
  719. /package/{contracts/workers → workers}/executor-fee-lib/src/errors.rs +0 -0
  720. /package/{contracts/workers → workers}/executor-fee-lib/src/executor_fee_lib.rs +0 -0
  721. /package/{contracts/workers → workers}/executor-fee-lib/src/executor_option.rs +0 -0
  722. /package/{contracts/workers → workers}/executor-fee-lib/src/lib.rs +0 -0
  723. /package/{contracts/workers → workers}/executor-fee-lib/src/tests/executor_fee_lib.rs +0 -0
  724. /package/{contracts/workers → workers}/executor-fee-lib/src/tests/executor_option.rs +0 -0
  725. /package/{contracts/workers → workers}/executor-fee-lib/src/tests/mod.rs +0 -0
  726. /package/{contracts/workers → workers}/executor-fee-lib/src/tests/setup.rs +0 -0
  727. /package/{contracts/workers → workers}/executor-helper/src/executor_helper.rs +0 -0
  728. /package/{contracts/workers → workers}/executor-helper/src/lib.rs +0 -0
  729. /package/{contracts/workers → workers}/executor-helper/src/tests/executor_helper.rs +0 -0
  730. /package/{contracts/workers → workers}/executor-helper/src/tests/mod.rs +0 -0
  731. /package/{contracts/workers → workers}/executor-helper/src/tests/setup.rs +0 -0
  732. /package/{contracts/workers → workers}/fee-lib-interfaces/src/dvn_fee_lib.rs +0 -0
  733. /package/{contracts/workers → workers}/fee-lib-interfaces/src/executor_fee_lib.rs +0 -0
  734. /package/{contracts/workers → workers}/fee-lib-interfaces/src/lib.rs +0 -0
  735. /package/{contracts/workers → workers}/fee-lib-interfaces/src/price_feed.rs +0 -0
  736. /package/{contracts/workers → workers}/price-feed/src/errors.rs +0 -0
  737. /package/{contracts/workers → workers}/price-feed/src/events.rs +0 -0
  738. /package/{contracts/workers → workers}/price-feed/src/lib.rs +0 -0
  739. /package/{contracts/workers → workers}/price-feed/src/price_feed.rs +0 -0
  740. /package/{contracts/workers → workers}/price-feed/src/storage.rs +0 -0
  741. /package/{contracts/workers → workers}/price-feed/src/tests/mod.rs +0 -0
  742. /package/{contracts/workers → workers}/price-feed/src/tests/price_feed.rs +0 -0
  743. /package/{contracts/workers → workers}/price-feed/src/tests/setup.rs +0 -0
  744. /package/{contracts/workers → workers}/price-feed/src/types.rs +0 -0
  745. /package/{contracts/workers → workers}/worker/src/errors.rs +0 -0
  746. /package/{contracts/workers → workers}/worker/src/events.rs +0 -0
  747. /package/{contracts/workers → workers}/worker/src/lib.rs +0 -0
  748. /package/{contracts/workers → workers}/worker/src/storage.rs +0 -0
  749. /package/{contracts/workers → workers}/worker/src/tests/mod.rs +0 -0
  750. /package/{contracts/workers → workers}/worker/src/tests/setup.rs +0 -0
  751. /package/{contracts/workers → workers}/worker/src/tests/worker.rs +0 -0
  752. /package/{contracts/workers → workers}/worker/src/worker.rs +0 -0
@@ -1,15 +0,0 @@
1
- #![no_std]
2
-
3
- pub mod oapp_core;
4
- pub mod oapp_options_type3;
5
- pub mod oapp_receiver;
6
- pub mod oapp_sender;
7
-
8
- mod errors;
9
- mod interfaces;
10
-
11
- pub use errors::*;
12
- pub use interfaces::*;
13
-
14
- #[cfg(test)]
15
- mod tests;
@@ -1,143 +0,0 @@
1
- use crate::{errors::OAppError, oapp_receiver::RECEIVER_VERSION, oapp_sender::SENDER_VERSION};
2
- use common_macros::{contract_trait, only_role, storage};
3
- use endpoint_v2::LayerZeroEndpointV2Client;
4
- use soroban_sdk::{contractevent, Address, BytesN, Env};
5
- use utils::{
6
- option_ext::OptionExt,
7
- ownable::{Ownable, OwnableInitializer},
8
- rbac::{RoleBasedAccessControl, AUTHORIZER},
9
- };
10
-
11
- // =====================================================
12
- // OAppCore Storage and Events
13
- // =====================================================
14
-
15
- #[storage]
16
- pub enum OAppCoreStorage {
17
- // Endpoint address - set once during initialization
18
- #[instance(Address)]
19
- Endpoint,
20
-
21
- // Mapping from endpoint ID to remote peer address
22
- #[persistent(BytesN<32>)]
23
- Peer { eid: u32 },
24
- }
25
-
26
- #[contractevent]
27
- #[derive(Clone, Debug, Eq, PartialEq)]
28
- pub struct PeerSet {
29
- pub eid: u32,
30
- pub peer: Option<BytesN<32>>,
31
- }
32
-
33
- // =====================================================
34
- // OAppCore Interface and Default Implementation
35
- // =====================================================
36
-
37
- #[contract_trait]
38
- pub trait OAppCore: Ownable + RoleBasedAccessControl {
39
- /// Retrieves the OApp version information.
40
- ///
41
- /// # Returns
42
- /// A tuple containing:
43
- /// - `sender_version`: The version of the OAppSender
44
- /// - `receiver_version`: The version of the OAppReceiver
45
- fn oapp_version(_env: &soroban_sdk::Env) -> (u64, u64) {
46
- (SENDER_VERSION, RECEIVER_VERSION)
47
- }
48
-
49
- /// Retrieves the LayerZero endpoint address associated with the OApp.
50
- ///
51
- /// # Returns
52
- /// The LayerZero endpoint address
53
- fn endpoint(env: &soroban_sdk::Env) -> soroban_sdk::Address {
54
- OAppCoreStorage::endpoint(env).unwrap()
55
- }
56
-
57
- /// Retrieves the peer (OApp) associated with a corresponding endpoint.
58
- ///
59
- /// # Arguments
60
- /// * `eid` - The endpoint ID
61
- ///
62
- /// # Returns
63
- /// The peer address (OApp instance) associated with the corresponding endpoint
64
- fn peer(env: &soroban_sdk::Env, eid: u32) -> Option<soroban_sdk::BytesN<32>> {
65
- OAppCoreStorage::peer(env, eid)
66
- }
67
-
68
- /// Sets or removes the peer address (OApp instance) for a corresponding endpoint.
69
- ///
70
- /// # Arguments
71
- /// * `eid` - The endpoint ID
72
- /// * `peer` - The address of the peer to be associated with the corresponding endpoint, or None to remove the peer
73
- /// * `operator` - The authorizer address
74
- #[only_role(operator, AUTHORIZER)]
75
- fn set_peer(
76
- env: &soroban_sdk::Env,
77
- eid: u32,
78
- peer: &Option<soroban_sdk::BytesN<32>>,
79
- operator: &soroban_sdk::Address,
80
- ) {
81
- OAppCoreStorage::set_or_remove_peer(env, eid, peer);
82
- PeerSet { eid, peer: peer.clone() }.publish(env);
83
- }
84
-
85
- /// Sets the delegate address for the OApp Core.
86
- ///
87
- /// # Arguments
88
- /// * `delegate` - The address of the delegate to be set, or None to remove the delegate
89
- /// * `operator` - The authorizer address
90
- #[only_role(operator, AUTHORIZER)]
91
- fn set_delegate(env: &soroban_sdk::Env, delegate: &Option<soroban_sdk::Address>, operator: &soroban_sdk::Address) {
92
- endpoint_client::<Self>(env).set_delegate(&env.current_contract_address(), delegate);
93
- }
94
- }
95
-
96
- // =====================================================
97
- // Helper Functions
98
- // =====================================================
99
-
100
- /// Initializes the OApp with the specified configuration.
101
- ///
102
- /// This function sets up the OApp by initializing ownership, storing the LayerZero endpoint,
103
- /// and setting a delegate address for the endpoint.
104
- ///
105
- /// # Arguments
106
- /// * `env` - The Soroban environment
107
- /// * `owner` - The address that will own this OApp
108
- /// * `endpoint` - The LayerZero endpoint address to associate with this OApp
109
- /// * `delegate` - The delegate address to set on the endpoint for this OApp
110
- pub fn init_ownable_oapp<T: OAppCore + OwnableInitializer>(
111
- env: &Env,
112
- owner: &Address,
113
- endpoint: &Address,
114
- delegate: &Address,
115
- ) {
116
- T::init_owner(env, owner);
117
- OAppCoreStorage::set_endpoint(env, endpoint);
118
- LayerZeroEndpointV2Client::new(env, endpoint)
119
- .set_delegate(&env.current_contract_address(), &Some(delegate.clone()));
120
- }
121
-
122
- /// Retrieves the peer address associated with a specific endpoint ID; panics if NOT set.
123
- ///
124
- /// This is a safe getter that ensures a peer has been configured for the given endpoint.
125
- /// If no peer is set (i.e., the peer is `None`), it will panic with `OAppError::NoPeer`.
126
- ///
127
- /// # Arguments
128
- /// * `env` - The Soroban environment
129
- /// * `eid` - The endpoint ID
130
- ///
131
- /// # Returns
132
- /// The peer address (`BytesN<32>`) associated with the specified endpoint
133
- ///
134
- /// # Panics
135
- /// Panics with `OAppError::NoPeer` if no peer is set for the given endpoint ID
136
- pub fn get_peer_or_panic<T: OAppCore>(env: &Env, eid: u32) -> BytesN<32> {
137
- T::peer(env, eid).unwrap_or_panic(env, OAppError::NoPeer)
138
- }
139
-
140
- /// Returns a client for the LayerZero endpoint.
141
- pub fn endpoint_client<'a, T: OAppCore>(env: &'a Env) -> LayerZeroEndpointV2Client<'a> {
142
- LayerZeroEndpointV2Client::new(env, &T::endpoint(env))
143
- }
@@ -1,133 +0,0 @@
1
- use crate::{self as oapp, errors::OAppError};
2
- use common_macros::{contract_trait, only_role, storage};
3
- use soroban_sdk::{assert_with_error, contractevent, contracttype, panic_with_error, Bytes, Env, Vec};
4
- use utils::{buffer_reader::BufferReader, rbac::{RoleBasedAccessControl, AUTHORIZER}};
5
-
6
- pub const OPTION_TYPE3: u16 = 3;
7
-
8
- #[contracttype]
9
- #[derive(Clone, Debug, Eq, PartialEq)]
10
- pub struct EnforcedOptionParam {
11
- pub eid: u32,
12
- pub msg_type: u32,
13
- pub options: Option<Bytes>,
14
- }
15
-
16
- #[storage]
17
- pub enum OAppOptionsType3Storage {
18
- #[persistent(Bytes)]
19
- EnforcedOptions { eid: u32, msg_type: u32 },
20
- }
21
-
22
- #[contractevent]
23
- #[derive(Clone, Debug, Eq, PartialEq)]
24
- pub struct EnforcedOptionSet {
25
- pub enforced_options: Vec<EnforcedOptionParam>,
26
- }
27
-
28
- // =========================================================================
29
- // OAppOptionsType3 Trait and Default Implementation
30
- // =========================================================================
31
-
32
- #[contract_trait]
33
- pub trait OAppOptionsType3: RoleBasedAccessControl {
34
- /// Retrieves the enforced options for a given endpoint and message type.
35
- ///
36
- /// # Arguments
37
- /// * `eid` - The endpoint ID
38
- /// * `msg_type` - The OApp message type
39
- ///
40
- /// # Returns
41
- /// The enforced options for the given endpoint and message type
42
- fn enforced_options(env: &soroban_sdk::Env, eid: u32, msg_type: u32) -> Option<soroban_sdk::Bytes> {
43
- OAppOptionsType3Storage::enforced_options(env, eid, msg_type)
44
- }
45
-
46
- /// Sets or removes the enforced options for specific endpoint and message type combinations.
47
- ///
48
- /// Only the `authorizer` of the OApp can call this function.
49
- /// Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
50
- /// These enforced options can vary as the potential options/execution on the remote may differ as per the msg_type.
51
- /// e.g. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you don't want to pay
52
- /// if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
53
- ///
54
- /// # Arguments
55
- /// * `options` - A vector of EnforcedOptionParam structures specifying enforced options
56
- /// * `operator` - The authorizer address
57
- #[only_role(operator, AUTHORIZER)]
58
- fn set_enforced_options(
59
- env: &soroban_sdk::Env,
60
- options: &soroban_sdk::Vec<oapp::oapp_options_type3::EnforcedOptionParam>,
61
- operator: &soroban_sdk::Address,
62
- ) {
63
- for param in options {
64
- if let Some(ref opts) = param.options {
65
- assert_option_type3(env, opts);
66
- }
67
- OAppOptionsType3Storage::set_or_remove_enforced_options(env, param.eid, param.msg_type, &param.options);
68
- }
69
- EnforcedOptionSet { enforced_options: options.clone() }.publish(env);
70
- }
71
-
72
- /// Combines options for a given endpoint and message type.
73
- ///
74
- /// If there is an enforced lzReceive option:
75
- /// - {gas_limit: 200k, value: 1 XLM} AND a caller supplies a lzReceive option: {gas_limit: 100k, value: 0.5 XLM}
76
- /// - The resulting options will be {gas_limit: 300k, value: 1.5 XLM} when the message is executed on the remote lz_receive() function.
77
- /// The presence of duplicated options is handled off-chain in the verifier/executor.
78
- ///
79
- /// # Arguments
80
- /// * `eid` - The endpoint ID
81
- /// * `msg_type` - The OApp message type
82
- /// * `extra_options` - Additional options passed by the caller
83
- ///
84
- /// # Returns
85
- /// The combination of caller specified options AND enforced options
86
- fn combine_options(
87
- env: &soroban_sdk::Env,
88
- eid: u32,
89
- msg_type: u32,
90
- extra_options: &soroban_sdk::Bytes,
91
- ) -> soroban_sdk::Bytes {
92
- let enforced_options_opt = Self::enforced_options(env, eid, msg_type);
93
-
94
- // No enforced options, pass whatever the caller supplied, even if it's empty or legacy type 1/2 options.
95
- if enforced_options_opt.is_none() {
96
- return extra_options.clone();
97
- }
98
-
99
- // No caller options, return enforced
100
- let mut enforced_options = enforced_options_opt.unwrap(); // unwrap is safe because we checked if it is none above
101
- if extra_options.is_empty() {
102
- return enforced_options;
103
- }
104
-
105
- // If caller provided extra_options, must be type 3 as its the ONLY type that can be combined.
106
- if extra_options.len() >= 2 {
107
- assert_option_type3(env, extra_options);
108
-
109
- // Remove the first 2 bytes containing the type from the extra_options and combine with enforced.
110
- enforced_options.append(&extra_options.slice(2..));
111
- return enforced_options;
112
- }
113
-
114
- // No valid set of options was found.
115
- panic_with_error!(env, OAppError::InvalidOptions);
116
- }
117
- }
118
-
119
- // =========================================================================
120
- // Helpers Functions
121
- // =========================================================================
122
-
123
- /// Asserts that the provided options are of type 3.
124
- ///
125
- /// # Arguments
126
- /// * `options` - The options to be checked
127
- ///
128
- /// # Panics
129
- /// If the options are not of type 3
130
- pub fn assert_option_type3(env: &Env, options: &Bytes) {
131
- let options_type = BufferReader::new(options).read_u16();
132
- assert_with_error!(env, options_type == OPTION_TYPE3, OAppError::InvalidOptions);
133
- }
@@ -1,195 +0,0 @@
1
- use crate::{
2
- errors::OAppError,
3
- oapp_core::{endpoint_client, get_peer_or_panic, OAppCore},
4
- };
5
- use common_macros::contract_trait;
6
- use endpoint_v2::Origin;
7
- use soroban_sdk::{assert_with_error, token::TokenClient, Address, Bytes, BytesN, Env};
8
-
9
- /// The version of the OAppReceiver implementation.
10
- /// Version is bumped when changes are made to this contract.
11
- pub const RECEIVER_VERSION: u64 = 1;
12
-
13
- // =====================================================
14
- // LzReceiveInternal Trait
15
- // =====================================================
16
-
17
- /// Application-specific handler for incoming LayerZero messages.
18
- ///
19
- /// Implement this trait to define how your OApp processes cross-chain messages.
20
- /// The default `OAppReceiver::lz_receive` calls `clear_payload_and_transfer` first,
21
- /// then delegates to your `__lz_receive` implementation.
22
- ///
23
- /// **Important:** Do NOT call `clear_payload_and_transfer` in your implementation -
24
- /// it is handled automatically by the default `lz_receive`.
25
- pub trait LzReceiveInternal {
26
- /// Processes a verified cross-chain message.
27
- ///
28
- /// Called after payload verification. Implement your message handling logic here.
29
- fn __lz_receive(
30
- env: &Env,
31
- origin: &Origin,
32
- guid: &BytesN<32>,
33
- message: &Bytes,
34
- extra_data: &Bytes,
35
- executor: &Address,
36
- value: i128,
37
- );
38
- }
39
-
40
- // =====================================================
41
- // OAppReceiver Trait
42
- // =====================================================
43
-
44
- /// Receiver trait for OApps that accept cross-chain messages from LayerZero.
45
- ///
46
- /// Mirrors `ILayerZeroReceiver` function signatures, allowing the executor to call
47
- /// these methods via `LayerZeroReceiverClient`.
48
- ///
49
- /// # Default Implementations
50
- /// | Method | Behavior |
51
- /// |--------------------------|----------------------------------------------------------------|
52
- /// | `allow_initialize_path` | Returns true if origin sender matches configured peer |
53
- /// | `next_nonce` | Returns 0 (unordered delivery) |
54
- /// | `lz_receive` | Verifies payload, then calls `LzReceiveInternal::__lz_receive` |
55
- /// | `is_compose_msg_sender` | Returns true if sender is current contract |
56
- ///
57
- /// # Usage
58
- ///
59
- /// ```ignore
60
- /// use oapp::oapp_receiver::LzReceiveInternal;
61
- ///
62
- /// #[common_macros::lz_contract]
63
- /// #[oapp_macros::oapp]
64
- /// pub struct MyOApp;
65
- ///
66
- /// impl LzReceiveInternal for MyOApp {
67
- /// fn __lz_receive(env: &Env, origin: &Origin, guid: &BytesN<32>,
68
- /// message: &Bytes, extra_data: &Bytes, executor: &Address, value: i128) {
69
- /// // Your message handling logic here
70
- /// }
71
- /// }
72
- /// ```
73
- ///
74
- /// # Customization
75
- /// For custom behavior (e.g., ordered nonce enforcement), use `#[oapp(custom = [receiver])]`
76
- /// and implement both `LzReceiveInternal` and `OAppReceiver`.
77
- #[contract_trait]
78
- pub trait OAppReceiver: OAppCore + LzReceiveInternal {
79
- /// Checks if a messaging path can be initialized for the given origin.
80
- ///
81
- /// # Arguments
82
- /// * `origin` - The origin of the message
83
- ///
84
- /// # Returns
85
- /// True if the path can be initialized, false otherwise
86
- fn allow_initialize_path(env: &soroban_sdk::Env, origin: &endpoint_v2::Origin) -> bool {
87
- let peer = Self::peer(env, origin.src_eid);
88
- peer.is_some_and(|peer| peer == origin.sender)
89
- }
90
-
91
- /// Retrieves the next nonce for a given source endpoint and sender address.
92
- ///
93
- /// The path nonce starts from 1. If 0 is returned it means that there is NO nonce ordered enforcement.
94
- /// This is required by the off-chain executor to determine if the OApp expects message execution to be ordered.
95
- /// This is also enforced by the OApp.
96
- /// By default this is NOT enabled, i.e. next_nonce is hardcoded to return 0.
97
- ///
98
- /// # Arguments
99
- /// * `src_eid` - The source endpoint ID
100
- /// * `sender` - The sender OApp address
101
- ///
102
- /// # Returns
103
- /// The next nonce
104
- fn next_nonce(_env: &soroban_sdk::Env, _src_eid: u32, _sender: &soroban_sdk::BytesN<32>) -> u64 {
105
- 0
106
- }
107
-
108
- /// Entry point for receiving messages or packets from the LayerZero endpoint.
109
- ///
110
- /// The default implementation calls `clear_payload_and_transfer` to validate the message
111
- /// and clear it from the endpoint, then delegates to `__lz_receive` for application logic.
112
- ///
113
- /// # Arguments
114
- /// * `executor` - The address of the executor for the received message
115
- /// * `origin` - The origin information containing the source endpoint and sender address:
116
- /// - `src_eid`: The source endpoint ID
117
- /// - `sender`: The sender address on the source chain
118
- /// - `nonce`: The nonce of the message
119
- /// * `guid` - The unique identifier for the received LayerZero message
120
- /// * `message` - The payload of the received message
121
- /// * `extra_data` - Additional arbitrary data provided by the corresponding executor
122
- /// * `value` - The native token value sent with the message
123
- fn lz_receive(
124
- env: &soroban_sdk::Env,
125
- executor: &soroban_sdk::Address,
126
- origin: &endpoint_v2::Origin,
127
- guid: &soroban_sdk::BytesN<32>,
128
- message: &soroban_sdk::Bytes,
129
- extra_data: &soroban_sdk::Bytes,
130
- value: i128,
131
- ) {
132
- clear_payload_and_transfer::<Self>(env, executor, origin, guid, message, value);
133
- Self::__lz_receive(env, origin, guid, message, extra_data, executor, value)
134
- }
135
-
136
- /// Indicates whether an address is an approved composeMsg sender to the Endpoint.
137
- ///
138
- /// Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer.
139
- /// The default sender IS the OAppReceiver implementer.
140
- ///
141
- /// # Arguments
142
- /// * `origin` - The origin information containing the source endpoint and sender address
143
- /// * `message` - The lzReceive payload
144
- /// * `sender` - The sender address to check
145
- ///
146
- /// # Returns
147
- /// True if the sender is a valid composeMsg sender, false otherwise
148
- fn is_compose_msg_sender(
149
- env: &soroban_sdk::Env,
150
- _origin: &endpoint_v2::Origin,
151
- _message: &soroban_sdk::Bytes,
152
- sender: &soroban_sdk::Address,
153
- ) -> bool {
154
- env.current_contract_address() == *sender
155
- }
156
- }
157
-
158
- // =====================================================
159
- // Helper functions
160
- // =====================================================
161
-
162
- /// Clears the message payload from the endpoint and transfers native tokens from the executor to the oapp if has value.
163
- ///
164
- /// # Arguments
165
- /// * `env` - The environment
166
- /// * `executor` - The address of the executor delivering the message
167
- /// * `origin` - The origin information (source EID, sender, nonce)
168
- /// * `guid` - The unique identifier for the LayerZero message to clear the payload from
169
- /// * `message` - The message payload to clear
170
- /// * `value` - The native token value to transfer from the executor to the oapp if has value
171
- pub fn clear_payload_and_transfer<T: OAppCore>(
172
- env: &Env,
173
- executor: &Address,
174
- origin: &Origin,
175
- guid: &BytesN<32>,
176
- message: &Bytes,
177
- value: i128,
178
- ) {
179
- // Require authorization from the executor and transfer the value from the executor to the oapp if has value
180
- executor.require_auth();
181
- // Assert that the message is from the expected peer
182
- assert_with_error!(env, get_peer_or_panic::<T>(env, origin.src_eid) == origin.sender, OAppError::OnlyPeer);
183
-
184
- let this_address = env.current_contract_address();
185
- let endpoint_client = endpoint_client::<T>(env);
186
-
187
- // Transfer the value from the executor to the oapp if has value
188
- if value != 0 {
189
- let token_client = TokenClient::new(env, &endpoint_client.native_token());
190
- token_client.transfer(executor, &this_address, &value);
191
- }
192
-
193
- // Clear the message payload from the endpoint
194
- endpoint_client.clear(&this_address, origin, &this_address, guid, message);
195
- }
@@ -1,152 +0,0 @@
1
- use crate::{
2
- errors::OAppError,
3
- oapp_core::{endpoint_client, get_peer_or_panic, OAppCore},
4
- };
5
- use endpoint_v2::{MessagingFee, MessagingParams, MessagingReceipt};
6
- use soroban_sdk::{contracttype, token::TokenClient, Address, Bytes, Env};
7
- use utils::option_ext::OptionExt;
8
-
9
- /// The version of the OAppSender implementation.
10
- /// Version is bumped when changes are made to this contract.
11
- pub const SENDER_VERSION: u64 = 1;
12
-
13
- /// Represents a fee payer address with explicit authorization state.
14
- ///
15
- /// This enum forces callers of `__lz_send` to explicitly declare whether
16
- /// `require_auth()` has already been called for the fee payer address.
17
- /// This prevents the common mistake of forgetting to authorize the fee payer.
18
- ///
19
- /// # Variants
20
- /// - `Unverified` — Safe default. `__lz_send` will call `require_auth()` on the address.
21
- /// Use this when the caller has **not** already authorized the fee payer.
22
- /// - `Verified` — Caller asserts that `require_auth()` has already been called.
23
- /// Use this to avoid a duplicate `require_auth()` node in the Soroban auth tree
24
- /// (e.g., when the same address was already authorized as the message sender).
25
- #[contracttype]
26
- #[derive(Clone, Debug, Eq, PartialEq)]
27
- pub enum FeePayer {
28
- /// The fee payer has **not** been authorized yet.
29
- /// `__lz_send` will call `fee_payer.require_auth()` before transferring fees.
30
- /// This is the safe default — use this if unsure.
31
- Unverified(Address),
32
-
33
- /// The fee payer has **already** been authorized by the caller via `require_auth()`.
34
- /// `__lz_send` will skip the auth check to avoid creating a duplicate auth node
35
- /// in the Soroban authorization tree.
36
- ///
37
- /// # Safety
38
- /// Only use this variant if you have already called `require_auth()` on this address
39
- /// in the current contract invocation. Misuse may allow unauthorized fee deductions.
40
- Verified(Address),
41
- }
42
-
43
- impl FeePayer {
44
- /// Returns a reference to the underlying address.
45
- pub fn address(&self) -> &Address {
46
- match self {
47
- FeePayer::Unverified(addr) | FeePayer::Verified(addr) => addr,
48
- }
49
- }
50
- }
51
-
52
- /// A helper trait for sending cross-chain messages via LayerZero.
53
- ///
54
- /// Contracts should implement this trait to gain access to the `__quote` and `__lz_send` helper
55
- /// methods for cross-chain messaging. This trait provides default implementations that handle
56
- /// fee payment and message dispatch through the LayerZero endpoint.
57
- ///
58
- /// # Important
59
- /// This trait is intended to be used as an **internal helper** only. Do **NOT** expose these
60
- /// methods as part of your contract's public interface (i.e., do not use `#[contract_impl]` on
61
- /// the implementation of this trait). Instead, call these methods internally from your
62
- /// contract's own public functions.
63
- pub trait OAppSenderInternal: OAppCore {
64
- /// Quote the messaging fee for sending a message to the other chain
65
- ///
66
- /// # Arguments
67
- /// * `dst_eid`: The destination endpoint ID
68
- /// * `message`: The message to send
69
- /// * `options`: The options for the message
70
- /// * `pay_in_zro`: Whether to pay the fee in ZRO
71
- ///
72
- /// # Returns
73
- /// * `MessagingFee`: The messaging fee for the message
74
- fn __quote(env: &Env, dst_eid: u32, message: &Bytes, options: &Bytes, pay_in_zro: bool) -> MessagingFee {
75
- let receiver = get_peer_or_panic::<Self>(env, dst_eid);
76
- endpoint_client::<Self>(env).quote(
77
- &env.current_contract_address(),
78
- &MessagingParams { dst_eid, receiver, message: message.clone(), options: options.clone(), pay_in_zro },
79
- )
80
- }
81
-
82
- /// Send a message to the other chain
83
- ///
84
- /// # Arguments
85
- /// * `dst_eid`: The destination endpoint ID
86
- /// * `message`: The message to send
87
- /// * `options`: The options for the message
88
- /// * `fee_payer`: The fee payer, wrapped in [`FeePayer`] to indicate authorization state.
89
- /// Use `FeePayer::Unverified(addr)` if auth has not been checked (safe default),
90
- /// or `FeePayer::Verified(addr)` if `addr.require_auth()` was already called by the caller.
91
- /// * `fee`: The messaging fee
92
- /// * `refund_address`: The address to receive any excess fees
93
- ///
94
- /// # Returns
95
- /// * `MessagingReceipt`: The receipt for the sent message
96
- fn __lz_send(
97
- env: &Env,
98
- dst_eid: u32,
99
- message: &Bytes,
100
- options: &Bytes,
101
- fee_payer: &FeePayer,
102
- fee: &MessagingFee,
103
- refund_address: &Address,
104
- ) -> MessagingReceipt {
105
- // Enforce fee payer authorization if not already verified by the caller
106
- let payer = match fee_payer {
107
- FeePayer::Unverified(addr) => {
108
- addr.require_auth();
109
- addr
110
- }
111
- FeePayer::Verified(addr) => addr,
112
- };
113
-
114
- // Pay the messaging fees
115
- Self::__pay_native(env, payer, fee.native_fee);
116
- // Skip the ZRO payment call only when the fee is exactly zero. Using `!= 0` instead of
117
- // `> 0` so that an invalid negative value still reaches `__pay_zro` and fails loudly
118
- // rather than being silently ignored.
119
- let pay_in_zro = fee.zro_fee != 0;
120
- if pay_in_zro {
121
- Self::__pay_zro(env, payer, fee.zro_fee);
122
- }
123
-
124
- // Send the message to the other chain
125
- let receiver = get_peer_or_panic::<Self>(env, dst_eid);
126
- endpoint_client::<Self>(env).send(
127
- &env.current_contract_address(),
128
- &MessagingParams { dst_eid, receiver, message: message.clone(), options: options.clone(), pay_in_zro },
129
- refund_address,
130
- )
131
- }
132
-
133
- /// Pay the native fee to the endpoint for sending a message to the other chain
134
- ///
135
- /// # Arguments
136
- /// * `fee_payer`: The address of the fee payer
137
- /// * `native_fee`: The native fee to pay
138
- fn __pay_native(env: &Env, fee_payer: &Address, native_fee: i128) {
139
- let token_client = TokenClient::new(env, &endpoint_client::<Self>(env).native_token());
140
- token_client.transfer(fee_payer, Self::endpoint(env), &native_fee);
141
- }
142
-
143
- /// Pay the ZRO fee to the endpoint for sending a message to the other chain
144
- ///
145
- /// # Arguments
146
- /// * `fee_payer`: The address of the fee payer
147
- /// * `zro_fee`: The ZRO fee to pay
148
- fn __pay_zro(env: &Env, fee_payer: &Address, zro_fee: i128) {
149
- let zro_token = endpoint_client::<Self>(env).zro().unwrap_or_panic(env, OAppError::ZroTokenUnavailable);
150
- TokenClient::new(env, &zro_token).transfer(fee_payer, Self::endpoint(env), &zro_fee);
151
- }
152
- }
@@ -1,5 +0,0 @@
1
- mod oapp_core;
2
- mod oapp_options_type3;
3
- mod oapp_receiver;
4
- mod oapp_sender;
5
- mod test_macros;