@layerzerolabs/protocol-stellar-v2 0.2.8 → 0.2.10

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 (239) hide show
  1. package/.turbo/turbo-build.log +443 -302
  2. package/.turbo/turbo-lint.log +118 -96
  3. package/.turbo/turbo-test.log +853 -731
  4. package/Cargo.lock +120 -37
  5. package/Cargo.toml +8 -5
  6. package/contracts/common-macros/src/contract_impl.rs +44 -0
  7. package/contracts/common-macros/src/lib.rs +86 -40
  8. package/contracts/common-macros/src/ownable.rs +24 -32
  9. package/contracts/common-macros/src/storage.rs +95 -120
  10. package/contracts/common-macros/src/tests/contract_impl.rs +289 -0
  11. package/contracts/common-macros/src/tests/mod.rs +9 -0
  12. package/contracts/common-macros/src/tests/ownable.rs +151 -0
  13. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__contract_impl__snapshot_generated_contract_impl_code.snap +85 -0
  14. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ownable__snapshot_generated_ownable_code.snap +30 -0
  15. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ownable__snapshot_only_owner_preserves_function_signature.snap +9 -0
  16. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__storage__snapshot_generated_storage_code.snap +1072 -0
  17. package/contracts/common-macros/src/tests/snapshots/common_macros__tests__ttl_configurable__snapshot_generated_ttl_configurable_code.snap +45 -0
  18. package/contracts/common-macros/src/tests/storage.rs +485 -0
  19. package/contracts/common-macros/src/tests/test_helpers.rs +93 -0
  20. package/contracts/common-macros/src/tests/ttl_configurable.rs +34 -0
  21. package/contracts/common-macros/src/ttl_configurable.rs +31 -14
  22. package/contracts/common-macros/src/utils.rs +27 -0
  23. package/contracts/endpoint-v2/ARCHITECTURE.md +4 -4
  24. package/contracts/endpoint-v2/src/endpoint_v2.rs +18 -15
  25. package/contracts/endpoint-v2/src/interfaces/message_lib.rs +2 -3
  26. package/contracts/endpoint-v2/src/interfaces/message_lib_manager.rs +5 -3
  27. package/contracts/endpoint-v2/src/interfaces/messaging_channel.rs +2 -2
  28. package/contracts/endpoint-v2/src/interfaces/messaging_composer.rs +2 -2
  29. package/contracts/endpoint-v2/src/interfaces/send_lib.rs +4 -4
  30. package/contracts/endpoint-v2/src/lib.rs +6 -5
  31. package/contracts/endpoint-v2/src/message_lib_manager.rs +14 -6
  32. package/contracts/endpoint-v2/src/messaging_channel.rs +6 -2
  33. package/contracts/endpoint-v2/src/messaging_composer.rs +6 -2
  34. package/contracts/endpoint-v2/src/storage.rs +10 -7
  35. package/contracts/endpoint-v2/src/tests/endpoint_v2/pay_messaging_fees.rs +16 -16
  36. package/contracts/endpoint-v2/src/tests/endpoint_v2/ttl_config.rs +46 -46
  37. package/contracts/endpoint-v2/src/tests/mock.rs +2 -2
  38. package/contracts/endpoint-v2/src/util.rs +8 -2
  39. package/contracts/message-libs/block-message-lib/Cargo.toml +1 -0
  40. package/contracts/message-libs/block-message-lib/src/lib.rs +5 -5
  41. package/contracts/message-libs/message-lib-common/src/errors.rs +8 -8
  42. package/contracts/message-libs/message-lib-common/src/interfaces/dvn.rs +0 -1
  43. package/contracts/message-libs/message-lib-common/src/interfaces/mod.rs +3 -3
  44. package/contracts/message-libs/message-lib-common/src/lib.rs +0 -2
  45. package/contracts/message-libs/message-lib-common/src/packet_codec_v1.rs +4 -6
  46. package/contracts/message-libs/message-lib-common/src/tests/packet_codec_v1.rs +2 -2
  47. package/contracts/message-libs/message-lib-common/src/tests/worker_options.rs +11 -11
  48. package/contracts/message-libs/message-lib-common/src/worker_options.rs +10 -16
  49. package/contracts/message-libs/simple-message-lib/src/errors.rs +0 -4
  50. package/contracts/message-libs/simple-message-lib/src/simple_message_lib.rs +49 -34
  51. package/contracts/message-libs/simple-message-lib/src/storage.rs +3 -7
  52. package/contracts/message-libs/simple-message-lib/src/test.rs +3 -3
  53. package/contracts/message-libs/treasury/src/storage.rs +1 -2
  54. package/contracts/message-libs/treasury/src/tests/setup.rs +3 -2
  55. package/contracts/message-libs/treasury/src/tests/treasury_tests.rs +0 -13
  56. package/contracts/message-libs/treasury/src/treasury.rs +18 -21
  57. package/contracts/message-libs/uln-302/Cargo.toml +1 -0
  58. package/contracts/message-libs/uln-302/src/interfaces/mod.rs +4 -4
  59. package/contracts/message-libs/uln-302/src/interfaces/{receive.rs → receive_uln.rs} +3 -3
  60. package/contracts/message-libs/uln-302/src/interfaces/{send.rs → send_uln.rs} +8 -80
  61. package/contracts/message-libs/uln-302/src/lib.rs +5 -4
  62. package/contracts/message-libs/uln-302/src/{receive.rs → receive_uln.rs} +20 -12
  63. package/contracts/message-libs/uln-302/src/{send.rs → send_uln.rs} +19 -13
  64. package/contracts/message-libs/uln-302/src/storage.rs +1 -2
  65. package/contracts/message-libs/uln-302/src/tests/config/uln_config.rs +3 -2
  66. package/contracts/message-libs/uln-302/src/tests/send_uln302/send.rs +30 -30
  67. package/contracts/message-libs/uln-302/src/tests/setup.rs +12 -11
  68. package/contracts/message-libs/uln-302/src/tests/uln302/set_config.rs +1 -1
  69. package/contracts/message-libs/uln-302/src/{config_validation.rs → types.rs} +79 -11
  70. package/contracts/message-libs/uln-302/src/uln302.rs +15 -10
  71. package/contracts/oapp-macros/Cargo.toml +2 -8
  72. package/contracts/oapp-macros/src/lib.rs +57 -311
  73. package/contracts/oapp-macros/src/oapp_core.rs +23 -32
  74. package/contracts/oapp-macros/src/oapp_full.rs +8 -2
  75. package/contracts/oapp-macros/src/oapp_options_type3.rs +21 -36
  76. package/contracts/oapp-macros/src/oapp_receiver.rs +38 -57
  77. package/contracts/oapp-macros/src/oapp_sender.rs +12 -14
  78. package/contracts/oapp-macros/src/util.rs +14 -10
  79. package/contracts/oapps/counter/Cargo.toml +2 -1
  80. package/contracts/oapps/counter/integration_tests/utils.rs +4 -4
  81. package/contracts/oapps/counter/src/codec.rs +8 -9
  82. package/contracts/oapps/counter/src/counter.rs +156 -147
  83. package/contracts/oapps/counter/src/storage.rs +1 -2
  84. package/contracts/oapps/counter/src/tests/test_codec.rs +5 -5
  85. package/contracts/oapps/counter/src/tests/test_counter.rs +11 -13
  86. package/contracts/oapps/oapp/Cargo.toml +1 -0
  87. package/contracts/oapps/oapp/src/errors.rs +1 -1
  88. package/contracts/oapps/oapp/src/lib.rs +3 -0
  89. package/contracts/oapps/oapp/src/macro_tests/mod.rs +1 -0
  90. package/contracts/oapps/oapp/src/macro_tests/test_macros.rs +312 -0
  91. package/contracts/oapps/oapp/src/oapp_core.rs +52 -53
  92. package/contracts/oapps/oapp/src/oapp_options_type3.rs +18 -28
  93. package/contracts/oapps/oapp/src/oapp_receiver.rs +82 -31
  94. package/contracts/oapps/oapp/src/oapp_sender.rs +55 -13
  95. package/contracts/oapps/oapp/src/tests/test_oapp_core.rs +16 -3
  96. package/contracts/oapps/oapp/src/tests/test_oapp_options_type3.rs +33 -8
  97. package/contracts/oapps/oapp/src/tests/test_oapp_receiver.rs +6 -9
  98. package/contracts/oapps/oapp/src/tests/test_oapp_sender.rs +28 -15
  99. package/contracts/oapps/oft/Cargo.toml +27 -0
  100. package/contracts/oapps/oft/integration-tests/mod.rs +3 -0
  101. package/contracts/oapps/oft/integration-tests/setup.rs +320 -0
  102. package/contracts/oapps/oft/integration-tests/test_with_sml.rs +155 -0
  103. package/contracts/oapps/oft/integration-tests/utils.rs +201 -0
  104. package/contracts/oapps/oft/src/codec/mod.rs +2 -0
  105. package/contracts/oapps/oft/src/codec/oft_compose_msg_codec.rs +55 -0
  106. package/contracts/oapps/oft/src/codec/oft_msg_codec.rs +62 -0
  107. package/contracts/oapps/oft/src/constants.rs +5 -0
  108. package/contracts/oapps/oft/src/errors.rs +8 -0
  109. package/contracts/oapps/oft/src/events.rs +19 -0
  110. package/contracts/oapps/oft/src/interfaces/mint_burn_token.rs +23 -0
  111. package/contracts/oapps/oft/src/interfaces/mod.rs +3 -0
  112. package/contracts/oapps/oft/src/lib.rs +22 -0
  113. package/contracts/oapps/oft/src/macro_tests/mod.rs +2 -0
  114. package/contracts/oapps/oft/src/macro_tests/test_all_default.rs +41 -0
  115. package/contracts/oapps/oft/src/macro_tests/test_override.rs +83 -0
  116. package/contracts/oapps/oft/src/oft.rs +320 -0
  117. package/contracts/oapps/oft/src/oft_types/lock_unlock.rs +50 -0
  118. package/contracts/oapps/oft/src/oft_types/mint_burn.rs +50 -0
  119. package/contracts/oapps/oft/src/oft_types/mod.rs +10 -0
  120. package/contracts/oapps/oft/src/storage.rs +11 -0
  121. package/contracts/oapps/oft/src/tests/mod.rs +13 -0
  122. package/contracts/oapps/oft/src/tests/test_decimals.rs +89 -0
  123. package/contracts/oapps/oft/src/tests/test_lz_receive.rs +282 -0
  124. package/contracts/oapps/oft/src/tests/test_oft_compose_msg_codec.rs +68 -0
  125. package/contracts/oapps/oft/src/tests/test_oft_msg_codec.rs +136 -0
  126. package/contracts/oapps/oft/src/tests/test_oft_version.rs +13 -0
  127. package/contracts/oapps/oft/src/tests/test_quote_oft.rs +159 -0
  128. package/contracts/oapps/oft/src/tests/test_quote_send.rs +195 -0
  129. package/contracts/oapps/oft/src/tests/test_resolve_address.rs +37 -0
  130. package/contracts/oapps/oft/src/tests/test_send.rs +915 -0
  131. package/contracts/oapps/oft/src/tests/test_token.rs +47 -0
  132. package/contracts/oapps/oft/src/tests/test_utils.rs +789 -0
  133. package/contracts/oapps/oft/src/types.rs +38 -0
  134. package/contracts/oapps/oft/src/utils.rs +67 -0
  135. package/contracts/oapps/oft-mint-burn/Cargo.toml +26 -0
  136. package/contracts/oapps/oft-mint-burn/src/lib.rs +3 -0
  137. package/contracts/oapps/oft-mint-burn/src/oft.rs +28 -0
  138. package/contracts/oapps/oft-mint-burn/src/tests/mod.rs +1 -0
  139. package/contracts/utils/src/buffer_reader.rs +8 -9
  140. package/contracts/utils/src/buffer_writer.rs +11 -5
  141. package/contracts/utils/src/errors.rs +5 -5
  142. package/contracts/utils/src/ownable.rs +14 -6
  143. package/contracts/utils/src/testing_utils.rs +11 -1
  144. package/contracts/utils/src/tests/buffer_reader.rs +491 -730
  145. package/contracts/utils/src/tests/buffer_writer.rs +336 -148
  146. package/contracts/utils/src/tests/bytes_ext.rs +125 -40
  147. package/contracts/utils/src/tests/mod.rs +3 -0
  148. package/contracts/utils/src/tests/ownable.rs +379 -27
  149. package/contracts/utils/src/tests/test_helper.rs +47 -0
  150. package/contracts/utils/src/tests/testing_utils.rs +555 -0
  151. package/contracts/utils/src/tests/ttl.rs +421 -0
  152. package/contracts/utils/src/ttl.rs +29 -89
  153. package/contracts/workers/dvn/Cargo.toml +31 -0
  154. package/contracts/workers/dvn/src/auth.rs +66 -0
  155. package/contracts/workers/dvn/src/dvn.rs +143 -0
  156. package/contracts/workers/dvn/src/errors.rs +21 -0
  157. package/contracts/workers/dvn/src/events.rs +19 -0
  158. package/contracts/workers/dvn/src/interfaces/dvn.rs +12 -0
  159. package/contracts/workers/dvn/src/interfaces/mod.rs +5 -0
  160. package/contracts/workers/dvn/src/interfaces/multisig.rs +15 -0
  161. package/contracts/workers/dvn/src/lib.rs +24 -0
  162. package/contracts/workers/dvn/src/multisig.rs +127 -0
  163. package/contracts/workers/dvn/src/storage.rs +35 -0
  164. package/contracts/workers/dvn/src/tests/auth.rs +237 -0
  165. package/contracts/workers/dvn/src/tests/dvn.rs +349 -0
  166. package/contracts/workers/dvn/src/tests/key_pair.rs +66 -0
  167. package/contracts/workers/dvn/src/tests/mod.rs +5 -0
  168. package/contracts/workers/dvn/src/tests/multisig/mod.rs +3 -0
  169. package/contracts/workers/dvn/src/tests/multisig/set_signer.rs +133 -0
  170. package/contracts/workers/dvn/src/tests/multisig/set_threshold.rs +108 -0
  171. package/contracts/workers/dvn/src/tests/multisig/verify_signatures.rs +109 -0
  172. package/contracts/workers/dvn/src/tests/setup.rs +109 -0
  173. package/contracts/workers/dvn/src/types.rs +26 -0
  174. package/contracts/workers/dvn-fee-lib/Cargo.toml +24 -0
  175. package/contracts/workers/dvn-fee-lib/src/dvn_fee_lib.rs +113 -0
  176. package/contracts/workers/dvn-fee-lib/src/errors.rs +8 -0
  177. package/contracts/workers/dvn-fee-lib/src/lib.rs +17 -0
  178. package/contracts/workers/dvn-fee-lib/src/tests/dvn_fee_lib.rs +282 -0
  179. package/contracts/workers/dvn-fee-lib/src/tests/mod.rs +1 -0
  180. package/contracts/workers/executor/Cargo.toml +10 -7
  181. package/contracts/workers/executor/src/errors.rs +8 -0
  182. package/contracts/workers/executor/src/events.rs +4 -7
  183. package/contracts/workers/executor/src/interfaces/executor.rs +72 -22
  184. package/contracts/workers/executor/src/interfaces/mod.rs +0 -2
  185. package/contracts/workers/executor/src/lib.rs +16 -7
  186. package/contracts/workers/executor/src/lz_executor.rs +308 -0
  187. package/contracts/workers/executor/src/storage.rs +24 -16
  188. package/contracts/workers/executor-fee-lib/Cargo.toml +22 -0
  189. package/contracts/workers/executor-fee-lib/src/errors.rs +15 -0
  190. package/contracts/workers/executor-fee-lib/src/executor_fee_lib.rs +215 -0
  191. package/contracts/workers/executor-fee-lib/src/executor_option.rs +203 -0
  192. package/contracts/workers/executor-fee-lib/src/lib.rs +7 -0
  193. package/contracts/workers/executor-helper/Cargo.toml +29 -0
  194. package/contracts/workers/executor-helper/src/executor_helper.rs +161 -0
  195. package/contracts/workers/executor-helper/src/lib.rs +11 -0
  196. package/contracts/workers/{worker-common → worker}/Cargo.toml +1 -4
  197. package/contracts/workers/worker/src/errors.rs +24 -0
  198. package/contracts/workers/worker/src/events.rs +62 -0
  199. package/contracts/workers/worker/src/interfaces/dvn_fee_lib.rs +75 -0
  200. package/contracts/workers/worker/src/interfaces/executor_fee_lib.rs +84 -0
  201. package/contracts/workers/{worker-common → worker}/src/interfaces/mod.rs +2 -2
  202. package/contracts/workers/worker/src/interfaces/price_feed.rs +85 -0
  203. package/contracts/workers/worker/src/lib.rs +14 -0
  204. package/contracts/workers/worker/src/storage.rs +63 -0
  205. package/contracts/workers/worker/src/worker.rs +459 -0
  206. package/package.json +3 -3
  207. package/sdk/dist/generated/bml.d.ts +88 -17
  208. package/sdk/dist/generated/bml.js +62 -16
  209. package/sdk/dist/generated/counter.d.ts +281 -102
  210. package/sdk/dist/generated/counter.js +93 -41
  211. package/sdk/dist/generated/endpoint.d.ts +128 -105
  212. package/sdk/dist/generated/endpoint.js +47 -45
  213. package/sdk/dist/generated/sml.d.ts +212 -69
  214. package/sdk/dist/generated/sml.js +103 -53
  215. package/sdk/dist/generated/uln302.d.ts +270 -173
  216. package/sdk/dist/generated/uln302.js +112 -64
  217. package/sdk/package.json +11 -11
  218. package/sdk/test/index.test.ts +147 -42
  219. package/sdk/test/suites/constants.ts +7 -3
  220. package/sdk/test/suites/deploy.ts +65 -42
  221. package/sdk/test/suites/localnet.ts +2 -2
  222. package/sdk/test/suites/scan.ts +28 -25
  223. package/sdk/test/utils.ts +199 -0
  224. package/sdk/tsconfig.json +93 -95
  225. package/tools/ts-bindings-gen/src/main.rs +2 -0
  226. package/contracts/common-macros/src/snapshots/common_macros__tests__tests__snapshot_generated_storage_code.snap +0 -310
  227. package/contracts/common-macros/src/tests.rs +0 -287
  228. package/contracts/oapp-macros/tests/test_macros.rs +0 -522
  229. package/contracts/workers/executor/src/executor.rs +0 -347
  230. package/contracts/workers/executor/src/interfaces/types.rs +0 -51
  231. package/contracts/workers/worker-common/src/constants.rs +0 -17
  232. package/contracts/workers/worker-common/src/errors.rs +0 -6
  233. package/contracts/workers/worker-common/src/events.rs +0 -34
  234. package/contracts/workers/worker-common/src/interfaces/executor_fee_lib.rs +0 -35
  235. package/contracts/workers/worker-common/src/interfaces/price_feed.rs +0 -40
  236. package/contracts/workers/worker-common/src/interfaces/worker.rs +0 -60
  237. package/contracts/workers/worker-common/src/lib.rs +0 -19
  238. package/contracts/workers/worker-common/src/storage.rs +0 -32
  239. package/contracts/workers/worker-common/src/worker_common.rs +0 -166
