@layerzerolabs/lz-sui-sdk-v2 3.0.134 → 3.0.135-sui.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/deployments/sui-sandbox-local/blocked_message_lib.json +18 -18
- package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +22 -22
- package/deployments/sui-sandbox-local/call.json +18 -19
- package/deployments/sui-sandbox-local/counter.json +79 -44
- package/deployments/sui-sandbox-local/dvn.json +15 -14
- package/deployments/sui-sandbox-local/dvn_call_type.json +28 -28
- package/deployments/sui-sandbox-local/dvn_fee_lib.json +27 -27
- package/deployments/sui-sandbox-local/dvn_layerzero.json +19 -19
- package/deployments/sui-sandbox-local/dvn_ptb_builder.json +14 -14
- package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +31 -31
- package/deployments/sui-sandbox-local/endpoint_v2.json +26 -26
- package/deployments/sui-sandbox-local/executor.json +23 -22
- package/deployments/sui-sandbox-local/executor_call_type.json +28 -28
- package/deployments/sui-sandbox-local/executor_fee_lib.json +32 -32
- package/deployments/sui-sandbox-local/executor_layerzero.json +25 -25
- package/deployments/sui-sandbox-local/executor_ptb_builder.json +21 -21
- package/deployments/sui-sandbox-local/layerzero_views.json +21 -21
- package/deployments/sui-sandbox-local/message_lib_common.json +21 -21
- package/deployments/sui-sandbox-local/msglib_ptb_builder_call_types.json +13 -13
- package/deployments/sui-sandbox-local/multi_call.json +45 -0
- package/deployments/sui-sandbox-local/oapp.json +23 -21
- package/deployments/sui-sandbox-local/object-BlockedMessageLib.json +5 -5
- package/deployments/sui-sandbox-local/object-BlockedMsglibPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Counter.json +5 -5
- package/deployments/sui-sandbox-local/object-CounterAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-CounterOApp.json +5 -5
- package/deployments/sui-sandbox-local/object-DVN.json +2 -2
- package/deployments/sui-sandbox-local/object-DVNCap.json +5 -5
- package/deployments/sui-sandbox-local/object-DVNFeeLib.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilderAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointV2.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointV2AdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-Executor.json +2 -2
- package/deployments/sui-sandbox-local/object-ExecutorCap.json +5 -5
- package/deployments/sui-sandbox-local/object-ExecutorFeeLib.json +5 -5
- package/deployments/sui-sandbox-local/object-ExecutorOwnerCap.json +2 -2
- package/deployments/sui-sandbox-local/object-PackageWhitelistValidator.json +5 -5
- package/deployments/sui-sandbox-local/object-PriceFeed.json +5 -5
- package/deployments/sui-sandbox-local/object-PriceFeedOwnerCap.json +5 -5
- package/deployments/sui-sandbox-local/object-SimpleMessageLib.json +5 -5
- package/deployments/sui-sandbox-local/object-SimpleMessageLibAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-SmlPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Treasury.json +5 -5
- package/deployments/sui-sandbox-local/object-TreasuryAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-ULN302.json +5 -5
- package/deployments/sui-sandbox-local/object-ULN302AdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-Uln302PtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Uln302Verification.json +5 -5
- package/deployments/sui-sandbox-local/object-WorkerRegistry.json +9 -0
- package/deployments/sui-sandbox-local/package_whitelist_validator.json +45 -45
- package/deployments/sui-sandbox-local/price_feed.json +39 -39
- package/deployments/sui-sandbox-local/price_feed_call_types.json +19 -19
- package/deployments/sui-sandbox-local/ptb_move_call.json +20 -20
- package/deployments/sui-sandbox-local/simple_message_lib.json +29 -29
- package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +18 -18
- package/deployments/sui-sandbox-local/treasury.json +38 -38
- package/deployments/sui-sandbox-local/uln_302.json +43 -47
- package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +25 -25
- package/deployments/sui-sandbox-local/uln_common.json +49 -0
- package/deployments/sui-sandbox-local/worker_common.json +21 -20
- package/deployments/sui-sandbox-local/worker_registry.json +58 -0
- package/deployments/sui-testnet/blocked_message_lib.json +25 -25
- package/deployments/sui-testnet/blocked_msglib_ptb_builder.json +25 -25
- package/deployments/sui-testnet/call.json +14 -15
- package/deployments/sui-testnet/counter.json +41 -34
- package/deployments/sui-testnet/dvn.json +22 -21
- package/deployments/sui-testnet/dvn_call_type.json +19 -19
- package/deployments/sui-testnet/dvn_fee_lib.json +26 -26
- package/deployments/sui-testnet/dvn_layerzero.json +24 -24
- package/deployments/sui-testnet/dvn_ptb_builder.json +13 -13
- package/deployments/sui-testnet/endpoint_ptb_builder.json +25 -25
- package/deployments/sui-testnet/endpoint_v2.json +30 -30
- package/deployments/sui-testnet/executor.json +14 -13
- package/deployments/sui-testnet/executor_call_type.json +12 -12
- package/deployments/sui-testnet/executor_fee_lib.json +26 -26
- package/deployments/sui-testnet/executor_layerzero.json +25 -25
- package/deployments/sui-testnet/executor_ptb_builder.json +13 -13
- package/deployments/sui-testnet/layerzero_views.json +13 -13
- package/deployments/sui-testnet/message_lib_common.json +21 -21
- package/deployments/sui-testnet/msglib_ptb_builder_call_types.json +13 -13
- package/deployments/sui-testnet/multi_call.json +45 -0
- package/deployments/sui-testnet/oapp.json +23 -21
- package/deployments/sui-testnet/object-BlockedMessageLib.json +5 -5
- package/deployments/sui-testnet/object-BlockedMsglibPtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-Counter.json +5 -5
- package/deployments/sui-testnet/object-CounterAdminCap.json +5 -5
- package/deployments/sui-testnet/object-CounterOApp.json +5 -5
- package/deployments/sui-testnet/object-DVN.json +2 -2
- package/deployments/sui-testnet/object-DVNCap.json +5 -5
- package/deployments/sui-testnet/object-DVNFeeLib.json +5 -5
- package/deployments/sui-testnet/object-EndpointPtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-EndpointPtbBuilderAdminCap.json +5 -5
- package/deployments/sui-testnet/object-EndpointV2.json +5 -5
- package/deployments/sui-testnet/object-EndpointV2AdminCap.json +5 -5
- package/deployments/sui-testnet/object-Executor.json +2 -2
- package/deployments/sui-testnet/object-ExecutorCap.json +5 -5
- package/deployments/sui-testnet/object-ExecutorFeeLib.json +5 -5
- package/deployments/sui-testnet/object-ExecutorOwnerCap.json +2 -2
- package/deployments/sui-testnet/object-PackageWhitelistValidator.json +5 -5
- package/deployments/sui-testnet/object-PriceFeed.json +5 -5
- package/deployments/sui-testnet/object-PriceFeedOwnerCap.json +5 -5
- package/deployments/sui-testnet/object-SimpleMessageLib.json +5 -5
- package/deployments/sui-testnet/object-SimpleMessageLibAdminCap.json +5 -5
- package/deployments/sui-testnet/object-SmlPtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-Treasury.json +5 -5
- package/deployments/sui-testnet/object-TreasuryAdminCap.json +5 -5
- package/deployments/sui-testnet/object-ULN302.json +5 -5
- package/deployments/sui-testnet/object-ULN302AdminCap.json +5 -5
- package/deployments/sui-testnet/object-Uln302PtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-Uln302Verification.json +5 -5
- package/deployments/sui-testnet/object-WorkerRegistry.json +9 -0
- package/deployments/sui-testnet/object-ZroCoinMetadata.json +5 -5
- package/deployments/sui-testnet/object-ZroTreasuryCap.json +5 -5
- package/deployments/sui-testnet/package_whitelist_validator.json +51 -51
- package/deployments/sui-testnet/price_feed.json +34 -34
- package/deployments/sui-testnet/price_feed_call_types.json +19 -19
- package/deployments/sui-testnet/ptb_move_call.json +21 -21
- package/deployments/sui-testnet/simple_message_lib.json +29 -29
- package/deployments/sui-testnet/simple_msglib_ptb_builder.json +22 -22
- package/deployments/sui-testnet/treasury.json +30 -58
- package/deployments/sui-testnet/uln_302.json +46 -50
- package/deployments/sui-testnet/uln_302_ptb_builder.json +25 -25
- package/deployments/sui-testnet/uln_common.json +49 -0
- package/deployments/sui-testnet/utils.json +20 -20
- package/deployments/sui-testnet/worker_common.json +21 -20
- package/deployments/sui-testnet/worker_registry.json +58 -0
- package/deployments/sui-testnet/zro.json +28 -28
- package/dist/index.cjs +1231 -464
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +728 -379
- package/dist/index.d.ts +728 -379
- package/dist/index.mjs +1220 -464
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/bcs/index.ts +2 -1
- package/src/bcs/oapp.ts +14 -0
- package/src/generated/addresses.ts +124 -106
- package/src/module-manager.ts +15 -3
- package/src/modules/call.ts +16 -6
- package/src/modules/endpoint.ts +54 -53
- package/src/modules/message-libs/simple-message-lib.ts +3 -2
- package/src/modules/message-libs/uln302.ts +28 -26
- package/src/modules/oapps/counter.ts +34 -53
- package/src/modules/oapps/oapp.ts +489 -74
- package/src/modules/ptb-builders/endpoint-ptb-builder.ts +9 -3
- package/src/modules/ptb-builders/ptb-builder.ts +19 -4
- package/src/modules/ptb-builders/uln302-ptb-builder.ts +5 -0
- package/src/modules/workers/dvn-layerzero.ts +9 -0
- package/src/modules/workers/dvn.ts +214 -6
- package/src/modules/workers/executor-fee-lib.ts +11 -3
- package/src/modules/workers/executor-layerzero.ts +9 -0
- package/src/modules/workers/executor.ts +115 -0
- package/src/modules/workers/index.ts +1 -0
- package/src/modules/workers/treasury.ts +4 -4
- package/src/modules/workers/worker-registry.ts +110 -0
- package/src/resource.ts +3 -0
- package/src/sdk.ts +7 -2
- package/src/types/endpoint.ts +2 -1
- package/src/types/modules.ts +1 -0
- package/src/types/oapp.ts +6 -0
- package/src/types/options.ts +15 -0
- package/src/utils/transaction.ts +3 -3
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,10 @@ var DvnDstConfigBcs = bcs.bcs.struct("DstConfig", {
|
|
|
23
23
|
multiplier_bps: bcs.bcs.U16,
|
|
24
24
|
floor_margin_usd: bcs.bcs.U128
|
|
25
25
|
});
|
|
26
|
+
var TimeoutBcs = bcs.bcs.struct("Timeout", {
|
|
27
|
+
expiry: bcs.bcs.U64,
|
|
28
|
+
fallback_lib: bcs.bcs.Address
|
|
29
|
+
});
|
|
26
30
|
var Bytes32Bcs = bcs.bcs.struct("Bytes32", {
|
|
27
31
|
bytes: bcs.bcs.vector(bcs.bcs.u8())
|
|
28
32
|
});
|
|
@@ -68,6 +72,16 @@ var MoveCallBCS = bcs.bcs.struct("MoveCall", {
|
|
|
68
72
|
result_ids: bcs.bcs.vector(bcs.bcs.vector(bcs.bcs.u8()))
|
|
69
73
|
});
|
|
70
74
|
var VectorMoveCallBCS = bcs.bcs.vector(MoveCallBCS);
|
|
75
|
+
var OAppInfoV1Bcs = bcs.bcs.struct("OAppInfoV1", {
|
|
76
|
+
// Object ID address of the OApp instance
|
|
77
|
+
oapp_object: bcs.bcs.Address,
|
|
78
|
+
// Used to populate the MoveCalls to fetch the next nonce that can be executed by an executor
|
|
79
|
+
next_nonce_info: bcs.bcs.vector(bcs.bcs.u8()),
|
|
80
|
+
// Used to populate the MoveCalls to execute lz_receive by executor
|
|
81
|
+
lz_receive_info: bcs.bcs.vector(bcs.bcs.u8()),
|
|
82
|
+
// Additional configuration data for custom OApp functionality
|
|
83
|
+
extra_info: bcs.bcs.vector(bcs.bcs.u8())
|
|
84
|
+
});
|
|
71
85
|
var PriceBcs = bcs.bcs.struct("Price", {
|
|
72
86
|
price_ratio: bcs.bcs.U128,
|
|
73
87
|
gas_price_in_unit: bcs.bcs.U64,
|
|
@@ -94,10 +108,6 @@ var OAppUlnConfigBcs = bcs.bcs.struct("OAppUlnConfig", {
|
|
|
94
108
|
use_default_optional_dvns: bcs.bcs.Bool,
|
|
95
109
|
uln_config: UlnConfigBcs
|
|
96
110
|
});
|
|
97
|
-
var TimeoutBcs = bcs.bcs.struct("Timeout", {
|
|
98
|
-
expiry: bcs.bcs.U64,
|
|
99
|
-
fallback_lib: bcs.bcs.Address
|
|
100
|
-
});
|
|
101
111
|
|
|
102
112
|
// src/types/modules.ts
|
|
103
113
|
var Modules = /* @__PURE__ */ ((Modules2) => {
|
|
@@ -127,6 +137,7 @@ var Modules = /* @__PURE__ */ ((Modules2) => {
|
|
|
127
137
|
Modules2["Counter"] = "counter";
|
|
128
138
|
Modules2["DvnPtbBuilder"] = "dvnPtbBuilder";
|
|
129
139
|
Modules2["ExecutorPtbBuilder"] = "executorPtbBuilder";
|
|
140
|
+
Modules2["WorkerRegistry"] = "workerRegistry";
|
|
130
141
|
return Modules2;
|
|
131
142
|
})(Modules || {});
|
|
132
143
|
|
|
@@ -216,6 +227,7 @@ var UlnVerificationState = {
|
|
|
216
227
|
};
|
|
217
228
|
|
|
218
229
|
// src/types/endpoint.ts
|
|
230
|
+
var OAppInfoVersion = { VERSION_1: 1, VERSION_2: 2 };
|
|
219
231
|
var LzReceiveVersion = { VERSION_1: 1 };
|
|
220
232
|
var LzComposeVersion = { VERSION_1: 1 };
|
|
221
233
|
function isTransactionArgument(value) {
|
|
@@ -357,7 +369,7 @@ async function validateTransaction(client, signer, tx) {
|
|
|
357
369
|
}
|
|
358
370
|
async function executeSimulate(client, moveCallFn, parser) {
|
|
359
371
|
const tx = new transactions.Transaction();
|
|
360
|
-
moveCallFn(tx);
|
|
372
|
+
await moveCallFn(tx);
|
|
361
373
|
const result = await simulateTransaction(client, tx);
|
|
362
374
|
return parser(result);
|
|
363
375
|
}
|
|
@@ -755,17 +767,22 @@ var EndpointErrorCode = {
|
|
|
755
767
|
MessagingChannel_EPayloadHashNotFound: 9,
|
|
756
768
|
MessagingChannel_ESendReentrancy: 10,
|
|
757
769
|
MessagingChannel_EUninitializedChannel: 11,
|
|
770
|
+
// MessagingComposer related errors (with MessagingComposer_ prefix)
|
|
771
|
+
MessagingComposer_EComposeExists: 1,
|
|
772
|
+
MessagingComposer_EComposeMessageMismatch: 2,
|
|
773
|
+
MessagingComposer_EComposeNotFound: 3,
|
|
774
|
+
MessagingComposer_EComposerNotRegistered: 4,
|
|
775
|
+
MessagingComposer_EComposerRegistered: 5,
|
|
758
776
|
// OAppRegistry related errors (with OAppRegistry_ prefix)
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
OAppRegistry_EOAppNotRegistered: 3,
|
|
762
|
-
OAppRegistry_EOAppRegistered: 4,
|
|
777
|
+
OAppRegistry_EOAppNotRegistered: 1,
|
|
778
|
+
OAppRegistry_EOAppRegistered: 2,
|
|
763
779
|
// Endpoint related errors (with Endpoint_ prefix)
|
|
764
780
|
Endpoint_EAlreadyInitialized: 1,
|
|
765
781
|
Endpoint_EInvalidEid: 2,
|
|
766
782
|
Endpoint_ENotInitialized: 3,
|
|
767
783
|
Endpoint_ERefundAddressNotFound: 4,
|
|
768
|
-
|
|
784
|
+
Endpoint_EUnauthorizedOApp: 5,
|
|
785
|
+
Endpoint_EUnauthorizedSendLibrary: 6
|
|
769
786
|
};
|
|
770
787
|
var _Endpoint_instances, addRequiredValidators_fn, target_fn;
|
|
771
788
|
var Endpoint = class {
|
|
@@ -793,12 +810,13 @@ var Endpoint = class {
|
|
|
793
810
|
* Register an OApp with the endpoint
|
|
794
811
|
* @param tx - The transaction to add the move call to
|
|
795
812
|
* @param oappCap - The OApp capability object ID or transaction argument
|
|
796
|
-
* @param
|
|
813
|
+
* @param oappInfo - OApp information including lz_receive execution information
|
|
814
|
+
* @returns Transaction result containing the messaging channel address
|
|
797
815
|
*/
|
|
798
|
-
registerOAppMoveCall(tx, oappCap,
|
|
799
|
-
tx.moveCall({
|
|
816
|
+
registerOAppMoveCall(tx, oappCap, oappInfo) {
|
|
817
|
+
return tx.moveCall({
|
|
800
818
|
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "register_oapp"),
|
|
801
|
-
arguments: [tx.object(this.objects.endpointV2), asObject(tx, oappCap), asBytes(tx,
|
|
819
|
+
arguments: [tx.object(this.objects.endpointV2), asObject(tx, oappCap), asBytes(tx, oappInfo)]
|
|
802
820
|
});
|
|
803
821
|
}
|
|
804
822
|
/**
|
|
@@ -814,20 +832,20 @@ var Endpoint = class {
|
|
|
814
832
|
});
|
|
815
833
|
}
|
|
816
834
|
/**
|
|
817
|
-
* Set
|
|
835
|
+
* Set OApp information for an OApp
|
|
818
836
|
* @param tx - The transaction to add the move call to
|
|
819
837
|
* @param callerCap - The caller capability object ID or transaction argument
|
|
820
838
|
* @param oapp - The OApp address or transaction argument
|
|
821
|
-
* @param
|
|
839
|
+
* @param oappInfo - The OApp information including lz_receive execution information as bytes or transaction argument
|
|
822
840
|
*/
|
|
823
|
-
|
|
841
|
+
setOappInfoMoveCall(tx, callerCap, oapp, oappInfo) {
|
|
824
842
|
tx.moveCall({
|
|
825
|
-
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "
|
|
843
|
+
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "set_oapp_info"),
|
|
826
844
|
arguments: [
|
|
827
845
|
tx.object(this.objects.endpointV2),
|
|
828
846
|
asObject(tx, callerCap),
|
|
829
847
|
asAddress(tx, oapp),
|
|
830
|
-
asBytes(tx,
|
|
848
|
+
asBytes(tx, oappInfo)
|
|
831
849
|
]
|
|
832
850
|
});
|
|
833
851
|
}
|
|
@@ -1111,24 +1129,25 @@ var Endpoint = class {
|
|
|
1111
1129
|
* Register a composer with the endpoint
|
|
1112
1130
|
* @param tx - The transaction to add the move call to
|
|
1113
1131
|
* @param composerCap - The composer capability object ID or transaction argument
|
|
1114
|
-
* @param
|
|
1132
|
+
* @param composerInfo - Composer information including lz_compose execution information as bytes
|
|
1133
|
+
* @returns Transaction result containing the compose queue address
|
|
1115
1134
|
*/
|
|
1116
|
-
registerComposerMoveCall(tx, composerCap,
|
|
1117
|
-
tx.moveCall({
|
|
1135
|
+
registerComposerMoveCall(tx, composerCap, composerInfo) {
|
|
1136
|
+
return tx.moveCall({
|
|
1118
1137
|
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "register_composer"),
|
|
1119
|
-
arguments: [tx.object(this.objects.endpointV2), asObject(tx, composerCap), asBytes(tx,
|
|
1138
|
+
arguments: [tx.object(this.objects.endpointV2), asObject(tx, composerCap), asBytes(tx, composerInfo)]
|
|
1120
1139
|
});
|
|
1121
1140
|
}
|
|
1122
1141
|
/**
|
|
1123
|
-
* Set
|
|
1142
|
+
* Set composer information for a composer
|
|
1124
1143
|
* @param tx - The transaction to add the move call to
|
|
1125
1144
|
* @param composerCap - The composer capability object ID or transaction argument
|
|
1126
|
-
* @param
|
|
1145
|
+
* @param composerInfo - Composer information including lz_compose execution information as bytes or transaction argument
|
|
1127
1146
|
*/
|
|
1128
|
-
|
|
1147
|
+
setComposerInfoMoveCall(tx, composerCap, composerInfo) {
|
|
1129
1148
|
tx.moveCall({
|
|
1130
|
-
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "
|
|
1131
|
-
arguments: [tx.object(this.objects.endpointV2), asObject(tx, composerCap), asBytes(tx,
|
|
1149
|
+
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "set_composer_info"),
|
|
1150
|
+
arguments: [tx.object(this.objects.endpointV2), asObject(tx, composerCap), asBytes(tx, composerInfo)]
|
|
1132
1151
|
});
|
|
1133
1152
|
}
|
|
1134
1153
|
/**
|
|
@@ -1483,27 +1502,27 @@ var Endpoint = class {
|
|
|
1483
1502
|
);
|
|
1484
1503
|
}
|
|
1485
1504
|
/**
|
|
1486
|
-
* Get
|
|
1505
|
+
* Get OApp information for an OApp
|
|
1487
1506
|
* @param tx - The transaction to add the move call to
|
|
1488
1507
|
* @param oapp - The OApp address or transaction argument
|
|
1489
|
-
* @returns Transaction result containing the
|
|
1508
|
+
* @returns Transaction result containing the OApp information including lz_receive execution information
|
|
1490
1509
|
*/
|
|
1491
|
-
|
|
1510
|
+
getOappInfoMoveCall(tx, oapp) {
|
|
1492
1511
|
return tx.moveCall({
|
|
1493
|
-
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "
|
|
1512
|
+
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "get_oapp_info"),
|
|
1494
1513
|
arguments: [tx.object(this.objects.endpointV2), asAddress(tx, oapp)]
|
|
1495
1514
|
});
|
|
1496
1515
|
}
|
|
1497
1516
|
/**
|
|
1498
|
-
* Get
|
|
1517
|
+
* Get OApp information for an OApp
|
|
1499
1518
|
* @param oapp - The OApp address
|
|
1500
|
-
* @returns Promise<Uint8Array> - The
|
|
1519
|
+
* @returns Promise<Uint8Array> - The OApp information including lz_receive execution information as bytes
|
|
1501
1520
|
*/
|
|
1502
|
-
async
|
|
1521
|
+
async getOappInfo(oapp) {
|
|
1503
1522
|
return executeSimulate(
|
|
1504
1523
|
this.client,
|
|
1505
1524
|
(tx) => {
|
|
1506
|
-
return this.
|
|
1525
|
+
return this.getOappInfoMoveCall(tx, oapp);
|
|
1507
1526
|
},
|
|
1508
1527
|
(result) => {
|
|
1509
1528
|
const parsed = bcs.bcs.vector(bcs.bcs.u8()).parse(result[0].value);
|
|
@@ -1590,27 +1609,27 @@ var Endpoint = class {
|
|
|
1590
1609
|
);
|
|
1591
1610
|
}
|
|
1592
1611
|
/**
|
|
1593
|
-
* Get
|
|
1612
|
+
* Get composer information for a registered composer
|
|
1594
1613
|
* @param tx - The transaction to add the move call to
|
|
1595
1614
|
* @param composer - The composer address or transaction argument
|
|
1596
|
-
* @returns Transaction result containing the
|
|
1615
|
+
* @returns Transaction result containing the composer information
|
|
1597
1616
|
*/
|
|
1598
|
-
|
|
1617
|
+
getComposerInfoMoveCall(tx, composer) {
|
|
1599
1618
|
return tx.moveCall({
|
|
1600
|
-
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "
|
|
1619
|
+
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "get_composer_info"),
|
|
1601
1620
|
arguments: [tx.object(this.objects.endpointV2), asAddress(tx, composer)]
|
|
1602
1621
|
});
|
|
1603
1622
|
}
|
|
1604
1623
|
/**
|
|
1605
|
-
* Get
|
|
1624
|
+
* Get composer information for a registered composer
|
|
1606
1625
|
* @param composer - The composer address
|
|
1607
|
-
* @returns Promise<Uint8Array> - The
|
|
1626
|
+
* @returns Promise<Uint8Array> - The composer information as bytes
|
|
1608
1627
|
*/
|
|
1609
|
-
async
|
|
1628
|
+
async getComposerInfo(composer) {
|
|
1610
1629
|
return executeSimulate(
|
|
1611
1630
|
this.client,
|
|
1612
1631
|
(tx) => {
|
|
1613
|
-
this.
|
|
1632
|
+
this.getComposerInfoMoveCall(tx, composer);
|
|
1614
1633
|
},
|
|
1615
1634
|
(result) => {
|
|
1616
1635
|
const parsed = bcs.bcs.vector(bcs.bcs.u8()).parse(result[0].value);
|
|
@@ -2555,10 +2574,7 @@ var Endpoint = class {
|
|
|
2555
2574
|
*/
|
|
2556
2575
|
async populateLzReceiveTransaction(tx, lzReceiveCall, oapp, sender = void 0, validators = [], maxSimulationTimes = DEFAULT_SIMULATION_TIMES) {
|
|
2557
2576
|
const simulateTx = transactions.Transaction.from(tx);
|
|
2558
|
-
|
|
2559
|
-
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "get_lz_receive_info"),
|
|
2560
|
-
arguments: [simulateTx.object(this.objects.endpointV2), simulateTx.pure.address(oapp)]
|
|
2561
|
-
});
|
|
2577
|
+
this.getOappInfoMoveCall(simulateTx, oapp);
|
|
2562
2578
|
const moveCalls = await this.moduleManager.getPtbBuilder().simulateLzReceivePtb(simulateTx, sender);
|
|
2563
2579
|
const [_, finalMoveCalls] = await this.moduleManager.getPtbBuilder().buildPtb(
|
|
2564
2580
|
tx,
|
|
@@ -2586,10 +2602,7 @@ var Endpoint = class {
|
|
|
2586
2602
|
*/
|
|
2587
2603
|
async populateLzComposeTransaction(tx, endpointLzComposeCall, composer, sender = void 0, validators = [], maxSimulationTimes = DEFAULT_SIMULATION_TIMES) {
|
|
2588
2604
|
const simulateTx = transactions.Transaction.from(tx);
|
|
2589
|
-
|
|
2590
|
-
target: __privateMethod(this, _Endpoint_instances, target_fn).call(this, "get_lz_compose_info"),
|
|
2591
|
-
arguments: [simulateTx.object(this.objects.endpointV2), simulateTx.pure.address(composer)]
|
|
2592
|
-
});
|
|
2605
|
+
this.getComposerInfoMoveCall(simulateTx, composer);
|
|
2593
2606
|
const moveCalls = await this.moduleManager.getPtbBuilder().simulateLzComposePtb(simulateTx, sender);
|
|
2594
2607
|
const [_, finalMoveCalls] = await this.moduleManager.getPtbBuilder().buildPtb(
|
|
2595
2608
|
tx,
|
|
@@ -2722,9 +2735,10 @@ target_fn2 = function(name, module_name = MODULE_NAME2) {
|
|
|
2722
2735
|
};
|
|
2723
2736
|
var MODULE_NAME3 = "simple_message_lib";
|
|
2724
2737
|
var SimpleMessageLibErrorCode = {
|
|
2725
|
-
// SimpleMessageLib related errors (
|
|
2726
|
-
|
|
2727
|
-
SimpleMessageLib_EZROFeeNotEnabled: 2
|
|
2738
|
+
// SimpleMessageLib related errors (matching simple_message_lib.move)
|
|
2739
|
+
SimpleMessageLib_ENotImplemented: 1,
|
|
2740
|
+
SimpleMessageLib_EZROFeeNotEnabled: 2,
|
|
2741
|
+
SimpleMessageLib_EInvalidEid: 3
|
|
2728
2742
|
};
|
|
2729
2743
|
var _SimpleMessageLib_instances, target_fn3;
|
|
2730
2744
|
var SimpleMessageLib = class {
|
|
@@ -2955,10 +2969,25 @@ var Uln302ErrorCode = {
|
|
|
2955
2969
|
ReceiveUln302_EInvalidEid: 3,
|
|
2956
2970
|
ReceiveUln302_EOAppUlnConfigNotFound: 4,
|
|
2957
2971
|
ReceiveUln302_EVerifying: 5,
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2972
|
+
Uln302_EInvalidConfigType: 1,
|
|
2973
|
+
Uln302_EInvalidMessagingChannel: 2,
|
|
2974
|
+
Uln302_EUnsupportedEid: 3,
|
|
2975
|
+
// UlnConfig related errors (matching uln_config.move)
|
|
2976
|
+
UlnConfig_EAtLeastOneDVN: 1,
|
|
2977
|
+
UlnConfig_EDuplicateOptionalDVNs: 2,
|
|
2978
|
+
UlnConfig_EDuplicateRequiredDVNs: 3,
|
|
2979
|
+
UlnConfig_EInvalidOptionalDVNCount: 4,
|
|
2980
|
+
UlnConfig_EInvalidOptionalDVNThreshold: 5,
|
|
2981
|
+
UlnConfig_EInvalidRequiredDVNCount: 6,
|
|
2982
|
+
UlnConfig_EInvalidUlnConfigBytes: 7,
|
|
2983
|
+
// OAppUlnConfig related errors (matching oapp_uln_config.move)
|
|
2984
|
+
OAppUlnConfig_EInvalidConfirmations: 1,
|
|
2985
|
+
OAppUlnConfig_EInvalidRequiredDVNs: 2,
|
|
2986
|
+
OAppUlnConfig_EInvalidOptionalDVNs: 3,
|
|
2987
|
+
// ExecutorConfig related errors (matching executor_config.move)
|
|
2988
|
+
ExecutorConfig_EInvalidExecutorAddress: 1,
|
|
2989
|
+
ExecutorConfig_EInvalidExecutorBytes: 2,
|
|
2990
|
+
ExecutorConfig_EZeroMessageSize: 3
|
|
2962
2991
|
};
|
|
2963
2992
|
var _Uln302_instances, target_fn4;
|
|
2964
2993
|
var Uln302 = class {
|
|
@@ -3056,25 +3085,16 @@ var Uln302 = class {
|
|
|
3056
3085
|
});
|
|
3057
3086
|
}
|
|
3058
3087
|
/**
|
|
3059
|
-
* Verify packet move call with DVN
|
|
3060
|
-
* Note: This is typically called by DVNs, not directly by users
|
|
3088
|
+
* Verify packet move call with DVN call (new API)
|
|
3089
|
+
* Note: This is typically called by DVNs via Call objects, not directly by users
|
|
3061
3090
|
* @param tx - The transaction to add the move call to
|
|
3062
3091
|
* @param verification - The verification object address or transaction argument
|
|
3063
|
-
* @param
|
|
3064
|
-
* @param packetHeader - The packet header as bytes or transaction argument
|
|
3065
|
-
* @param payloadHash - The payload hash as bytes or transaction argument
|
|
3066
|
-
* @param confirmations - Required confirmations count or transaction argument
|
|
3092
|
+
* @param call - The DVN verification call containing verification parameters
|
|
3067
3093
|
*/
|
|
3068
|
-
verifyMoveCall(tx, verification,
|
|
3094
|
+
verifyMoveCall(tx, verification, call) {
|
|
3069
3095
|
tx.moveCall({
|
|
3070
3096
|
target: __privateMethod(this, _Uln302_instances, target_fn4).call(this, "verify"),
|
|
3071
|
-
arguments: [
|
|
3072
|
-
asObject(tx, verification),
|
|
3073
|
-
asObject(tx, dvn),
|
|
3074
|
-
asBytes(tx, packetHeader),
|
|
3075
|
-
asBytes32(tx, payloadHash, this.moduleManager.getUtils()),
|
|
3076
|
-
asU64(tx, confirmations)
|
|
3077
|
-
]
|
|
3097
|
+
arguments: [tx.object(this.objects.uln302), asObject(tx, verification), call]
|
|
3078
3098
|
});
|
|
3079
3099
|
}
|
|
3080
3100
|
/**
|
|
@@ -3627,9 +3647,22 @@ var DVNErrorCode = {
|
|
|
3627
3647
|
DVN_EExpiredSignature: 1,
|
|
3628
3648
|
DVN_EEidNotSupported: 2,
|
|
3629
3649
|
DVN_EHashAlreadyUsed: 3,
|
|
3630
|
-
DVN_EPtbBuilderAlreadyInitialized: 4
|
|
3631
|
-
|
|
3632
|
-
|
|
3650
|
+
DVN_EPtbBuilderAlreadyInitialized: 4,
|
|
3651
|
+
// Multisig related errors (matching multisig.move)
|
|
3652
|
+
Multisig_EDuplicatedSigner: 1,
|
|
3653
|
+
Multisig_EInvalidSignatureLength: 2,
|
|
3654
|
+
Multisig_EInvalidSignerLength: 3,
|
|
3655
|
+
Multisig_EQuorumIsZero: 4,
|
|
3656
|
+
Multisig_ESignaturesLessThanQuorum: 5,
|
|
3657
|
+
Multisig_ESignerAlreadyExists: 6,
|
|
3658
|
+
Multisig_ESignerNotFound: 7,
|
|
3659
|
+
Multisig_ESignerNotInCommittee: 8,
|
|
3660
|
+
Multisig_ESignersSizeIsLessThanQuorum: 9,
|
|
3661
|
+
// DVNInfoV1 related errors (matching dvn_info_v1.move)
|
|
3662
|
+
DVNInfoV1_EInvalidData: 1,
|
|
3663
|
+
DVNInfoV1_EInvalidVersion: 2
|
|
3664
|
+
};
|
|
3665
|
+
var _DVN_instances, getUlnObjectAddress_fn, getUlnVerifyTarget_fn, target_fn5;
|
|
3633
3666
|
var DVN = class {
|
|
3634
3667
|
constructor(packageId, client, objects, moduleManager) {
|
|
3635
3668
|
this.moduleManager = moduleManager;
|
|
@@ -3792,6 +3825,29 @@ var DVN = class {
|
|
|
3792
3825
|
});
|
|
3793
3826
|
}
|
|
3794
3827
|
// === Set Functions with Signatures ===
|
|
3828
|
+
/**
|
|
3829
|
+
* Set supported message library (admin with signatures)
|
|
3830
|
+
* @param tx - The transaction to add the move call to
|
|
3831
|
+
* @param adminCap - The admin capability object ID
|
|
3832
|
+
* @param messageLib - The message library address
|
|
3833
|
+
* @param supported - Whether to support or remove support for the message library
|
|
3834
|
+
* @param expiration - Signature expiration timestamp
|
|
3835
|
+
* @param signatures - Multisig signatures for authorization
|
|
3836
|
+
*/
|
|
3837
|
+
setSupportedMessageLibMoveCall(tx, adminCap, messageLib, supported, expiration, signatures) {
|
|
3838
|
+
tx.moveCall({
|
|
3839
|
+
target: __privateMethod(this, _DVN_instances, target_fn5).call(this, "set_supported_message_lib"),
|
|
3840
|
+
arguments: [
|
|
3841
|
+
tx.object(this.objects.dvn),
|
|
3842
|
+
asObject(tx, adminCap),
|
|
3843
|
+
asAddress(tx, messageLib),
|
|
3844
|
+
asBool(tx, supported),
|
|
3845
|
+
asU64(tx, expiration),
|
|
3846
|
+
asBytes(tx, signatures),
|
|
3847
|
+
tx.object.clock()
|
|
3848
|
+
]
|
|
3849
|
+
});
|
|
3850
|
+
}
|
|
3795
3851
|
/**
|
|
3796
3852
|
* Set allowlist status for an OApp sender (admin with signatures)
|
|
3797
3853
|
* @param tx - The transaction to add the move call to
|
|
@@ -3926,23 +3982,24 @@ var DVN = class {
|
|
|
3926
3982
|
}
|
|
3927
3983
|
// Verification Functions
|
|
3928
3984
|
/**
|
|
3929
|
-
* Verify a packet with DVN signatures (admin with signatures)
|
|
3985
|
+
* Verify a packet with DVN signatures (admin with signatures) - returns Call object for ULN302
|
|
3930
3986
|
* @param tx - The transaction to add the move call to
|
|
3931
3987
|
* @param adminCap - The admin capability object ID
|
|
3932
|
-
* @param
|
|
3988
|
+
* @param targetMessageLib - The target message library address (usually ULN302)
|
|
3933
3989
|
* @param packetHeader - The packet header as bytes
|
|
3934
3990
|
* @param payloadHash - The payload hash as bytes
|
|
3935
3991
|
* @param confirmations - Required confirmations count
|
|
3936
3992
|
* @param expiration - Signature expiration timestamp
|
|
3937
3993
|
* @param signatures - DVN multisig signatures
|
|
3994
|
+
* @returns Transaction result containing the verification Call object
|
|
3938
3995
|
*/
|
|
3939
|
-
verifyMoveCall(tx, adminCap,
|
|
3940
|
-
tx.moveCall({
|
|
3996
|
+
verifyMoveCall(tx, adminCap, targetMessageLib, packetHeader, payloadHash, confirmations, expiration, signatures) {
|
|
3997
|
+
return tx.moveCall({
|
|
3941
3998
|
target: __privateMethod(this, _DVN_instances, target_fn5).call(this, "verify"),
|
|
3942
3999
|
arguments: [
|
|
3943
4000
|
tx.object(this.objects.dvn),
|
|
3944
4001
|
asObject(tx, adminCap),
|
|
3945
|
-
|
|
4002
|
+
asAddress(tx, targetMessageLib),
|
|
3946
4003
|
asBytes(tx, packetHeader),
|
|
3947
4004
|
asBytes32(tx, payloadHash, this.moduleManager.getUtils()),
|
|
3948
4005
|
asU64(tx, confirmations),
|
|
@@ -4212,6 +4269,32 @@ var DVN = class {
|
|
|
4212
4269
|
(result) => bcs.bcs.Bool.parse(result[0].value)
|
|
4213
4270
|
);
|
|
4214
4271
|
}
|
|
4272
|
+
/**
|
|
4273
|
+
* Check if a message library is supported by this DVN
|
|
4274
|
+
* @param tx - The transaction to add the move call to
|
|
4275
|
+
* @param messageLib - The message library address to check
|
|
4276
|
+
* @returns Transaction result containing the support status
|
|
4277
|
+
*/
|
|
4278
|
+
isSupportedMessageLibMoveCall(tx, messageLib) {
|
|
4279
|
+
return tx.moveCall({
|
|
4280
|
+
target: __privateMethod(this, _DVN_instances, target_fn5).call(this, "is_supported_message_lib"),
|
|
4281
|
+
arguments: [tx.object(this.objects.dvn), asAddress(tx, messageLib)]
|
|
4282
|
+
});
|
|
4283
|
+
}
|
|
4284
|
+
/**
|
|
4285
|
+
* Check if a message library is supported by this DVN
|
|
4286
|
+
* @param messageLib - The message library address to check
|
|
4287
|
+
* @returns Promise<boolean> - True if the message library is supported
|
|
4288
|
+
*/
|
|
4289
|
+
async isSupportedMessageLib(messageLib) {
|
|
4290
|
+
return executeSimulate(
|
|
4291
|
+
this.client,
|
|
4292
|
+
(tx) => {
|
|
4293
|
+
this.isSupportedMessageLibMoveCall(tx, messageLib);
|
|
4294
|
+
},
|
|
4295
|
+
(result) => bcs.bcs.Bool.parse(result[0].value)
|
|
4296
|
+
);
|
|
4297
|
+
}
|
|
4215
4298
|
/**
|
|
4216
4299
|
* Check if an address is allowlisted
|
|
4217
4300
|
* @param tx - The transaction to add the move call to
|
|
@@ -4564,6 +4647,49 @@ var DVN = class {
|
|
|
4564
4647
|
(result) => bcs.bcs.Bool.parse(result[0].value)
|
|
4565
4648
|
);
|
|
4566
4649
|
}
|
|
4650
|
+
/**
|
|
4651
|
+
* Get DVN object address from worker registry using this DVN's worker capability (as a move call)
|
|
4652
|
+
* This function chains Move calls to decode worker info and extract the DVN object address
|
|
4653
|
+
* @param tx - The transaction to add the move call to
|
|
4654
|
+
* @returns Transaction result containing the DVN object address
|
|
4655
|
+
*/
|
|
4656
|
+
getDvnObjectAddressMoveCall(tx) {
|
|
4657
|
+
const workerCapAddress = this.workerCapAddressMoveCall(tx);
|
|
4658
|
+
const workerInfoBytes = this.moduleManager.getWorkerRegistry(this.client).getWorkerInfoMoveCall(tx, workerCapAddress);
|
|
4659
|
+
const workerInfo = tx.moveCall({
|
|
4660
|
+
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::decode`,
|
|
4661
|
+
arguments: [workerInfoBytes]
|
|
4662
|
+
});
|
|
4663
|
+
const dvnInfoBytes = tx.moveCall({
|
|
4664
|
+
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::worker_info`,
|
|
4665
|
+
arguments: [workerInfo]
|
|
4666
|
+
});
|
|
4667
|
+
const dvnInfo = tx.moveCall({
|
|
4668
|
+
target: `${this.packageId}::dvn_info_v1::decode`,
|
|
4669
|
+
arguments: [dvnInfoBytes]
|
|
4670
|
+
});
|
|
4671
|
+
return tx.moveCall({
|
|
4672
|
+
target: `${this.packageId}::dvn_info_v1::dvn_object`,
|
|
4673
|
+
arguments: [dvnInfo]
|
|
4674
|
+
});
|
|
4675
|
+
}
|
|
4676
|
+
/**
|
|
4677
|
+
* Get DVN object address from worker registry using this DVN's worker capability
|
|
4678
|
+
* This function uses Move calls to decode worker info and extract the DVN object address
|
|
4679
|
+
* @returns Promise<string> - The DVN object address
|
|
4680
|
+
* @throws Will throw an error if worker info is not found or if decoding fails
|
|
4681
|
+
*/
|
|
4682
|
+
async getDvnObjectAddress() {
|
|
4683
|
+
return executeSimulate(
|
|
4684
|
+
this.client,
|
|
4685
|
+
(tx) => {
|
|
4686
|
+
this.getDvnObjectAddressMoveCall(tx);
|
|
4687
|
+
},
|
|
4688
|
+
(result) => {
|
|
4689
|
+
return bcs.bcs.Address.parse(result[0].value);
|
|
4690
|
+
}
|
|
4691
|
+
);
|
|
4692
|
+
}
|
|
4567
4693
|
// === Witness Functions ===
|
|
4568
4694
|
/**
|
|
4569
4695
|
* Create a LayerZero witness for DVN package whitelist registration
|
|
@@ -4851,8 +4977,63 @@ var DVN = class {
|
|
|
4851
4977
|
]
|
|
4852
4978
|
});
|
|
4853
4979
|
}
|
|
4980
|
+
/**
|
|
4981
|
+
* Populate verify with DVN verification and ULN verify call
|
|
4982
|
+
* @param tx - The transaction to add the move call to
|
|
4983
|
+
* @param adminCap - The admin capability object ID
|
|
4984
|
+
* @param targetMessageLib - The target message library address (usually ULN302)
|
|
4985
|
+
* @param targetVerification - The verification object address for the target message library
|
|
4986
|
+
* @param packetHeader - The packet header as bytes
|
|
4987
|
+
* @param payloadHash - The payload hash as bytes
|
|
4988
|
+
* @param confirmations - Required confirmations count
|
|
4989
|
+
* @param expiration - Signature expiration timestamp
|
|
4990
|
+
* @param signatures - DVN multisig signatures
|
|
4991
|
+
*/
|
|
4992
|
+
populateVerify(tx, adminCap, targetMessageLib, targetVerification, packetHeader, payloadHash, confirmations, expiration, signatures) {
|
|
4993
|
+
const dvnCall = this.verifyMoveCall(
|
|
4994
|
+
tx,
|
|
4995
|
+
adminCap,
|
|
4996
|
+
targetMessageLib,
|
|
4997
|
+
packetHeader,
|
|
4998
|
+
payloadHash,
|
|
4999
|
+
confirmations,
|
|
5000
|
+
expiration,
|
|
5001
|
+
signatures
|
|
5002
|
+
);
|
|
5003
|
+
const messageLibObjectAddress = __privateMethod(this, _DVN_instances, getUlnObjectAddress_fn).call(this, targetMessageLib);
|
|
5004
|
+
tx.moveCall({
|
|
5005
|
+
target: __privateMethod(this, _DVN_instances, getUlnVerifyTarget_fn).call(this, targetMessageLib),
|
|
5006
|
+
arguments: [tx.object(messageLibObjectAddress), asObject(tx, targetVerification), dvnCall]
|
|
5007
|
+
});
|
|
5008
|
+
}
|
|
4854
5009
|
};
|
|
4855
5010
|
_DVN_instances = new WeakSet();
|
|
5011
|
+
/**
|
|
5012
|
+
* Get message library object address based on targetMessageLib package address
|
|
5013
|
+
* @param targetMessageLib - The target message library package address
|
|
5014
|
+
* @returns Message library object address
|
|
5015
|
+
* @throws Error if targetMessageLib doesn't match any known message library
|
|
5016
|
+
* @private
|
|
5017
|
+
*/
|
|
5018
|
+
getUlnObjectAddress_fn = function(targetMessageLib) {
|
|
5019
|
+
if (targetMessageLib === this.moduleManager.packages.uln302) {
|
|
5020
|
+
return this.objects.uln302;
|
|
5021
|
+
}
|
|
5022
|
+
throw new Error("Target message library not match objects");
|
|
5023
|
+
};
|
|
5024
|
+
/**
|
|
5025
|
+
* Get ULN verify target path based on targetMessageLib package address
|
|
5026
|
+
* @param targetMessageLib - The target message library package address
|
|
5027
|
+
* @returns Message library verify target path
|
|
5028
|
+
* @throws Error if targetMessageLib doesn't match any known message library
|
|
5029
|
+
* @private
|
|
5030
|
+
*/
|
|
5031
|
+
getUlnVerifyTarget_fn = function(targetMessageLib) {
|
|
5032
|
+
if (targetMessageLib === this.moduleManager.packages.uln302) {
|
|
5033
|
+
return `${targetMessageLib}::uln_302::verify`;
|
|
5034
|
+
}
|
|
5035
|
+
throw new Error("Target message library not match any target");
|
|
5036
|
+
};
|
|
4856
5037
|
/**
|
|
4857
5038
|
* Generate the full target path for move calls
|
|
4858
5039
|
* @param name - The function name to call
|
|
@@ -4937,6 +5118,10 @@ target_fn6 = function(name, module_name = MODULE_NAME6) {
|
|
|
4937
5118
|
|
|
4938
5119
|
// src/modules/workers/dvn-layerzero.ts
|
|
4939
5120
|
var MODULE_NAME7 = "dvn_layerzero";
|
|
5121
|
+
var DVNLayerzeroErrorCode = {
|
|
5122
|
+
// DVNLayerzero related errors (matching dvn_layerzero.move)
|
|
5123
|
+
DVNLayerzero_EWorkerCapNotFromPackage: 1
|
|
5124
|
+
};
|
|
4940
5125
|
var _DvnLayerZero_instances, target_fn7;
|
|
4941
5126
|
var DvnLayerZero = class {
|
|
4942
5127
|
constructor(packageId, client, moduleManager) {
|
|
@@ -4953,6 +5138,7 @@ var DvnLayerZero = class {
|
|
|
4953
5138
|
* @param workerCap - Worker capability object ID or transaction argument
|
|
4954
5139
|
* @param vid - Verifier ID for the DVN or transaction argument
|
|
4955
5140
|
* @param depositAddress - Address for fee deposits or transaction argument
|
|
5141
|
+
* @param supportedMessageLibs - Array of supported message library addresses or transaction argument
|
|
4956
5142
|
* @param priceFeed - Price feed object address or transaction argument
|
|
4957
5143
|
* @param workerFeeLib - Worker fee library address or transaction argument
|
|
4958
5144
|
* @param defaultMultiplierBps - Default multiplier in basis points or transaction argument
|
|
@@ -4960,19 +5146,21 @@ var DvnLayerZero = class {
|
|
|
4960
5146
|
* @param signers - Array of signer public keys as bytes or transaction argument
|
|
4961
5147
|
* @param quorum - Required signature threshold or transaction argument
|
|
4962
5148
|
*/
|
|
4963
|
-
initDvnMoveCall(tx, workerCap, vid, depositAddress, priceFeed, workerFeeLib, defaultMultiplierBps, admins, signers, quorum) {
|
|
5149
|
+
initDvnMoveCall(tx, workerCap, vid, depositAddress, supportedMessageLibs, priceFeed, workerFeeLib, defaultMultiplierBps, admins, signers, quorum) {
|
|
4964
5150
|
tx.moveCall({
|
|
4965
5151
|
target: __privateMethod(this, _DvnLayerZero_instances, target_fn7).call(this, "init_dvn"),
|
|
4966
5152
|
arguments: [
|
|
4967
5153
|
asObject(tx, workerCap),
|
|
4968
5154
|
asU32(tx, vid),
|
|
4969
5155
|
asAddress(tx, depositAddress),
|
|
5156
|
+
asAddressVector(tx, supportedMessageLibs),
|
|
4970
5157
|
asAddress(tx, priceFeed),
|
|
4971
5158
|
asAddress(tx, workerFeeLib),
|
|
4972
5159
|
asU16(tx, defaultMultiplierBps),
|
|
4973
5160
|
asAddressVector(tx, admins),
|
|
4974
5161
|
asBytesVector(tx, signers),
|
|
4975
|
-
asU64(tx, quorum)
|
|
5162
|
+
asU64(tx, quorum),
|
|
5163
|
+
tx.object(this.moduleManager.objects.workerRegistry)
|
|
4976
5164
|
]
|
|
4977
5165
|
});
|
|
4978
5166
|
}
|
|
@@ -4992,7 +5180,10 @@ var MODULE_NAME8 = "executor_worker";
|
|
|
4992
5180
|
var ExecutorErrorCode = {
|
|
4993
5181
|
// Executor related errors (with Executor_ prefix)
|
|
4994
5182
|
Executor_EEidNotSupported: 1,
|
|
4995
|
-
Executor_EInvalidNativeDropAmount: 2
|
|
5183
|
+
Executor_EInvalidNativeDropAmount: 2,
|
|
5184
|
+
// ExecutorInfoV1 related errors (matching executor_info_v1.move)
|
|
5185
|
+
ExecutorInfoV1_EInvalidData: 1,
|
|
5186
|
+
ExecutorInfoV1_EInvalidVersion: 2
|
|
4996
5187
|
};
|
|
4997
5188
|
var _Executor_instances, target_fn8;
|
|
4998
5189
|
var Executor = class {
|
|
@@ -5364,6 +5555,24 @@ var Executor = class {
|
|
|
5364
5555
|
]
|
|
5365
5556
|
});
|
|
5366
5557
|
}
|
|
5558
|
+
/**
|
|
5559
|
+
* Set supported message library (owner only)
|
|
5560
|
+
* @param tx - The transaction to add the move call to
|
|
5561
|
+
* @param ownerCap - The owner capability object ID
|
|
5562
|
+
* @param messageLib - The message library address
|
|
5563
|
+
* @param supported - Whether to support or remove support for the message library
|
|
5564
|
+
*/
|
|
5565
|
+
setSupportedMessageLibMoveCall(tx, ownerCap, messageLib, supported) {
|
|
5566
|
+
tx.moveCall({
|
|
5567
|
+
target: __privateMethod(this, _Executor_instances, target_fn8).call(this, "set_supported_message_lib"),
|
|
5568
|
+
arguments: [
|
|
5569
|
+
tx.object(this.objects.executor),
|
|
5570
|
+
asObject(tx, ownerCap),
|
|
5571
|
+
asAddress(tx, messageLib),
|
|
5572
|
+
asBool(tx, supported)
|
|
5573
|
+
]
|
|
5574
|
+
});
|
|
5575
|
+
}
|
|
5367
5576
|
/**
|
|
5368
5577
|
* Set allowlist status for an OApp sender (owner only)
|
|
5369
5578
|
* @param tx - The transaction to add the move call to
|
|
@@ -5616,6 +5825,32 @@ var Executor = class {
|
|
|
5616
5825
|
(result) => bcs.bcs.Bool.parse(result[0].value)
|
|
5617
5826
|
);
|
|
5618
5827
|
}
|
|
5828
|
+
/**
|
|
5829
|
+
* Check if a message library is supported by this executor
|
|
5830
|
+
* @param tx - The transaction to add the move call to
|
|
5831
|
+
* @param messageLib - The message library address to check
|
|
5832
|
+
* @returns Transaction result containing the support status
|
|
5833
|
+
*/
|
|
5834
|
+
isSupportedMessageLibMoveCall(tx, messageLib) {
|
|
5835
|
+
return tx.moveCall({
|
|
5836
|
+
target: __privateMethod(this, _Executor_instances, target_fn8).call(this, "is_supported_message_lib"),
|
|
5837
|
+
arguments: [tx.object(this.objects.executor), asAddress(tx, messageLib)]
|
|
5838
|
+
});
|
|
5839
|
+
}
|
|
5840
|
+
/**
|
|
5841
|
+
* Check if a message library is supported by this executor
|
|
5842
|
+
* @param messageLib - The message library address to check
|
|
5843
|
+
* @returns Promise<boolean> - True if the message library is supported
|
|
5844
|
+
*/
|
|
5845
|
+
async isSupportedMessageLib(messageLib) {
|
|
5846
|
+
return executeSimulate(
|
|
5847
|
+
this.client,
|
|
5848
|
+
(tx) => {
|
|
5849
|
+
this.isSupportedMessageLibMoveCall(tx, messageLib);
|
|
5850
|
+
},
|
|
5851
|
+
(result) => bcs.bcs.Bool.parse(result[0].value)
|
|
5852
|
+
);
|
|
5853
|
+
}
|
|
5619
5854
|
/**
|
|
5620
5855
|
* Check if an address is allowlisted
|
|
5621
5856
|
* @param tx - The transaction to add the move call to
|
|
@@ -5819,6 +6054,49 @@ var Executor = class {
|
|
|
5819
6054
|
(result) => bcs.bcs.Address.parse(result[0].value)
|
|
5820
6055
|
);
|
|
5821
6056
|
}
|
|
6057
|
+
/**
|
|
6058
|
+
* Get Executor object address from worker registry using this Executor's worker capability (as a move call)
|
|
6059
|
+
* This function chains Move calls to decode worker info and extract the Executor object address
|
|
6060
|
+
* @param tx - The transaction to add the move call to
|
|
6061
|
+
* @returns Transaction result containing the Executor object address
|
|
6062
|
+
*/
|
|
6063
|
+
getExecutorObjectAddressMoveCall(tx) {
|
|
6064
|
+
const workerCapAddress = this.workerCapAddressMoveCall(tx);
|
|
6065
|
+
const workerInfoBytes = this.moduleManager.getWorkerRegistry(this.client).getWorkerInfoMoveCall(tx, workerCapAddress);
|
|
6066
|
+
const workerInfo = tx.moveCall({
|
|
6067
|
+
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::decode`,
|
|
6068
|
+
arguments: [workerInfoBytes]
|
|
6069
|
+
});
|
|
6070
|
+
const executorInfoBytes = tx.moveCall({
|
|
6071
|
+
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::worker_info`,
|
|
6072
|
+
arguments: [workerInfo]
|
|
6073
|
+
});
|
|
6074
|
+
const executorInfo = tx.moveCall({
|
|
6075
|
+
target: `${this.packageId}::executor_info_v1::decode`,
|
|
6076
|
+
arguments: [executorInfoBytes]
|
|
6077
|
+
});
|
|
6078
|
+
return tx.moveCall({
|
|
6079
|
+
target: `${this.packageId}::executor_info_v1::executor_object`,
|
|
6080
|
+
arguments: [executorInfo]
|
|
6081
|
+
});
|
|
6082
|
+
}
|
|
6083
|
+
/**
|
|
6084
|
+
* Get Executor object address from worker registry using this Executor's worker capability
|
|
6085
|
+
* This function uses Move calls to decode worker info and extract the Executor object address
|
|
6086
|
+
* @returns Promise<string> - The Executor object address
|
|
6087
|
+
* @throws Will throw an error if worker info is not found or if decoding fails
|
|
6088
|
+
*/
|
|
6089
|
+
async getExecutorObjectAddress() {
|
|
6090
|
+
return executeSimulate(
|
|
6091
|
+
this.client,
|
|
6092
|
+
(tx) => {
|
|
6093
|
+
this.getExecutorObjectAddressMoveCall(tx);
|
|
6094
|
+
},
|
|
6095
|
+
(result) => {
|
|
6096
|
+
return bcs.bcs.Address.parse(result[0].value);
|
|
6097
|
+
}
|
|
6098
|
+
);
|
|
6099
|
+
}
|
|
5822
6100
|
// === Private Helper Functions ===
|
|
5823
6101
|
parseDstConfig(data) {
|
|
5824
6102
|
const config = DstConfigBcs.parse(data);
|
|
@@ -5846,10 +6124,17 @@ target_fn8 = function(name, module_name = MODULE_NAME8) {
|
|
|
5846
6124
|
// src/modules/workers/executor-fee-lib.ts
|
|
5847
6125
|
var MODULE_NAME9 = "executor_fee_lib";
|
|
5848
6126
|
var ExecutorFeeLibErrorCode = {
|
|
5849
|
-
// Executor Fee Lib related errors (
|
|
6127
|
+
// Executor Fee Lib related errors (matching executor_fee_lib.move)
|
|
5850
6128
|
ExecutorFeeLib_EEidNotSupported: 1,
|
|
5851
|
-
|
|
5852
|
-
|
|
6129
|
+
// ExecutorOption related errors (matching executor_option.move)
|
|
6130
|
+
ExecutorOption_ENoOptions: 1,
|
|
6131
|
+
ExecutorOption_EUnsupportedOptionType: 2,
|
|
6132
|
+
ExecutorOption_EZeroLzReceiveGasProvided: 3,
|
|
6133
|
+
ExecutorOption_EZeroLzComposeGasProvided: 4,
|
|
6134
|
+
ExecutorOption_ENativeAmountExceedsCap: 5,
|
|
6135
|
+
ExecutorOption_EInvalidLzReceiveOption: 6,
|
|
6136
|
+
ExecutorOption_EInvalidNativeDropOption: 7,
|
|
6137
|
+
ExecutorOption_EInvalidLzComposeOption: 8
|
|
5853
6138
|
};
|
|
5854
6139
|
var _ExecutorFeeLib_instances, target_fn9;
|
|
5855
6140
|
var ExecutorFeeLib = class {
|
|
@@ -5914,6 +6199,10 @@ target_fn9 = function(name, module_name = MODULE_NAME9) {
|
|
|
5914
6199
|
|
|
5915
6200
|
// src/modules/workers/executor-layerzero.ts
|
|
5916
6201
|
var MODULE_NAME10 = "executor_layerzero";
|
|
6202
|
+
var ExecutorLayerzeroErrorCode = {
|
|
6203
|
+
// ExecutorLayerzero related errors (matching executor_layerzero.move)
|
|
6204
|
+
ExecutorLayerzero_EWorkerCapNotFromPackage: 1
|
|
6205
|
+
};
|
|
5917
6206
|
var _ExecutorLayerZero_instances, target_fn10;
|
|
5918
6207
|
var ExecutorLayerZero = class {
|
|
5919
6208
|
constructor(packageId, client, moduleManager) {
|
|
@@ -5929,23 +6218,26 @@ var ExecutorLayerZero = class {
|
|
|
5929
6218
|
* @param tx - The transaction to add the move call to
|
|
5930
6219
|
* @param workerCap - Worker capability object ID or transaction argument
|
|
5931
6220
|
* @param depositAddress - Address for fee deposits or transaction argument
|
|
6221
|
+
* @param supportedMessageLibs - Array of supported message library addresses or transaction argument
|
|
5932
6222
|
* @param priceFeed - Price feed object address or transaction argument
|
|
5933
6223
|
* @param workerFeeLib - Worker fee library address or transaction argument
|
|
5934
6224
|
* @param defaultMultiplierBps - Default multiplier in basis points or transaction argument
|
|
5935
6225
|
* @param owner - Owner address for the executor or transaction argument
|
|
5936
6226
|
* @param admins - Array of admin addresses or transaction argument
|
|
5937
6227
|
*/
|
|
5938
|
-
initExecutorMoveCall(tx, workerCap, depositAddress, priceFeed, workerFeeLib, defaultMultiplierBps, owner, admins) {
|
|
6228
|
+
initExecutorMoveCall(tx, workerCap, depositAddress, supportedMessageLibs, priceFeed, workerFeeLib, defaultMultiplierBps, owner, admins) {
|
|
5939
6229
|
tx.moveCall({
|
|
5940
6230
|
target: __privateMethod(this, _ExecutorLayerZero_instances, target_fn10).call(this, "init_executor"),
|
|
5941
6231
|
arguments: [
|
|
5942
6232
|
asObject(tx, workerCap),
|
|
5943
6233
|
asAddress(tx, depositAddress),
|
|
6234
|
+
asAddressVector(tx, supportedMessageLibs),
|
|
5944
6235
|
asAddress(tx, priceFeed),
|
|
5945
6236
|
asAddress(tx, workerFeeLib),
|
|
5946
6237
|
asU16(tx, defaultMultiplierBps),
|
|
5947
6238
|
asAddress(tx, owner),
|
|
5948
|
-
asAddressVector(tx, admins)
|
|
6239
|
+
asAddressVector(tx, admins),
|
|
6240
|
+
tx.object(this.moduleManager.objects.workerRegistry)
|
|
5949
6241
|
]
|
|
5950
6242
|
});
|
|
5951
6243
|
}
|
|
@@ -6442,10 +6734,10 @@ target_fn11 = function(name, module_name = MODULE_NAME11) {
|
|
|
6442
6734
|
};
|
|
6443
6735
|
var MODULE_NAME12 = "treasury";
|
|
6444
6736
|
var TreasuryErrorCode = {
|
|
6445
|
-
// Treasury related errors
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6737
|
+
// Treasury related errors (matching treasury.move)
|
|
6738
|
+
TREASURY_EInvalidFeeRecipient: 1,
|
|
6739
|
+
TREASURY_EInvalidNativeFeeBp: 2,
|
|
6740
|
+
TREASURY_EZroNotEnabled: 3
|
|
6449
6741
|
};
|
|
6450
6742
|
var _Treasury_instances, target_fn12;
|
|
6451
6743
|
var Treasury = class {
|
|
@@ -6695,9 +6987,95 @@ target_fn12 = function(name, module_name = MODULE_NAME12) {
|
|
|
6695
6987
|
return `${this.packageId}::${module_name}::${name}`;
|
|
6696
6988
|
};
|
|
6697
6989
|
|
|
6990
|
+
// src/modules/workers/worker-registry.ts
|
|
6991
|
+
var MODULE_NAME13 = "worker_registry";
|
|
6992
|
+
var WorkerRegistryErrorCode = {
|
|
6993
|
+
// WorkerRegistry related errors (matching worker_registry.move)
|
|
6994
|
+
EWorkerInfoInvalid: 1,
|
|
6995
|
+
EWorkerInfoNotFound: 2
|
|
6996
|
+
};
|
|
6997
|
+
var _WorkerRegistry_instances, target_fn13;
|
|
6998
|
+
var WorkerRegistry = class {
|
|
6999
|
+
/**
|
|
7000
|
+
* Create a new WorkerRegistry instance
|
|
7001
|
+
* @param packageId - The package ID of the worker registry contract
|
|
7002
|
+
* @param client - The Sui client instance
|
|
7003
|
+
* @param objects - Object options containing contract object IDs
|
|
7004
|
+
* @param moduleManager - Module manager for handling dependencies
|
|
7005
|
+
*/
|
|
7006
|
+
constructor(packageId, client, objects, moduleManager) {
|
|
7007
|
+
this.moduleManager = moduleManager;
|
|
7008
|
+
__privateAdd(this, _WorkerRegistry_instances);
|
|
7009
|
+
this.packageId = packageId;
|
|
7010
|
+
this.client = client;
|
|
7011
|
+
this.objects = objects;
|
|
7012
|
+
}
|
|
7013
|
+
// === View Functions ===
|
|
7014
|
+
/**
|
|
7015
|
+
* Get worker info for a specific worker address (as a move call)
|
|
7016
|
+
* This creates a move call that can be used in a PTB (Programmable Transaction Block)
|
|
7017
|
+
* @param tx - The transaction to add the move call to
|
|
7018
|
+
* @param worker - The worker address or transaction argument
|
|
7019
|
+
* @returns TransactionResult - The move call result containing worker info bytes
|
|
7020
|
+
* @throws Will throw an error if worker info is not found (EWorkerInfoNotFound)
|
|
7021
|
+
*/
|
|
7022
|
+
getWorkerInfoMoveCall(tx, worker) {
|
|
7023
|
+
return tx.moveCall({
|
|
7024
|
+
target: __privateMethod(this, _WorkerRegistry_instances, target_fn13).call(this, "get_worker_info"),
|
|
7025
|
+
arguments: [tx.object(this.objects.workerRegistry), asAddress(tx, worker)]
|
|
7026
|
+
});
|
|
7027
|
+
}
|
|
7028
|
+
/**
|
|
7029
|
+
* Get worker info for a specific worker address
|
|
7030
|
+
* Executes the get_worker_info function and returns the worker information bytes
|
|
7031
|
+
* @param worker - The worker address to get info for
|
|
7032
|
+
* @returns Promise<Uint8Array> - The worker information bytes containing encoded worker data
|
|
7033
|
+
* @throws Will throw an error if worker info is not found (EWorkerInfoNotFound)
|
|
7034
|
+
*/
|
|
7035
|
+
async getWorkerInfo(worker) {
|
|
7036
|
+
return executeSimulate(
|
|
7037
|
+
this.client,
|
|
7038
|
+
(tx) => {
|
|
7039
|
+
this.getWorkerInfoMoveCall(tx, worker);
|
|
7040
|
+
},
|
|
7041
|
+
(result) => {
|
|
7042
|
+
return result[0].value;
|
|
7043
|
+
}
|
|
7044
|
+
);
|
|
7045
|
+
}
|
|
7046
|
+
/**
|
|
7047
|
+
* Check if worker info exists for a specific worker address
|
|
7048
|
+
* This is a convenience method that catches EWorkerInfoNotFound errors
|
|
7049
|
+
* @param worker - The worker address to check
|
|
7050
|
+
* @returns Promise<boolean> - True if worker info exists, false if not found
|
|
7051
|
+
* @throws Will re-throw any errors other than EWorkerInfoNotFound
|
|
7052
|
+
*/
|
|
7053
|
+
async hasWorkerInfo(worker) {
|
|
7054
|
+
try {
|
|
7055
|
+
await this.getWorkerInfo(worker);
|
|
7056
|
+
return true;
|
|
7057
|
+
} catch (error) {
|
|
7058
|
+
if (error instanceof Error && error.message.includes("EWorkerInfoNotFound")) {
|
|
7059
|
+
return false;
|
|
7060
|
+
}
|
|
7061
|
+
throw error;
|
|
7062
|
+
}
|
|
7063
|
+
}
|
|
7064
|
+
};
|
|
7065
|
+
_WorkerRegistry_instances = new WeakSet();
|
|
7066
|
+
// === Private Functions ===
|
|
7067
|
+
/**
|
|
7068
|
+
* Generate the target string for move calls
|
|
7069
|
+
* @param functionName - The function name to call
|
|
7070
|
+
* @returns The fully qualified target string for the move call
|
|
7071
|
+
*/
|
|
7072
|
+
target_fn13 = function(functionName) {
|
|
7073
|
+
return `${this.packageId}::${MODULE_NAME13}::${functionName}`;
|
|
7074
|
+
};
|
|
7075
|
+
|
|
6698
7076
|
// src/modules/ptb-builders/dvn-ptb-builder.ts
|
|
6699
|
-
var
|
|
6700
|
-
var _DvnPtbBuilder_instances,
|
|
7077
|
+
var MODULE_NAME14 = "dvn_ptb_builder";
|
|
7078
|
+
var _DvnPtbBuilder_instances, target_fn14;
|
|
6701
7079
|
var DvnPtbBuilder = class {
|
|
6702
7080
|
constructor(packageId, client, objects, moduleManager) {
|
|
6703
7081
|
this.moduleManager = moduleManager;
|
|
@@ -6717,7 +7095,7 @@ var DvnPtbBuilder = class {
|
|
|
6717
7095
|
*/
|
|
6718
7096
|
buildDvnPtbMoveCall(tx, dvnAddress, feelibAddress, priceFeedAddress) {
|
|
6719
7097
|
return tx.moveCall({
|
|
6720
|
-
target: __privateMethod(this, _DvnPtbBuilder_instances,
|
|
7098
|
+
target: __privateMethod(this, _DvnPtbBuilder_instances, target_fn14).call(this, "build_dvn_ptb"),
|
|
6721
7099
|
arguments: [asObject(tx, dvnAddress), asObject(tx, feelibAddress), asObject(tx, priceFeedAddress)]
|
|
6722
7100
|
});
|
|
6723
7101
|
}
|
|
@@ -6730,15 +7108,21 @@ _DvnPtbBuilder_instances = new WeakSet();
|
|
|
6730
7108
|
* @returns The full module path for the move call
|
|
6731
7109
|
* @private
|
|
6732
7110
|
*/
|
|
6733
|
-
|
|
7111
|
+
target_fn14 = function(name, module_name = MODULE_NAME14) {
|
|
6734
7112
|
return `${this.packageId}::${module_name}::${name}`;
|
|
6735
7113
|
};
|
|
6736
|
-
var
|
|
6737
|
-
//
|
|
6738
|
-
|
|
7114
|
+
var EndpointPtbBuilderErrorCode = {
|
|
7115
|
+
// EndpointPtbBuilder related errors (matching endpoint_ptb_builder.move)
|
|
7116
|
+
EndpointPtbBuilder_EBuilderNotFound: 1,
|
|
7117
|
+
EndpointPtbBuilder_EBuilderRegistered: 2,
|
|
7118
|
+
EndpointPtbBuilder_EBuilderUnsupported: 3,
|
|
7119
|
+
EndpointPtbBuilder_EInvalidBounds: 4,
|
|
7120
|
+
EndpointPtbBuilder_EInvalidBuilderAddress: 5,
|
|
7121
|
+
EndpointPtbBuilder_EInvalidLibrary: 6,
|
|
7122
|
+
EndpointPtbBuilder_EUnauthorized: 7
|
|
6739
7123
|
};
|
|
6740
7124
|
var ModuleName = "endpoint_ptb_builder";
|
|
6741
|
-
var _EndpointPtbBuilder_instances,
|
|
7125
|
+
var _EndpointPtbBuilder_instances, target_fn15;
|
|
6742
7126
|
var EndpointPtbBuilder = class {
|
|
6743
7127
|
constructor(packageId, client, objects, moduleManager) {
|
|
6744
7128
|
this.moduleManager = moduleManager;
|
|
@@ -6755,7 +7139,7 @@ var EndpointPtbBuilder = class {
|
|
|
6755
7139
|
*/
|
|
6756
7140
|
registerMsglibPtbBuilderMoveCall(tx, builderInfo) {
|
|
6757
7141
|
tx.moveCall({
|
|
6758
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7142
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "register_msglib_ptb_builder"),
|
|
6759
7143
|
arguments: [
|
|
6760
7144
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6761
7145
|
tx.object(this.objects.endpointPtbBuilderAdminCap),
|
|
@@ -6772,7 +7156,7 @@ var EndpointPtbBuilder = class {
|
|
|
6772
7156
|
*/
|
|
6773
7157
|
setDefaultMsglibPtbBuilderMoveCall(tx, messageLib, ptbBuilder) {
|
|
6774
7158
|
tx.moveCall({
|
|
6775
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7159
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "set_default_msglib_ptb_builder"),
|
|
6776
7160
|
arguments: [
|
|
6777
7161
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6778
7162
|
tx.object(this.objects.endpointPtbBuilderAdminCap),
|
|
@@ -6788,7 +7172,7 @@ var EndpointPtbBuilder = class {
|
|
|
6788
7172
|
*/
|
|
6789
7173
|
setMsglibPtbBuilderMoveCall(tx, call) {
|
|
6790
7174
|
tx.moveCall({
|
|
6791
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7175
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "set_msglib_ptb_builder"),
|
|
6792
7176
|
arguments: [tx.object(this.objects.endpointPtbBuilder), call]
|
|
6793
7177
|
});
|
|
6794
7178
|
}
|
|
@@ -6801,7 +7185,7 @@ var EndpointPtbBuilder = class {
|
|
|
6801
7185
|
*/
|
|
6802
7186
|
buildQuotePtbByCallMoveCall(tx, endpointQuoteCall) {
|
|
6803
7187
|
return tx.moveCall({
|
|
6804
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7188
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "build_quote_ptb_by_call"),
|
|
6805
7189
|
arguments: [
|
|
6806
7190
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6807
7191
|
tx.object(this.objects.endpointV2),
|
|
@@ -6817,7 +7201,7 @@ var EndpointPtbBuilder = class {
|
|
|
6817
7201
|
*/
|
|
6818
7202
|
buildSendPtbByCallMoveCall(tx, endpointSendCall) {
|
|
6819
7203
|
return tx.moveCall({
|
|
6820
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7204
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "build_send_ptb_by_call"),
|
|
6821
7205
|
arguments: [
|
|
6822
7206
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6823
7207
|
tx.object(this.objects.endpointV2),
|
|
@@ -6833,7 +7217,7 @@ var EndpointPtbBuilder = class {
|
|
|
6833
7217
|
*/
|
|
6834
7218
|
buildSetConfigPtbByCallMoveCall(tx, messageLibSetConfigCall) {
|
|
6835
7219
|
return tx.moveCall({
|
|
6836
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7220
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "build_set_config_ptb_by_call"),
|
|
6837
7221
|
arguments: [tx.object(this.objects.endpointPtbBuilder), messageLibSetConfigCall]
|
|
6838
7222
|
});
|
|
6839
7223
|
}
|
|
@@ -6846,7 +7230,7 @@ var EndpointPtbBuilder = class {
|
|
|
6846
7230
|
*/
|
|
6847
7231
|
buildQuotePtbMoveCall(tx, sender, dstEid) {
|
|
6848
7232
|
return tx.moveCall({
|
|
6849
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7233
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "build_quote_ptb"),
|
|
6850
7234
|
arguments: [
|
|
6851
7235
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6852
7236
|
tx.object(this.objects.endpointV2),
|
|
@@ -6865,7 +7249,7 @@ var EndpointPtbBuilder = class {
|
|
|
6865
7249
|
*/
|
|
6866
7250
|
buildSendPtbMoveCall(tx, sender, dstEid, refund) {
|
|
6867
7251
|
return tx.moveCall({
|
|
6868
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7252
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "build_send_ptb"),
|
|
6869
7253
|
arguments: [
|
|
6870
7254
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6871
7255
|
tx.object(this.objects.endpointV2),
|
|
@@ -6884,7 +7268,7 @@ var EndpointPtbBuilder = class {
|
|
|
6884
7268
|
*/
|
|
6885
7269
|
buildSetConfigPtbMoveCall(tx, sender, lib) {
|
|
6886
7270
|
return tx.moveCall({
|
|
6887
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7271
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "build_set_config_ptb"),
|
|
6888
7272
|
arguments: [
|
|
6889
7273
|
tx.object(this.objects.endpointPtbBuilder),
|
|
6890
7274
|
tx.object(this.objects.endpointV2),
|
|
@@ -6901,7 +7285,7 @@ var EndpointPtbBuilder = class {
|
|
|
6901
7285
|
*/
|
|
6902
7286
|
endpointQuoteCallIdMoveCall(tx) {
|
|
6903
7287
|
return tx.moveCall({
|
|
6904
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7288
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "endpoint_quote_call_id"),
|
|
6905
7289
|
arguments: []
|
|
6906
7290
|
});
|
|
6907
7291
|
}
|
|
@@ -6925,7 +7309,7 @@ var EndpointPtbBuilder = class {
|
|
|
6925
7309
|
*/
|
|
6926
7310
|
endpointSendCallIdMoveCall(tx) {
|
|
6927
7311
|
return tx.moveCall({
|
|
6928
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7312
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "endpoint_send_call_id"),
|
|
6929
7313
|
arguments: []
|
|
6930
7314
|
});
|
|
6931
7315
|
}
|
|
@@ -6949,7 +7333,7 @@ var EndpointPtbBuilder = class {
|
|
|
6949
7333
|
*/
|
|
6950
7334
|
messageLibQuoteCallIdMoveCall(tx) {
|
|
6951
7335
|
return tx.moveCall({
|
|
6952
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7336
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "message_lib_quote_call_id"),
|
|
6953
7337
|
arguments: []
|
|
6954
7338
|
});
|
|
6955
7339
|
}
|
|
@@ -6973,7 +7357,7 @@ var EndpointPtbBuilder = class {
|
|
|
6973
7357
|
*/
|
|
6974
7358
|
messageLibSendCallIdMoveCall(tx) {
|
|
6975
7359
|
return tx.moveCall({
|
|
6976
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7360
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "message_lib_send_call_id"),
|
|
6977
7361
|
arguments: []
|
|
6978
7362
|
});
|
|
6979
7363
|
}
|
|
@@ -6997,7 +7381,7 @@ var EndpointPtbBuilder = class {
|
|
|
6997
7381
|
*/
|
|
6998
7382
|
messageLibSetConfigCallIdMoveCall(tx) {
|
|
6999
7383
|
return tx.moveCall({
|
|
7000
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7384
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "message_lib_set_config_call_id"),
|
|
7001
7385
|
arguments: []
|
|
7002
7386
|
});
|
|
7003
7387
|
}
|
|
@@ -7023,7 +7407,7 @@ var EndpointPtbBuilder = class {
|
|
|
7023
7407
|
*/
|
|
7024
7408
|
getDefaultMsglibPtbBuilderMoveCall(tx, lib) {
|
|
7025
7409
|
return tx.moveCall({
|
|
7026
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7410
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "get_default_msglib_ptb_builder"),
|
|
7027
7411
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, lib)]
|
|
7028
7412
|
});
|
|
7029
7413
|
}
|
|
@@ -7050,7 +7434,7 @@ var EndpointPtbBuilder = class {
|
|
|
7050
7434
|
*/
|
|
7051
7435
|
getOappMsglibPtbBuilderMoveCall(tx, oapp, lib) {
|
|
7052
7436
|
return tx.moveCall({
|
|
7053
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7437
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "get_oapp_msglib_ptb_builder"),
|
|
7054
7438
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, oapp), asAddress(tx, lib)]
|
|
7055
7439
|
});
|
|
7056
7440
|
}
|
|
@@ -7078,7 +7462,7 @@ var EndpointPtbBuilder = class {
|
|
|
7078
7462
|
*/
|
|
7079
7463
|
getEffectiveMsglibPtbBuilderMoveCall(tx, oapp, lib) {
|
|
7080
7464
|
return tx.moveCall({
|
|
7081
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7465
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "get_effective_msglib_ptb_builder"),
|
|
7082
7466
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, oapp), asAddress(tx, lib)]
|
|
7083
7467
|
});
|
|
7084
7468
|
}
|
|
@@ -7105,7 +7489,7 @@ var EndpointPtbBuilder = class {
|
|
|
7105
7489
|
*/
|
|
7106
7490
|
getMsglibPtbBuilderInfoMoveCall(tx, builder) {
|
|
7107
7491
|
return tx.moveCall({
|
|
7108
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7492
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "get_msglib_ptb_builder_info"),
|
|
7109
7493
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, builder)]
|
|
7110
7494
|
});
|
|
7111
7495
|
}
|
|
@@ -7117,7 +7501,7 @@ var EndpointPtbBuilder = class {
|
|
|
7117
7501
|
*/
|
|
7118
7502
|
isMsglibPtbBuilderRegisteredMoveCall(tx, builder) {
|
|
7119
7503
|
return tx.moveCall({
|
|
7120
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7504
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "is_msglib_ptb_builder_registered"),
|
|
7121
7505
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, builder)]
|
|
7122
7506
|
});
|
|
7123
7507
|
}
|
|
@@ -7142,7 +7526,7 @@ var EndpointPtbBuilder = class {
|
|
|
7142
7526
|
*/
|
|
7143
7527
|
registeredMsglibPtbBuildersCountMoveCall(tx) {
|
|
7144
7528
|
return tx.moveCall({
|
|
7145
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7529
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn15).call(this, "registered_msglib_ptb_builders_count"),
|
|
7146
7530
|
arguments: [tx.object(this.objects.endpointPtbBuilder)]
|
|
7147
7531
|
});
|
|
7148
7532
|
}
|
|
@@ -7168,13 +7552,13 @@ _EndpointPtbBuilder_instances = new WeakSet();
|
|
|
7168
7552
|
* @returns The full module path for the move call
|
|
7169
7553
|
* @private
|
|
7170
7554
|
*/
|
|
7171
|
-
|
|
7555
|
+
target_fn15 = function(name) {
|
|
7172
7556
|
return `${this.packageId}::${ModuleName}::${name}`;
|
|
7173
7557
|
};
|
|
7174
7558
|
|
|
7175
7559
|
// src/modules/ptb-builders/executor-ptb-builder.ts
|
|
7176
|
-
var
|
|
7177
|
-
var _ExecutorPtbBuilder_instances,
|
|
7560
|
+
var MODULE_NAME15 = "executor_ptb_builder";
|
|
7561
|
+
var _ExecutorPtbBuilder_instances, target_fn16;
|
|
7178
7562
|
var ExecutorPtbBuilder = class {
|
|
7179
7563
|
constructor(packageId, client, objects, moduleManager) {
|
|
7180
7564
|
this.moduleManager = moduleManager;
|
|
@@ -7194,7 +7578,7 @@ var ExecutorPtbBuilder = class {
|
|
|
7194
7578
|
*/
|
|
7195
7579
|
buildExecutorPtbMoveCall(tx, executorAddress, feelibAddress, priceFeedAddress) {
|
|
7196
7580
|
return tx.moveCall({
|
|
7197
|
-
target: __privateMethod(this, _ExecutorPtbBuilder_instances,
|
|
7581
|
+
target: __privateMethod(this, _ExecutorPtbBuilder_instances, target_fn16).call(this, "build_executor_ptb"),
|
|
7198
7582
|
arguments: [asObject(tx, executorAddress), asObject(tx, feelibAddress), asObject(tx, priceFeedAddress)]
|
|
7199
7583
|
});
|
|
7200
7584
|
}
|
|
@@ -7207,15 +7591,15 @@ _ExecutorPtbBuilder_instances = new WeakSet();
|
|
|
7207
7591
|
* @returns The full module path for the move call
|
|
7208
7592
|
* @private
|
|
7209
7593
|
*/
|
|
7210
|
-
|
|
7594
|
+
target_fn16 = function(name, module_name = MODULE_NAME15) {
|
|
7211
7595
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7212
7596
|
};
|
|
7213
|
-
var
|
|
7597
|
+
var MODULE_NAME16 = "package_whitelist_validator";
|
|
7214
7598
|
var ValidatorErrorCode = {
|
|
7215
7599
|
// PTB Whitelist related errors
|
|
7216
7600
|
EInvalidWitness: 1
|
|
7217
7601
|
};
|
|
7218
|
-
var _PackageWhitelistValidator_instances,
|
|
7602
|
+
var _PackageWhitelistValidator_instances, target_fn17;
|
|
7219
7603
|
var PackageWhitelistValidator = class {
|
|
7220
7604
|
constructor(packageId, client, objects, moduleManager) {
|
|
7221
7605
|
this.moduleManager = moduleManager;
|
|
@@ -7235,7 +7619,7 @@ var PackageWhitelistValidator = class {
|
|
|
7235
7619
|
*/
|
|
7236
7620
|
addWhitelistMoveCall(tx, witness, witnessType) {
|
|
7237
7621
|
tx.moveCall({
|
|
7238
|
-
target: __privateMethod(this, _PackageWhitelistValidator_instances,
|
|
7622
|
+
target: __privateMethod(this, _PackageWhitelistValidator_instances, target_fn17).call(this, "add_whitelist"),
|
|
7239
7623
|
typeArguments: [witnessType],
|
|
7240
7624
|
arguments: [tx.object(this.objects.packageWhitelistValidator), witness]
|
|
7241
7625
|
});
|
|
@@ -7249,7 +7633,7 @@ var PackageWhitelistValidator = class {
|
|
|
7249
7633
|
*/
|
|
7250
7634
|
isWhitelistedMoveCall(tx, packageAddress) {
|
|
7251
7635
|
return tx.moveCall({
|
|
7252
|
-
target: __privateMethod(this, _PackageWhitelistValidator_instances,
|
|
7636
|
+
target: __privateMethod(this, _PackageWhitelistValidator_instances, target_fn17).call(this, "is_whitelisted"),
|
|
7253
7637
|
arguments: [tx.object(this.objects.packageWhitelistValidator), asAddress(tx, packageAddress)]
|
|
7254
7638
|
});
|
|
7255
7639
|
}
|
|
@@ -7261,7 +7645,7 @@ var PackageWhitelistValidator = class {
|
|
|
7261
7645
|
*/
|
|
7262
7646
|
validateMoveCall(tx, packageAddresses) {
|
|
7263
7647
|
return tx.moveCall({
|
|
7264
|
-
target: __privateMethod(this, _PackageWhitelistValidator_instances,
|
|
7648
|
+
target: __privateMethod(this, _PackageWhitelistValidator_instances, target_fn17).call(this, "validate"),
|
|
7265
7649
|
arguments: [
|
|
7266
7650
|
tx.object(this.objects.packageWhitelistValidator),
|
|
7267
7651
|
tx.pure(bcs.bcs.vector(bcs.bcs.Address).serialize(packageAddresses))
|
|
@@ -7322,11 +7706,18 @@ _PackageWhitelistValidator_instances = new WeakSet();
|
|
|
7322
7706
|
* @returns The full module path for the move call
|
|
7323
7707
|
* @private
|
|
7324
7708
|
*/
|
|
7325
|
-
|
|
7709
|
+
target_fn17 = function(name, module_name = MODULE_NAME16) {
|
|
7326
7710
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7327
7711
|
};
|
|
7328
7712
|
var MOVE_CALL_MODULE_NAME = "move_call";
|
|
7329
|
-
var
|
|
7713
|
+
var PtbBuilderErrorCode = {
|
|
7714
|
+
// MoveCallsBuilder related errors (matching move_calls_builder.move)
|
|
7715
|
+
MoveCallsBuilder_EInvalidMoveCallResult: 1,
|
|
7716
|
+
MoveCallsBuilder_EResultIDNotFound: 2,
|
|
7717
|
+
// Argument related errors (matching argument.move)
|
|
7718
|
+
Argument_EInvalidArgument: 1
|
|
7719
|
+
};
|
|
7720
|
+
var _PtbBuilder_instances, buildMoveCalls_fn, appendMoveCall_fn, decodeMoveCalls_fn, decodeMoveCallsFromOAppInfoV1_fn, decodeMoveCallsBytes_fn, calculateOffset_fn;
|
|
7330
7721
|
var PtbBuilder = class {
|
|
7331
7722
|
constructor(packageId, client) {
|
|
7332
7723
|
__privateAdd(this, _PtbBuilder_instances);
|
|
@@ -7355,8 +7746,8 @@ var PtbBuilder = class {
|
|
|
7355
7746
|
const ptbCallsResult = await simulateTransaction(this.client, tx, sender);
|
|
7356
7747
|
const buffer = Buffer.from(bcs.bcs.vector(bcs.bcs.u8()).parse(ptbCallsResult[0].value));
|
|
7357
7748
|
const version = buffer.readInt16BE();
|
|
7358
|
-
if (version ===
|
|
7359
|
-
return __privateMethod(this, _PtbBuilder_instances,
|
|
7749
|
+
if (version === OAppInfoVersion.VERSION_1) {
|
|
7750
|
+
return __privateMethod(this, _PtbBuilder_instances, decodeMoveCallsFromOAppInfoV1_fn).call(this, new Uint8Array(buffer.subarray(2)));
|
|
7360
7751
|
}
|
|
7361
7752
|
throw new Error(`Unknown version: ${version}`);
|
|
7362
7753
|
}
|
|
@@ -7515,6 +7906,10 @@ decodeMoveCalls_fn = function(viewResult) {
|
|
|
7515
7906
|
}
|
|
7516
7907
|
return __privateMethod(this, _PtbBuilder_instances, decodeMoveCallsBytes_fn).call(this, value);
|
|
7517
7908
|
};
|
|
7909
|
+
decodeMoveCallsFromOAppInfoV1_fn = function(bytes) {
|
|
7910
|
+
const oappInfo = OAppInfoV1Bcs.parse(bytes);
|
|
7911
|
+
return __privateMethod(this, _PtbBuilder_instances, decodeMoveCallsBytes_fn).call(this, new Uint8Array(oappInfo.lz_receive_info).subarray(2));
|
|
7912
|
+
};
|
|
7518
7913
|
/**
|
|
7519
7914
|
* Decode move calls from raw bytes
|
|
7520
7915
|
* @param bytes - The raw bytes containing encoded move calls
|
|
@@ -7568,8 +7963,8 @@ calculateOffset_fn = function(index, baseOffset, placeholderInfos) {
|
|
|
7568
7963
|
};
|
|
7569
7964
|
|
|
7570
7965
|
// src/modules/ptb-builders/simple-message-lib-ptb-builder.ts
|
|
7571
|
-
var
|
|
7572
|
-
var _SimpleMessageLibPtbBuilder_instances,
|
|
7966
|
+
var MODULE_NAME17 = "simple_msglib_ptb_builder";
|
|
7967
|
+
var _SimpleMessageLibPtbBuilder_instances, target_fn18;
|
|
7573
7968
|
var SimpleMessageLibPtbBuilder = class {
|
|
7574
7969
|
constructor(packageId, client, objects, moduleManager) {
|
|
7575
7970
|
this.moduleManager = moduleManager;
|
|
@@ -7586,7 +7981,7 @@ var SimpleMessageLibPtbBuilder = class {
|
|
|
7586
7981
|
*/
|
|
7587
7982
|
getPtbBuilderInfoMoveCall(tx) {
|
|
7588
7983
|
return tx.moveCall({
|
|
7589
|
-
target: __privateMethod(this, _SimpleMessageLibPtbBuilder_instances,
|
|
7984
|
+
target: __privateMethod(this, _SimpleMessageLibPtbBuilder_instances, target_fn18).call(this, "get_ptb_builder_info"),
|
|
7590
7985
|
arguments: [
|
|
7591
7986
|
tx.object(this.objects.simpleMessageLibPtbBuilder),
|
|
7592
7987
|
tx.object(this.objects.endpointV2),
|
|
@@ -7603,11 +7998,15 @@ _SimpleMessageLibPtbBuilder_instances = new WeakSet();
|
|
|
7603
7998
|
* @returns The full module path for the move call
|
|
7604
7999
|
* @private
|
|
7605
8000
|
*/
|
|
7606
|
-
|
|
8001
|
+
target_fn18 = function(name, module_name = MODULE_NAME17) {
|
|
7607
8002
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7608
8003
|
};
|
|
7609
|
-
var
|
|
7610
|
-
var
|
|
8004
|
+
var MODULE_NAME18 = "uln_302_ptb_builder";
|
|
8005
|
+
var Uln302PtbBuilderErrorCode = {
|
|
8006
|
+
// ULN302 PTB Builder related errors (matching uln_302_ptb_builder.move)
|
|
8007
|
+
Uln302PtbBuilder_EWorkerPtbsNotFound: 1
|
|
8008
|
+
};
|
|
8009
|
+
var _Uln302PtbBuilder_instances, target_fn19;
|
|
7611
8010
|
var Uln302PtbBuilder = class {
|
|
7612
8011
|
constructor(packageId, client, objects, moduleManager) {
|
|
7613
8012
|
this.moduleManager = moduleManager;
|
|
@@ -7624,7 +8023,7 @@ var Uln302PtbBuilder = class {
|
|
|
7624
8023
|
*/
|
|
7625
8024
|
setWorkerPtbsMoveCall(tx, call) {
|
|
7626
8025
|
tx.moveCall({
|
|
7627
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8026
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "set_worker_ptbs"),
|
|
7628
8027
|
arguments: [tx.object(this.objects.uln302PtbBuilder), call]
|
|
7629
8028
|
});
|
|
7630
8029
|
}
|
|
@@ -7636,7 +8035,7 @@ var Uln302PtbBuilder = class {
|
|
|
7636
8035
|
*/
|
|
7637
8036
|
getPtbBuilderInfoMoveCall(tx) {
|
|
7638
8037
|
return tx.moveCall({
|
|
7639
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8038
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "get_ptb_builder_info"),
|
|
7640
8039
|
arguments: [
|
|
7641
8040
|
tx.object(this.objects.uln302PtbBuilder),
|
|
7642
8041
|
tx.object(this.objects.uln302),
|
|
@@ -7653,7 +8052,7 @@ var Uln302PtbBuilder = class {
|
|
|
7653
8052
|
*/
|
|
7654
8053
|
isWorkerPtbsSetMoveCall(tx, workerCap) {
|
|
7655
8054
|
return tx.moveCall({
|
|
7656
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8055
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "is_worker_ptbs_set"),
|
|
7657
8056
|
arguments: [tx.object(this.objects.uln302PtbBuilder), asAddress(tx, workerCap)]
|
|
7658
8057
|
});
|
|
7659
8058
|
}
|
|
@@ -7679,7 +8078,7 @@ var Uln302PtbBuilder = class {
|
|
|
7679
8078
|
*/
|
|
7680
8079
|
getWorkerPtbsMoveCall(tx, workerCap) {
|
|
7681
8080
|
return tx.moveCall({
|
|
7682
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8081
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "get_worker_ptbs"),
|
|
7683
8082
|
arguments: [tx.object(this.objects.uln302PtbBuilder), asAddress(tx, workerCap)]
|
|
7684
8083
|
});
|
|
7685
8084
|
}
|
|
@@ -7691,7 +8090,7 @@ var Uln302PtbBuilder = class {
|
|
|
7691
8090
|
*/
|
|
7692
8091
|
executorGetFeeCallIdMoveCall(tx) {
|
|
7693
8092
|
return tx.moveCall({
|
|
7694
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8093
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "executor_get_fee_call_id"),
|
|
7695
8094
|
arguments: []
|
|
7696
8095
|
});
|
|
7697
8096
|
}
|
|
@@ -7715,7 +8114,7 @@ var Uln302PtbBuilder = class {
|
|
|
7715
8114
|
*/
|
|
7716
8115
|
dvnGetFeeMultiCallIdMoveCall(tx) {
|
|
7717
8116
|
return tx.moveCall({
|
|
7718
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8117
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "dvn_get_fee_multi_call_id"),
|
|
7719
8118
|
arguments: []
|
|
7720
8119
|
});
|
|
7721
8120
|
}
|
|
@@ -7739,7 +8138,7 @@ var Uln302PtbBuilder = class {
|
|
|
7739
8138
|
*/
|
|
7740
8139
|
executorAssignJobCallIdMoveCall(tx) {
|
|
7741
8140
|
return tx.moveCall({
|
|
7742
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8141
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "executor_assign_job_call_id"),
|
|
7743
8142
|
arguments: []
|
|
7744
8143
|
});
|
|
7745
8144
|
}
|
|
@@ -7763,7 +8162,7 @@ var Uln302PtbBuilder = class {
|
|
|
7763
8162
|
*/
|
|
7764
8163
|
dvnAssignJobMultiCallIdMoveCall(tx) {
|
|
7765
8164
|
return tx.moveCall({
|
|
7766
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
8165
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn19).call(this, "dvn_assign_job_multi_call_id"),
|
|
7767
8166
|
arguments: []
|
|
7768
8167
|
});
|
|
7769
8168
|
}
|
|
@@ -7789,13 +8188,13 @@ _Uln302PtbBuilder_instances = new WeakSet();
|
|
|
7789
8188
|
* @returns The full module path for the move call
|
|
7790
8189
|
* @private
|
|
7791
8190
|
*/
|
|
7792
|
-
|
|
8191
|
+
target_fn19 = function(name, module_name = MODULE_NAME18) {
|
|
7793
8192
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7794
8193
|
};
|
|
7795
8194
|
|
|
7796
8195
|
// src/modules/ptb-builders/blocked-message-lib-ptb-builder.ts
|
|
7797
|
-
var
|
|
7798
|
-
var _BlockedMessageLibPtbBuilder_instances,
|
|
8196
|
+
var MODULE_NAME19 = "blocked_msglib_ptb_builder";
|
|
8197
|
+
var _BlockedMessageLibPtbBuilder_instances, target_fn20;
|
|
7799
8198
|
var BlockedMessageLibPtbBuilder = class {
|
|
7800
8199
|
constructor(packageId, client, objects, moduleManager) {
|
|
7801
8200
|
this.moduleManager = moduleManager;
|
|
@@ -7812,7 +8211,7 @@ var BlockedMessageLibPtbBuilder = class {
|
|
|
7812
8211
|
*/
|
|
7813
8212
|
getPtbBuilderInfoMoveCall(tx) {
|
|
7814
8213
|
return tx.moveCall({
|
|
7815
|
-
target: __privateMethod(this, _BlockedMessageLibPtbBuilder_instances,
|
|
8214
|
+
target: __privateMethod(this, _BlockedMessageLibPtbBuilder_instances, target_fn20).call(this, "get_ptb_builder_info"),
|
|
7816
8215
|
arguments: [tx.object(this.objects.blockedMessageLibPtbBuilder), tx.object(this.objects.blockedMessageLib)]
|
|
7817
8216
|
});
|
|
7818
8217
|
}
|
|
@@ -7825,22 +8224,22 @@ _BlockedMessageLibPtbBuilder_instances = new WeakSet();
|
|
|
7825
8224
|
* @returns The full module path for the move call
|
|
7826
8225
|
* @private
|
|
7827
8226
|
*/
|
|
7828
|
-
|
|
8227
|
+
target_fn20 = function(name, module_name = MODULE_NAME19) {
|
|
7829
8228
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7830
8229
|
};
|
|
7831
|
-
var
|
|
8230
|
+
var MODULE_NAME20 = "counter";
|
|
7832
8231
|
var CounterErrorCode = {
|
|
7833
|
-
// Counter related errors
|
|
8232
|
+
// Counter related errors (matching counter.move)
|
|
7834
8233
|
Counter_EInvalidMsgType: 0,
|
|
7835
8234
|
Counter_EInvalidValue: 1,
|
|
7836
8235
|
Counter_EInvalidNonce: 2,
|
|
7837
8236
|
Counter_EOnlyEndpoint: 3,
|
|
7838
8237
|
Counter_ESelfComposeOnly: 4,
|
|
7839
8238
|
Counter_EInvalidOApp: 5,
|
|
7840
|
-
|
|
7841
|
-
|
|
8239
|
+
// OptionsBuilder related errors (matching options_builder.move)
|
|
8240
|
+
OptionsBuilder_EInvalidSize: 1
|
|
7842
8241
|
};
|
|
7843
|
-
var _Counter_instances,
|
|
8242
|
+
var _Counter_instances, target_fn21;
|
|
7844
8243
|
var Counter = class {
|
|
7845
8244
|
constructor(packageId, client, objects, moduleManager) {
|
|
7846
8245
|
this.moduleManager = moduleManager;
|
|
@@ -7858,7 +8257,7 @@ var Counter = class {
|
|
|
7858
8257
|
*/
|
|
7859
8258
|
initCounterMoveCall(tx, lzReceiveInfo, lzComposeInfo) {
|
|
7860
8259
|
tx.moveCall({
|
|
7861
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8260
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "init_counter"),
|
|
7862
8261
|
arguments: [
|
|
7863
8262
|
tx.object(this.objects.counter),
|
|
7864
8263
|
tx.object(this.objects.counterOapp),
|
|
@@ -7877,10 +8276,10 @@ var Counter = class {
|
|
|
7877
8276
|
* @param payInZero - Whether to pay in ZRO tokens
|
|
7878
8277
|
* @returns Promise<MessagingFee> - The calculated messaging fees
|
|
7879
8278
|
*/
|
|
7880
|
-
async quote(dstEid, msgType, options, payInZero) {
|
|
8279
|
+
async quote(dstEid, msgType, options, payInZero, validators) {
|
|
7881
8280
|
const tx = new transactions.Transaction();
|
|
7882
8281
|
const quoteCall = tx.moveCall({
|
|
7883
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8282
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "quote"),
|
|
7884
8283
|
arguments: [
|
|
7885
8284
|
tx.object(this.objects.counter),
|
|
7886
8285
|
tx.object(this.objects.counterOapp),
|
|
@@ -7890,7 +8289,7 @@ var Counter = class {
|
|
|
7890
8289
|
asBool(tx, payInZero)
|
|
7891
8290
|
]
|
|
7892
8291
|
});
|
|
7893
|
-
return this.moduleManager.getEndpoint().quote(tx, quoteCall);
|
|
8292
|
+
return this.moduleManager.getEndpoint().quote(tx, quoteCall, void 0, validators);
|
|
7894
8293
|
}
|
|
7895
8294
|
/**
|
|
7896
8295
|
* Increment counter on destination chain
|
|
@@ -7899,86 +8298,70 @@ var Counter = class {
|
|
|
7899
8298
|
* @param dstEid - Destination endpoint ID
|
|
7900
8299
|
* @param msgType - Message type (SEND or SEND_AND_CALL)
|
|
7901
8300
|
* @param options - Execution options as bytes
|
|
7902
|
-
* @param sendValue - Value to send with the message
|
|
7903
8301
|
* @param nativeFee - Native token fee amount
|
|
7904
8302
|
* @param zroFee - ZRO token fee amount
|
|
7905
8303
|
* @param refundAddress - Address for fee refunds
|
|
7906
8304
|
*/
|
|
7907
|
-
async incrementMoveCall(tx, sender, dstEid, msgType, options,
|
|
8305
|
+
async incrementMoveCall(tx, sender, dstEid, msgType, options, nativeFee, zroFee, refundAddress, validators) {
|
|
7908
8306
|
const [nativeToken] = tx.splitCoins(tx.gas, [asU64(tx, nativeFee)]);
|
|
7909
8307
|
const zroToken = isTransactionArgument(zroFee) ? zroFee : await this.moduleManager.getZro().splitOptionZroTokenMoveCall(tx, sender, zroFee);
|
|
7910
8308
|
const incrementCall = tx.moveCall({
|
|
7911
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8309
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "increment"),
|
|
7912
8310
|
arguments: [
|
|
7913
8311
|
tx.object(this.objects.counter),
|
|
7914
8312
|
tx.object(this.objects.counterOapp),
|
|
7915
8313
|
asU32(tx, dstEid),
|
|
7916
8314
|
asU8(tx, msgType),
|
|
7917
8315
|
asBytes(tx, options),
|
|
7918
|
-
asU64(tx, sendValue),
|
|
7919
8316
|
nativeToken,
|
|
7920
8317
|
zroToken,
|
|
7921
8318
|
asAddress(tx, refundAddress)
|
|
7922
8319
|
]
|
|
7923
8320
|
});
|
|
7924
|
-
await this.moduleManager.getEndpoint().populateSendTransaction(tx, incrementCall, sender);
|
|
8321
|
+
await this.moduleManager.getEndpoint().populateSendTransaction(tx, incrementCall, sender, validators);
|
|
7925
8322
|
}
|
|
7926
8323
|
/**
|
|
7927
|
-
* Set
|
|
8324
|
+
* Set composer information for counter
|
|
7928
8325
|
* @param tx - The transaction to add the move call to
|
|
7929
|
-
* @param
|
|
7930
|
-
* @param eid - The peer endpoint ID or transaction argument
|
|
7931
|
-
* @param peer - The peer counter address as bytes or transaction argument
|
|
8326
|
+
* @param composerInfo - Composer information including lz_compose execution information as bytes
|
|
7932
8327
|
*/
|
|
7933
|
-
|
|
8328
|
+
setComposerInfoMoveCall(tx, composerInfo) {
|
|
7934
8329
|
tx.moveCall({
|
|
7935
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8330
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "set_composer_info"),
|
|
7936
8331
|
arguments: [
|
|
7937
8332
|
tx.object(this.objects.counter),
|
|
7938
8333
|
tx.object(this.objects.counterOapp),
|
|
7939
8334
|
tx.object(this.objects.counterAdminCap),
|
|
7940
8335
|
tx.object(this.objects.endpointV2),
|
|
7941
|
-
|
|
7942
|
-
asU32(tx, eid),
|
|
7943
|
-
asBytes32(tx, peer, this.moduleManager.getUtils())
|
|
8336
|
+
asBytes(tx, composerInfo)
|
|
7944
8337
|
]
|
|
7945
8338
|
});
|
|
7946
8339
|
}
|
|
8340
|
+
// === View Functions ===
|
|
7947
8341
|
/**
|
|
7948
|
-
*
|
|
8342
|
+
* Get counter EID
|
|
7949
8343
|
* @param tx - The transaction to add the move call to
|
|
7950
|
-
* @
|
|
8344
|
+
* @returns Transaction result containing the counter EID
|
|
7951
8345
|
*/
|
|
7952
|
-
|
|
7953
|
-
tx.moveCall({
|
|
7954
|
-
target: __privateMethod(this, _Counter_instances,
|
|
7955
|
-
arguments: [
|
|
7956
|
-
tx.object(this.objects.counter),
|
|
7957
|
-
tx.object(this.objects.counterOapp),
|
|
7958
|
-
tx.object(this.objects.counterAdminCap),
|
|
7959
|
-
tx.object(this.objects.endpointV2),
|
|
7960
|
-
asAddress(tx, newDelegate)
|
|
7961
|
-
]
|
|
8346
|
+
getEidMoveCall(tx) {
|
|
8347
|
+
return tx.moveCall({
|
|
8348
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "eid"),
|
|
8349
|
+
arguments: [tx.object(this.objects.counter)]
|
|
7962
8350
|
});
|
|
7963
8351
|
}
|
|
7964
8352
|
/**
|
|
7965
|
-
*
|
|
7966
|
-
* @
|
|
7967
|
-
* @param lzComposeInfo - LayerZero compose information as bytes
|
|
8353
|
+
* Get counter EID
|
|
8354
|
+
* @returns Promise<number> - The counter EID
|
|
7968
8355
|
*/
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
asBytes(tx, lzComposeInfo)
|
|
7978
|
-
]
|
|
7979
|
-
});
|
|
8356
|
+
async getEid() {
|
|
8357
|
+
return executeSimulate(
|
|
8358
|
+
this.client,
|
|
8359
|
+
(tx) => {
|
|
8360
|
+
this.getEidMoveCall(tx);
|
|
8361
|
+
},
|
|
8362
|
+
(result) => bcs.bcs.U32.parse(result[0].value)
|
|
8363
|
+
);
|
|
7980
8364
|
}
|
|
7981
|
-
// === View Functions ===
|
|
7982
8365
|
/**
|
|
7983
8366
|
* Get call capability address for counter
|
|
7984
8367
|
* @param tx - The transaction to add the move call to
|
|
@@ -7986,7 +8369,7 @@ var Counter = class {
|
|
|
7986
8369
|
*/
|
|
7987
8370
|
getCallCapAddressMoveCall(tx) {
|
|
7988
8371
|
return tx.moveCall({
|
|
7989
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8372
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "call_cap_address"),
|
|
7990
8373
|
arguments: [tx.object(this.objects.counter)]
|
|
7991
8374
|
});
|
|
7992
8375
|
}
|
|
@@ -8010,7 +8393,7 @@ var Counter = class {
|
|
|
8010
8393
|
*/
|
|
8011
8394
|
getComposerAddressMoveCall(tx) {
|
|
8012
8395
|
return tx.moveCall({
|
|
8013
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8396
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "composer_address"),
|
|
8014
8397
|
arguments: [tx.object(this.objects.counter)]
|
|
8015
8398
|
});
|
|
8016
8399
|
}
|
|
@@ -8034,7 +8417,7 @@ var Counter = class {
|
|
|
8034
8417
|
*/
|
|
8035
8418
|
getCountMoveCall(tx) {
|
|
8036
8419
|
return tx.moveCall({
|
|
8037
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8420
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "get_count"),
|
|
8038
8421
|
arguments: [tx.object(this.objects.counter)]
|
|
8039
8422
|
});
|
|
8040
8423
|
}
|
|
@@ -8058,7 +8441,7 @@ var Counter = class {
|
|
|
8058
8441
|
*/
|
|
8059
8442
|
getComposedCountMoveCall(tx) {
|
|
8060
8443
|
return tx.moveCall({
|
|
8061
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8444
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "get_composed_count"),
|
|
8062
8445
|
arguments: [tx.object(this.objects.counter)]
|
|
8063
8446
|
});
|
|
8064
8447
|
}
|
|
@@ -8083,7 +8466,7 @@ var Counter = class {
|
|
|
8083
8466
|
*/
|
|
8084
8467
|
getOutboundCountMoveCall(tx, dstEid) {
|
|
8085
8468
|
return tx.moveCall({
|
|
8086
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8469
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "get_outbound_count"),
|
|
8087
8470
|
arguments: [tx.object(this.objects.counter), asU32(tx, dstEid)]
|
|
8088
8471
|
});
|
|
8089
8472
|
}
|
|
@@ -8109,7 +8492,7 @@ var Counter = class {
|
|
|
8109
8492
|
*/
|
|
8110
8493
|
getInboundCountMoveCall(tx, srcEid) {
|
|
8111
8494
|
return tx.moveCall({
|
|
8112
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8495
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "get_inbound_count"),
|
|
8113
8496
|
arguments: [tx.object(this.objects.counter), asU32(tx, srcEid)]
|
|
8114
8497
|
});
|
|
8115
8498
|
}
|
|
@@ -8129,7 +8512,7 @@ var Counter = class {
|
|
|
8129
8512
|
}
|
|
8130
8513
|
nextNonceMoveCall(tx, srcEid, sender) {
|
|
8131
8514
|
return tx.moveCall({
|
|
8132
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8515
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "next_nonce"),
|
|
8133
8516
|
arguments: [
|
|
8134
8517
|
tx.object(this.objects.counter),
|
|
8135
8518
|
asU32(tx, srcEid),
|
|
@@ -8148,7 +8531,7 @@ var Counter = class {
|
|
|
8148
8531
|
}
|
|
8149
8532
|
getMaxReceivedNonceMoveCall(tx, srcEid, sender) {
|
|
8150
8533
|
return tx.moveCall({
|
|
8151
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8534
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "get_max_received_nonce"),
|
|
8152
8535
|
arguments: [
|
|
8153
8536
|
tx.object(this.objects.counter),
|
|
8154
8537
|
asU32(tx, srcEid),
|
|
@@ -8167,7 +8550,7 @@ var Counter = class {
|
|
|
8167
8550
|
}
|
|
8168
8551
|
isOrderedNonceMoveCall(tx) {
|
|
8169
8552
|
return tx.moveCall({
|
|
8170
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8553
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "is_ordered_nonce"),
|
|
8171
8554
|
arguments: [tx.object(this.objects.counter)]
|
|
8172
8555
|
});
|
|
8173
8556
|
}
|
|
@@ -8183,7 +8566,7 @@ var Counter = class {
|
|
|
8183
8566
|
// === PTB Builder Functions ===
|
|
8184
8567
|
lzReceiveInfoMoveCall(tx) {
|
|
8185
8568
|
return tx.moveCall({
|
|
8186
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8569
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "lz_receive_info", "counter_ptb_builder"),
|
|
8187
8570
|
arguments: [
|
|
8188
8571
|
tx.object(this.objects.counter),
|
|
8189
8572
|
tx.object(this.objects.counterOapp),
|
|
@@ -8194,7 +8577,7 @@ var Counter = class {
|
|
|
8194
8577
|
}
|
|
8195
8578
|
lzComposeInfoMoveCall(tx) {
|
|
8196
8579
|
return tx.moveCall({
|
|
8197
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8580
|
+
target: __privateMethod(this, _Counter_instances, target_fn21).call(this, "lz_compose_info", "counter_ptb_builder"),
|
|
8198
8581
|
arguments: [
|
|
8199
8582
|
tx.object(this.objects.counter),
|
|
8200
8583
|
tx.object(this.objects.counterOapp),
|
|
@@ -8213,33 +8596,44 @@ _Counter_instances = new WeakSet();
|
|
|
8213
8596
|
* @returns The full module path for the move call
|
|
8214
8597
|
* @private
|
|
8215
8598
|
*/
|
|
8216
|
-
|
|
8599
|
+
target_fn21 = function(name, module_name = MODULE_NAME20) {
|
|
8217
8600
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8218
8601
|
};
|
|
8219
|
-
var
|
|
8602
|
+
var MODULE_NAME21 = "oapp";
|
|
8220
8603
|
var OAppErrorCode = {
|
|
8221
|
-
// OApp related errors
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
//
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8604
|
+
// OApp related errors (matching oapp.move)
|
|
8605
|
+
OApp_EInvalidAdminCap: 1,
|
|
8606
|
+
OApp_EInvalidOAppCap: 2,
|
|
8607
|
+
OApp_EInvalidRefundAddress: 3,
|
|
8608
|
+
OApp_EInvalidSendingCall: 4,
|
|
8609
|
+
OApp_EOnlyEndpoint: 5,
|
|
8610
|
+
OApp_EOnlyPeer: 6,
|
|
8611
|
+
OApp_ESendingInProgress: 7,
|
|
8612
|
+
// OAppPeer related errors (matching oapp_peer.move)
|
|
8613
|
+
OAppPeer_EPeerNotFound: 0,
|
|
8614
|
+
OAppPeer_EInvalidPeer: 1,
|
|
8615
|
+
// EnforcedOptions related errors (matching enforced_options.move)
|
|
8616
|
+
EnforcedOptions_EEnforcedOptionsNotFound: 1,
|
|
8617
|
+
EnforcedOptions_EInvalidOptionsLength: 2,
|
|
8618
|
+
EnforcedOptions_EInvalidOptionsType: 3,
|
|
8619
|
+
// OAppInfoV1 related errors (matching oapp_info_v1.move)
|
|
8620
|
+
OAppInfoV1_EInvalidData: 1,
|
|
8621
|
+
OAppInfoV1_EInvalidVersion: 2
|
|
8622
|
+
};
|
|
8623
|
+
var _OApp_instances, oappInfo_fn, target_fn22;
|
|
8235
8624
|
var OApp = class {
|
|
8236
|
-
constructor(packageId, client, objects, moduleManager) {
|
|
8625
|
+
constructor(packageId, oappCallCapId, client, objects, moduleManager) {
|
|
8237
8626
|
this.moduleManager = moduleManager;
|
|
8238
8627
|
__privateAdd(this, _OApp_instances);
|
|
8628
|
+
this.oappInfo = null;
|
|
8239
8629
|
this.packageId = packageId;
|
|
8630
|
+
this.oappCallCapId = oappCallCapId;
|
|
8240
8631
|
this.client = client;
|
|
8241
8632
|
this.objects = objects;
|
|
8242
8633
|
}
|
|
8634
|
+
// setOAppInfo(oappInfo: OAppInfoV1): void {
|
|
8635
|
+
// this.oappInfo = oappInfo
|
|
8636
|
+
// }
|
|
8243
8637
|
// === Set Functions ===
|
|
8244
8638
|
/**
|
|
8245
8639
|
* Set enforced options for OApp messaging
|
|
@@ -8250,11 +8644,13 @@ var OApp = class {
|
|
|
8250
8644
|
* @param msgType - Message type or transaction argument
|
|
8251
8645
|
* @param options - Enforced options as bytes or transaction argument
|
|
8252
8646
|
*/
|
|
8253
|
-
setEnforcedOptionsMoveCall(tx,
|
|
8647
|
+
async setEnforcedOptionsMoveCall(tx, eid, msgType, options) {
|
|
8648
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8649
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8254
8650
|
tx.moveCall({
|
|
8255
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8651
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_enforced_options"),
|
|
8256
8652
|
arguments: [
|
|
8257
|
-
asObject(tx,
|
|
8653
|
+
asObject(tx, oappInfo.oapp_object),
|
|
8258
8654
|
asObject(tx, adminCap),
|
|
8259
8655
|
asU32(tx, eid),
|
|
8260
8656
|
asU16(tx, msgType),
|
|
@@ -8270,12 +8666,17 @@ var OApp = class {
|
|
|
8270
8666
|
* @param eid - Peer endpoint ID or transaction argument
|
|
8271
8667
|
* @param peer - Peer OApp address as bytes or transaction argument
|
|
8272
8668
|
*/
|
|
8273
|
-
setPeerMoveCall(tx,
|
|
8669
|
+
async setPeerMoveCall(tx, eid, peer) {
|
|
8670
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8671
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8672
|
+
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
8274
8673
|
tx.moveCall({
|
|
8275
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8674
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_peer"),
|
|
8276
8675
|
arguments: [
|
|
8277
|
-
asObject(tx,
|
|
8676
|
+
asObject(tx, oappInfo.oapp_object),
|
|
8278
8677
|
asObject(tx, adminCap),
|
|
8678
|
+
asObject(tx, this.objects.endpointV2),
|
|
8679
|
+
asObject(tx, messagingChannel),
|
|
8279
8680
|
asU32(tx, eid),
|
|
8280
8681
|
asBytes32(tx, peer, this.moduleManager.getUtils())
|
|
8281
8682
|
]
|
|
@@ -8283,53 +8684,54 @@ var OApp = class {
|
|
|
8283
8684
|
}
|
|
8284
8685
|
// === View Functions ===
|
|
8285
8686
|
/**
|
|
8286
|
-
* Get admin address for OApp
|
|
8687
|
+
* Get admin capability address for OApp
|
|
8287
8688
|
* @param tx - The transaction to add the move call to
|
|
8288
8689
|
* @param oapp - The OApp object ID or transaction argument
|
|
8289
|
-
* @returns Transaction result containing the admin address
|
|
8690
|
+
* @returns Transaction result containing the admin capability address
|
|
8290
8691
|
*/
|
|
8291
|
-
|
|
8692
|
+
getAdminCapMoveCall(tx, oapp) {
|
|
8292
8693
|
return tx.moveCall({
|
|
8293
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8694
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "admin_cap"),
|
|
8294
8695
|
arguments: [asObject(tx, oapp)]
|
|
8295
8696
|
});
|
|
8296
8697
|
}
|
|
8297
8698
|
/**
|
|
8298
|
-
* Get admin address for OApp
|
|
8699
|
+
* Get admin capability address for OApp
|
|
8299
8700
|
* @param oapp - The OApp object ID
|
|
8300
|
-
* @returns Promise<string> - The admin address
|
|
8701
|
+
* @returns Promise<string> - The admin capability address
|
|
8301
8702
|
*/
|
|
8302
|
-
async
|
|
8703
|
+
async getAdminCap(oapp) {
|
|
8303
8704
|
return executeSimulate(
|
|
8304
8705
|
this.client,
|
|
8305
8706
|
(tx) => {
|
|
8306
|
-
this.
|
|
8707
|
+
this.getAdminCapMoveCall(tx, oapp);
|
|
8307
8708
|
},
|
|
8308
8709
|
(result) => bcs.bcs.Address.parse(result[0].value)
|
|
8309
8710
|
);
|
|
8310
8711
|
}
|
|
8311
8712
|
/**
|
|
8312
|
-
* Get OApp
|
|
8713
|
+
* Get OApp CallCap identifier
|
|
8313
8714
|
* @param tx - The transaction to add the move call to
|
|
8314
8715
|
* @param oapp - The OApp object ID or transaction argument
|
|
8315
|
-
* @returns Transaction result containing the OApp
|
|
8716
|
+
* @returns Transaction result containing the OApp CallCap identifier
|
|
8316
8717
|
*/
|
|
8317
|
-
|
|
8718
|
+
async getOAppCapIdMoveCall(tx) {
|
|
8719
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8318
8720
|
return tx.moveCall({
|
|
8319
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8320
|
-
arguments: [asObject(tx,
|
|
8721
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "oapp_cap_id"),
|
|
8722
|
+
arguments: [asObject(tx, oappInfo.oapp_object)]
|
|
8321
8723
|
});
|
|
8322
8724
|
}
|
|
8323
8725
|
/**
|
|
8324
|
-
* Get OApp
|
|
8325
|
-
* @param oapp - The OApp object ID
|
|
8326
|
-
* @returns Promise<string> - The OApp
|
|
8726
|
+
* Get OApp CallCap identifier
|
|
8727
|
+
* @param oapp - The OApp object ID (optional, uses configured oapp if not provided)
|
|
8728
|
+
* @returns Promise<string> - The OApp CallCap identifier
|
|
8327
8729
|
*/
|
|
8328
|
-
async
|
|
8730
|
+
async getOAppCapId() {
|
|
8329
8731
|
return executeSimulate(
|
|
8330
8732
|
this.client,
|
|
8331
|
-
(tx) => {
|
|
8332
|
-
this.
|
|
8733
|
+
async (tx) => {
|
|
8734
|
+
await this.getOAppCapIdMoveCall(tx);
|
|
8333
8735
|
},
|
|
8334
8736
|
(result) => bcs.bcs.Address.parse(result[0].value)
|
|
8335
8737
|
);
|
|
@@ -8343,10 +8745,16 @@ var OApp = class {
|
|
|
8343
8745
|
* @param extraOptions - Extra options to combine with enforced options or transaction argument
|
|
8344
8746
|
* @returns Transaction result containing combined options
|
|
8345
8747
|
*/
|
|
8346
|
-
combineOptionsMoveCall(tx,
|
|
8748
|
+
async combineOptionsMoveCall(tx, eid, msgType, extraOptions) {
|
|
8749
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8347
8750
|
return tx.moveCall({
|
|
8348
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8349
|
-
arguments: [
|
|
8751
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "combine_options"),
|
|
8752
|
+
arguments: [
|
|
8753
|
+
asObject(tx, oappInfo.oapp_object),
|
|
8754
|
+
asU32(tx, eid),
|
|
8755
|
+
asU16(tx, msgType),
|
|
8756
|
+
asBytes(tx, extraOptions)
|
|
8757
|
+
]
|
|
8350
8758
|
});
|
|
8351
8759
|
}
|
|
8352
8760
|
/**
|
|
@@ -8357,11 +8765,11 @@ var OApp = class {
|
|
|
8357
8765
|
* @param extraOptions - Extra options to combine with enforced options
|
|
8358
8766
|
* @returns Promise<Uint8Array> - Combined options as bytes
|
|
8359
8767
|
*/
|
|
8360
|
-
async combineOptions(
|
|
8768
|
+
async combineOptions(eid, msgType, extraOptions) {
|
|
8361
8769
|
return executeSimulate(
|
|
8362
8770
|
this.client,
|
|
8363
|
-
(tx) => {
|
|
8364
|
-
this.combineOptionsMoveCall(tx,
|
|
8771
|
+
async (tx) => {
|
|
8772
|
+
await this.combineOptionsMoveCall(tx, eid, msgType, extraOptions);
|
|
8365
8773
|
},
|
|
8366
8774
|
(result) => new Uint8Array(bcs.bcs.vector(bcs.bcs.u8()).parse(result[0].value))
|
|
8367
8775
|
);
|
|
@@ -8374,10 +8782,11 @@ var OApp = class {
|
|
|
8374
8782
|
* @param msgType - Message type or transaction argument
|
|
8375
8783
|
* @returns Transaction result containing enforced options
|
|
8376
8784
|
*/
|
|
8377
|
-
getEnforcedOptionsMoveCall(tx,
|
|
8785
|
+
async getEnforcedOptionsMoveCall(tx, eid, msgType) {
|
|
8786
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8378
8787
|
return tx.moveCall({
|
|
8379
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8380
|
-
arguments: [asObject(tx,
|
|
8788
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "get_enforced_options"),
|
|
8789
|
+
arguments: [asObject(tx, oappInfo.oapp_object), asU32(tx, eid), asU16(tx, msgType)]
|
|
8381
8790
|
});
|
|
8382
8791
|
}
|
|
8383
8792
|
/**
|
|
@@ -8387,11 +8796,11 @@ var OApp = class {
|
|
|
8387
8796
|
* @param msgType - Message type
|
|
8388
8797
|
* @returns Promise<Uint8Array> - Enforced options as bytes
|
|
8389
8798
|
*/
|
|
8390
|
-
async getEnforcedOptions(
|
|
8799
|
+
async getEnforcedOptions(eid, msgType) {
|
|
8391
8800
|
return executeSimulate(
|
|
8392
8801
|
this.client,
|
|
8393
|
-
(tx) => {
|
|
8394
|
-
this.getEnforcedOptionsMoveCall(tx,
|
|
8802
|
+
async (tx) => {
|
|
8803
|
+
await this.getEnforcedOptionsMoveCall(tx, eid, msgType);
|
|
8395
8804
|
},
|
|
8396
8805
|
(result) => new Uint8Array(bcs.bcs.vector(bcs.bcs.u8()).parse(result[0].value))
|
|
8397
8806
|
);
|
|
@@ -8403,10 +8812,11 @@ var OApp = class {
|
|
|
8403
8812
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
8404
8813
|
* @returns Transaction result containing boolean result
|
|
8405
8814
|
*/
|
|
8406
|
-
hasPeerMoveCall(tx,
|
|
8815
|
+
async hasPeerMoveCall(tx, dstEid) {
|
|
8816
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8407
8817
|
return tx.moveCall({
|
|
8408
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8409
|
-
arguments: [asObject(tx,
|
|
8818
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "has_peer"),
|
|
8819
|
+
arguments: [asObject(tx, oappInfo.oapp_object), asU32(tx, dstEid)]
|
|
8410
8820
|
});
|
|
8411
8821
|
}
|
|
8412
8822
|
/**
|
|
@@ -8415,11 +8825,11 @@ var OApp = class {
|
|
|
8415
8825
|
* @param dstEid - Destination endpoint ID
|
|
8416
8826
|
* @returns Promise<boolean> - True if peer is configured, false otherwise
|
|
8417
8827
|
*/
|
|
8418
|
-
async hasPeer(
|
|
8828
|
+
async hasPeer(dstEid) {
|
|
8419
8829
|
return executeSimulate(
|
|
8420
8830
|
this.client,
|
|
8421
|
-
(tx) => {
|
|
8422
|
-
this.hasPeerMoveCall(tx,
|
|
8831
|
+
async (tx) => {
|
|
8832
|
+
await this.hasPeerMoveCall(tx, dstEid);
|
|
8423
8833
|
},
|
|
8424
8834
|
(result) => bcs.bcs.Bool.parse(result[0].value)
|
|
8425
8835
|
);
|
|
@@ -8431,10 +8841,11 @@ var OApp = class {
|
|
|
8431
8841
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
8432
8842
|
* @returns Transaction result containing peer address
|
|
8433
8843
|
*/
|
|
8434
|
-
getPeerMoveCall(tx,
|
|
8844
|
+
async getPeerMoveCall(tx, dstEid) {
|
|
8845
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8435
8846
|
return tx.moveCall({
|
|
8436
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8437
|
-
arguments: [asObject(tx,
|
|
8847
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "get_peer"),
|
|
8848
|
+
arguments: [asObject(tx, oappInfo.oapp_object), asU32(tx, dstEid)]
|
|
8438
8849
|
});
|
|
8439
8850
|
}
|
|
8440
8851
|
/**
|
|
@@ -8443,27 +8854,333 @@ var OApp = class {
|
|
|
8443
8854
|
* @param dstEid - Destination endpoint ID
|
|
8444
8855
|
* @returns Promise<Uint8Array> - Peer address as bytes32
|
|
8445
8856
|
*/
|
|
8446
|
-
async getPeer(
|
|
8857
|
+
async getPeer(dstEid) {
|
|
8447
8858
|
return executeSimulate(
|
|
8448
8859
|
this.client,
|
|
8449
|
-
(tx) => {
|
|
8450
|
-
this.getPeerMoveCall(tx,
|
|
8860
|
+
async (tx) => {
|
|
8861
|
+
await this.getPeerMoveCall(tx, dstEid);
|
|
8451
8862
|
},
|
|
8452
8863
|
(result) => {
|
|
8453
8864
|
return new Uint8Array(bcs.bcs.vector(bcs.bcs.u8()).parse(result[0].value));
|
|
8454
8865
|
}
|
|
8455
8866
|
);
|
|
8456
8867
|
}
|
|
8868
|
+
getOAppInfoV1MoveCall(tx) {
|
|
8869
|
+
const endpoint = this.moduleManager.getEndpoint();
|
|
8870
|
+
const oappInfoRaw = endpoint.getOappInfoMoveCall(tx, this.oappCallCapId);
|
|
8871
|
+
return tx.moveCall({
|
|
8872
|
+
target: `${this.packageId}::oapp_info_v1::decode`,
|
|
8873
|
+
arguments: [oappInfoRaw]
|
|
8874
|
+
});
|
|
8875
|
+
}
|
|
8876
|
+
async getOAppInfoV1() {
|
|
8877
|
+
return executeSimulate(
|
|
8878
|
+
this.client,
|
|
8879
|
+
(tx) => {
|
|
8880
|
+
this.getOAppInfoV1MoveCall(tx);
|
|
8881
|
+
},
|
|
8882
|
+
(result) => {
|
|
8883
|
+
return OAppInfoV1Bcs.parse(result[0].value);
|
|
8884
|
+
}
|
|
8885
|
+
);
|
|
8886
|
+
}
|
|
8887
|
+
// === Endpoint Call Functions ===
|
|
8888
|
+
/**
|
|
8889
|
+
* Register OApp with the endpoint
|
|
8890
|
+
* @param tx - The transaction to add the move call to
|
|
8891
|
+
* @param oappInfo - OApp information as bytes (optional)
|
|
8892
|
+
* @returns Transaction result containing the messaging channel address
|
|
8893
|
+
*/
|
|
8894
|
+
async registerOAppMoveCall(tx, oappInfo) {
|
|
8895
|
+
let oappInfoArg;
|
|
8896
|
+
if (isTransactionArgument(oappInfo)) {
|
|
8897
|
+
oappInfoArg = oappInfo;
|
|
8898
|
+
} else if (oappInfo) {
|
|
8899
|
+
oappInfoArg = tx.pure.option("vector<u8>", Array.from(oappInfo));
|
|
8900
|
+
} else {
|
|
8901
|
+
oappInfoArg = tx.pure.option("vector<u8>", null);
|
|
8902
|
+
}
|
|
8903
|
+
const oappInfoObj = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8904
|
+
const adminCap = await this.getAdminCap(oappInfoObj.oapp_object);
|
|
8905
|
+
return tx.moveCall({
|
|
8906
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "register_oapp", "endpoint_calls"),
|
|
8907
|
+
arguments: [
|
|
8908
|
+
asObject(tx, oappInfoObj.oapp_object),
|
|
8909
|
+
asObject(tx, adminCap),
|
|
8910
|
+
asObject(tx, this.objects.endpointV2),
|
|
8911
|
+
oappInfoArg
|
|
8912
|
+
]
|
|
8913
|
+
});
|
|
8914
|
+
}
|
|
8915
|
+
/**
|
|
8916
|
+
* Set delegate for OApp
|
|
8917
|
+
* @param tx - The transaction to add the move call to
|
|
8918
|
+
* @param newDelegate - New delegate address
|
|
8919
|
+
*/
|
|
8920
|
+
async setDelegateMoveCall(tx, newDelegate) {
|
|
8921
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8922
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8923
|
+
tx.moveCall({
|
|
8924
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_delegate", "endpoint_calls"),
|
|
8925
|
+
arguments: [
|
|
8926
|
+
asObject(tx, oappInfo.oapp_object),
|
|
8927
|
+
asObject(tx, adminCap),
|
|
8928
|
+
asObject(tx, this.objects.endpointV2),
|
|
8929
|
+
asAddress(tx, newDelegate)
|
|
8930
|
+
]
|
|
8931
|
+
});
|
|
8932
|
+
}
|
|
8933
|
+
/**
|
|
8934
|
+
* Set OApp information in the endpoint
|
|
8935
|
+
* @param tx - The transaction to add the move call to
|
|
8936
|
+
* @param oappInfo - OApp information as bytes
|
|
8937
|
+
*/
|
|
8938
|
+
async setOAppInfoMoveCall(tx, oappInfo) {
|
|
8939
|
+
const oappInfoObj = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8940
|
+
const adminCap = await this.getAdminCap(oappInfoObj.oapp_object);
|
|
8941
|
+
tx.moveCall({
|
|
8942
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_oapp_info", "endpoint_calls"),
|
|
8943
|
+
arguments: [
|
|
8944
|
+
asObject(tx, oappInfoObj.oapp_object),
|
|
8945
|
+
asObject(tx, adminCap),
|
|
8946
|
+
asObject(tx, this.objects.endpointV2),
|
|
8947
|
+
asBytes(tx, oappInfo)
|
|
8948
|
+
]
|
|
8949
|
+
});
|
|
8950
|
+
}
|
|
8951
|
+
/**
|
|
8952
|
+
* Initialize channel with remote OApp
|
|
8953
|
+
* @param tx - The transaction to add the move call to
|
|
8954
|
+
* @param remoteEid - Remote endpoint ID
|
|
8955
|
+
* @param remoteOApp - Remote OApp address as bytes32
|
|
8956
|
+
*/
|
|
8957
|
+
async initChannelMoveCall(tx, remoteEid, remoteOApp) {
|
|
8958
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8959
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8960
|
+
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
8961
|
+
tx.moveCall({
|
|
8962
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "init_channel", "endpoint_calls"),
|
|
8963
|
+
arguments: [
|
|
8964
|
+
asObject(tx, oappInfo.oapp_object),
|
|
8965
|
+
asObject(tx, adminCap),
|
|
8966
|
+
asObject(tx, this.objects.endpointV2),
|
|
8967
|
+
asObject(tx, messagingChannel),
|
|
8968
|
+
asU32(tx, remoteEid),
|
|
8969
|
+
asBytes32(tx, remoteOApp, this.moduleManager.getUtils())
|
|
8970
|
+
]
|
|
8971
|
+
});
|
|
8972
|
+
}
|
|
8973
|
+
/**
|
|
8974
|
+
* Clear a message from the messaging channel
|
|
8975
|
+
* @param tx - The transaction to add the move call to
|
|
8976
|
+
* @param srcEid - Source endpoint ID
|
|
8977
|
+
* @param sender - Sender address as bytes32
|
|
8978
|
+
* @param nonce - Message nonce
|
|
8979
|
+
* @param guid - Message GUID as bytes32
|
|
8980
|
+
* @param message - Message payload
|
|
8981
|
+
*/
|
|
8982
|
+
async clearMoveCall(tx, srcEid, sender, nonce, guid, message) {
|
|
8983
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8984
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8985
|
+
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
8986
|
+
tx.moveCall({
|
|
8987
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "clear", "endpoint_calls"),
|
|
8988
|
+
arguments: [
|
|
8989
|
+
asObject(tx, oappInfo.oapp_object),
|
|
8990
|
+
asObject(tx, adminCap),
|
|
8991
|
+
asObject(tx, this.objects.endpointV2),
|
|
8992
|
+
asObject(tx, messagingChannel),
|
|
8993
|
+
asU32(tx, srcEid),
|
|
8994
|
+
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
8995
|
+
asU64(tx, nonce),
|
|
8996
|
+
asBytes32(tx, guid, this.moduleManager.getUtils()),
|
|
8997
|
+
asBytes(tx, message)
|
|
8998
|
+
]
|
|
8999
|
+
});
|
|
9000
|
+
}
|
|
9001
|
+
/**
|
|
9002
|
+
* Skip a message in the messaging channel
|
|
9003
|
+
* @param tx - The transaction to add the move call to
|
|
9004
|
+
* @param srcEid - Source endpoint ID
|
|
9005
|
+
* @param sender - Sender address as bytes32
|
|
9006
|
+
* @param nonce - Message nonce
|
|
9007
|
+
*/
|
|
9008
|
+
async skipMoveCall(tx, srcEid, sender, nonce) {
|
|
9009
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9010
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9011
|
+
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
9012
|
+
tx.moveCall({
|
|
9013
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "skip", "endpoint_calls"),
|
|
9014
|
+
arguments: [
|
|
9015
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9016
|
+
asObject(tx, adminCap),
|
|
9017
|
+
asObject(tx, this.objects.endpointV2),
|
|
9018
|
+
asObject(tx, messagingChannel),
|
|
9019
|
+
asU32(tx, srcEid),
|
|
9020
|
+
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
9021
|
+
asU64(tx, nonce)
|
|
9022
|
+
]
|
|
9023
|
+
});
|
|
9024
|
+
}
|
|
9025
|
+
/**
|
|
9026
|
+
* Nilify a message in the messaging channel
|
|
9027
|
+
* @param tx - The transaction to add the move call to
|
|
9028
|
+
* @param srcEid - Source endpoint ID
|
|
9029
|
+
* @param sender - Sender address as bytes32
|
|
9030
|
+
* @param nonce - Message nonce
|
|
9031
|
+
* @param payloadHash - Payload hash as bytes32
|
|
9032
|
+
*/
|
|
9033
|
+
async nilifyMoveCall(tx, srcEid, sender, nonce, payloadHash) {
|
|
9034
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9035
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9036
|
+
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
9037
|
+
tx.moveCall({
|
|
9038
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "nilify", "endpoint_calls"),
|
|
9039
|
+
arguments: [
|
|
9040
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9041
|
+
asObject(tx, adminCap),
|
|
9042
|
+
asObject(tx, this.objects.endpointV2),
|
|
9043
|
+
asObject(tx, messagingChannel),
|
|
9044
|
+
asU32(tx, srcEid),
|
|
9045
|
+
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
9046
|
+
asU64(tx, nonce),
|
|
9047
|
+
asBytes32(tx, payloadHash, this.moduleManager.getUtils())
|
|
9048
|
+
]
|
|
9049
|
+
});
|
|
9050
|
+
}
|
|
9051
|
+
/**
|
|
9052
|
+
* Burn a message in the messaging channel
|
|
9053
|
+
* @param tx - The transaction to add the move call to
|
|
9054
|
+
* @param srcEid - Source endpoint ID
|
|
9055
|
+
* @param sender - Sender address as bytes32
|
|
9056
|
+
* @param nonce - Message nonce
|
|
9057
|
+
* @param payloadHash - Payload hash as bytes32
|
|
9058
|
+
*/
|
|
9059
|
+
async burnMoveCall(tx, srcEid, sender, nonce, payloadHash) {
|
|
9060
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9061
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9062
|
+
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
9063
|
+
tx.moveCall({
|
|
9064
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "burn", "endpoint_calls"),
|
|
9065
|
+
arguments: [
|
|
9066
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9067
|
+
asObject(tx, adminCap),
|
|
9068
|
+
asObject(tx, this.objects.endpointV2),
|
|
9069
|
+
asObject(tx, messagingChannel),
|
|
9070
|
+
asU32(tx, srcEid),
|
|
9071
|
+
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
9072
|
+
asU64(tx, nonce),
|
|
9073
|
+
asBytes32(tx, payloadHash, this.moduleManager.getUtils())
|
|
9074
|
+
]
|
|
9075
|
+
});
|
|
9076
|
+
}
|
|
9077
|
+
/**
|
|
9078
|
+
* Set send library for a destination chain
|
|
9079
|
+
* @param tx - The transaction to add the move call to
|
|
9080
|
+
* @param dstEid - Destination endpoint ID
|
|
9081
|
+
* @param sendLibrary - Send library address
|
|
9082
|
+
*/
|
|
9083
|
+
async setSendLibraryMoveCall(tx, dstEid, sendLibrary) {
|
|
9084
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9085
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9086
|
+
tx.moveCall({
|
|
9087
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_send_library", "endpoint_calls"),
|
|
9088
|
+
arguments: [
|
|
9089
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9090
|
+
asObject(tx, adminCap),
|
|
9091
|
+
asObject(tx, this.objects.endpointV2),
|
|
9092
|
+
asU32(tx, dstEid),
|
|
9093
|
+
asAddress(tx, sendLibrary)
|
|
9094
|
+
]
|
|
9095
|
+
});
|
|
9096
|
+
}
|
|
9097
|
+
/**
|
|
9098
|
+
* Set receive library for a source chain
|
|
9099
|
+
* @param tx - The transaction to add the move call to
|
|
9100
|
+
* @param srcEid - Source endpoint ID
|
|
9101
|
+
* @param receiveLibrary - Receive library address
|
|
9102
|
+
* @param gracePeriod - Grace period in seconds
|
|
9103
|
+
*/
|
|
9104
|
+
async setReceiveLibraryMoveCall(tx, srcEid, receiveLibrary, gracePeriod) {
|
|
9105
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9106
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9107
|
+
tx.moveCall({
|
|
9108
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_receive_library", "endpoint_calls"),
|
|
9109
|
+
arguments: [
|
|
9110
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9111
|
+
asObject(tx, adminCap),
|
|
9112
|
+
asObject(tx, this.objects.endpointV2),
|
|
9113
|
+
asU32(tx, srcEid),
|
|
9114
|
+
asAddress(tx, receiveLibrary),
|
|
9115
|
+
asU64(tx, gracePeriod),
|
|
9116
|
+
tx.object.clock()
|
|
9117
|
+
]
|
|
9118
|
+
});
|
|
9119
|
+
}
|
|
9120
|
+
/**
|
|
9121
|
+
* Set receive library timeout for a source chain
|
|
9122
|
+
* @param tx - The transaction to add the move call to
|
|
9123
|
+
* @param srcEid - Source endpoint ID
|
|
9124
|
+
* @param receiveLibrary - Receive library address
|
|
9125
|
+
* @param expiry - Expiry timestamp in seconds
|
|
9126
|
+
*/
|
|
9127
|
+
async setReceiveLibraryTimeoutMoveCall(tx, srcEid, receiveLibrary, expiry) {
|
|
9128
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9129
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9130
|
+
tx.moveCall({
|
|
9131
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_receive_library_timeout", "endpoint_calls"),
|
|
9132
|
+
arguments: [
|
|
9133
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9134
|
+
asObject(tx, adminCap),
|
|
9135
|
+
asObject(tx, this.objects.endpointV2),
|
|
9136
|
+
asU32(tx, srcEid),
|
|
9137
|
+
asAddress(tx, receiveLibrary),
|
|
9138
|
+
asU64(tx, expiry),
|
|
9139
|
+
tx.object.clock()
|
|
9140
|
+
]
|
|
9141
|
+
});
|
|
9142
|
+
}
|
|
9143
|
+
/**
|
|
9144
|
+
* Set configuration for a message library
|
|
9145
|
+
* @param tx - The transaction to add the move call to
|
|
9146
|
+
* @param lib - Library address
|
|
9147
|
+
* @param eid - Endpoint ID
|
|
9148
|
+
* @param configType - Configuration type
|
|
9149
|
+
* @param config - Configuration data as bytes
|
|
9150
|
+
* @returns Transaction result containing Call<MessageLibSetConfigParam, Void>
|
|
9151
|
+
*/
|
|
9152
|
+
async setConfigMoveCall(tx, lib, eid, configType, config) {
|
|
9153
|
+
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9154
|
+
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9155
|
+
return tx.moveCall({
|
|
9156
|
+
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_config", "endpoint_calls"),
|
|
9157
|
+
typeArguments: [],
|
|
9158
|
+
arguments: [
|
|
9159
|
+
asObject(tx, oappInfo.oapp_object),
|
|
9160
|
+
asObject(tx, adminCap),
|
|
9161
|
+
asObject(tx, this.objects.endpointV2),
|
|
9162
|
+
asAddress(tx, lib),
|
|
9163
|
+
asU32(tx, eid),
|
|
9164
|
+
asU32(tx, configType),
|
|
9165
|
+
asBytes(tx, config)
|
|
9166
|
+
]
|
|
9167
|
+
});
|
|
9168
|
+
}
|
|
8457
9169
|
};
|
|
8458
9170
|
_OApp_instances = new WeakSet();
|
|
8459
|
-
|
|
9171
|
+
oappInfo_fn = async function() {
|
|
9172
|
+
if (!this.oappInfo) {
|
|
9173
|
+
this.oappInfo = await this.getOAppInfoV1();
|
|
9174
|
+
}
|
|
9175
|
+
return this.oappInfo;
|
|
9176
|
+
};
|
|
8460
9177
|
/**
|
|
8461
9178
|
* Generate the full target path for move calls
|
|
8462
9179
|
* @param name - The function name to call
|
|
8463
9180
|
* @returns The full module path for the move call
|
|
8464
9181
|
* @private
|
|
8465
9182
|
*/
|
|
8466
|
-
|
|
9183
|
+
target_fn22 = function(name, module_name = MODULE_NAME21) {
|
|
8467
9184
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8468
9185
|
};
|
|
8469
9186
|
var MODULE_NAME_ENDPOINT_VIEWS = "endpoint_views";
|
|
@@ -8632,16 +9349,24 @@ uln302ViewsTarget_fn = function(functionName) {
|
|
|
8632
9349
|
};
|
|
8633
9350
|
var DEFAULT_MODULE_NAME = "call";
|
|
8634
9351
|
var CallErrorCode = {
|
|
8635
|
-
// Call related errors (
|
|
8636
|
-
|
|
9352
|
+
// Call related errors (matching call.move)
|
|
9353
|
+
Call_ECallNotActive: 1,
|
|
8637
9354
|
Call_ECallNotCompleted: 2,
|
|
8638
|
-
|
|
9355
|
+
Call_ECallNotCreating: 3,
|
|
8639
9356
|
Call_ECallNotRoot: 4,
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
9357
|
+
Call_ECallNotWaiting: 5,
|
|
9358
|
+
Call_EInvalidChild: 6,
|
|
9359
|
+
Call_EInvalidNonce: 7,
|
|
9360
|
+
Call_EInvalidParent: 8,
|
|
9361
|
+
Call_EParameterNotMutable: 9,
|
|
9362
|
+
Call_EUnauthorized: 10,
|
|
9363
|
+
// CallCap related errors (matching call_cap.move)
|
|
9364
|
+
CallCap_EBadWitness: 1,
|
|
9365
|
+
// MultiCall related errors (matching dynamic-call/multi-call/multi_call.move)
|
|
9366
|
+
MultiCall_ENoMoreCalls: 1,
|
|
9367
|
+
MultiCall_EUnauthorized: 2
|
|
9368
|
+
};
|
|
9369
|
+
var _Call_instances, target_fn23;
|
|
8645
9370
|
var Call = class {
|
|
8646
9371
|
constructor(packageId, client) {
|
|
8647
9372
|
__privateAdd(this, _Call_instances);
|
|
@@ -8657,7 +9382,7 @@ var Call = class {
|
|
|
8657
9382
|
*/
|
|
8658
9383
|
newIndividualCapMoveCall(tx) {
|
|
8659
9384
|
return tx.moveCall({
|
|
8660
|
-
target: __privateMethod(this, _Call_instances,
|
|
9385
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "new_individual_cap", "call_cap"),
|
|
8661
9386
|
arguments: []
|
|
8662
9387
|
});
|
|
8663
9388
|
}
|
|
@@ -8668,7 +9393,7 @@ var Call = class {
|
|
|
8668
9393
|
*/
|
|
8669
9394
|
voidMoveCall(tx) {
|
|
8670
9395
|
return tx.moveCall({
|
|
8671
|
-
target: __privateMethod(this, _Call_instances,
|
|
9396
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "void"),
|
|
8672
9397
|
arguments: []
|
|
8673
9398
|
});
|
|
8674
9399
|
}
|
|
@@ -8683,7 +9408,7 @@ var Call = class {
|
|
|
8683
9408
|
*/
|
|
8684
9409
|
resultMoveCall(tx, paramType, resultType, call) {
|
|
8685
9410
|
return tx.moveCall({
|
|
8686
|
-
target: __privateMethod(this, _Call_instances,
|
|
9411
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "result"),
|
|
8687
9412
|
typeArguments: [paramType, resultType],
|
|
8688
9413
|
arguments: [call]
|
|
8689
9414
|
});
|
|
@@ -8698,7 +9423,7 @@ var Call = class {
|
|
|
8698
9423
|
*/
|
|
8699
9424
|
recipientMoveCall(tx, paramType, resultType, call) {
|
|
8700
9425
|
return tx.moveCall({
|
|
8701
|
-
target: __privateMethod(this, _Call_instances,
|
|
9426
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "recipient"),
|
|
8702
9427
|
typeArguments: [paramType, resultType],
|
|
8703
9428
|
arguments: [call]
|
|
8704
9429
|
});
|
|
@@ -8712,7 +9437,7 @@ var Call = class {
|
|
|
8712
9437
|
*/
|
|
8713
9438
|
callCapIdMoveCall(tx, callCap) {
|
|
8714
9439
|
return tx.moveCall({
|
|
8715
|
-
target: __privateMethod(this, _Call_instances,
|
|
9440
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "id", "call_cap"),
|
|
8716
9441
|
arguments: [asObject(tx, callCap)]
|
|
8717
9442
|
});
|
|
8718
9443
|
}
|
|
@@ -8739,7 +9464,7 @@ var Call = class {
|
|
|
8739
9464
|
*/
|
|
8740
9465
|
isIndividualCapMoveCall(tx, callCap) {
|
|
8741
9466
|
return tx.moveCall({
|
|
8742
|
-
target: __privateMethod(this, _Call_instances,
|
|
9467
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "is_individual", "call_cap"),
|
|
8743
9468
|
arguments: [asObject(tx, callCap)]
|
|
8744
9469
|
});
|
|
8745
9470
|
}
|
|
@@ -8765,7 +9490,7 @@ var Call = class {
|
|
|
8765
9490
|
*/
|
|
8766
9491
|
isPackageCapMoveCall(tx, callCap) {
|
|
8767
9492
|
return tx.moveCall({
|
|
8768
|
-
target: __privateMethod(this, _Call_instances,
|
|
9493
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "is_package", "call_cap"),
|
|
8769
9494
|
arguments: [asObject(tx, callCap)]
|
|
8770
9495
|
});
|
|
8771
9496
|
}
|
|
@@ -8792,7 +9517,7 @@ var Call = class {
|
|
|
8792
9517
|
*/
|
|
8793
9518
|
packageAddressMoveCall(tx, callCap) {
|
|
8794
9519
|
return tx.moveCall({
|
|
8795
|
-
target: __privateMethod(this, _Call_instances,
|
|
9520
|
+
target: __privateMethod(this, _Call_instances, target_fn23).call(this, "package_address", "call_cap"),
|
|
8796
9521
|
arguments: [asObject(tx, callCap)]
|
|
8797
9522
|
});
|
|
8798
9523
|
}
|
|
@@ -8827,7 +9552,7 @@ _Call_instances = new WeakSet();
|
|
|
8827
9552
|
* @returns The full module path for the move call
|
|
8828
9553
|
* @private
|
|
8829
9554
|
*/
|
|
8830
|
-
|
|
9555
|
+
target_fn23 = function(name, module_name = DEFAULT_MODULE_NAME) {
|
|
8831
9556
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8832
9557
|
};
|
|
8833
9558
|
|
|
@@ -8840,7 +9565,7 @@ var UtilsErrorCode = {
|
|
|
8840
9565
|
// Utils related errors (with Utils_ prefix)
|
|
8841
9566
|
Utils_EInvalidLength: 1
|
|
8842
9567
|
};
|
|
8843
|
-
var _Utils_instances,
|
|
9568
|
+
var _Utils_instances, target_fn24, destroyZeroCoin_fn, fetchSufficientCoins_fn;
|
|
8844
9569
|
var Utils = class {
|
|
8845
9570
|
constructor(packageId, client) {
|
|
8846
9571
|
__privateAdd(this, _Utils_instances);
|
|
@@ -8856,7 +9581,7 @@ var Utils = class {
|
|
|
8856
9581
|
*/
|
|
8857
9582
|
fromBytesMoveCall(tx, peer) {
|
|
8858
9583
|
return tx.moveCall({
|
|
8859
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9584
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "from_bytes"),
|
|
8860
9585
|
arguments: [asBytes(tx, peer)]
|
|
8861
9586
|
});
|
|
8862
9587
|
}
|
|
@@ -8868,7 +9593,7 @@ var Utils = class {
|
|
|
8868
9593
|
*/
|
|
8869
9594
|
fromBytesLeftPaddedMoveCall(tx, bytes) {
|
|
8870
9595
|
return tx.moveCall({
|
|
8871
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9596
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "from_bytes_left_padded"),
|
|
8872
9597
|
arguments: [asBytes(tx, bytes)]
|
|
8873
9598
|
});
|
|
8874
9599
|
}
|
|
@@ -8880,7 +9605,7 @@ var Utils = class {
|
|
|
8880
9605
|
*/
|
|
8881
9606
|
fromBytesRightPaddedMoveCall(tx, bytes) {
|
|
8882
9607
|
return tx.moveCall({
|
|
8883
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9608
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "from_bytes_right_padded"),
|
|
8884
9609
|
arguments: [asBytes(tx, bytes)]
|
|
8885
9610
|
});
|
|
8886
9611
|
}
|
|
@@ -8892,7 +9617,7 @@ var Utils = class {
|
|
|
8892
9617
|
*/
|
|
8893
9618
|
fromAddressMoveCall(tx, address) {
|
|
8894
9619
|
return tx.moveCall({
|
|
8895
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9620
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "from_address"),
|
|
8896
9621
|
arguments: [asAddress(tx, address)]
|
|
8897
9622
|
});
|
|
8898
9623
|
}
|
|
@@ -8904,7 +9629,7 @@ var Utils = class {
|
|
|
8904
9629
|
*/
|
|
8905
9630
|
fromIdMoveCall(tx, id) {
|
|
8906
9631
|
return tx.moveCall({
|
|
8907
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9632
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "from_id"),
|
|
8908
9633
|
arguments: [asObject(tx, id)]
|
|
8909
9634
|
});
|
|
8910
9635
|
}
|
|
@@ -8915,7 +9640,7 @@ var Utils = class {
|
|
|
8915
9640
|
*/
|
|
8916
9641
|
zeroBytes32MoveCall(tx) {
|
|
8917
9642
|
return tx.moveCall({
|
|
8918
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9643
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "zero_bytes32")
|
|
8919
9644
|
});
|
|
8920
9645
|
}
|
|
8921
9646
|
/**
|
|
@@ -8925,7 +9650,7 @@ var Utils = class {
|
|
|
8925
9650
|
*/
|
|
8926
9651
|
ffBytes32MoveCall(tx) {
|
|
8927
9652
|
return tx.moveCall({
|
|
8928
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9653
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "ff_bytes32")
|
|
8929
9654
|
});
|
|
8930
9655
|
}
|
|
8931
9656
|
/**
|
|
@@ -8936,7 +9661,7 @@ var Utils = class {
|
|
|
8936
9661
|
*/
|
|
8937
9662
|
isZeroMoveCall(tx, bytes32) {
|
|
8938
9663
|
return tx.moveCall({
|
|
8939
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9664
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "is_zero"),
|
|
8940
9665
|
arguments: [bytes32]
|
|
8941
9666
|
});
|
|
8942
9667
|
}
|
|
@@ -8948,7 +9673,7 @@ var Utils = class {
|
|
|
8948
9673
|
*/
|
|
8949
9674
|
isFfMoveCall(tx, bytes32) {
|
|
8950
9675
|
return tx.moveCall({
|
|
8951
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9676
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "is_ff"),
|
|
8952
9677
|
arguments: [bytes32]
|
|
8953
9678
|
});
|
|
8954
9679
|
}
|
|
@@ -8960,7 +9685,7 @@ var Utils = class {
|
|
|
8960
9685
|
*/
|
|
8961
9686
|
toBytesMoveCall(tx, bytes32) {
|
|
8962
9687
|
return tx.moveCall({
|
|
8963
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9688
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "to_bytes"),
|
|
8964
9689
|
arguments: [bytes32]
|
|
8965
9690
|
});
|
|
8966
9691
|
}
|
|
@@ -8972,7 +9697,7 @@ var Utils = class {
|
|
|
8972
9697
|
*/
|
|
8973
9698
|
toAddressMoveCall(tx, bytes32) {
|
|
8974
9699
|
return tx.moveCall({
|
|
8975
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9700
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "to_address"),
|
|
8976
9701
|
arguments: [bytes32]
|
|
8977
9702
|
});
|
|
8978
9703
|
}
|
|
@@ -8984,7 +9709,7 @@ var Utils = class {
|
|
|
8984
9709
|
*/
|
|
8985
9710
|
toIdMoveCall(tx, bytes32) {
|
|
8986
9711
|
return tx.moveCall({
|
|
8987
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9712
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "to_id"),
|
|
8988
9713
|
arguments: [bytes32]
|
|
8989
9714
|
});
|
|
8990
9715
|
}
|
|
@@ -8997,7 +9722,7 @@ var Utils = class {
|
|
|
8997
9722
|
*/
|
|
8998
9723
|
newReaderMoveCall(tx, buffer) {
|
|
8999
9724
|
return tx.moveCall({
|
|
9000
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9725
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "create", BUFFER_READER_MODULE_NAME),
|
|
9001
9726
|
arguments: [asBytes(tx, buffer)]
|
|
9002
9727
|
});
|
|
9003
9728
|
}
|
|
@@ -9009,7 +9734,7 @@ var Utils = class {
|
|
|
9009
9734
|
*/
|
|
9010
9735
|
positionMoveCall(tx, reader) {
|
|
9011
9736
|
return tx.moveCall({
|
|
9012
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9737
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "position", BUFFER_READER_MODULE_NAME),
|
|
9013
9738
|
arguments: [reader]
|
|
9014
9739
|
});
|
|
9015
9740
|
}
|
|
@@ -9021,7 +9746,7 @@ var Utils = class {
|
|
|
9021
9746
|
*/
|
|
9022
9747
|
remainingLengthMoveCall(tx, reader) {
|
|
9023
9748
|
return tx.moveCall({
|
|
9024
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9749
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "remaining_length", BUFFER_READER_MODULE_NAME),
|
|
9025
9750
|
arguments: [reader]
|
|
9026
9751
|
});
|
|
9027
9752
|
}
|
|
@@ -9034,7 +9759,7 @@ var Utils = class {
|
|
|
9034
9759
|
*/
|
|
9035
9760
|
skipMoveCall(tx, reader, len) {
|
|
9036
9761
|
return tx.moveCall({
|
|
9037
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9762
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "skip", BUFFER_READER_MODULE_NAME),
|
|
9038
9763
|
arguments: [reader, asU64(tx, len)]
|
|
9039
9764
|
});
|
|
9040
9765
|
}
|
|
@@ -9047,7 +9772,7 @@ var Utils = class {
|
|
|
9047
9772
|
*/
|
|
9048
9773
|
setPositionMoveCall(tx, reader, position) {
|
|
9049
9774
|
return tx.moveCall({
|
|
9050
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9775
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "set_position", BUFFER_READER_MODULE_NAME),
|
|
9051
9776
|
arguments: [reader, asU64(tx, position)]
|
|
9052
9777
|
});
|
|
9053
9778
|
}
|
|
@@ -9060,7 +9785,7 @@ var Utils = class {
|
|
|
9060
9785
|
*/
|
|
9061
9786
|
rewindMoveCall(tx, reader, len) {
|
|
9062
9787
|
return tx.moveCall({
|
|
9063
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9788
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "rewind", BUFFER_READER_MODULE_NAME),
|
|
9064
9789
|
arguments: [reader, asU64(tx, len)]
|
|
9065
9790
|
});
|
|
9066
9791
|
}
|
|
@@ -9072,7 +9797,7 @@ var Utils = class {
|
|
|
9072
9797
|
*/
|
|
9073
9798
|
readBoolMoveCall(tx, reader) {
|
|
9074
9799
|
return tx.moveCall({
|
|
9075
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9800
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_bool", BUFFER_READER_MODULE_NAME),
|
|
9076
9801
|
arguments: [reader]
|
|
9077
9802
|
});
|
|
9078
9803
|
}
|
|
@@ -9084,7 +9809,7 @@ var Utils = class {
|
|
|
9084
9809
|
*/
|
|
9085
9810
|
readU8MoveCall(tx, reader) {
|
|
9086
9811
|
return tx.moveCall({
|
|
9087
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9812
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_u8", BUFFER_READER_MODULE_NAME),
|
|
9088
9813
|
arguments: [reader]
|
|
9089
9814
|
});
|
|
9090
9815
|
}
|
|
@@ -9096,7 +9821,7 @@ var Utils = class {
|
|
|
9096
9821
|
*/
|
|
9097
9822
|
readU16MoveCall(tx, reader) {
|
|
9098
9823
|
return tx.moveCall({
|
|
9099
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9824
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_u16", BUFFER_READER_MODULE_NAME),
|
|
9100
9825
|
arguments: [reader]
|
|
9101
9826
|
});
|
|
9102
9827
|
}
|
|
@@ -9108,7 +9833,7 @@ var Utils = class {
|
|
|
9108
9833
|
*/
|
|
9109
9834
|
readU32MoveCall(tx, reader) {
|
|
9110
9835
|
return tx.moveCall({
|
|
9111
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9836
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_u32", BUFFER_READER_MODULE_NAME),
|
|
9112
9837
|
arguments: [reader]
|
|
9113
9838
|
});
|
|
9114
9839
|
}
|
|
@@ -9120,7 +9845,7 @@ var Utils = class {
|
|
|
9120
9845
|
*/
|
|
9121
9846
|
readU64MoveCall(tx, reader) {
|
|
9122
9847
|
return tx.moveCall({
|
|
9123
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9848
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_u64", BUFFER_READER_MODULE_NAME),
|
|
9124
9849
|
arguments: [reader]
|
|
9125
9850
|
});
|
|
9126
9851
|
}
|
|
@@ -9132,7 +9857,7 @@ var Utils = class {
|
|
|
9132
9857
|
*/
|
|
9133
9858
|
readU128MoveCall(tx, reader) {
|
|
9134
9859
|
return tx.moveCall({
|
|
9135
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9860
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_u128", BUFFER_READER_MODULE_NAME),
|
|
9136
9861
|
arguments: [reader]
|
|
9137
9862
|
});
|
|
9138
9863
|
}
|
|
@@ -9144,7 +9869,7 @@ var Utils = class {
|
|
|
9144
9869
|
*/
|
|
9145
9870
|
readU256MoveCall(tx, reader) {
|
|
9146
9871
|
return tx.moveCall({
|
|
9147
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9872
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_u256", BUFFER_READER_MODULE_NAME),
|
|
9148
9873
|
arguments: [reader]
|
|
9149
9874
|
});
|
|
9150
9875
|
}
|
|
@@ -9156,7 +9881,7 @@ var Utils = class {
|
|
|
9156
9881
|
*/
|
|
9157
9882
|
readBytes32MoveCall(tx, reader) {
|
|
9158
9883
|
return tx.moveCall({
|
|
9159
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9884
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_bytes32", BUFFER_READER_MODULE_NAME),
|
|
9160
9885
|
arguments: [reader]
|
|
9161
9886
|
});
|
|
9162
9887
|
}
|
|
@@ -9168,7 +9893,7 @@ var Utils = class {
|
|
|
9168
9893
|
*/
|
|
9169
9894
|
readAddressMoveCall(tx, reader) {
|
|
9170
9895
|
return tx.moveCall({
|
|
9171
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9896
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_address", BUFFER_READER_MODULE_NAME),
|
|
9172
9897
|
arguments: [reader]
|
|
9173
9898
|
});
|
|
9174
9899
|
}
|
|
@@ -9181,7 +9906,7 @@ var Utils = class {
|
|
|
9181
9906
|
*/
|
|
9182
9907
|
readFixedLenBytesMoveCall(tx, reader, len) {
|
|
9183
9908
|
return tx.moveCall({
|
|
9184
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9909
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_fixed_len_bytes", BUFFER_READER_MODULE_NAME),
|
|
9185
9910
|
arguments: [reader, asU64(tx, len)]
|
|
9186
9911
|
});
|
|
9187
9912
|
}
|
|
@@ -9193,7 +9918,7 @@ var Utils = class {
|
|
|
9193
9918
|
*/
|
|
9194
9919
|
readBytesUntilEndMoveCall(tx, reader) {
|
|
9195
9920
|
return tx.moveCall({
|
|
9196
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9921
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "read_bytes_until_end", BUFFER_READER_MODULE_NAME),
|
|
9197
9922
|
arguments: [reader]
|
|
9198
9923
|
});
|
|
9199
9924
|
}
|
|
@@ -9205,7 +9930,7 @@ var Utils = class {
|
|
|
9205
9930
|
*/
|
|
9206
9931
|
readerBufferLengthMoveCall(tx, reader) {
|
|
9207
9932
|
return tx.moveCall({
|
|
9208
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9933
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "length", BUFFER_READER_MODULE_NAME),
|
|
9209
9934
|
arguments: [reader]
|
|
9210
9935
|
});
|
|
9211
9936
|
}
|
|
@@ -9217,7 +9942,7 @@ var Utils = class {
|
|
|
9217
9942
|
*/
|
|
9218
9943
|
readerToBytesMoveCall(tx, reader) {
|
|
9219
9944
|
return tx.moveCall({
|
|
9220
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9945
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "to_bytes", BUFFER_READER_MODULE_NAME),
|
|
9221
9946
|
arguments: [reader]
|
|
9222
9947
|
});
|
|
9223
9948
|
}
|
|
@@ -9229,7 +9954,7 @@ var Utils = class {
|
|
|
9229
9954
|
*/
|
|
9230
9955
|
newWriterMoveCall(tx) {
|
|
9231
9956
|
return tx.moveCall({
|
|
9232
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9957
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "new", BUFFER_WRITER_MODULE_NAME)
|
|
9233
9958
|
});
|
|
9234
9959
|
}
|
|
9235
9960
|
/**
|
|
@@ -9240,7 +9965,7 @@ var Utils = class {
|
|
|
9240
9965
|
*/
|
|
9241
9966
|
createWriterMoveCall(tx, buffer) {
|
|
9242
9967
|
return tx.moveCall({
|
|
9243
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9968
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "create", BUFFER_WRITER_MODULE_NAME),
|
|
9244
9969
|
arguments: [asBytes(tx, buffer)]
|
|
9245
9970
|
});
|
|
9246
9971
|
}
|
|
@@ -9252,7 +9977,7 @@ var Utils = class {
|
|
|
9252
9977
|
*/
|
|
9253
9978
|
writerBufferLengthMoveCall(tx, writer) {
|
|
9254
9979
|
return tx.moveCall({
|
|
9255
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9980
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "length", BUFFER_WRITER_MODULE_NAME),
|
|
9256
9981
|
arguments: [writer]
|
|
9257
9982
|
});
|
|
9258
9983
|
}
|
|
@@ -9264,7 +9989,7 @@ var Utils = class {
|
|
|
9264
9989
|
*/
|
|
9265
9990
|
writerToBytesMoveCall(tx, writer) {
|
|
9266
9991
|
return tx.moveCall({
|
|
9267
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9992
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "to_bytes", BUFFER_WRITER_MODULE_NAME),
|
|
9268
9993
|
arguments: [writer]
|
|
9269
9994
|
});
|
|
9270
9995
|
}
|
|
@@ -9277,7 +10002,7 @@ var Utils = class {
|
|
|
9277
10002
|
*/
|
|
9278
10003
|
writeBoolMoveCall(tx, writer, value) {
|
|
9279
10004
|
return tx.moveCall({
|
|
9280
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10005
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_bool", BUFFER_WRITER_MODULE_NAME),
|
|
9281
10006
|
arguments: [writer, asBool(tx, value)]
|
|
9282
10007
|
});
|
|
9283
10008
|
}
|
|
@@ -9290,7 +10015,7 @@ var Utils = class {
|
|
|
9290
10015
|
*/
|
|
9291
10016
|
writeU8MoveCall(tx, writer, value) {
|
|
9292
10017
|
return tx.moveCall({
|
|
9293
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10018
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_u8", BUFFER_WRITER_MODULE_NAME),
|
|
9294
10019
|
arguments: [writer, asU8(tx, value)]
|
|
9295
10020
|
});
|
|
9296
10021
|
}
|
|
@@ -9303,7 +10028,7 @@ var Utils = class {
|
|
|
9303
10028
|
*/
|
|
9304
10029
|
writeU16MoveCall(tx, writer, value) {
|
|
9305
10030
|
return tx.moveCall({
|
|
9306
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10031
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_u16", BUFFER_WRITER_MODULE_NAME),
|
|
9307
10032
|
arguments: [writer, asU16(tx, value)]
|
|
9308
10033
|
});
|
|
9309
10034
|
}
|
|
@@ -9316,7 +10041,7 @@ var Utils = class {
|
|
|
9316
10041
|
*/
|
|
9317
10042
|
writeU32MoveCall(tx, writer, value) {
|
|
9318
10043
|
return tx.moveCall({
|
|
9319
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10044
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_u32", BUFFER_WRITER_MODULE_NAME),
|
|
9320
10045
|
arguments: [writer, asU32(tx, value)]
|
|
9321
10046
|
});
|
|
9322
10047
|
}
|
|
@@ -9329,7 +10054,7 @@ var Utils = class {
|
|
|
9329
10054
|
*/
|
|
9330
10055
|
writeU64MoveCall(tx, writer, value) {
|
|
9331
10056
|
return tx.moveCall({
|
|
9332
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10057
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_u64", BUFFER_WRITER_MODULE_NAME),
|
|
9333
10058
|
arguments: [writer, asU64(tx, value)]
|
|
9334
10059
|
});
|
|
9335
10060
|
}
|
|
@@ -9342,7 +10067,7 @@ var Utils = class {
|
|
|
9342
10067
|
*/
|
|
9343
10068
|
writeU128MoveCall(tx, writer, value) {
|
|
9344
10069
|
return tx.moveCall({
|
|
9345
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10070
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_u128", BUFFER_WRITER_MODULE_NAME),
|
|
9346
10071
|
arguments: [writer, asU128(tx, value)]
|
|
9347
10072
|
});
|
|
9348
10073
|
}
|
|
@@ -9355,7 +10080,7 @@ var Utils = class {
|
|
|
9355
10080
|
*/
|
|
9356
10081
|
writeU256MoveCall(tx, writer, value) {
|
|
9357
10082
|
return tx.moveCall({
|
|
9358
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10083
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_u256", BUFFER_WRITER_MODULE_NAME),
|
|
9359
10084
|
arguments: [writer, asU256(tx, value)]
|
|
9360
10085
|
});
|
|
9361
10086
|
}
|
|
@@ -9368,7 +10093,7 @@ var Utils = class {
|
|
|
9368
10093
|
*/
|
|
9369
10094
|
writeBytesMoveCall(tx, writer, bytes) {
|
|
9370
10095
|
return tx.moveCall({
|
|
9371
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10096
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_bytes", BUFFER_WRITER_MODULE_NAME),
|
|
9372
10097
|
arguments: [writer, asBytes(tx, bytes)]
|
|
9373
10098
|
});
|
|
9374
10099
|
}
|
|
@@ -9381,7 +10106,7 @@ var Utils = class {
|
|
|
9381
10106
|
*/
|
|
9382
10107
|
writeAddressMoveCall(tx, writer, address) {
|
|
9383
10108
|
return tx.moveCall({
|
|
9384
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10109
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_address", BUFFER_WRITER_MODULE_NAME),
|
|
9385
10110
|
arguments: [writer, asAddress(tx, address)]
|
|
9386
10111
|
});
|
|
9387
10112
|
}
|
|
@@ -9394,7 +10119,7 @@ var Utils = class {
|
|
|
9394
10119
|
*/
|
|
9395
10120
|
writeBytes32MoveCall(tx, writer, bytes32) {
|
|
9396
10121
|
return tx.moveCall({
|
|
9397
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10122
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "write_bytes32", BUFFER_WRITER_MODULE_NAME),
|
|
9398
10123
|
arguments: [writer, asBytes32(tx, bytes32, this)]
|
|
9399
10124
|
});
|
|
9400
10125
|
}
|
|
@@ -9407,7 +10132,7 @@ var Utils = class {
|
|
|
9407
10132
|
*/
|
|
9408
10133
|
originalPackageOfTypeMoveCall(tx, typeArgument) {
|
|
9409
10134
|
return tx.moveCall({
|
|
9410
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10135
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "original_package_of_type", PACKAGE_MODULE_NAME),
|
|
9411
10136
|
typeArguments: [typeArgument]
|
|
9412
10137
|
});
|
|
9413
10138
|
}
|
|
@@ -9419,7 +10144,7 @@ var Utils = class {
|
|
|
9419
10144
|
*/
|
|
9420
10145
|
packageOfTypeMoveCall(tx, typeArgument) {
|
|
9421
10146
|
return tx.moveCall({
|
|
9422
|
-
target: __privateMethod(this, _Utils_instances,
|
|
10147
|
+
target: __privateMethod(this, _Utils_instances, target_fn24).call(this, "package_of_type", PACKAGE_MODULE_NAME),
|
|
9423
10148
|
typeArguments: [typeArgument]
|
|
9424
10149
|
});
|
|
9425
10150
|
}
|
|
@@ -9520,7 +10245,7 @@ _Utils_instances = new WeakSet();
|
|
|
9520
10245
|
* @returns The full module path for the move call
|
|
9521
10246
|
* @private
|
|
9522
10247
|
*/
|
|
9523
|
-
|
|
10248
|
+
target_fn24 = function(name, module_name = BYTES32_MODULE_NAME) {
|
|
9524
10249
|
return `${this.packageId}::${module_name}::${name}`;
|
|
9525
10250
|
};
|
|
9526
10251
|
/**
|
|
@@ -9736,8 +10461,7 @@ var ModuleManager = class {
|
|
|
9736
10461
|
["call" /* Call */]: new Call(packages.call, client),
|
|
9737
10462
|
["treasury" /* Treasury */]: new Treasury(packages.treasury, client, objects, this),
|
|
9738
10463
|
["layerZeroViews" /* LayerZeroViews */]: new LayerZeroViews(packages.layerzeroViews, client, objects, this),
|
|
9739
|
-
["ptbBuilder" /* PtbBuilder */]: new PtbBuilder(packages.ptbMoveCall, client)
|
|
9740
|
-
["oapp" /* Oapp */]: new OApp(packages.oapp, client, objects, this)
|
|
10464
|
+
["ptbBuilder" /* PtbBuilder */]: new PtbBuilder(packages.ptbMoveCall, client)
|
|
9741
10465
|
});
|
|
9742
10466
|
}
|
|
9743
10467
|
// === Core Module Getters ===
|
|
@@ -9771,8 +10495,12 @@ var ModuleManager = class {
|
|
|
9771
10495
|
getPtbBuilder() {
|
|
9772
10496
|
return this.getModule("ptbBuilder" /* PtbBuilder */);
|
|
9773
10497
|
}
|
|
9774
|
-
getOApp() {
|
|
9775
|
-
return this.
|
|
10498
|
+
getOApp(client, callCapId, options) {
|
|
10499
|
+
return this.getOrCreateModule("oapp" /* Oapp */ + callCapId, options, () => {
|
|
10500
|
+
const packageId = options?.packageId ?? this.packages.oapp;
|
|
10501
|
+
const objects = this.mergeObjectsOptions(options);
|
|
10502
|
+
return new OApp(packageId, callCapId, client, objects, this);
|
|
10503
|
+
});
|
|
9776
10504
|
}
|
|
9777
10505
|
// === Non-core Module Getters (created on-demand with caching) ===
|
|
9778
10506
|
getCounter(client, options) {
|
|
@@ -9878,6 +10606,13 @@ var ModuleManager = class {
|
|
|
9878
10606
|
return new BlockedMessageLibPtbBuilder(packageId, client, objects, this);
|
|
9879
10607
|
});
|
|
9880
10608
|
}
|
|
10609
|
+
getWorkerRegistry(client, options) {
|
|
10610
|
+
return this.getOrCreateModule("workerRegistry" /* WorkerRegistry */, options, () => {
|
|
10611
|
+
const packageId = options?.packageId ?? this.packages.workerRegistry;
|
|
10612
|
+
const objects = this.mergeObjectsOptions(options);
|
|
10613
|
+
return new WorkerRegistry(packageId, client, objects, this);
|
|
10614
|
+
});
|
|
10615
|
+
}
|
|
9881
10616
|
// === Private Utility Methods ===
|
|
9882
10617
|
/**
|
|
9883
10618
|
* Merge objects configuration with options, avoiding unnecessary object spreading
|
|
@@ -9891,193 +10626,203 @@ var ModuleManager = class {
|
|
|
9891
10626
|
};
|
|
9892
10627
|
var PACKAGE_UTILS_ADDRESS = {
|
|
9893
10628
|
[lzDefinitions.Stage.MAINNET]: "0xcdad05867c25d6461e5813071116fa3f26d56a9b52ad053747457efb79d45714",
|
|
9894
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10629
|
+
[lzDefinitions.Stage.TESTNET]: "0xb168928451914a99ec70aa954e4b7e45e2739fdb5c403f540caf647c01645f30",
|
|
9895
10630
|
[lzDefinitions.Stage.SANDBOX]: "0xb60f3952a3dc284637f419ac445b6b3d5a2ea112252c4bf686f2671cbecbb7a3"
|
|
9896
10631
|
};
|
|
9897
10632
|
var PACKAGE_ENDPOINT_V2_ADDRESS = {
|
|
9898
10633
|
[lzDefinitions.Stage.MAINNET]: "0xf625a8bde20d64850a4ec7b01c1918d9a0a29495546de7a0144440275f9b933c",
|
|
9899
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9900
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10634
|
+
[lzDefinitions.Stage.TESTNET]: "0xabf9629418d997fcc742a5ca22820241b72fb53691f010bc964eb49b4bd2263a",
|
|
10635
|
+
[lzDefinitions.Stage.SANDBOX]: "0x391bd5cd878dce0b306f4dda68c33b48b30dd320845254c427f6c92d5449bc14"
|
|
9901
10636
|
};
|
|
9902
10637
|
var PACKAGE_COUNTER_V2_ADDRESS = {
|
|
9903
10638
|
[lzDefinitions.Stage.MAINNET]: "0xfe1e336fdb42fa5ef85ab9a9c932b58c43e0bb58273cecea9d00cb5d05159914",
|
|
9904
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9905
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10639
|
+
[lzDefinitions.Stage.TESTNET]: "0x7e594c8f3f3e26f8c5d7dfb3103b5f159442995602bd54c5825b4bd40e381880",
|
|
10640
|
+
[lzDefinitions.Stage.SANDBOX]: "0x090fcb740a5ab40983acfd63499695dd31ab105def70f65aef549a0631eadf2a"
|
|
9906
10641
|
};
|
|
9907
10642
|
var PACKAGE_SIMPLE_MESSAGE_LIB_ADDRESS = {
|
|
9908
10643
|
[lzDefinitions.Stage.MAINNET]: "0x83651370065f70112b20007137c7235a2a243055d9f59cb5e162c00c4a1680a7",
|
|
9909
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9910
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10644
|
+
[lzDefinitions.Stage.TESTNET]: "0x7f170d5f0f9ed14d249eebf29053ed7a7fefe429c34fd7dc7b918e54158ef825",
|
|
10645
|
+
[lzDefinitions.Stage.SANDBOX]: "0xc68858ef375671a5fbc2e1f16a28efdbe95cfa91abf71f7368bc5d9f9ea7e404"
|
|
9911
10646
|
};
|
|
9912
10647
|
var PACKAGE_ULN_302_ADDRESS = {
|
|
9913
10648
|
[lzDefinitions.Stage.MAINNET]: "0xd73c9d588717c32fa327335d9beaf59b983b808577a382e013d8c7161a323d8e",
|
|
9914
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9915
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10649
|
+
[lzDefinitions.Stage.TESTNET]: "0xf5d69c7b0922ce0ab4540525fbc66ca25ce9f092c64b032b91e4c5625ea0fb24",
|
|
10650
|
+
[lzDefinitions.Stage.SANDBOX]: "0x02530da0f30827d81eaf9ac6ed5151309d1dda8d3a919ba796ce3d9853ccbe7c"
|
|
9916
10651
|
};
|
|
9917
10652
|
var PACKAGE_ULN_302_PTB_BUILDER_ADDRESS = {
|
|
9918
10653
|
[lzDefinitions.Stage.MAINNET]: "0x67b3a43a3aa962e1a6012b04f68e6f358803f5970858f4de22684d6d13fcd747",
|
|
9919
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9920
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10654
|
+
[lzDefinitions.Stage.TESTNET]: "0x48fde185c0645dde7b8c0adf8b7a060c3722fc93088957cc2dc08ad328ce0c7e",
|
|
10655
|
+
[lzDefinitions.Stage.SANDBOX]: "0x99f1802813cd3d2ffea4c7d6c93ad1d0a4f80f92b2c588af8ca5304eccc7bd23"
|
|
9921
10656
|
};
|
|
9922
10657
|
var PACKAGE_DVN_PTB_BUILDER_ADDRESS = {
|
|
9923
10658
|
[lzDefinitions.Stage.MAINNET]: "0xb3f3a6d39a441a0f41a621d27427cedf624d500b3da5cd7051bc5835b21ac3ba",
|
|
9924
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9925
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10659
|
+
[lzDefinitions.Stage.TESTNET]: "0xf21c983443a76cf3fb83bc76cae25ca35e4d1b20471b52a666ac5dac95d17a37",
|
|
10660
|
+
[lzDefinitions.Stage.SANDBOX]: "0x1ccdfc2f6560475a194489719f0f4ede96d5c322c231ce80ccf16a9ce05f032b"
|
|
9926
10661
|
};
|
|
9927
10662
|
var PACKAGE_EXECUTOR_PTB_BUILDER_ADDRESS = {
|
|
9928
10663
|
[lzDefinitions.Stage.MAINNET]: "0x9d26806bb023ccd5b79d8ad50bf503e0e91c07b5bbfeb5b20a79e073571a5196",
|
|
9929
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9930
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10664
|
+
[lzDefinitions.Stage.TESTNET]: "0xe964c8cdc0222d5f6b9ae99c4593a679e5903e899cfb84acdaa57f7d6288df55",
|
|
10665
|
+
[lzDefinitions.Stage.SANDBOX]: "0x1d3a1af6f64f34cdc3a64bea68e1fb2b57bc04391ed34f5b7ff217df3bc563a2"
|
|
9931
10666
|
};
|
|
9932
10667
|
var PACKAGE_EXECUTOR_ADDRESS = {
|
|
9933
10668
|
[lzDefinitions.Stage.MAINNET]: "0x749420cc42b47d3db83fe316eb8accd8126bed9a779c0b7e06fa084c7fa1d76d",
|
|
9934
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9935
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10669
|
+
[lzDefinitions.Stage.TESTNET]: "0xb9fdc6748fb939095e249b22717d564edf890681e387131d6c525d867d30f834",
|
|
10670
|
+
[lzDefinitions.Stage.SANDBOX]: "0xa08437ee32a50f168eb37639f291dc3cd6a3c40b82edfc7a6b20314a937c3ed5"
|
|
9936
10671
|
};
|
|
9937
10672
|
var PACKAGE_ZRO_ADDRESS = {
|
|
9938
10673
|
[lzDefinitions.Stage.MAINNET]: "0xcdf19828a455468c4e4ffbd74ad641dddb58b49cd7d043da4cfa12f76c599d0a",
|
|
9939
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10674
|
+
[lzDefinitions.Stage.TESTNET]: "0x6909c3aa2e31e11ed55bf8240e1d499fd6f9e4b6d6439b996e286771594da151",
|
|
9940
10675
|
[lzDefinitions.Stage.SANDBOX]: "0xce9cfe2dc60b2f45896a3c94a9af691c26b78ac4ce585ad7db429a3b6cc382c4"
|
|
9941
10676
|
};
|
|
9942
10677
|
var PACKAGE_CALL_ADDRESS = {
|
|
9943
10678
|
[lzDefinitions.Stage.MAINNET]: "0x26848d191c6b922a0bf185c4b3f6333179ce3b48df47d83fb112868bb65c2f37",
|
|
9944
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9945
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10679
|
+
[lzDefinitions.Stage.TESTNET]: "0x4273b15ebff2b52be41813ae6f39c643e352fb7d02340fe0755ebbf20d4198c7",
|
|
10680
|
+
[lzDefinitions.Stage.SANDBOX]: "0xdcaeaff56642980b1776fa19fbe231a0e21c9b1a002d6cc93e4f25ac7af6ceae"
|
|
9946
10681
|
};
|
|
9947
10682
|
var PACKAGE_ENDPOINT_PTB_BUILDER_ADDRESS = {
|
|
9948
10683
|
[lzDefinitions.Stage.MAINNET]: "0x387af0542c79874a52c3e8812390c0fd02a8e947ce54aea8d80481ac2b5b3acb",
|
|
9949
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9950
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10684
|
+
[lzDefinitions.Stage.TESTNET]: "0x8aa8f8212d35515298213099a317e7d79d54a35d455e17d6c8f0a3e017f37eb5",
|
|
10685
|
+
[lzDefinitions.Stage.SANDBOX]: "0xe7120f354c0f73c8c43de21d9bd4a552e349cca4f7efdfdc7c8d53cdb82c523b"
|
|
9951
10686
|
};
|
|
9952
10687
|
var PACKAGE_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
9953
10688
|
[lzDefinitions.Stage.MAINNET]: "0xba557037446a5b114205c868db114957945dd21df9770796fea2b558fc4a20fd",
|
|
9954
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9955
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10689
|
+
[lzDefinitions.Stage.TESTNET]: "0x3328ee44a8cf96905dbd2ad78ee6e8f71a2ee9abdba6b1d69d23dbb31b390a4b",
|
|
10690
|
+
[lzDefinitions.Stage.SANDBOX]: "0x941b47e58e8da4debf2a725e8b7000b005e6616403dd34f24266b734689c13a7"
|
|
9956
10691
|
};
|
|
9957
10692
|
var PACKAGE_PTB_MOVE_CALL_ADDRESS = {
|
|
9958
10693
|
[lzDefinitions.Stage.MAINNET]: "0x0dd38c96b282271279247c26dba1f51d6e45209396a9e548154881e04549db66",
|
|
9959
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9960
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10694
|
+
[lzDefinitions.Stage.TESTNET]: "0xb824310acecc18cdbc4803d185d7c516dca47b991a5a0e43404e49cd46c91270",
|
|
10695
|
+
[lzDefinitions.Stage.SANDBOX]: "0x3927c9ab138b182b538ec8aa2432410893faa69a8f30074349135e65f7da43ea"
|
|
9961
10696
|
};
|
|
9962
10697
|
var PACKAGE_DVN_ADDRESS = {
|
|
9963
10698
|
[lzDefinitions.Stage.MAINNET]: "0x6810f5568936a9a2b5fcb043f59a3cbf681e06f0db61c90bf3ff5530d4f470c0",
|
|
9964
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9965
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10699
|
+
[lzDefinitions.Stage.TESTNET]: "0xfa5a7bd745a56f3f18f4830563c8b65a737dcfca5b9e5aa281f2f2cd3f6eaf6d",
|
|
10700
|
+
[lzDefinitions.Stage.SANDBOX]: "0xd88870f2ca028bb96f5622fc4ca4299d9ad0d2f5348e21d2ebb90d494242a810"
|
|
9966
10701
|
};
|
|
9967
10702
|
var PACKAGE_DVN_FEE_LIB_ADDRESS = {
|
|
9968
10703
|
[lzDefinitions.Stage.MAINNET]: "0xb94f476ccd37034f4f5fb9c541320b85f86e61ae7f654fa66f3b987e8fb3f825",
|
|
9969
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9970
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10704
|
+
[lzDefinitions.Stage.TESTNET]: "0xfb596f2afcc4f15ec8660fb241c3a7bc9aa2f9b3b820914b6990202b5f236f2f",
|
|
10705
|
+
[lzDefinitions.Stage.SANDBOX]: "0x3d55959f6b4b0f48d1b674cd50c5ab1698677ca8808e7e0a45215c1f62a3ed89"
|
|
9971
10706
|
};
|
|
9972
10707
|
var PACKAGE_EXECUTOR_FEE_LIB_ADDRESS = {
|
|
9973
10708
|
[lzDefinitions.Stage.MAINNET]: "0x4cdd97cf2dee8387b004915c293d0565577e0194fff4894e604a09db54ac62c7",
|
|
9974
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9975
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10709
|
+
[lzDefinitions.Stage.TESTNET]: "0xa99c7ca780a6cedfc27d9274c031741b68014886cba04dafe8335c72eeeed0b5",
|
|
10710
|
+
[lzDefinitions.Stage.SANDBOX]: "0x3d3ba365cf39ffba6cffb22ac139b53f3b8cbe77f092ed04419b16f65f4e3912"
|
|
9976
10711
|
};
|
|
9977
10712
|
var PACKAGE_PRICE_FEED_ADDRESS = {
|
|
9978
10713
|
[lzDefinitions.Stage.MAINNET]: "0x9f12f79a355fca76492bc1908fc7a9a8518d2a83e65cffc93f134144dfa4e5bb",
|
|
9979
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9980
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10714
|
+
[lzDefinitions.Stage.TESTNET]: "0xa4f8f126dc7e2a763676eab3a6f0a12afaf334baa0f37b41a1e93890cf95ea4c",
|
|
10715
|
+
[lzDefinitions.Stage.SANDBOX]: "0x9b0422966b9c51a825081754feee8eb1d3d869b4a16ffbeecbc6b0fe4a4b6ca6"
|
|
9981
10716
|
};
|
|
9982
10717
|
var PACKAGE_TREASURY_ADDRESS = {
|
|
9983
10718
|
[lzDefinitions.Stage.MAINNET]: "0xcb8bc76ad2dde43cb83fe4f27a702df0874e99c047317251ee878893c17c83c5",
|
|
9984
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9985
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10719
|
+
[lzDefinitions.Stage.TESTNET]: "0xb9ae7adf8193fb0bf2cc99d89dac19ae309c0f1b768d0976166f507c1daa9936",
|
|
10720
|
+
[lzDefinitions.Stage.SANDBOX]: "0x6ac5181a8775958f3ff9829c289a73dc6007f9741ee7d5941ba09313925ce70b"
|
|
9986
10721
|
};
|
|
9987
10722
|
var PACKAGE_OAPP_ADDRESS = {
|
|
9988
10723
|
[lzDefinitions.Stage.MAINNET]: "0x7c93d6d8288fa0f8df5a595dcde2413b849d8c839fc59fc09243fd5bf44c96ab",
|
|
9989
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9990
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10724
|
+
[lzDefinitions.Stage.TESTNET]: "0x04c440985f5deab2fb7f821b3288d93225a3e637cf22dda476809836f0533751",
|
|
10725
|
+
[lzDefinitions.Stage.SANDBOX]: "0x3874d4613db1a91ff5f7fbc3b1a57c276630694110371d3988bbe467a6a225df"
|
|
9991
10726
|
};
|
|
9992
10727
|
var PACKAGE_LAYERZERO_VIEWS_ADDRESS = {
|
|
9993
10728
|
[lzDefinitions.Stage.MAINNET]: "0x74803ac88036cbd57bf1a46347e22143a47081f7159efb01419f1ed14a17ad67",
|
|
9994
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
9995
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10729
|
+
[lzDefinitions.Stage.TESTNET]: "0xaab2d0f2a54eef15fd00f03d70b87a015a41ebdc3fd85c0ceaffda969a400c9f",
|
|
10730
|
+
[lzDefinitions.Stage.SANDBOX]: "0xf632751c0c00176ccc878650ec38bf1e952f9f3da23602208ae0cecfbc6ba84f"
|
|
9996
10731
|
};
|
|
9997
10732
|
var PACKAGE_DVN_LAYERZERO_ADDRESS = {
|
|
9998
10733
|
[lzDefinitions.Stage.MAINNET]: "0xc3f25fb140745ca0d4cde0ec382fd76e2f20d5a76a7fd9264340b4af949fd38b",
|
|
9999
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10000
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10734
|
+
[lzDefinitions.Stage.TESTNET]: "0x1356fef0c7325536e289e53cc545219cbfbd1490ed762c8d8efb97efa6cfb856",
|
|
10735
|
+
[lzDefinitions.Stage.SANDBOX]: "0x04a430209e86248528bfc50f1760eefe331bfd8921613847a24ed5a046fb01cd"
|
|
10001
10736
|
};
|
|
10002
10737
|
var PACKAGE_EXECUTOR_LAYERZERO_ADDRESS = {
|
|
10003
10738
|
[lzDefinitions.Stage.MAINNET]: "0x2111256b15f5d0a20f6352084dac268c737b47c113b4da5eacb316f8a536f9bf",
|
|
10004
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10005
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10739
|
+
[lzDefinitions.Stage.TESTNET]: "0xbd529bbc1e862db38c374435c40bb6399f3fffbc097977dbae4b71cfa975adb1",
|
|
10740
|
+
[lzDefinitions.Stage.SANDBOX]: "0x332a2e072e2b55f61414f46f48b6e6bda408fd918c816be1a6a466f563a47170"
|
|
10006
10741
|
};
|
|
10007
10742
|
var PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS = {
|
|
10008
10743
|
[lzDefinitions.Stage.MAINNET]: "0xbdce35f2801192bb218e47bb6e9cf08e136037b271157e8db8fdc9acf0bd225e",
|
|
10009
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10010
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10744
|
+
[lzDefinitions.Stage.TESTNET]: "0xfd259aa95eec6f8b91e0ff3cc5c3313010fbe3226096cf02286b1f843dd036d4",
|
|
10745
|
+
[lzDefinitions.Stage.SANDBOX]: "0x90e872e4dc6b7a2966c906e2baa1701bff5668db95e998e4880ff78c28690990"
|
|
10011
10746
|
};
|
|
10012
10747
|
var PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS = {
|
|
10013
10748
|
[lzDefinitions.Stage.MAINNET]: "0x9f6107b708d7650b1484ae10cb98340af343f46bd63793ea91c2379bab9a7abb",
|
|
10014
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10015
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10749
|
+
[lzDefinitions.Stage.TESTNET]: "0x8f7e92efeba183d10db22ea61e8a35b46a165f2b42b127ca28740250dde5220a",
|
|
10750
|
+
[lzDefinitions.Stage.SANDBOX]: "0x89e12d1df2c1bb9270c3802911f533265f14573cfed792d1c431ab3b8c15f40c"
|
|
10016
10751
|
};
|
|
10017
10752
|
var PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10018
10753
|
[lzDefinitions.Stage.MAINNET]: "0xd90430a0b1b5bf932586d7d52e67e2242b1276ad7944b41c21acd4f950671335",
|
|
10019
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10020
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10754
|
+
[lzDefinitions.Stage.TESTNET]: "0xa791dddddc4007c7d13ce2318159f0e0e2f27ad5a5e330dfb821683663df43eb",
|
|
10755
|
+
[lzDefinitions.Stage.SANDBOX]: "0x4b84ee0bc71e6b2de155e715a1407fadf481f8190984ffe0434a8b4f148bc326"
|
|
10756
|
+
};
|
|
10757
|
+
var PACKAGE_WORKER_REGISTRY_ADDRESS = {
|
|
10758
|
+
[lzDefinitions.Stage.MAINNET]: "",
|
|
10759
|
+
[lzDefinitions.Stage.TESTNET]: "0x042cf30d4fb29582cfba5ab0acae2f24ad04e46ef6fcbdec7ecf8273fb46bb24",
|
|
10760
|
+
[lzDefinitions.Stage.SANDBOX]: "0x717eb4ed01669a599b4563318b7ce6fa00a2192e437674b87ddd7666b9b248ae"
|
|
10761
|
+
};
|
|
10762
|
+
var PACKAGE_WORKER_COMMON_ADDRESS = {
|
|
10763
|
+
[lzDefinitions.Stage.MAINNET]: "0x6b29b0abf9da88be53a9ea1dfab8f600930b9ab6961eee65d67c1eecdd8cb695",
|
|
10764
|
+
[lzDefinitions.Stage.TESTNET]: "0x9e60db99cfda71312eeb6fff4ce9682ce1d4a3c3a0051c430c5de7d373b85889",
|
|
10765
|
+
[lzDefinitions.Stage.SANDBOX]: "0xddbad4f449870d88511f40cba2e83a49533d7e26ddb6971685d54bf801f4efdf"
|
|
10021
10766
|
};
|
|
10022
10767
|
var OBJECT_ENDPOINT_V2_ADDRESS = {
|
|
10023
10768
|
[lzDefinitions.Stage.MAINNET]: "0xd84dfbd6b21f2a6e2d9ecfd8204d20a420f2528746381c2db29c2f4caae67fcd",
|
|
10024
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10025
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10769
|
+
[lzDefinitions.Stage.TESTNET]: "0x2b96537c30c5fa962a1bfb58a168fc17c17f2546c88e2e9252f21ee7d5eff57a",
|
|
10770
|
+
[lzDefinitions.Stage.SANDBOX]: "0xdb6c4e19cf6896fd1abbd6ee22ec915d08b70c88f35b4796dfedc218f3047168"
|
|
10026
10771
|
};
|
|
10027
10772
|
var OBJECT_SIMPLE_MESSAGE_LIB_ADDRESS = {
|
|
10028
10773
|
[lzDefinitions.Stage.MAINNET]: "0xd18907d32aa9e95fc2eed2d02fec562442877bec8680620c05fa5b3c110ccd81",
|
|
10029
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10030
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10774
|
+
[lzDefinitions.Stage.TESTNET]: "0xcc22cbdd0961e7ba0522de24c1c38bc3b6265345ac423a68666079a3b558b575",
|
|
10775
|
+
[lzDefinitions.Stage.SANDBOX]: "0xd28485b9f2443a42f48ac795a6e7b3bf427f346ca875e52d885afde396639727"
|
|
10031
10776
|
};
|
|
10032
10777
|
var OBJECT_SIMPLE_MESSAGE_LIB_ADMIN_CAP_ADDRESS = {
|
|
10033
10778
|
[lzDefinitions.Stage.MAINNET]: "0x617aceffed0b17cc5b5f5ad4cd1e8b9d965a9ef73a923b474e4763dec7c175f6",
|
|
10034
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10035
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10779
|
+
[lzDefinitions.Stage.TESTNET]: "0xd0e51a7343f9f11bbc7a5d149d9184721a5e0086fa7622279ebe1b3a5db16408",
|
|
10780
|
+
[lzDefinitions.Stage.SANDBOX]: "0x6dbb2134f93b44369f6eb92af788f9aa7d15e9847110e9f2c9e445427af44846"
|
|
10036
10781
|
};
|
|
10037
10782
|
var OBJECT_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10038
10783
|
[lzDefinitions.Stage.MAINNET]: "0x2a0c8a426823cc7fcb89dd849810b42643fda344286d493d0ce8593d9b2be280",
|
|
10039
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10040
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10784
|
+
[lzDefinitions.Stage.TESTNET]: "0x160a37f6df7b23bfd01ae53f376b490d9c0d535253e22d47c87dc8e4048f92b0",
|
|
10785
|
+
[lzDefinitions.Stage.SANDBOX]: "0xc4981d5d5f7b6d3f57645386cac22c6606f534ff41b70e76c1580945e2501ef0"
|
|
10041
10786
|
};
|
|
10042
10787
|
var OBJECT_ULN_302_ADDRESS = {
|
|
10043
10788
|
[lzDefinitions.Stage.MAINNET]: "0x7d140391ed97fcdb3f87aa13a7727b7354cb0a6ca2a3e7156f8b3767dd634266",
|
|
10044
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10045
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10789
|
+
[lzDefinitions.Stage.TESTNET]: "0x69541d4feeb08cdd3b20b3502021a676eea0fca4f47d46e423cdc9686df406ff",
|
|
10790
|
+
[lzDefinitions.Stage.SANDBOX]: "0xe119b6da1bd01883ef63d28b040dd6d35041128990392189f25b4a3263f740f8"
|
|
10046
10791
|
};
|
|
10047
10792
|
var OBJECT_ULN_302_ADMIN_CAP_ADDRESS = {
|
|
10048
10793
|
[lzDefinitions.Stage.MAINNET]: "0xece25d7e8aad8a6295a7821bd4b7f29896714c3fc8472a5e7dbb19d67ff77e00",
|
|
10049
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10050
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10794
|
+
[lzDefinitions.Stage.TESTNET]: "0xf02307bc8f22f0390ebe757a8a9292eba2c784dddde523fec2632d2167f4c02e",
|
|
10795
|
+
[lzDefinitions.Stage.SANDBOX]: "0xf716caca2da45bff574226107728dcbdcc1f791a9f79a59140739419c5e138ca"
|
|
10051
10796
|
};
|
|
10052
10797
|
var OBJECT_ULN_302_VERIFICATION_ADDRESS = {
|
|
10053
10798
|
[lzDefinitions.Stage.MAINNET]: "0x2e672e3cb4f4992b3e790ce50c7b3e464a60633ca5f68de3039cc5f20116f6e7",
|
|
10054
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10055
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10799
|
+
[lzDefinitions.Stage.TESTNET]: "0x0769f54f89fdeacccd61384db8e67e7c76f8c33723cfa97940132616600709f9",
|
|
10800
|
+
[lzDefinitions.Stage.SANDBOX]: "0x5c676cf5b8c7ee55668f0040cbe62e6decdde5b31d132c94a15c829125363890"
|
|
10056
10801
|
};
|
|
10057
10802
|
var OBJECT_ULN_302_PTB_BUILDER_ADDRESS = {
|
|
10058
10803
|
[lzDefinitions.Stage.MAINNET]: "0xb41c8c88899debceb5982ff0333a0026bb68159758af8557ee1b12433f539ec8",
|
|
10059
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10060
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10804
|
+
[lzDefinitions.Stage.TESTNET]: "0xec0cb4575348722360fc2ef7a3ddeeeb29024bdfdd0fadeb4b9fe787847af552",
|
|
10805
|
+
[lzDefinitions.Stage.SANDBOX]: "0x581751d5a9892f7730ea68e809da69d69c71a48acc4e6a4ec50bcc68bb2bb3ac"
|
|
10061
10806
|
};
|
|
10062
10807
|
var OBJECT_TREASURY_ADDRESS = {
|
|
10063
10808
|
[lzDefinitions.Stage.MAINNET]: "0xa6fd139692050fb7fea2a5d924d5cc637b2b617982b1537b98ab51f6074a6335",
|
|
10064
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10065
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10809
|
+
[lzDefinitions.Stage.TESTNET]: "0x40a2b309bda42658dd12e967574f6e77170082599a77b158051c31064df82be1",
|
|
10810
|
+
[lzDefinitions.Stage.SANDBOX]: "0x42b92df6ef144c89bd00e2a0c36681a4739aed87a8e292a7dd9bee7a1a9f8017"
|
|
10066
10811
|
};
|
|
10067
10812
|
var OBJECT_TREASURY_ADMIN_CAP_ADDRESS = {
|
|
10068
10813
|
[lzDefinitions.Stage.MAINNET]: "0x6fafabbb6f8dd963fb926b2075de90ed86e550bc67c900768e6b4c6002bc2b7d",
|
|
10069
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10070
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10814
|
+
[lzDefinitions.Stage.TESTNET]: "0xe2db6d7632269ccdea6eb9c93a66809b242005f1ac9c0a4ed9a31ef2d0e8b6dd",
|
|
10815
|
+
[lzDefinitions.Stage.SANDBOX]: "0x935860aa216daf5d3c741d1c76dff9e0259f3b0d6dcac7cdab5e9a4847427f7d"
|
|
10071
10816
|
};
|
|
10072
10817
|
var OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS = {
|
|
10073
10818
|
[lzDefinitions.Stage.MAINNET]: "0x48761f1a6591f4ad761f8ef9ec85ad6d5255805c35d4c9a90c97c40e7820aa85",
|
|
10074
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10075
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10819
|
+
[lzDefinitions.Stage.TESTNET]: "0xb9b05d049cb78fa942b8a259d424f3db42f1a26a8d033a273edce240956bd04a",
|
|
10820
|
+
[lzDefinitions.Stage.SANDBOX]: "0x426e1eda45d6c9463b31ba939ae962f743a1a070be88f52f247662381300b195"
|
|
10076
10821
|
};
|
|
10077
10822
|
var OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10078
10823
|
[lzDefinitions.Stage.MAINNET]: "0xba9a66cdc77ae59264b7481e6d0d04426f380169b9afbb5176aaf58718fad6d1",
|
|
10079
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10080
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10824
|
+
[lzDefinitions.Stage.TESTNET]: "0xcb9de2c184b44f26ab981b898b5ad46fb86d05335523bae3bc0c8eee478f28bb",
|
|
10825
|
+
[lzDefinitions.Stage.SANDBOX]: "0x2898915c4d47f1ce8de0c638b0cd5c696cc13a55a946c80e08129b35dd7d42ab"
|
|
10081
10826
|
};
|
|
10082
10827
|
var OBJECT_DISCOVERY_ADDRESS = {
|
|
10083
10828
|
[lzDefinitions.Stage.MAINNET]: "",
|
|
@@ -10086,48 +10831,48 @@ var OBJECT_DISCOVERY_ADDRESS = {
|
|
|
10086
10831
|
};
|
|
10087
10832
|
var OBJECT_COUNTER_ADDRESS = {
|
|
10088
10833
|
[lzDefinitions.Stage.MAINNET]: "0xe44f7b2ff80b8450e0d09ec84198dd22d9e2ad6e9c9688d2db605736b99ae965",
|
|
10089
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10090
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10834
|
+
[lzDefinitions.Stage.TESTNET]: "0x47607ddc0f7d906f384da14d868c000499f5ef96dcf214a036322618e61907c5",
|
|
10835
|
+
[lzDefinitions.Stage.SANDBOX]: "0x03647f24fde18a798ac5462db6141db68dea0cf9cd6f98e17223ab7af593e8e1"
|
|
10091
10836
|
};
|
|
10092
10837
|
var OBJECT_COUNTER_OAPP_ADDRESS = {
|
|
10093
10838
|
[lzDefinitions.Stage.MAINNET]: "0x84e16eed83a2e9787860bd0324a3a69adc9ec181e5f7f2bfcca11222c113414c",
|
|
10094
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10095
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10839
|
+
[lzDefinitions.Stage.TESTNET]: "0xacf214933db3da2dc72202c33c8e2dbc694efcc52dea7a76314038e674ba51e8",
|
|
10840
|
+
[lzDefinitions.Stage.SANDBOX]: "0x52f0ffe7401a36c2223af0a2b0f2a95ae3e047a2b2e500314dea1cb125b07e9f"
|
|
10096
10841
|
};
|
|
10097
10842
|
var OBJECT_COUNTER_ADMIN_CAP_ADDRESS = {
|
|
10098
10843
|
[lzDefinitions.Stage.MAINNET]: "0x7c1250bbfb0e72ff58985112746d361ad729ac6f47a404c76d4e447b93b49984",
|
|
10099
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10100
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10844
|
+
[lzDefinitions.Stage.TESTNET]: "0x4fdd1cba150010d9cfe8f5a9e33179d6a6cd0837441d2a2c4adb5af98298849f",
|
|
10845
|
+
[lzDefinitions.Stage.SANDBOX]: "0xaa3ae4fb9873b7a749aeefdbe9cd0d7d9c4f641693df2cee063983d333837951"
|
|
10101
10846
|
};
|
|
10102
10847
|
var OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS = {
|
|
10103
10848
|
[lzDefinitions.Stage.MAINNET]: "0x78d0ef45ccf4e6247162c09aa73ea0bb59467057960c23fe41a976ca67e916ab",
|
|
10104
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10105
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10849
|
+
[lzDefinitions.Stage.TESTNET]: "0xf76fbe61f88a3512f0218aa629531708b4aa4ebc2e9a8b3bbf2764259f5ad4ca",
|
|
10850
|
+
[lzDefinitions.Stage.SANDBOX]: "0x2fa79d197dd4dab16a542f9a7e4327b33d9ced11e9696dd14688ae8b1d8130b2"
|
|
10106
10851
|
};
|
|
10107
10852
|
var OBJECT_ENDPOINT_PTB_BUILDER_ADDRESS = {
|
|
10108
10853
|
[lzDefinitions.Stage.MAINNET]: "0x2954f9997631409cf067785477b800ced4a2a9ccc75032076f8129ee07ca2caa",
|
|
10109
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10110
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10854
|
+
[lzDefinitions.Stage.TESTNET]: "0x57ec59d312b807e12c4af7e5efa9764cba5feb03ebb9a238d3f3547f4d14c78a",
|
|
10855
|
+
[lzDefinitions.Stage.SANDBOX]: "0x19c6288dc2b5d48f45fac8e750561f5d17893c83b506be93f01c63fc393bcc5b"
|
|
10111
10856
|
};
|
|
10112
10857
|
var OBJECT_ENDPOINT_PTB_BUILDER_ADMIN_CAP_ADDRESS = {
|
|
10113
10858
|
[lzDefinitions.Stage.MAINNET]: "0x2a705654d837e75ee88e1f03003cccf3faa9a683cf0434468745532cc55e148f",
|
|
10114
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10115
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10859
|
+
[lzDefinitions.Stage.TESTNET]: "0x385284d0bd5b2cf39bde3bd448ecb64d851c23dbd8f6890b138e5268a88e2304",
|
|
10860
|
+
[lzDefinitions.Stage.SANDBOX]: "0xf5a6ad27d693721cfccd9c2a568d9f7a610b81feaed6d2b6bd6aee32f89471c6"
|
|
10116
10861
|
};
|
|
10117
10862
|
var OBJECT_DVN_ADDRESS = {
|
|
10118
10863
|
[lzDefinitions.Stage.MAINNET]: "0x607471cac2ed025cbb2874cd5a175e6000939747097bbd0ea89664c1fbe9672c",
|
|
10119
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10120
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10864
|
+
[lzDefinitions.Stage.TESTNET]: "0x4160cd9281e79a93f87f7f45853cd682750102be01f36d1c33ef99ee8cd86e0d",
|
|
10865
|
+
[lzDefinitions.Stage.SANDBOX]: "0x4260355e158e03ef808b69ef71feb741d3277850a1cba918a0674e1d30340b32"
|
|
10121
10866
|
};
|
|
10122
10867
|
var OBJECT_DVN_CAP_ADDRESS = {
|
|
10123
10868
|
[lzDefinitions.Stage.MAINNET]: "0x67d3d9e3537fc8ad2efd674bdce3b7f98ba2892971ab91a6f3bb611844dcc2e1",
|
|
10124
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10125
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10869
|
+
[lzDefinitions.Stage.TESTNET]: "0xf124f6eb30af9ce474d60827cd5df45c207f5fb5c1ea1c45f535c655ca0a776e",
|
|
10870
|
+
[lzDefinitions.Stage.SANDBOX]: "0x4bd71cbd70093f30fa367bcdd47b99d585d3e30165ded9b0def32348012fa2aa"
|
|
10126
10871
|
};
|
|
10127
10872
|
var OBJECT_DVN_FEE_LIB_ADDRESS = {
|
|
10128
10873
|
[lzDefinitions.Stage.MAINNET]: "0x5ff9119265b39b59260a7f1df2b7af5390f39fb33aeaf8b099e1ddc6673da1f0",
|
|
10129
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10130
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10874
|
+
[lzDefinitions.Stage.TESTNET]: "0xd433507170ea8cf08c5697128e80fca03f5c03c4a2f639bc632e6647baff63e1",
|
|
10875
|
+
[lzDefinitions.Stage.SANDBOX]: "0xeeb467d323bc8a8a3ef519318c1b34589245c9a232698e944dc540796c9ec119"
|
|
10131
10876
|
};
|
|
10132
10877
|
var OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
10133
10878
|
[lzDefinitions.Stage.MAINNET]: "",
|
|
@@ -10136,23 +10881,23 @@ var OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
|
10136
10881
|
};
|
|
10137
10882
|
var OBJECT_EXECUTOR_ADDRESS = {
|
|
10138
10883
|
[lzDefinitions.Stage.MAINNET]: "0xf5848ad4863f3594a96b4af26ab8d47414e5d17a9da76db1ab1489f1db3a75ae",
|
|
10139
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10140
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10884
|
+
[lzDefinitions.Stage.TESTNET]: "0x51816836a18df1cc8bbc0ae840e01da8fef15968ddbb390f4d6b9243b7911f23",
|
|
10885
|
+
[lzDefinitions.Stage.SANDBOX]: "0x679583dc666511caa0e066cca30c82843228a3bf707d2b1fd6c9b9fa6142da40"
|
|
10141
10886
|
};
|
|
10142
10887
|
var OBJECT_EXECUTOR_CAP_ADDRESS = {
|
|
10143
10888
|
[lzDefinitions.Stage.MAINNET]: "0x4f86b866513949acb7728b33dc9334c9b0439c5f368f527b99db3cbf69a0282f",
|
|
10144
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10145
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10889
|
+
[lzDefinitions.Stage.TESTNET]: "0x89a76121547d5a96482244015e908081d776bccbafc9e3f67bc079d560b3b185",
|
|
10890
|
+
[lzDefinitions.Stage.SANDBOX]: "0x0f5fa75c1a89241c6e690e581877f81ee5c904f82d4540dd6a3168c9a031ea0c"
|
|
10146
10891
|
};
|
|
10147
10892
|
var OBJECT_EXECUTOR_OWNER_CAP_ADDRESS = {
|
|
10148
10893
|
[lzDefinitions.Stage.MAINNET]: "0x26082897ee964836468287f28e091078257d4fa27a6b309321b3d171cef3850d",
|
|
10149
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10150
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10894
|
+
[lzDefinitions.Stage.TESTNET]: "0xf68d901d0426743e97c053f939f0e401e26e4c9bd2b1918227a942aa0acb4498",
|
|
10895
|
+
[lzDefinitions.Stage.SANDBOX]: "0xc46c173e64e13e51f9c2185501ab6718fda66f8c81fd0c19e399452fdebef3c9"
|
|
10151
10896
|
};
|
|
10152
10897
|
var OBJECT_EXECUTOR_FEE_LIB_ADDRESS = {
|
|
10153
10898
|
[lzDefinitions.Stage.MAINNET]: "0x1d505d1cfdd0ac8938826269b93c35cec0cd97ba783e073fa3b0206b35ca0378",
|
|
10154
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10155
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10899
|
+
[lzDefinitions.Stage.TESTNET]: "0x4e0c4cc4aa88b428005a8bb131014fdf9637a3ae042f192b9071119a64a32138",
|
|
10900
|
+
[lzDefinitions.Stage.SANDBOX]: "0x804969a1fd9b170183c1dfb9359e49b75fa5e1f57f6aa80f3894c4e0a7e75a8d"
|
|
10156
10901
|
};
|
|
10157
10902
|
var OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
10158
10903
|
[lzDefinitions.Stage.MAINNET]: "",
|
|
@@ -10161,18 +10906,23 @@ var OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
|
10161
10906
|
};
|
|
10162
10907
|
var OBJECT_PRICE_FEED_ADDRESS = {
|
|
10163
10908
|
[lzDefinitions.Stage.MAINNET]: "0x17a24b91f720a8f170386d920df3c605fe7a0b96e43424283b30b11ced0f0156",
|
|
10164
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10165
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10909
|
+
[lzDefinitions.Stage.TESTNET]: "0xc8ae95cdc862a032e4d35f5f4c5dd6d3d07bdde2c7f39460e78e1539cc07dc2d",
|
|
10910
|
+
[lzDefinitions.Stage.SANDBOX]: "0x5e01a76c3668a70bfa2a21f198c3169182f4e928372859cf8947fe0553f22809"
|
|
10166
10911
|
};
|
|
10167
10912
|
var OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS = {
|
|
10168
10913
|
[lzDefinitions.Stage.MAINNET]: "0x809d4b17a59a2b832b9222b09d4d6d805b6b2aaf340b6a52babea814ef5637a4",
|
|
10169
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10170
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10914
|
+
[lzDefinitions.Stage.TESTNET]: "0xe1b167fe636f405def446df32c7d1390b2e4341f7c2af71c6eb358d8fbe4e99b",
|
|
10915
|
+
[lzDefinitions.Stage.SANDBOX]: "0xc01dbfc85a3977dd4ba1a34a4b341a8aee3381736eea95cb0e8fe4f3cc64d4e1"
|
|
10171
10916
|
};
|
|
10172
10917
|
var OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS = {
|
|
10173
10918
|
[lzDefinitions.Stage.MAINNET]: "0x9d29be17482e050324db3a4b10755e4adc5a1aa062ed80528e0fbe94654055b5",
|
|
10174
|
-
[lzDefinitions.Stage.TESTNET]: "
|
|
10175
|
-
[lzDefinitions.Stage.SANDBOX]: "
|
|
10919
|
+
[lzDefinitions.Stage.TESTNET]: "0x68fd353ff6848cb7281ce3ccbddbd4d651319e6427d71d170b13031416c93c10",
|
|
10920
|
+
[lzDefinitions.Stage.SANDBOX]: "0x423781a278902e91d78eeefb2b3de8ee9182e852ebfee1bb8b9261ab0bb404f8"
|
|
10921
|
+
};
|
|
10922
|
+
var OBJECT_WORKER_REGISTRY_ADDRESS = {
|
|
10923
|
+
[lzDefinitions.Stage.MAINNET]: "",
|
|
10924
|
+
[lzDefinitions.Stage.TESTNET]: "0x81be6f7575e9f22da9f6e8fb919453feeeaef6d48c41cd67d3217c0f1ae44a24",
|
|
10925
|
+
[lzDefinitions.Stage.SANDBOX]: "0x9d15b04929515f64919fe25724c125363436778e6478987d54c181bb217bcd55"
|
|
10176
10926
|
};
|
|
10177
10927
|
|
|
10178
10928
|
// src/resource.ts
|
|
@@ -10202,7 +10952,9 @@ var PACKAGE_ADDRESS_MAP = {
|
|
|
10202
10952
|
treasury: PACKAGE_TREASURY_ADDRESS,
|
|
10203
10953
|
oapp: PACKAGE_OAPP_ADDRESS,
|
|
10204
10954
|
layerzeroViews: PACKAGE_LAYERZERO_VIEWS_ADDRESS,
|
|
10205
|
-
packageWhitelistValidator: PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS
|
|
10955
|
+
packageWhitelistValidator: PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS,
|
|
10956
|
+
workerRegistry: PACKAGE_WORKER_REGISTRY_ADDRESS,
|
|
10957
|
+
workerCommon: PACKAGE_WORKER_COMMON_ADDRESS
|
|
10206
10958
|
};
|
|
10207
10959
|
var OBJECT_ADDRESS_MAP = {
|
|
10208
10960
|
endpointV2: OBJECT_ENDPOINT_V2_ADDRESS,
|
|
@@ -10232,7 +10984,8 @@ var OBJECT_ADDRESS_MAP = {
|
|
|
10232
10984
|
executorFeeLib: OBJECT_EXECUTOR_FEE_LIB_ADDRESS,
|
|
10233
10985
|
priceFeed: OBJECT_PRICE_FEED_ADDRESS,
|
|
10234
10986
|
priceFeedOwnerCap: OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS,
|
|
10235
|
-
packageWhitelistValidator: OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS
|
|
10987
|
+
packageWhitelistValidator: OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS,
|
|
10988
|
+
workerRegistry: OBJECT_WORKER_REGISTRY_ADDRESS
|
|
10236
10989
|
};
|
|
10237
10990
|
var ResourceManager = class {
|
|
10238
10991
|
/**
|
|
@@ -10304,8 +11057,8 @@ var SDK = class {
|
|
|
10304
11057
|
getLayerZeroViews() {
|
|
10305
11058
|
return this.moduleManager.getLayerZeroViews();
|
|
10306
11059
|
}
|
|
10307
|
-
getOApp() {
|
|
10308
|
-
return this.moduleManager.getOApp();
|
|
11060
|
+
getOApp(callCapId, options) {
|
|
11061
|
+
return this.moduleManager.getOApp(this.client, callCapId, options);
|
|
10309
11062
|
}
|
|
10310
11063
|
// === Non-Core Module Getters (created on-demand with caching) ===
|
|
10311
11064
|
getCounter(options) {
|
|
@@ -10353,6 +11106,9 @@ var SDK = class {
|
|
|
10353
11106
|
getBlockedMessageLibPtbBuilder(options) {
|
|
10354
11107
|
return this.moduleManager.getBlockedMessageLibPtbBuilder(this.client, options);
|
|
10355
11108
|
}
|
|
11109
|
+
getWorkerRegistry(options) {
|
|
11110
|
+
return this.moduleManager.getWorkerRegistry(this.client, options);
|
|
11111
|
+
}
|
|
10356
11112
|
getOrCreateModule(moduleName, options, factory) {
|
|
10357
11113
|
return this.moduleManager.getOrCreateModule(moduleName, options, factory);
|
|
10358
11114
|
}
|
|
@@ -10376,6 +11132,7 @@ exports.DVN = DVN;
|
|
|
10376
11132
|
exports.DVNErrorCode = DVNErrorCode;
|
|
10377
11133
|
exports.DVNFeeLib = DVNFeeLib;
|
|
10378
11134
|
exports.DVNFeeLibErrorCode = DVNFeeLibErrorCode;
|
|
11135
|
+
exports.DVNLayerzeroErrorCode = DVNLayerzeroErrorCode;
|
|
10379
11136
|
exports.DstConfigBcs = DstConfigBcs;
|
|
10380
11137
|
exports.DvnDstConfigBcs = DvnDstConfigBcs;
|
|
10381
11138
|
exports.DvnLayerZero = DvnLayerZero;
|
|
@@ -10384,17 +11141,18 @@ exports.Endpoint = Endpoint;
|
|
|
10384
11141
|
exports.EndpointErrorCode = EndpointErrorCode;
|
|
10385
11142
|
exports.EndpointExecutionState = EndpointExecutionState;
|
|
10386
11143
|
exports.EndpointPtbBuilder = EndpointPtbBuilder;
|
|
11144
|
+
exports.EndpointPtbBuilderErrorCode = EndpointPtbBuilderErrorCode;
|
|
10387
11145
|
exports.Executor = Executor;
|
|
10388
11146
|
exports.ExecutorConfigBcs = ExecutorConfigBcs;
|
|
10389
11147
|
exports.ExecutorErrorCode = ExecutorErrorCode;
|
|
10390
11148
|
exports.ExecutorFeeLib = ExecutorFeeLib;
|
|
10391
11149
|
exports.ExecutorFeeLibErrorCode = ExecutorFeeLibErrorCode;
|
|
10392
11150
|
exports.ExecutorLayerZero = ExecutorLayerZero;
|
|
11151
|
+
exports.ExecutorLayerzeroErrorCode = ExecutorLayerzeroErrorCode;
|
|
10393
11152
|
exports.ExecutorOptionType = ExecutorOptionType;
|
|
10394
11153
|
exports.ExecutorPtbBuilder = ExecutorPtbBuilder;
|
|
10395
11154
|
exports.FunctionBCS = FunctionBCS;
|
|
10396
11155
|
exports.LayerZeroViews = LayerZeroViews;
|
|
10397
|
-
exports.LibBuilderManagerErrorCode = LibBuilderManagerErrorCode;
|
|
10398
11156
|
exports.LzComposeVersion = LzComposeVersion;
|
|
10399
11157
|
exports.LzReceiveVersion = LzReceiveVersion;
|
|
10400
11158
|
exports.LzTypeName = LzTypeName;
|
|
@@ -10410,6 +11168,8 @@ exports.NativeDropParamsBcs = NativeDropParamsBcs;
|
|
|
10410
11168
|
exports.NonSenderObjectValidator = NonSenderObjectValidator;
|
|
10411
11169
|
exports.OApp = OApp;
|
|
10412
11170
|
exports.OAppErrorCode = OAppErrorCode;
|
|
11171
|
+
exports.OAppInfoV1Bcs = OAppInfoV1Bcs;
|
|
11172
|
+
exports.OAppInfoVersion = OAppInfoVersion;
|
|
10413
11173
|
exports.OAppUlnConfigBcs = OAppUlnConfigBcs;
|
|
10414
11174
|
exports.OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS = OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS;
|
|
10415
11175
|
exports.OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS = OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS;
|
|
@@ -10442,6 +11202,7 @@ exports.OBJECT_ULN_302_ADDRESS = OBJECT_ULN_302_ADDRESS;
|
|
|
10442
11202
|
exports.OBJECT_ULN_302_ADMIN_CAP_ADDRESS = OBJECT_ULN_302_ADMIN_CAP_ADDRESS;
|
|
10443
11203
|
exports.OBJECT_ULN_302_PTB_BUILDER_ADDRESS = OBJECT_ULN_302_PTB_BUILDER_ADDRESS;
|
|
10444
11204
|
exports.OBJECT_ULN_302_VERIFICATION_ADDRESS = OBJECT_ULN_302_VERIFICATION_ADDRESS;
|
|
11205
|
+
exports.OBJECT_WORKER_REGISTRY_ADDRESS = OBJECT_WORKER_REGISTRY_ADDRESS;
|
|
10445
11206
|
exports.PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS = PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS;
|
|
10446
11207
|
exports.PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS = PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS;
|
|
10447
11208
|
exports.PACKAGE_CALL_ADDRESS = PACKAGE_CALL_ADDRESS;
|
|
@@ -10467,6 +11228,8 @@ exports.PACKAGE_TREASURY_ADDRESS = PACKAGE_TREASURY_ADDRESS;
|
|
|
10467
11228
|
exports.PACKAGE_ULN_302_ADDRESS = PACKAGE_ULN_302_ADDRESS;
|
|
10468
11229
|
exports.PACKAGE_ULN_302_PTB_BUILDER_ADDRESS = PACKAGE_ULN_302_PTB_BUILDER_ADDRESS;
|
|
10469
11230
|
exports.PACKAGE_UTILS_ADDRESS = PACKAGE_UTILS_ADDRESS;
|
|
11231
|
+
exports.PACKAGE_WORKER_COMMON_ADDRESS = PACKAGE_WORKER_COMMON_ADDRESS;
|
|
11232
|
+
exports.PACKAGE_WORKER_REGISTRY_ADDRESS = PACKAGE_WORKER_REGISTRY_ADDRESS;
|
|
10470
11233
|
exports.PACKAGE_ZRO_ADDRESS = PACKAGE_ZRO_ADDRESS;
|
|
10471
11234
|
exports.PackageAllowlistValidator = PackageAllowlistValidator;
|
|
10472
11235
|
exports.PackageWhitelistValidator = PackageWhitelistValidator;
|
|
@@ -10474,6 +11237,7 @@ exports.PriceBcs = PriceBcs;
|
|
|
10474
11237
|
exports.PriceFeed = PriceFeed;
|
|
10475
11238
|
exports.PriceFeedErrorCode = PriceFeedErrorCode;
|
|
10476
11239
|
exports.PtbBuilder = PtbBuilder;
|
|
11240
|
+
exports.PtbBuilderErrorCode = PtbBuilderErrorCode;
|
|
10477
11241
|
exports.SDK = SDK;
|
|
10478
11242
|
exports.ShareObjectValidator = ShareObjectValidator;
|
|
10479
11243
|
exports.SimpleMessageLib = SimpleMessageLib;
|
|
@@ -10485,6 +11249,7 @@ exports.TreasuryErrorCode = TreasuryErrorCode;
|
|
|
10485
11249
|
exports.Uln302 = Uln302;
|
|
10486
11250
|
exports.Uln302ErrorCode = Uln302ErrorCode;
|
|
10487
11251
|
exports.Uln302PtbBuilder = Uln302PtbBuilder;
|
|
11252
|
+
exports.Uln302PtbBuilderErrorCode = Uln302PtbBuilderErrorCode;
|
|
10488
11253
|
exports.UlnConfigBcs = UlnConfigBcs;
|
|
10489
11254
|
exports.UlnVerificationState = UlnVerificationState;
|
|
10490
11255
|
exports.UnclassifiedError = UnclassifiedError;
|
|
@@ -10492,6 +11257,8 @@ exports.Utils = Utils;
|
|
|
10492
11257
|
exports.UtilsErrorCode = UtilsErrorCode;
|
|
10493
11258
|
exports.ValidatorErrorCode = ValidatorErrorCode;
|
|
10494
11259
|
exports.VectorMoveCallBCS = VectorMoveCallBCS;
|
|
11260
|
+
exports.WorkerRegistry = WorkerRegistry;
|
|
11261
|
+
exports.WorkerRegistryErrorCode = WorkerRegistryErrorCode;
|
|
10495
11262
|
exports.Zro = Zro;
|
|
10496
11263
|
exports.asAddress = asAddress;
|
|
10497
11264
|
exports.asAddressVector = asAddressVector;
|