@@ -1,4 +1,4 @@
1
- import { StrKey, TransactionBuilder } from '@stellar/stellar-sdk';
1
+ import { Keypair, StrKey, TransactionBuilder } from '@stellar/stellar-sdk';
2
2
  import path from 'path';
3
3
  import { afterAll, beforeAll, describe, expect, it } from 'vitest';
4
4
  import { $ } from 'zx';
@@ -8,11 +8,21 @@ import { PacketSerializer, PacketV1Codec } from '@layerzerolabs/lz-v2-utilities'
8
8
 
9
9
  import { Client as CounterClient } from '../src/generated/counter';
10
10
  import { Client as EndpointClient } from '../src/generated/endpoint';
11
+ import { Client as ExecutorClient } from '../src/generated/executor';
12
+ import { Client as ExecutorHelperClient } from '../src/generated/executor_helper';
11
13
  import { Client as SMLClient } from '../src/generated/sml';
12
- import { DEFAULT_DEPLOYER, EID, MSG_TYPE_VANILLA, NATIVE_TOKEN_ADDRESS, NETWORK_PASSPHRASE, ZRO_TOKEN_ADDRESS } from './suites/constants';
14
+ import {
15
+ DEFAULT_DEPLOYER,
16
+ EID,
17
+ MSG_TYPE_VANILLA,
18
+ NATIVE_TOKEN_ADDRESS,
19
+ NETWORK_PASSPHRASE,
20
+ ZRO_TOKEN_ADDRESS,
21
+ } from './suites/constants';
13
22
  import { deployContract } from './suites/deploy';
14
- import { startStellarLocalnet, stopStellarLocalnet } from './suites/localnet';
23
+ import { fundAccount, startStellarLocalnet, stopStellarLocalnet } from './suites/localnet';
15
24
  import { PacketSentEvent, scanPacketSentEvents } from './suites/scan';
25
+ import { assertTransactionsSucceeded, signExecutorAuthEntries } from './utils';
16
26
 
17
27
  $.verbose = true;
18
28
  $.stdio = ['inherit', 'pipe', process.stderr];
@@ -21,24 +31,41 @@ const CONTRACT_ADDRESSES = {
21
31
  endpointV2: '',
22
32
  sml: '',
23
33
  counter: '',
24
- }
34
+ executor: '',
35
+ executorHelper: '',
36
+ };
25
37
 
26
38
  let endpointClient: EndpointClient;
27
39
  let smlClient: SMLClient;
28
40
  let counterClient: CounterClient;
41
+ let executorClient: ExecutorClient;
42
+ let executorHelperClient: ExecutorHelperClient;
43
+
44
+ const EXECUTOR_ADMIN = Keypair.random();
29
45
 
30
46
  // NOTE: run `stellar contract build --features sandbox` before running the test
31
47
 
32
48
  describe('Protocol testing', async () => {
33
49
  const repoRoot = await getFullyQualifiedRepoRootPath();
34
- const wasmDir = path.join(repoRoot, 'contracts', 'protocol', 'stellar', 'target', 'wasm32v1-none', 'release');
35
-
50
+ const wasmDir = path.join(
51
+ repoRoot,
52
+ 'contracts',
53
+ 'protocol',
54
+ 'stellar',
55
+ 'target',
56
+ 'wasm32v1-none',
57
+ 'release',
58
+ );
59
+
36
60
  const ENDPOINT_WASM_PATH = path.join(wasmDir, 'endpoint_v2.wasm');
37
61
  const SML_WASM_PATH = path.join(wasmDir, 'simple_message_lib.wasm');
38
62
  const COUNTER_WASM_PATH = path.join(wasmDir, 'counter.wasm');
63
+ const EXECUTOR_WASM_PATH = path.join(wasmDir, 'executor.wasm');
64
+ const EXECUTOR_HELPER_WASM_PATH = path.join(wasmDir, 'executor_helper.wasm');
39
65
 
40
66
  beforeAll(async () => {
41
67
  await startStellarLocalnet();
68
+ await fundAccount(EXECUTOR_ADMIN.publicKey());
42
69
  }, 120000); // 2 minute timeout for setup
43
70
 
44
71
  afterAll(async () => {
@@ -78,6 +105,46 @@ describe('Protocol testing', async () => {
78
105
  console.log('✅ SimpleMessageLib deployed:', CONTRACT_ADDRESSES.sml);
79
106
  });
80
107
 
108
+ it('Deploy Executor Helper', async () => {
109
+ // Deploy ExecutorHelper first (it's stateless) so we can pass it to Executor
110
+ executorHelperClient = await deployContract<ExecutorHelperClient>(
111
+ ExecutorHelperClient,
112
+ EXECUTOR_HELPER_WASM_PATH,
113
+ undefined,
114
+ DEFAULT_DEPLOYER,
115
+ );
116
+ CONTRACT_ADDRESSES.executorHelper = executorHelperClient.options.contractId;
117
+ console.log('✅ Executor Helper deployed:', CONTRACT_ADDRESSES.executorHelper);
118
+ });
119
+
120
+ it('Deploy Executor', async () => {
121
+ // Whitelist ExecutorHelper entry points
122
+ const whitelist = [
123
+ { contract: CONTRACT_ADDRESSES.executorHelper, fn_name: 'native_drop_and_execute' },
124
+ { contract: CONTRACT_ADDRESSES.executorHelper, fn_name: 'execute' },
125
+ { contract: CONTRACT_ADDRESSES.executorHelper, fn_name: 'compose' },
126
+ { contract: CONTRACT_ADDRESSES.executorHelper, fn_name: 'native_drop' },
127
+ ];
128
+
129
+ executorClient = await deployContract<ExecutorClient>(
130
+ ExecutorClient,
131
+ EXECUTOR_WASM_PATH,
132
+ {
133
+ owner: DEFAULT_DEPLOYER.publicKey(),
134
+ endpoint: CONTRACT_ADDRESSES.endpointV2,
135
+ whitelist,
136
+ admins: [EXECUTOR_ADMIN.publicKey()],
137
+ message_libs: [CONTRACT_ADDRESSES.sml],
138
+ // FIXME: Add price feed
139
+ price_feed: CONTRACT_ADDRESSES.endpointV2,
140
+ default_multiplier_bps: 10000,
141
+ },
142
+ DEFAULT_DEPLOYER,
143
+ );
144
+ CONTRACT_ADDRESSES.executor = executorClient.options.contractId;
145
+ console.log('✅ Executor deployed:', CONTRACT_ADDRESSES.executor);
146
+ });
147
+
81
148
  it('Deploy Counter', async () => {
82
149
  counterClient = await deployContract<CounterClient>(
83
150
  CounterClient,
@@ -99,6 +166,8 @@ describe('Protocol testing', async () => {
99
166
  console.log(' Endpoint:', CONTRACT_ADDRESSES.endpointV2);
100
167
  console.log(' SimpleMessageLib:', CONTRACT_ADDRESSES.sml);
101
168
  console.log(' Counter:', CONTRACT_ADDRESSES.counter);
169
+ console.log(' Executor:', CONTRACT_ADDRESSES.executor);
170
+ console.log(' Executor Helper:', CONTRACT_ADDRESSES.executorHelper);
102
171
  });
103
172
  });
104
173
 
@@ -108,9 +177,9 @@ describe('Protocol testing', async () => {
108
177
  new_lib: CONTRACT_ADDRESSES.sml,
109
178
  });
110
179
  await assembledTx.signAndSend();
111
- const {result: libs} = await endpointClient.get_registered_libraries({
112
- start: 0n,
113
- max_count: 100n,
180
+ const { result: libs } = await endpointClient.get_registered_libraries({
181
+ start: 0,
182
+ max_count: 100,
114
183
  });
115
184
  expect(libs.length).toBe(1);
116
185
  expect(libs[0]).toBe(CONTRACT_ADDRESSES.sml);
@@ -123,7 +192,7 @@ describe('Protocol testing', async () => {
123
192
  new_lib: CONTRACT_ADDRESSES.sml,
124
193
  });
125
194
  await assembledTx.signAndSend();
126
- const {result: defaultSendLib} = await endpointClient.default_send_library({
195
+ const { result: defaultSendLib } = await endpointClient.default_send_library({
127
196
  dst_eid: EID,
128
197
  });
129
198
  expect(defaultSendLib).toBe(CONTRACT_ADDRESSES.sml);
@@ -137,7 +206,7 @@ describe('Protocol testing', async () => {
137
206
  grace_period: 0n,
138
207
  });
139
208
  await assembledTx.signAndSend();
140
- const {result: defaultReceiveLib} = await endpointClient.default_receive_library({
209
+ const { result: defaultReceiveLib } = await endpointClient.default_receive_library({
141
210
  src_eid: EID,
142
211
  });
143
212
  expect(defaultReceiveLib).toBe(CONTRACT_ADDRESSES.sml);
@@ -149,28 +218,28 @@ describe('Protocol testing', async () => {
149
218
  zro: ZRO_TOKEN_ADDRESS,
150
219
  });
151
220
  await setZroTx.signAndSend();
152
-
153
- const {result: newZroToken} = await endpointClient.zro();
221
+
222
+ const { result: newZroToken } = await endpointClient.zro();
154
223
  expect(newZroToken).toBe(ZRO_TOKEN_ADDRESS);
155
224
  console.log('✅ ZRO token set:', ZRO_TOKEN_ADDRESS);
156
225
  });
157
226
 
158
227
  it('Set Counter Peer', async () => {
159
228
  const peerBytes = StrKey.decodeContract(CONTRACT_ADDRESSES.counter);
160
-
229
+
161
230
  const assembledTx = await counterClient.set_peer({
162
231
  eid: EID,
163
232
  peer: Buffer.from(peerBytes),
164
233
  });
165
234
  await assembledTx.signAndSend();
166
-
167
- const {result: peer} = await counterClient.peers({
235
+
236
+ const { result: peer } = await counterClient.peer({
168
237
  eid: EID,
169
238
  });
170
239
  expect(peer?.toString()).toBe(Buffer.from(peerBytes).toString());
171
240
  console.log('✅ Counter peer set for EID', EID);
172
241
  });
173
- })
242
+ });
174
243
 
175
244
  describe('Counter', async () => {
176
245
  let incrementLedger = 0;
@@ -178,14 +247,14 @@ describe('Protocol testing', async () => {
178
247
  let guid: Buffer;
179
248
  let message: Buffer;
180
249
  it('Counter Increment', async () => {
181
- const {result: fee} = await counterClient.quote({
250
+ const { result: fee } = await counterClient.quote({
182
251
  dst_eid: EID,
183
252
  msg_type: MSG_TYPE_VANILLA,
184
253
  options: Buffer.from([]),
185
254
  pay_in_zro: true,
186
255
  });
187
256
  console.log('✅ Fee:', fee);
188
-
257
+
189
258
  const assembledTx = await counterClient.increment({
190
259
  sender: DEFAULT_DEPLOYER.publicKey(),
191
260
  dst_eid: EID,
@@ -194,14 +263,14 @@ describe('Protocol testing', async () => {
194
263
  fee: fee,
195
264
  });
196
265
  const sentTx = await assembledTx.signAndSend();
197
-
266
+
198
267
  // Extract ledger number from transaction response
199
268
  const txResponse = sentTx.getTransactionResponse;
200
269
  if (txResponse && 'ledger' in txResponse) {
201
270
  incrementLedger = txResponse.ledger;
202
271
  }
203
-
204
- const {result: outboundCount} = await counterClient.outbound_count({
272
+
273
+ const { result: outboundCount } = await counterClient.outbound_count({
205
274
  eid: EID,
206
275
  });
207
276
  expect(outboundCount).toBe(1n);
@@ -215,57 +284,93 @@ describe('Protocol testing', async () => {
215
284
  );
216
285
  expect(packetSentEvents.length).toBeGreaterThan(0);
217
286
  packetSentEvent = packetSentEvents[0];
218
- console.log(`✅ PacketSent events scanned successfully. Found ${packetSentEvents.length} events`);
287
+ console.log(
288
+ `✅ PacketSent events scanned successfully. Found ${packetSentEvents.length} events`,
289
+ );
219
290
  });
220
291
 
221
292
  it('Verify Counter Message', async () => {
222
293
  const packet = PacketSerializer.deserialize(packetSentEvent.encoded_packet);
223
294
  guid = Buffer.from(packet.guid.replace('0x', ''), 'hex');
224
295
  message = Buffer.from(packet.message.replace('0x', ''), 'hex');
225
- const codec = PacketV1Codec.from(packet)
226
- const packetHeader = codec.header()
227
- const payloadHash = codec.payloadHash()
296
+ const codec = PacketV1Codec.from(packet);
297
+ const packetHeader = codec.header();
298
+ const payloadHash = codec.payloadHash();
228
299
  const assembledTx = await smlClient.validate_packet({
229
- caller: DEFAULT_DEPLOYER.publicKey(),
300
+ // caller: DEFAULT_DEPLOYER.publicKey(),
230
301
  header_bytes: Buffer.from(packetHeader.replace('0x', ''), 'hex'),
231
302
  payload_hash: Buffer.from(payloadHash.replace('0x', ''), 'hex'),
232
303
  });
233
304
  await assembledTx.signAndSend();
234
305
  });
235
306
 
236
- it('Receive Counter Message', async () => {
237
- const assembledTx = await counterClient.lz_receive({
238
- executor: DEFAULT_DEPLOYER.publicKey(),
239
- origin: {
240
- nonce: 1n,
241
- sender: Buffer.from(StrKey.decodeContract(CONTRACT_ADDRESSES.counter)),
242
- src_eid: EID,
307
+ it('Receive Counter Message (with native_drop)', async () => {
308
+ // Use native_drop_and_execute to test both native_drop and lz_receive
309
+ const origin = {
310
+ nonce: 1n,
311
+ sender: Buffer.from(StrKey.decodeContract(CONTRACT_ADDRESSES.counter)),
312
+ src_eid: EID,
313
+ };
314
+
315
+ const assembledTx = await executorHelperClient.native_drop_and_execute({
316
+ executor: CONTRACT_ADDRESSES.executor,
317
+ admin: EXECUTOR_ADMIN.publicKey(),
318
+ origin,
319
+ dst_eid: EID,
320
+ oapp: CONTRACT_ADDRESSES.counter,
321
+ // Native drop: send 100 stroops to counter contract
322
+ native_drop_params: [
323
+ {
324
+ receiver: CONTRACT_ADDRESSES.counter,
325
+ amount: 100n,
326
+ },
327
+ ],
328
+ execute_params: {
329
+ extra_data: Buffer.from([]),
330
+ gas_limit: 0n,
331
+ guid,
332
+ message,
333
+ origin,
334
+ receiver: CONTRACT_ADDRESSES.counter,
335
+ value: 11n,
243
336
  },
244
- guid,
245
- message,
246
- extra_data: Buffer.from([]),
247
- value: 0n,
248
337
  });
249
338
 
339
+ // Step 1: Sign the Executor's auth entries with the admin address as signature
340
+ await signExecutorAuthEntries(
341
+ CONTRACT_ADDRESSES.executor,
342
+ EXECUTOR_ADMIN,
343
+ assembledTx,
344
+ NETWORK_PASSPHRASE,
345
+ );
346
+
347
+ // Step 2: Sign and send the transaction by Executor Admin
250
348
  const sentTx = await assembledTx.signAndSend();
251
349
 
252
- // Extract and print the transaction fee from the result
350
+ // Assert that the transaction success
351
+ assertTransactionsSucceeded(sentTx, 'LzReceive');
352
+
253
353
  const txResponse = sentTx.getTransactionResponse;
354
+ // Extract and print the transaction fee from the result
254
355
  if (txResponse && 'envelopeXdr' in txResponse && txResponse.envelopeXdr) {
255
356
  try {
256
357
  const txXdr = txResponse.envelopeXdr.toXDR('base64');
257
358
  const parsedTx = TransactionBuilder.fromXDR(txXdr, NETWORK_PASSPHRASE);
258
359
  const fee = parsedTx.fee;
259
- console.log(`💰 lz_receive transaction fee: ${fee} stroops (${(Number(fee) / 10000000).toFixed(7)} XLM)`);
360
+ console.log(
361
+ `💰 lz_receive transaction fee: ${fee} stroops (${(Number(fee) / 10000000).toFixed(7)} XLM)`,
362
+ );
260
363
  } catch (_e) {
261
364
  // Ignore if we can't extract the fee
262
365
  }
263
366
  }
264
- const {result: inboundCount} = await counterClient.inbound_count({
367
+
368
+ // Verify the message was received
369
+ const { result: inboundCount } = await counterClient.inbound_count({
265
370
  eid: EID,
266
371
  });
267
372
  expect(inboundCount).toBe(1n);
268
373
  console.log('✅ Counter message received, inbox count:', inboundCount);
269
374
  });
270
- })
375
+ });
271
376
  });
@@ -1,11 +1,15 @@
1
- import { Asset, Keypair, Networks} from '@stellar/stellar-sdk';
1
+ import { Asset, Keypair, Networks } from '@stellar/stellar-sdk';
2
2
 
3
3
  const CORE_URL = 'http://localhost:8000';
4
4
  export const FRIENDBOT_URL = `${CORE_URL}/friendbot`;
5
5
  export const RPC_URL = `${CORE_URL}/rpc`;
6
6
  export const NETWORK_PASSPHRASE = Networks.STANDALONE;
7
- export const DEFAULT_DEPLOYER = Keypair.fromSecret('SDLCA3JUES3G6R4FTI6XXDIWW7QCNMZNWPYQQIKQ26TEIZUFOLIVIUDK');
8
- export const ZRO_DISTRIBUTOR = Keypair.fromSecret('SB6QAFXFRR2MXYHW4RRZ23JDGKHDCYCT5YTQEGG3WNT5VKZADJQFVNWG');
7
+ export const DEFAULT_DEPLOYER = Keypair.fromSecret(
8
+ 'SDLCA3JUES3G6R4FTI6XXDIWW7QCNMZNWPYQQIKQ26TEIZUFOLIVIUDK',
9
+ );
10
+ export const ZRO_DISTRIBUTOR = Keypair.fromSecret(
11
+ 'SB6QAFXFRR2MXYHW4RRZ23JDGKHDCYCT5YTQEGG3WNT5VKZADJQFVNWG',
12
+ );
9
13
  export const EID = 30111;
10
14
  export const NATIVE_TOKEN_ADDRESS = Asset.native().contractId(NETWORK_PASSPHRASE);
11
15
  export const ZRO_ASSET = new Asset('ZRO', DEFAULT_DEPLOYER.publicKey());
@@ -6,39 +6,42 @@ import {
6
6
  Operation,
7
7
  rpc,
8
8
  TransactionBuilder,
9
- xdr
9
+ xdr,
10
10
  } from '@stellar/stellar-sdk';
11
11
  import { readFileSync } from 'fs';
12
12
 
13
- import { DEFAULT_DEPLOYER, NETWORK_PASSPHRASE, RPC_URL, ZRO_ASSET, ZRO_DISTRIBUTOR } from './constants';
13
+ import {
14
+ DEFAULT_DEPLOYER,
15
+ NETWORK_PASSPHRASE,
16
+ RPC_URL,
17
+ ZRO_ASSET,
18
+ ZRO_DISTRIBUTOR,
19
+ } from './constants';
14
20
 
15
21
  /**
16
22
  * Query and display the TTL (Time To Live) of uploaded WASM code
17
- *
23
+ *
18
24
  * @param wasmHash - The hex-encoded SHA-256 hash of the WASM code
19
25
  * @param server - The Stellar RPC server instance
20
26
  * @param rpcUrl - Optional RPC URL (defaults to RPC_URL constant)
21
27
  */
22
- async function queryWasmTtl(
23
- wasmHash: string,
24
- server: rpc.Server,
25
- rpcUrl?: string
26
- ): Promise<void> {
28
+ async function queryWasmTtl(wasmHash: string, server: rpc.Server, rpcUrl?: string): Promise<void> {
27
29
  try {
28
30
  const latestLedger = await server.getLatestLedger();
29
31
  const currentLedger = latestLedger.sequence;
30
-
32
+
31
33
  // Create the LedgerKey for contract code using XDR encoding
32
34
  const wasmHashBuffer = Buffer.from(wasmHash, 'hex');
33
35
  // Ensure hash is exactly 32 bytes
34
- const hashBytes = wasmHashBuffer.length === 32 ? wasmHashBuffer : wasmHashBuffer.slice(0, 32);
36
+ const hashBytes =
37
+ wasmHashBuffer.length === 32 ? wasmHashBuffer : wasmHashBuffer.slice(0, 32);
35
38
  // Create LedgerKeyContractCode with hash
36
39
  const ledgerKeyContractCode = new xdr.LedgerKeyContractCode({
37
- hash: hashBytes
40
+ hash: hashBytes,
38
41
  });
39
42
  const ledgerKey = xdr.LedgerKey.contractCode(ledgerKeyContractCode);
40
43
  const ledgerKeyXdr = ledgerKey.toXDR('base64');
41
-
44
+
42
45
  // Query contract code entry using direct RPC call
43
46
  const rpcEndpoint = rpcUrl || (server as any).serverURL || RPC_URL;
44
47
  const response = await fetch(rpcEndpoint, {
@@ -49,11 +52,11 @@ async function queryWasmTtl(
49
52
  id: 1,
50
53
  method: 'getLedgerEntries',
51
54
  params: {
52
- keys: [ledgerKeyXdr]
53
- }
54
- })
55
+ keys: [ledgerKeyXdr],
56
+ },
57
+ }),
55
58
  });
56
-
59
+
57
60
  const result = await response.json();
58
61
  if (result.error) {
59
62
  console.warn(`⚠️ Could not retrieve WASM TTL: ${result.error.message}`);
@@ -61,12 +64,16 @@ async function queryWasmTtl(
61
64
  const liveUntilLedgerSeq = result.result.entries[0].liveUntilLedgerSeq;
62
65
  const ttlLedgers = liveUntilLedgerSeq - currentLedger;
63
66
  const ttlDays = (ttlLedgers * 5) / (24 * 3600); // ~5 seconds per ledger
64
- console.log(`⏰ WASM TTL: live until ledger ${liveUntilLedgerSeq} (${ttlLedgers} ledgers remaining, ~${ttlDays.toFixed(2)} days)`);
67
+ console.log(
68
+ `⏰ WASM TTL: live until ledger ${liveUntilLedgerSeq} (${ttlLedgers} ledgers remaining, ~${ttlDays.toFixed(2)} days)`,
69
+ );
65
70
  }
66
71
  } catch (error) {
67
72
  // If querying TTL fails, it might be because the code isn't indexed yet
68
73
  // This is non-fatal, so we just log a warning
69
- console.warn(`⚠️ Could not retrieve WASM TTL: ${error instanceof Error ? error.message : String(error)}`);
74
+ console.warn(
75
+ `⚠️ Could not retrieve WASM TTL: ${error instanceof Error ? error.message : String(error)}`,
76
+ );
70
77
  }
71
78
  }
72
79
 
@@ -75,8 +82,10 @@ export async function uploadWasm(
75
82
  keypair: Keypair,
76
83
  server: rpc.Server,
77
84
  ): Promise<string> {
78
- console.log(`📦 WASM buffer size: ${wasmBuffer.length} bytes (${(wasmBuffer.length / 1024).toFixed(2)} KB)`);
79
-
85
+ console.log(
86
+ `📦 WASM buffer size: ${wasmBuffer.length} bytes (${(wasmBuffer.length / 1024).toFixed(2)} KB)`,
87
+ );
88
+
80
89
  const account = await server.getAccount(keypair.publicKey());
81
90
 
82
91
  const uploadTx = new TransactionBuilder(account, {
@@ -89,9 +98,11 @@ export async function uploadWasm(
89
98
 
90
99
  const simulated = await server.simulateTransaction(uploadTx);
91
100
  const preparedTx = rpc.assembleTransaction(uploadTx, simulated).build();
92
-
93
- console.log(`💰 Upload transaction fee: ${preparedTx.fee} stroops (${(Number(preparedTx.fee) / 10000000).toFixed(7)} XLM)`);
94
-
101
+
102
+ console.log(
103
+ `💰 Upload transaction fee: ${preparedTx.fee} stroops (${(Number(preparedTx.fee) / 10000000).toFixed(7)} XLM)`,
104
+ );
105
+
95
106
  preparedTx.sign(keypair);
96
107
 
97
108
  const sendResult = await server.sendTransaction(preparedTx);
@@ -118,7 +129,7 @@ export async function uploadWasm(
118
129
 
119
130
  /**
120
131
  * Generic contract deployment helper that works with any contract Client
121
- *
132
+ *
122
133
  * @param ClientClass - The contract Client class (e.g., EndpointClient, SMLClient)
123
134
  * @param wasmFilePath - Path to the compiled WASM file
124
135
  * @param constructorArgs - Arguments for the contract's constructor
@@ -129,12 +140,12 @@ export async function uploadWasm(
129
140
  export async function deployContract<T extends { options: { contractId: string } }>(
130
141
  ClientClass: {
131
142
  deploy: (
132
- args: any,
133
- options: any,
143
+ argsOrOptions: any,
144
+ options?: any,
134
145
  ) => Promise<{ signAndSend: () => Promise<{ result: T }> }>;
135
146
  },
136
147
  wasmFilePath: string,
137
- constructorArgs: any,
148
+ constructorArgs: any | undefined,
138
149
  deployer: Keypair,
139
150
  options: {
140
151
  salt?: Buffer;
@@ -165,7 +176,7 @@ export async function deployContract<T extends { options: { contractId: string }
165
176
 
166
177
  // Step 3: Deploy the contract
167
178
  console.log('🚀 Deploying contract...');
168
- const deployTx = await ClientClass.deploy(constructorArgs, {
179
+ const deployOptions = {
169
180
  wasmHash: wasmHash,
170
181
  publicKey: deployer.publicKey(),
171
182
  signTransaction: async (tx: string) => {
@@ -180,7 +191,11 @@ export async function deployContract<T extends { options: { contractId: string }
180
191
  networkPassphrase: networkPassphrase,
181
192
  allowHttp: allowHttp,
182
193
  salt: salt,
183
- });
194
+ };
195
+ const deployTx =
196
+ constructorArgs == null
197
+ ? await ClientClass.deploy(deployOptions)
198
+ : await ClientClass.deploy(constructorArgs, deployOptions);
184
199
 
185
200
  // Step 4: Sign and send
186
201
  const sentTx = await deployTx.signAndSend();
@@ -202,7 +217,7 @@ export async function deployZroToken(): Promise<void> {
202
217
  const server = new rpc.Server(RPC_URL, {
203
218
  allowHttp: true,
204
219
  });
205
-
220
+
206
221
  // First, issue the ZRO token.
207
222
  // We can't changeTrust of Issuer account, because the Issuer can't hold the asset.
208
223
  const account = await server.getAccount(DEFAULT_DEPLOYER.publicKey());
@@ -210,8 +225,16 @@ export async function deployZroToken(): Promise<void> {
210
225
  fee: BASE_FEE,
211
226
  networkPassphrase: NETWORK_PASSPHRASE,
212
227
  })
213
- .addOperation(Operation.changeTrust({ asset: ZRO_ASSET, source: ZRO_DISTRIBUTOR.publicKey() }))
214
- .addOperation(Operation.payment({ asset: ZRO_ASSET, amount: '10000', destination: ZRO_DISTRIBUTOR.publicKey() }))
228
+ .addOperation(
229
+ Operation.changeTrust({ asset: ZRO_ASSET, source: ZRO_DISTRIBUTOR.publicKey() }),
230
+ )
231
+ .addOperation(
232
+ Operation.payment({
233
+ asset: ZRO_ASSET,
234
+ amount: '10000',
235
+ destination: ZRO_DISTRIBUTOR.publicKey(),
236
+ }),
237
+ )
215
238
  .setTimeout(10)
216
239
  .build();
217
240
  transaction.sign(DEFAULT_DEPLOYER, ZRO_DISTRIBUTOR);
@@ -225,7 +248,7 @@ export async function deployZroToken(): Promise<void> {
225
248
  throw new Error(`Failed to issue ZRO token: ${JSON.stringify(txResult)}`);
226
249
  }
227
250
  console.log('✅ ZRO asset issued');
228
-
251
+
229
252
  // Deploy the Stellar Asset Contract (SAC)
230
253
  await deployAssetSac(ZRO_ASSET);
231
254
  console.log('✅ ZRO SAC deployed');
@@ -236,10 +259,10 @@ export async function deployZroToken(): Promise<void> {
236
259
  */
237
260
  export async function deployAssetSac(asset: Asset): Promise<string> {
238
261
  console.log('Deploying SAC for asset:', asset.toString());
239
-
262
+
240
263
  const server = new rpc.Server(RPC_URL, { allowHttp: true });
241
264
  const account = await server.getAccount(DEFAULT_DEPLOYER.publicKey());
242
-
265
+
243
266
  // Build transaction with createStellarAssetContract operation
244
267
  const deployTx = new TransactionBuilder(account, {
245
268
  fee: BASE_FEE,
@@ -248,21 +271,21 @@ export async function deployAssetSac(asset: Asset): Promise<string> {
248
271
  .addOperation(
249
272
  Operation.createStellarAssetContract({
250
273
  asset: asset,
251
- })
274
+ }),
252
275
  )
253
276
  .setTimeout(30)
254
277
  .build();
255
-
278
+
256
279
  // Simulate transaction first (required for contract operations)
257
280
  const simulated = await server.simulateTransaction(deployTx);
258
-
281
+
259
282
  // Check if simulation was successful
260
283
  if (rpc.Api.isSimulationError(simulated)) {
261
284
  throw new Error(`Transaction simulation failed: ${JSON.stringify(simulated)}`);
262
285
  }
263
-
286
+
264
287
  const preparedTx = rpc.assembleTransaction(deployTx, simulated).build();
265
-
288
+
266
289
  // Sign and send
267
290
  preparedTx.sign(DEFAULT_DEPLOYER);
268
291
  const sendResult = await server.sendTransaction(preparedTx);
@@ -272,6 +295,6 @@ export async function deployAssetSac(asset: Asset): Promise<string> {
272
295
  const txResult = await server.pollTransaction(sendResult.hash);
273
296
  if (txResult.status !== 'SUCCESS') {
274
297
  throw new Error(`SAC deployment not successful: ${JSON.stringify(txResult)}`);
275
- }
298
+ }
276
299
  return asset.contractId(NETWORK_PASSPHRASE);
277
- }
300
+ }
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { $,sleep } from 'zx';
2
+ import { $, sleep } from 'zx';
3
3
 
4
4
  import { DEFAULT_DEPLOYER, FRIENDBOT_URL, ZRO_DISTRIBUTOR } from './constants';
5
5
  import { deployNativeSac, deployZroToken } from './deploy';
@@ -39,4 +39,4 @@ export async function fundAccount(publicKey: string): Promise<void> {
39
39
  export async function stopStellarLocalnet(): Promise<void> {
40
40
  await $`stellar container stop`;
41
41
  console.log('✅ Stellar localnet stopped');
42
- }
42
+ }