@layerzerolabs/lz-sui-sdk-v2 3.0.134-sui.2 → 3.0.134
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/deployments/sui-sandbox-local/blocked_message_lib.json +25 -25
- package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +22 -22
- package/deployments/sui-sandbox-local/counter.json +44 -79
- package/deployments/sui-sandbox-local/dvn.json +19 -20
- package/deployments/sui-sandbox-local/dvn_fee_lib.json +26 -26
- package/deployments/sui-sandbox-local/dvn_layerzero.json +21 -21
- package/deployments/sui-sandbox-local/dvn_ptb_builder.json +13 -13
- package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +29 -29
- package/deployments/sui-sandbox-local/endpoint_v2.json +25 -25
- package/deployments/sui-sandbox-local/executor.json +22 -23
- package/deployments/sui-sandbox-local/executor_call_type.json +28 -28
- package/deployments/sui-sandbox-local/executor_fee_lib.json +27 -27
- 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 +13 -13
- 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/oapp.json +13 -15
- 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 +3 -3
- 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 +4 -4
- 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/package_whitelist_validator.json +51 -51
- package/deployments/sui-sandbox-local/price_feed.json +43 -43
- package/deployments/sui-sandbox-local/price_feed_call_types.json +19 -19
- package/deployments/sui-sandbox-local/ptb_move_call.json +12 -12
- package/deployments/sui-sandbox-local/simple_message_lib.json +31 -31
- package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +26 -26
- package/deployments/sui-sandbox-local/treasury.json +41 -41
- package/deployments/sui-sandbox-local/uln_302.json +34 -30
- package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +22 -22
- package/deployments/sui-sandbox-local/worker_common.json +14 -15
- package/dist/index.cjs +364 -1139
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +343 -693
- package/dist/index.d.ts +343 -693
- package/dist/index.mjs +364 -1128
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/bcs/index.ts +1 -2
- package/src/generated/addresses.ts +51 -69
- package/src/module-manager.ts +3 -15
- package/src/modules/call.ts +6 -16
- package/src/modules/endpoint.ts +4 -12
- package/src/modules/message-libs/simple-message-lib.ts +2 -3
- package/src/modules/message-libs/uln302.ts +26 -28
- package/src/modules/oapps/counter.ts +50 -34
- package/src/modules/oapps/oapp.ts +74 -489
- package/src/modules/ptb-builders/endpoint-ptb-builder.ts +3 -9
- package/src/modules/ptb-builders/ptb-builder.ts +4 -19
- package/src/modules/ptb-builders/uln302-ptb-builder.ts +0 -5
- package/src/modules/workers/dvn-layerzero.ts +0 -9
- package/src/modules/workers/dvn.ts +6 -214
- package/src/modules/workers/executor-fee-lib.ts +3 -11
- package/src/modules/workers/executor-layerzero.ts +0 -9
- package/src/modules/workers/executor.ts +0 -115
- package/src/modules/workers/index.ts +0 -1
- package/src/modules/workers/treasury.ts +4 -4
- package/src/resource.ts +0 -3
- package/src/sdk.ts +2 -7
- package/src/types/endpoint.ts +1 -2
- package/src/types/modules.ts +0 -1
- package/src/types/options.ts +0 -15
- package/src/utils/transaction.ts +3 -3
- package/deployments/sui-sandbox-local/object-WorkerRegistry.json +0 -9
- package/deployments/sui-sandbox-local/sequential_multi_call.json +0 -45
- package/deployments/sui-sandbox-local/uln_common.json +0 -49
- package/deployments/sui-sandbox-local/worker_registry.json +0 -58
- package/src/bcs/oapp.ts +0 -14
- package/src/modules/workers/worker-registry.ts +0 -110
- package/src/types/oapp.ts +0 -6
package/dist/index.mjs
CHANGED
|
@@ -17,10 +17,6 @@ var DvnDstConfigBcs = bcs.struct("DstConfig", {
|
|
|
17
17
|
multiplier_bps: bcs.U16,
|
|
18
18
|
floor_margin_usd: bcs.U128
|
|
19
19
|
});
|
|
20
|
-
var TimeoutBcs = bcs.struct("Timeout", {
|
|
21
|
-
expiry: bcs.U64,
|
|
22
|
-
fallback_lib: bcs.Address
|
|
23
|
-
});
|
|
24
20
|
var Bytes32Bcs = bcs.struct("Bytes32", {
|
|
25
21
|
bytes: bcs.vector(bcs.u8())
|
|
26
22
|
});
|
|
@@ -66,16 +62,6 @@ var MoveCallBCS = bcs.struct("MoveCall", {
|
|
|
66
62
|
result_ids: bcs.vector(bcs.vector(bcs.u8()))
|
|
67
63
|
});
|
|
68
64
|
var VectorMoveCallBCS = bcs.vector(MoveCallBCS);
|
|
69
|
-
var OAppInfoV1Bcs = bcs.struct("OAppInfoV1", {
|
|
70
|
-
// Object ID address of the OApp instance
|
|
71
|
-
oapp_object: bcs.Address,
|
|
72
|
-
// Used to populate the MoveCalls to fetch the next nonce that can be executed by an executor
|
|
73
|
-
next_nonce_info: bcs.vector(bcs.u8()),
|
|
74
|
-
// Used to populate the MoveCalls to execute lz_receive by executor
|
|
75
|
-
lz_receive_info: bcs.vector(bcs.u8()),
|
|
76
|
-
// Additional configuration data for custom OApp functionality
|
|
77
|
-
extra_info: bcs.vector(bcs.u8())
|
|
78
|
-
});
|
|
79
65
|
var PriceBcs = bcs.struct("Price", {
|
|
80
66
|
price_ratio: bcs.U128,
|
|
81
67
|
gas_price_in_unit: bcs.U64,
|
|
@@ -102,6 +88,10 @@ var OAppUlnConfigBcs = bcs.struct("OAppUlnConfig", {
|
|
|
102
88
|
use_default_optional_dvns: bcs.Bool,
|
|
103
89
|
uln_config: UlnConfigBcs
|
|
104
90
|
});
|
|
91
|
+
var TimeoutBcs = bcs.struct("Timeout", {
|
|
92
|
+
expiry: bcs.U64,
|
|
93
|
+
fallback_lib: bcs.Address
|
|
94
|
+
});
|
|
105
95
|
|
|
106
96
|
// src/types/modules.ts
|
|
107
97
|
var Modules = /* @__PURE__ */ ((Modules2) => {
|
|
@@ -131,7 +121,6 @@ var Modules = /* @__PURE__ */ ((Modules2) => {
|
|
|
131
121
|
Modules2["Counter"] = "counter";
|
|
132
122
|
Modules2["DvnPtbBuilder"] = "dvnPtbBuilder";
|
|
133
123
|
Modules2["ExecutorPtbBuilder"] = "executorPtbBuilder";
|
|
134
|
-
Modules2["WorkerRegistry"] = "workerRegistry";
|
|
135
124
|
return Modules2;
|
|
136
125
|
})(Modules || {});
|
|
137
126
|
|
|
@@ -221,7 +210,6 @@ var UlnVerificationState = {
|
|
|
221
210
|
};
|
|
222
211
|
|
|
223
212
|
// src/types/endpoint.ts
|
|
224
|
-
var OAppInfoVersion = { VERSION_1: 1, VERSION_2: 2 };
|
|
225
213
|
var LzReceiveVersion = { VERSION_1: 1 };
|
|
226
214
|
var LzComposeVersion = { VERSION_1: 1 };
|
|
227
215
|
function isTransactionArgument(value) {
|
|
@@ -363,7 +351,7 @@ async function validateTransaction(client, signer, tx) {
|
|
|
363
351
|
}
|
|
364
352
|
async function executeSimulate(client, moveCallFn, parser) {
|
|
365
353
|
const tx = new Transaction();
|
|
366
|
-
|
|
354
|
+
moveCallFn(tx);
|
|
367
355
|
const result = await simulateTransaction(client, tx);
|
|
368
356
|
return parser(result);
|
|
369
357
|
}
|
|
@@ -761,24 +749,17 @@ var EndpointErrorCode = {
|
|
|
761
749
|
MessagingChannel_EPayloadHashNotFound: 9,
|
|
762
750
|
MessagingChannel_ESendReentrancy: 10,
|
|
763
751
|
MessagingChannel_EUninitializedChannel: 11,
|
|
764
|
-
// MessagingComposer related errors (with MessagingComposer_ prefix)
|
|
765
|
-
MessagingComposer_EComposeExists: 1,
|
|
766
|
-
MessagingComposer_EComposeMessageMismatch: 2,
|
|
767
|
-
MessagingComposer_EComposeNotFound: 3,
|
|
768
|
-
MessagingComposer_EComposerNotRegistered: 4,
|
|
769
|
-
MessagingComposer_EComposerRegistered: 5,
|
|
770
|
-
MessagingComposer_EInvalidLZComposeInfo: 6,
|
|
771
752
|
// OAppRegistry related errors (with OAppRegistry_ prefix)
|
|
772
753
|
OAppRegistry_EInvalidLZReceiveInfo: 1,
|
|
773
|
-
|
|
774
|
-
|
|
754
|
+
OAppRegistry_EInvalidOriginalPackage: 2,
|
|
755
|
+
OAppRegistry_EOAppNotRegistered: 3,
|
|
756
|
+
OAppRegistry_EOAppRegistered: 4,
|
|
775
757
|
// Endpoint related errors (with Endpoint_ prefix)
|
|
776
758
|
Endpoint_EAlreadyInitialized: 1,
|
|
777
759
|
Endpoint_EInvalidEid: 2,
|
|
778
760
|
Endpoint_ENotInitialized: 3,
|
|
779
761
|
Endpoint_ERefundAddressNotFound: 4,
|
|
780
|
-
|
|
781
|
-
Endpoint_EUnauthorizedSendLibrary: 6
|
|
762
|
+
Endpoint_EUnauthorizedSendLibrary: 5
|
|
782
763
|
};
|
|
783
764
|
var _Endpoint_instances, addRequiredValidators_fn, target_fn;
|
|
784
765
|
var Endpoint = class {
|
|
@@ -2735,10 +2716,9 @@ target_fn2 = function(name, module_name = MODULE_NAME2) {
|
|
|
2735
2716
|
};
|
|
2736
2717
|
var MODULE_NAME3 = "simple_message_lib";
|
|
2737
2718
|
var SimpleMessageLibErrorCode = {
|
|
2738
|
-
// SimpleMessageLib related errors (
|
|
2739
|
-
|
|
2740
|
-
SimpleMessageLib_EZROFeeNotEnabled: 2
|
|
2741
|
-
SimpleMessageLib_EInvalidEid: 3
|
|
2719
|
+
// SimpleMessageLib related errors (with SimpleMessageLib_ prefix)
|
|
2720
|
+
SimpleMessageLib_EConfigNotFound: 1,
|
|
2721
|
+
SimpleMessageLib_EZROFeeNotEnabled: 2
|
|
2742
2722
|
};
|
|
2743
2723
|
var _SimpleMessageLib_instances, target_fn3;
|
|
2744
2724
|
var SimpleMessageLib = class {
|
|
@@ -2969,25 +2949,10 @@ var Uln302ErrorCode = {
|
|
|
2969
2949
|
ReceiveUln302_EInvalidEid: 3,
|
|
2970
2950
|
ReceiveUln302_EOAppUlnConfigNotFound: 4,
|
|
2971
2951
|
ReceiveUln302_EVerifying: 5,
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
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
|
|
2952
|
+
Uln302_EEndpointInitialized: 1,
|
|
2953
|
+
Uln302_EInvalidConfigType: 2,
|
|
2954
|
+
Uln302_EInvalidMessagingChannel: 3,
|
|
2955
|
+
Uln302_EUnsupportedEid: 4
|
|
2991
2956
|
};
|
|
2992
2957
|
var _Uln302_instances, target_fn4;
|
|
2993
2958
|
var Uln302 = class {
|
|
@@ -3085,16 +3050,25 @@ var Uln302 = class {
|
|
|
3085
3050
|
});
|
|
3086
3051
|
}
|
|
3087
3052
|
/**
|
|
3088
|
-
* Verify packet move call with DVN
|
|
3089
|
-
* Note: This is typically called by DVNs
|
|
3053
|
+
* Verify packet move call with DVN signatures
|
|
3054
|
+
* Note: This is typically called by DVNs, not directly by users
|
|
3090
3055
|
* @param tx - The transaction to add the move call to
|
|
3091
3056
|
* @param verification - The verification object address or transaction argument
|
|
3092
|
-
* @param
|
|
3057
|
+
* @param dvn - The DVN address performing verification or transaction argument
|
|
3058
|
+
* @param packetHeader - The packet header as bytes or transaction argument
|
|
3059
|
+
* @param payloadHash - The payload hash as bytes or transaction argument
|
|
3060
|
+
* @param confirmations - Required confirmations count or transaction argument
|
|
3093
3061
|
*/
|
|
3094
|
-
verifyMoveCall(tx, verification,
|
|
3062
|
+
verifyMoveCall(tx, verification, dvn, packetHeader, payloadHash, confirmations) {
|
|
3095
3063
|
tx.moveCall({
|
|
3096
3064
|
target: __privateMethod(this, _Uln302_instances, target_fn4).call(this, "verify"),
|
|
3097
|
-
arguments: [
|
|
3065
|
+
arguments: [
|
|
3066
|
+
asObject(tx, verification),
|
|
3067
|
+
asObject(tx, dvn),
|
|
3068
|
+
asBytes(tx, packetHeader),
|
|
3069
|
+
asBytes32(tx, payloadHash, this.moduleManager.getUtils()),
|
|
3070
|
+
asU64(tx, confirmations)
|
|
3071
|
+
]
|
|
3098
3072
|
});
|
|
3099
3073
|
}
|
|
3100
3074
|
/**
|
|
@@ -3647,22 +3621,9 @@ var DVNErrorCode = {
|
|
|
3647
3621
|
DVN_EExpiredSignature: 1,
|
|
3648
3622
|
DVN_EEidNotSupported: 2,
|
|
3649
3623
|
DVN_EHashAlreadyUsed: 3,
|
|
3650
|
-
DVN_EPtbBuilderAlreadyInitialized: 4
|
|
3651
|
-
|
|
3652
|
-
|
|
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;
|
|
3624
|
+
DVN_EPtbBuilderAlreadyInitialized: 4
|
|
3625
|
+
};
|
|
3626
|
+
var _DVN_instances, target_fn5;
|
|
3666
3627
|
var DVN = class {
|
|
3667
3628
|
constructor(packageId, client, objects, moduleManager) {
|
|
3668
3629
|
this.moduleManager = moduleManager;
|
|
@@ -3825,29 +3786,6 @@ var DVN = class {
|
|
|
3825
3786
|
});
|
|
3826
3787
|
}
|
|
3827
3788
|
// === 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
|
-
}
|
|
3851
3789
|
/**
|
|
3852
3790
|
* Set allowlist status for an OApp sender (admin with signatures)
|
|
3853
3791
|
* @param tx - The transaction to add the move call to
|
|
@@ -3982,24 +3920,23 @@ var DVN = class {
|
|
|
3982
3920
|
}
|
|
3983
3921
|
// Verification Functions
|
|
3984
3922
|
/**
|
|
3985
|
-
* Verify a packet with DVN signatures (admin with signatures)
|
|
3923
|
+
* Verify a packet with DVN signatures (admin with signatures)
|
|
3986
3924
|
* @param tx - The transaction to add the move call to
|
|
3987
3925
|
* @param adminCap - The admin capability object ID
|
|
3988
|
-
* @param
|
|
3926
|
+
* @param verification - The verification object address
|
|
3989
3927
|
* @param packetHeader - The packet header as bytes
|
|
3990
3928
|
* @param payloadHash - The payload hash as bytes
|
|
3991
3929
|
* @param confirmations - Required confirmations count
|
|
3992
3930
|
* @param expiration - Signature expiration timestamp
|
|
3993
3931
|
* @param signatures - DVN multisig signatures
|
|
3994
|
-
* @returns Transaction result containing the verification Call object
|
|
3995
3932
|
*/
|
|
3996
|
-
verifyMoveCall(tx, adminCap,
|
|
3997
|
-
|
|
3933
|
+
verifyMoveCall(tx, adminCap, verification, packetHeader, payloadHash, confirmations, expiration, signatures) {
|
|
3934
|
+
tx.moveCall({
|
|
3998
3935
|
target: __privateMethod(this, _DVN_instances, target_fn5).call(this, "verify"),
|
|
3999
3936
|
arguments: [
|
|
4000
3937
|
tx.object(this.objects.dvn),
|
|
4001
3938
|
asObject(tx, adminCap),
|
|
4002
|
-
|
|
3939
|
+
asObject(tx, verification),
|
|
4003
3940
|
asBytes(tx, packetHeader),
|
|
4004
3941
|
asBytes32(tx, payloadHash, this.moduleManager.getUtils()),
|
|
4005
3942
|
asU64(tx, confirmations),
|
|
@@ -4269,32 +4206,6 @@ var DVN = class {
|
|
|
4269
4206
|
(result) => bcs.Bool.parse(result[0].value)
|
|
4270
4207
|
);
|
|
4271
4208
|
}
|
|
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.Bool.parse(result[0].value)
|
|
4296
|
-
);
|
|
4297
|
-
}
|
|
4298
4209
|
/**
|
|
4299
4210
|
* Check if an address is allowlisted
|
|
4300
4211
|
* @param tx - The transaction to add the move call to
|
|
@@ -4647,49 +4558,6 @@ var DVN = class {
|
|
|
4647
4558
|
(result) => bcs.Bool.parse(result[0].value)
|
|
4648
4559
|
);
|
|
4649
4560
|
}
|
|
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.Address.parse(result[0].value);
|
|
4690
|
-
}
|
|
4691
|
-
);
|
|
4692
|
-
}
|
|
4693
4561
|
// === Witness Functions ===
|
|
4694
4562
|
/**
|
|
4695
4563
|
* Create a LayerZero witness for DVN package whitelist registration
|
|
@@ -4977,63 +4845,8 @@ var DVN = class {
|
|
|
4977
4845
|
]
|
|
4978
4846
|
});
|
|
4979
4847
|
}
|
|
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
|
-
}
|
|
5009
4848
|
};
|
|
5010
4849
|
_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
|
-
};
|
|
5037
4850
|
/**
|
|
5038
4851
|
* Generate the full target path for move calls
|
|
5039
4852
|
* @param name - The function name to call
|
|
@@ -5118,10 +4931,6 @@ target_fn6 = function(name, module_name = MODULE_NAME6) {
|
|
|
5118
4931
|
|
|
5119
4932
|
// src/modules/workers/dvn-layerzero.ts
|
|
5120
4933
|
var MODULE_NAME7 = "dvn_layerzero";
|
|
5121
|
-
var DVNLayerzeroErrorCode = {
|
|
5122
|
-
// DVNLayerzero related errors (matching dvn_layerzero.move)
|
|
5123
|
-
DVNLayerzero_EWorkerCapNotFromPackage: 1
|
|
5124
|
-
};
|
|
5125
4934
|
var _DvnLayerZero_instances, target_fn7;
|
|
5126
4935
|
var DvnLayerZero = class {
|
|
5127
4936
|
constructor(packageId, client, moduleManager) {
|
|
@@ -5138,7 +4947,6 @@ var DvnLayerZero = class {
|
|
|
5138
4947
|
* @param workerCap - Worker capability object ID or transaction argument
|
|
5139
4948
|
* @param vid - Verifier ID for the DVN or transaction argument
|
|
5140
4949
|
* @param depositAddress - Address for fee deposits or transaction argument
|
|
5141
|
-
* @param supportedMessageLibs - Array of supported message library addresses or transaction argument
|
|
5142
4950
|
* @param priceFeed - Price feed object address or transaction argument
|
|
5143
4951
|
* @param workerFeeLib - Worker fee library address or transaction argument
|
|
5144
4952
|
* @param defaultMultiplierBps - Default multiplier in basis points or transaction argument
|
|
@@ -5146,21 +4954,19 @@ var DvnLayerZero = class {
|
|
|
5146
4954
|
* @param signers - Array of signer public keys as bytes or transaction argument
|
|
5147
4955
|
* @param quorum - Required signature threshold or transaction argument
|
|
5148
4956
|
*/
|
|
5149
|
-
initDvnMoveCall(tx, workerCap, vid, depositAddress,
|
|
4957
|
+
initDvnMoveCall(tx, workerCap, vid, depositAddress, priceFeed, workerFeeLib, defaultMultiplierBps, admins, signers, quorum) {
|
|
5150
4958
|
tx.moveCall({
|
|
5151
4959
|
target: __privateMethod(this, _DvnLayerZero_instances, target_fn7).call(this, "init_dvn"),
|
|
5152
4960
|
arguments: [
|
|
5153
4961
|
asObject(tx, workerCap),
|
|
5154
4962
|
asU32(tx, vid),
|
|
5155
4963
|
asAddress(tx, depositAddress),
|
|
5156
|
-
asAddressVector(tx, supportedMessageLibs),
|
|
5157
4964
|
asAddress(tx, priceFeed),
|
|
5158
4965
|
asAddress(tx, workerFeeLib),
|
|
5159
4966
|
asU16(tx, defaultMultiplierBps),
|
|
5160
4967
|
asAddressVector(tx, admins),
|
|
5161
4968
|
asBytesVector(tx, signers),
|
|
5162
|
-
asU64(tx, quorum)
|
|
5163
|
-
tx.object(this.moduleManager.objects.workerRegistry)
|
|
4969
|
+
asU64(tx, quorum)
|
|
5164
4970
|
]
|
|
5165
4971
|
});
|
|
5166
4972
|
}
|
|
@@ -5180,10 +4986,7 @@ var MODULE_NAME8 = "executor_worker";
|
|
|
5180
4986
|
var ExecutorErrorCode = {
|
|
5181
4987
|
// Executor related errors (with Executor_ prefix)
|
|
5182
4988
|
Executor_EEidNotSupported: 1,
|
|
5183
|
-
Executor_EInvalidNativeDropAmount: 2
|
|
5184
|
-
// ExecutorInfoV1 related errors (matching executor_info_v1.move)
|
|
5185
|
-
ExecutorInfoV1_EInvalidData: 1,
|
|
5186
|
-
ExecutorInfoV1_EInvalidVersion: 2
|
|
4989
|
+
Executor_EInvalidNativeDropAmount: 2
|
|
5187
4990
|
};
|
|
5188
4991
|
var _Executor_instances, target_fn8;
|
|
5189
4992
|
var Executor = class {
|
|
@@ -5555,24 +5358,6 @@ var Executor = class {
|
|
|
5555
5358
|
]
|
|
5556
5359
|
});
|
|
5557
5360
|
}
|
|
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
|
-
}
|
|
5576
5361
|
/**
|
|
5577
5362
|
* Set allowlist status for an OApp sender (owner only)
|
|
5578
5363
|
* @param tx - The transaction to add the move call to
|
|
@@ -5825,32 +5610,6 @@ var Executor = class {
|
|
|
5825
5610
|
(result) => bcs.Bool.parse(result[0].value)
|
|
5826
5611
|
);
|
|
5827
5612
|
}
|
|
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.Bool.parse(result[0].value)
|
|
5852
|
-
);
|
|
5853
|
-
}
|
|
5854
5613
|
/**
|
|
5855
5614
|
* Check if an address is allowlisted
|
|
5856
5615
|
* @param tx - The transaction to add the move call to
|
|
@@ -6054,49 +5813,6 @@ var Executor = class {
|
|
|
6054
5813
|
(result) => bcs.Address.parse(result[0].value)
|
|
6055
5814
|
);
|
|
6056
5815
|
}
|
|
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.Address.parse(result[0].value);
|
|
6097
|
-
}
|
|
6098
|
-
);
|
|
6099
|
-
}
|
|
6100
5816
|
// === Private Helper Functions ===
|
|
6101
5817
|
parseDstConfig(data) {
|
|
6102
5818
|
const config = DstConfigBcs.parse(data);
|
|
@@ -6124,17 +5840,10 @@ target_fn8 = function(name, module_name = MODULE_NAME8) {
|
|
|
6124
5840
|
// src/modules/workers/executor-fee-lib.ts
|
|
6125
5841
|
var MODULE_NAME9 = "executor_fee_lib";
|
|
6126
5842
|
var ExecutorFeeLibErrorCode = {
|
|
6127
|
-
// Executor Fee Lib related errors (
|
|
5843
|
+
// Executor Fee Lib related errors (with ExecutorFeeLib_ prefix)
|
|
6128
5844
|
ExecutorFeeLib_EEidNotSupported: 1,
|
|
6129
|
-
|
|
6130
|
-
|
|
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
|
|
5845
|
+
ExecutorFeeLib_EInvalidExecutor: 2,
|
|
5846
|
+
ExecutorFeeLib_EExecutorAlreadySet: 3
|
|
6138
5847
|
};
|
|
6139
5848
|
var _ExecutorFeeLib_instances, target_fn9;
|
|
6140
5849
|
var ExecutorFeeLib = class {
|
|
@@ -6199,10 +5908,6 @@ target_fn9 = function(name, module_name = MODULE_NAME9) {
|
|
|
6199
5908
|
|
|
6200
5909
|
// src/modules/workers/executor-layerzero.ts
|
|
6201
5910
|
var MODULE_NAME10 = "executor_layerzero";
|
|
6202
|
-
var ExecutorLayerzeroErrorCode = {
|
|
6203
|
-
// ExecutorLayerzero related errors (matching executor_layerzero.move)
|
|
6204
|
-
ExecutorLayerzero_EWorkerCapNotFromPackage: 1
|
|
6205
|
-
};
|
|
6206
5911
|
var _ExecutorLayerZero_instances, target_fn10;
|
|
6207
5912
|
var ExecutorLayerZero = class {
|
|
6208
5913
|
constructor(packageId, client, moduleManager) {
|
|
@@ -6218,26 +5923,23 @@ var ExecutorLayerZero = class {
|
|
|
6218
5923
|
* @param tx - The transaction to add the move call to
|
|
6219
5924
|
* @param workerCap - Worker capability object ID or transaction argument
|
|
6220
5925
|
* @param depositAddress - Address for fee deposits or transaction argument
|
|
6221
|
-
* @param supportedMessageLibs - Array of supported message library addresses or transaction argument
|
|
6222
5926
|
* @param priceFeed - Price feed object address or transaction argument
|
|
6223
5927
|
* @param workerFeeLib - Worker fee library address or transaction argument
|
|
6224
5928
|
* @param defaultMultiplierBps - Default multiplier in basis points or transaction argument
|
|
6225
5929
|
* @param owner - Owner address for the executor or transaction argument
|
|
6226
5930
|
* @param admins - Array of admin addresses or transaction argument
|
|
6227
5931
|
*/
|
|
6228
|
-
initExecutorMoveCall(tx, workerCap, depositAddress,
|
|
5932
|
+
initExecutorMoveCall(tx, workerCap, depositAddress, priceFeed, workerFeeLib, defaultMultiplierBps, owner, admins) {
|
|
6229
5933
|
tx.moveCall({
|
|
6230
5934
|
target: __privateMethod(this, _ExecutorLayerZero_instances, target_fn10).call(this, "init_executor"),
|
|
6231
5935
|
arguments: [
|
|
6232
5936
|
asObject(tx, workerCap),
|
|
6233
5937
|
asAddress(tx, depositAddress),
|
|
6234
|
-
asAddressVector(tx, supportedMessageLibs),
|
|
6235
5938
|
asAddress(tx, priceFeed),
|
|
6236
5939
|
asAddress(tx, workerFeeLib),
|
|
6237
5940
|
asU16(tx, defaultMultiplierBps),
|
|
6238
5941
|
asAddress(tx, owner),
|
|
6239
|
-
asAddressVector(tx, admins)
|
|
6240
|
-
tx.object(this.moduleManager.objects.workerRegistry)
|
|
5942
|
+
asAddressVector(tx, admins)
|
|
6241
5943
|
]
|
|
6242
5944
|
});
|
|
6243
5945
|
}
|
|
@@ -6734,10 +6436,10 @@ target_fn11 = function(name, module_name = MODULE_NAME11) {
|
|
|
6734
6436
|
};
|
|
6735
6437
|
var MODULE_NAME12 = "treasury";
|
|
6736
6438
|
var TreasuryErrorCode = {
|
|
6737
|
-
// Treasury related errors
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6439
|
+
// Treasury related errors
|
|
6440
|
+
TREASURY_EZroNotEnabled: 1,
|
|
6441
|
+
TREASURY_EInvalidFeeRecipient: 2,
|
|
6442
|
+
TREASURY_EInvalidNativeFeeBp: 3
|
|
6741
6443
|
};
|
|
6742
6444
|
var _Treasury_instances, target_fn12;
|
|
6743
6445
|
var Treasury = class {
|
|
@@ -6987,95 +6689,9 @@ target_fn12 = function(name, module_name = MODULE_NAME12) {
|
|
|
6987
6689
|
return `${this.packageId}::${module_name}::${name}`;
|
|
6988
6690
|
};
|
|
6989
6691
|
|
|
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
|
-
|
|
7076
6692
|
// src/modules/ptb-builders/dvn-ptb-builder.ts
|
|
7077
|
-
var
|
|
7078
|
-
var _DvnPtbBuilder_instances,
|
|
6693
|
+
var MODULE_NAME13 = "dvn_ptb_builder";
|
|
6694
|
+
var _DvnPtbBuilder_instances, target_fn13;
|
|
7079
6695
|
var DvnPtbBuilder = class {
|
|
7080
6696
|
constructor(packageId, client, objects, moduleManager) {
|
|
7081
6697
|
this.moduleManager = moduleManager;
|
|
@@ -7095,7 +6711,7 @@ var DvnPtbBuilder = class {
|
|
|
7095
6711
|
*/
|
|
7096
6712
|
buildDvnPtbMoveCall(tx, dvnAddress, feelibAddress, priceFeedAddress) {
|
|
7097
6713
|
return tx.moveCall({
|
|
7098
|
-
target: __privateMethod(this, _DvnPtbBuilder_instances,
|
|
6714
|
+
target: __privateMethod(this, _DvnPtbBuilder_instances, target_fn13).call(this, "build_dvn_ptb"),
|
|
7099
6715
|
arguments: [asObject(tx, dvnAddress), asObject(tx, feelibAddress), asObject(tx, priceFeedAddress)]
|
|
7100
6716
|
});
|
|
7101
6717
|
}
|
|
@@ -7108,21 +6724,15 @@ _DvnPtbBuilder_instances = new WeakSet();
|
|
|
7108
6724
|
* @returns The full module path for the move call
|
|
7109
6725
|
* @private
|
|
7110
6726
|
*/
|
|
7111
|
-
|
|
6727
|
+
target_fn13 = function(name, module_name = MODULE_NAME13) {
|
|
7112
6728
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7113
6729
|
};
|
|
7114
|
-
var
|
|
7115
|
-
//
|
|
7116
|
-
|
|
7117
|
-
EndpointPtbBuilder_EBuilderRegistered: 2,
|
|
7118
|
-
EndpointPtbBuilder_EBuilderUnsupported: 3,
|
|
7119
|
-
EndpointPtbBuilder_EInvalidBounds: 4,
|
|
7120
|
-
EndpointPtbBuilder_EInvalidBuilderAddress: 5,
|
|
7121
|
-
EndpointPtbBuilder_EInvalidLibrary: 6,
|
|
7122
|
-
EndpointPtbBuilder_EUnauthorized: 7
|
|
6730
|
+
var LibBuilderManagerErrorCode = {
|
|
6731
|
+
// LibBuilderManager related errors (with LibBuilderManager_ prefix)
|
|
6732
|
+
LibBuilderManager_EBuilderNotFound: 1
|
|
7123
6733
|
};
|
|
7124
6734
|
var ModuleName = "endpoint_ptb_builder";
|
|
7125
|
-
var _EndpointPtbBuilder_instances,
|
|
6735
|
+
var _EndpointPtbBuilder_instances, target_fn14;
|
|
7126
6736
|
var EndpointPtbBuilder = class {
|
|
7127
6737
|
constructor(packageId, client, objects, moduleManager) {
|
|
7128
6738
|
this.moduleManager = moduleManager;
|
|
@@ -7139,7 +6749,7 @@ var EndpointPtbBuilder = class {
|
|
|
7139
6749
|
*/
|
|
7140
6750
|
registerMsglibPtbBuilderMoveCall(tx, builderInfo) {
|
|
7141
6751
|
tx.moveCall({
|
|
7142
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6752
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "register_msglib_ptb_builder"),
|
|
7143
6753
|
arguments: [
|
|
7144
6754
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7145
6755
|
tx.object(this.objects.endpointPtbBuilderAdminCap),
|
|
@@ -7156,7 +6766,7 @@ var EndpointPtbBuilder = class {
|
|
|
7156
6766
|
*/
|
|
7157
6767
|
setDefaultMsglibPtbBuilderMoveCall(tx, messageLib, ptbBuilder) {
|
|
7158
6768
|
tx.moveCall({
|
|
7159
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6769
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "set_default_msglib_ptb_builder"),
|
|
7160
6770
|
arguments: [
|
|
7161
6771
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7162
6772
|
tx.object(this.objects.endpointPtbBuilderAdminCap),
|
|
@@ -7172,7 +6782,7 @@ var EndpointPtbBuilder = class {
|
|
|
7172
6782
|
*/
|
|
7173
6783
|
setMsglibPtbBuilderMoveCall(tx, call) {
|
|
7174
6784
|
tx.moveCall({
|
|
7175
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6785
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "set_msglib_ptb_builder"),
|
|
7176
6786
|
arguments: [tx.object(this.objects.endpointPtbBuilder), call]
|
|
7177
6787
|
});
|
|
7178
6788
|
}
|
|
@@ -7185,7 +6795,7 @@ var EndpointPtbBuilder = class {
|
|
|
7185
6795
|
*/
|
|
7186
6796
|
buildQuotePtbByCallMoveCall(tx, endpointQuoteCall) {
|
|
7187
6797
|
return tx.moveCall({
|
|
7188
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6798
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "build_quote_ptb_by_call"),
|
|
7189
6799
|
arguments: [
|
|
7190
6800
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7191
6801
|
tx.object(this.objects.endpointV2),
|
|
@@ -7201,7 +6811,7 @@ var EndpointPtbBuilder = class {
|
|
|
7201
6811
|
*/
|
|
7202
6812
|
buildSendPtbByCallMoveCall(tx, endpointSendCall) {
|
|
7203
6813
|
return tx.moveCall({
|
|
7204
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6814
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "build_send_ptb_by_call"),
|
|
7205
6815
|
arguments: [
|
|
7206
6816
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7207
6817
|
tx.object(this.objects.endpointV2),
|
|
@@ -7217,7 +6827,7 @@ var EndpointPtbBuilder = class {
|
|
|
7217
6827
|
*/
|
|
7218
6828
|
buildSetConfigPtbByCallMoveCall(tx, messageLibSetConfigCall) {
|
|
7219
6829
|
return tx.moveCall({
|
|
7220
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6830
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "build_set_config_ptb_by_call"),
|
|
7221
6831
|
arguments: [tx.object(this.objects.endpointPtbBuilder), messageLibSetConfigCall]
|
|
7222
6832
|
});
|
|
7223
6833
|
}
|
|
@@ -7230,7 +6840,7 @@ var EndpointPtbBuilder = class {
|
|
|
7230
6840
|
*/
|
|
7231
6841
|
buildQuotePtbMoveCall(tx, sender, dstEid) {
|
|
7232
6842
|
return tx.moveCall({
|
|
7233
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6843
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "build_quote_ptb"),
|
|
7234
6844
|
arguments: [
|
|
7235
6845
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7236
6846
|
tx.object(this.objects.endpointV2),
|
|
@@ -7249,7 +6859,7 @@ var EndpointPtbBuilder = class {
|
|
|
7249
6859
|
*/
|
|
7250
6860
|
buildSendPtbMoveCall(tx, sender, dstEid, refund) {
|
|
7251
6861
|
return tx.moveCall({
|
|
7252
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6862
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "build_send_ptb"),
|
|
7253
6863
|
arguments: [
|
|
7254
6864
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7255
6865
|
tx.object(this.objects.endpointV2),
|
|
@@ -7268,7 +6878,7 @@ var EndpointPtbBuilder = class {
|
|
|
7268
6878
|
*/
|
|
7269
6879
|
buildSetConfigPtbMoveCall(tx, sender, lib) {
|
|
7270
6880
|
return tx.moveCall({
|
|
7271
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6881
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "build_set_config_ptb"),
|
|
7272
6882
|
arguments: [
|
|
7273
6883
|
tx.object(this.objects.endpointPtbBuilder),
|
|
7274
6884
|
tx.object(this.objects.endpointV2),
|
|
@@ -7285,7 +6895,7 @@ var EndpointPtbBuilder = class {
|
|
|
7285
6895
|
*/
|
|
7286
6896
|
endpointQuoteCallIdMoveCall(tx) {
|
|
7287
6897
|
return tx.moveCall({
|
|
7288
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6898
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "endpoint_quote_call_id"),
|
|
7289
6899
|
arguments: []
|
|
7290
6900
|
});
|
|
7291
6901
|
}
|
|
@@ -7309,7 +6919,7 @@ var EndpointPtbBuilder = class {
|
|
|
7309
6919
|
*/
|
|
7310
6920
|
endpointSendCallIdMoveCall(tx) {
|
|
7311
6921
|
return tx.moveCall({
|
|
7312
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6922
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "endpoint_send_call_id"),
|
|
7313
6923
|
arguments: []
|
|
7314
6924
|
});
|
|
7315
6925
|
}
|
|
@@ -7333,7 +6943,7 @@ var EndpointPtbBuilder = class {
|
|
|
7333
6943
|
*/
|
|
7334
6944
|
messageLibQuoteCallIdMoveCall(tx) {
|
|
7335
6945
|
return tx.moveCall({
|
|
7336
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6946
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "message_lib_quote_call_id"),
|
|
7337
6947
|
arguments: []
|
|
7338
6948
|
});
|
|
7339
6949
|
}
|
|
@@ -7357,7 +6967,7 @@ var EndpointPtbBuilder = class {
|
|
|
7357
6967
|
*/
|
|
7358
6968
|
messageLibSendCallIdMoveCall(tx) {
|
|
7359
6969
|
return tx.moveCall({
|
|
7360
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6970
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "message_lib_send_call_id"),
|
|
7361
6971
|
arguments: []
|
|
7362
6972
|
});
|
|
7363
6973
|
}
|
|
@@ -7381,7 +6991,7 @@ var EndpointPtbBuilder = class {
|
|
|
7381
6991
|
*/
|
|
7382
6992
|
messageLibSetConfigCallIdMoveCall(tx) {
|
|
7383
6993
|
return tx.moveCall({
|
|
7384
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
6994
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "message_lib_set_config_call_id"),
|
|
7385
6995
|
arguments: []
|
|
7386
6996
|
});
|
|
7387
6997
|
}
|
|
@@ -7407,7 +7017,7 @@ var EndpointPtbBuilder = class {
|
|
|
7407
7017
|
*/
|
|
7408
7018
|
getDefaultMsglibPtbBuilderMoveCall(tx, lib) {
|
|
7409
7019
|
return tx.moveCall({
|
|
7410
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7020
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "get_default_msglib_ptb_builder"),
|
|
7411
7021
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, lib)]
|
|
7412
7022
|
});
|
|
7413
7023
|
}
|
|
@@ -7434,7 +7044,7 @@ var EndpointPtbBuilder = class {
|
|
|
7434
7044
|
*/
|
|
7435
7045
|
getOappMsglibPtbBuilderMoveCall(tx, oapp, lib) {
|
|
7436
7046
|
return tx.moveCall({
|
|
7437
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7047
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "get_oapp_msglib_ptb_builder"),
|
|
7438
7048
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, oapp), asAddress(tx, lib)]
|
|
7439
7049
|
});
|
|
7440
7050
|
}
|
|
@@ -7462,7 +7072,7 @@ var EndpointPtbBuilder = class {
|
|
|
7462
7072
|
*/
|
|
7463
7073
|
getEffectiveMsglibPtbBuilderMoveCall(tx, oapp, lib) {
|
|
7464
7074
|
return tx.moveCall({
|
|
7465
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7075
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "get_effective_msglib_ptb_builder"),
|
|
7466
7076
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, oapp), asAddress(tx, lib)]
|
|
7467
7077
|
});
|
|
7468
7078
|
}
|
|
@@ -7489,7 +7099,7 @@ var EndpointPtbBuilder = class {
|
|
|
7489
7099
|
*/
|
|
7490
7100
|
getMsglibPtbBuilderInfoMoveCall(tx, builder) {
|
|
7491
7101
|
return tx.moveCall({
|
|
7492
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7102
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "get_msglib_ptb_builder_info"),
|
|
7493
7103
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, builder)]
|
|
7494
7104
|
});
|
|
7495
7105
|
}
|
|
@@ -7501,7 +7111,7 @@ var EndpointPtbBuilder = class {
|
|
|
7501
7111
|
*/
|
|
7502
7112
|
isMsglibPtbBuilderRegisteredMoveCall(tx, builder) {
|
|
7503
7113
|
return tx.moveCall({
|
|
7504
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7114
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "is_msglib_ptb_builder_registered"),
|
|
7505
7115
|
arguments: [tx.object(this.objects.endpointPtbBuilder), asAddress(tx, builder)]
|
|
7506
7116
|
});
|
|
7507
7117
|
}
|
|
@@ -7526,7 +7136,7 @@ var EndpointPtbBuilder = class {
|
|
|
7526
7136
|
*/
|
|
7527
7137
|
registeredMsglibPtbBuildersCountMoveCall(tx) {
|
|
7528
7138
|
return tx.moveCall({
|
|
7529
|
-
target: __privateMethod(this, _EndpointPtbBuilder_instances,
|
|
7139
|
+
target: __privateMethod(this, _EndpointPtbBuilder_instances, target_fn14).call(this, "registered_msglib_ptb_builders_count"),
|
|
7530
7140
|
arguments: [tx.object(this.objects.endpointPtbBuilder)]
|
|
7531
7141
|
});
|
|
7532
7142
|
}
|
|
@@ -7552,13 +7162,13 @@ _EndpointPtbBuilder_instances = new WeakSet();
|
|
|
7552
7162
|
* @returns The full module path for the move call
|
|
7553
7163
|
* @private
|
|
7554
7164
|
*/
|
|
7555
|
-
|
|
7165
|
+
target_fn14 = function(name) {
|
|
7556
7166
|
return `${this.packageId}::${ModuleName}::${name}`;
|
|
7557
7167
|
};
|
|
7558
7168
|
|
|
7559
7169
|
// src/modules/ptb-builders/executor-ptb-builder.ts
|
|
7560
|
-
var
|
|
7561
|
-
var _ExecutorPtbBuilder_instances,
|
|
7170
|
+
var MODULE_NAME14 = "executor_ptb_builder";
|
|
7171
|
+
var _ExecutorPtbBuilder_instances, target_fn15;
|
|
7562
7172
|
var ExecutorPtbBuilder = class {
|
|
7563
7173
|
constructor(packageId, client, objects, moduleManager) {
|
|
7564
7174
|
this.moduleManager = moduleManager;
|
|
@@ -7578,7 +7188,7 @@ var ExecutorPtbBuilder = class {
|
|
|
7578
7188
|
*/
|
|
7579
7189
|
buildExecutorPtbMoveCall(tx, executorAddress, feelibAddress, priceFeedAddress) {
|
|
7580
7190
|
return tx.moveCall({
|
|
7581
|
-
target: __privateMethod(this, _ExecutorPtbBuilder_instances,
|
|
7191
|
+
target: __privateMethod(this, _ExecutorPtbBuilder_instances, target_fn15).call(this, "build_executor_ptb"),
|
|
7582
7192
|
arguments: [asObject(tx, executorAddress), asObject(tx, feelibAddress), asObject(tx, priceFeedAddress)]
|
|
7583
7193
|
});
|
|
7584
7194
|
}
|
|
@@ -7591,15 +7201,15 @@ _ExecutorPtbBuilder_instances = new WeakSet();
|
|
|
7591
7201
|
* @returns The full module path for the move call
|
|
7592
7202
|
* @private
|
|
7593
7203
|
*/
|
|
7594
|
-
|
|
7204
|
+
target_fn15 = function(name, module_name = MODULE_NAME14) {
|
|
7595
7205
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7596
7206
|
};
|
|
7597
|
-
var
|
|
7207
|
+
var MODULE_NAME15 = "package_whitelist_validator";
|
|
7598
7208
|
var ValidatorErrorCode = {
|
|
7599
7209
|
// PTB Whitelist related errors
|
|
7600
7210
|
EInvalidWitness: 1
|
|
7601
7211
|
};
|
|
7602
|
-
var _PackageWhitelistValidator_instances,
|
|
7212
|
+
var _PackageWhitelistValidator_instances, target_fn16;
|
|
7603
7213
|
var PackageWhitelistValidator = class {
|
|
7604
7214
|
constructor(packageId, client, objects, moduleManager) {
|
|
7605
7215
|
this.moduleManager = moduleManager;
|
|
@@ -7619,7 +7229,7 @@ var PackageWhitelistValidator = class {
|
|
|
7619
7229
|
*/
|
|
7620
7230
|
addWhitelistMoveCall(tx, witness, witnessType) {
|
|
7621
7231
|
tx.moveCall({
|
|
7622
|
-
target: __privateMethod(this, _PackageWhitelistValidator_instances,
|
|
7232
|
+
target: __privateMethod(this, _PackageWhitelistValidator_instances, target_fn16).call(this, "add_whitelist"),
|
|
7623
7233
|
typeArguments: [witnessType],
|
|
7624
7234
|
arguments: [tx.object(this.objects.packageWhitelistValidator), witness]
|
|
7625
7235
|
});
|
|
@@ -7633,7 +7243,7 @@ var PackageWhitelistValidator = class {
|
|
|
7633
7243
|
*/
|
|
7634
7244
|
isWhitelistedMoveCall(tx, packageAddress) {
|
|
7635
7245
|
return tx.moveCall({
|
|
7636
|
-
target: __privateMethod(this, _PackageWhitelistValidator_instances,
|
|
7246
|
+
target: __privateMethod(this, _PackageWhitelistValidator_instances, target_fn16).call(this, "is_whitelisted"),
|
|
7637
7247
|
arguments: [tx.object(this.objects.packageWhitelistValidator), asAddress(tx, packageAddress)]
|
|
7638
7248
|
});
|
|
7639
7249
|
}
|
|
@@ -7645,7 +7255,7 @@ var PackageWhitelistValidator = class {
|
|
|
7645
7255
|
*/
|
|
7646
7256
|
validateMoveCall(tx, packageAddresses) {
|
|
7647
7257
|
return tx.moveCall({
|
|
7648
|
-
target: __privateMethod(this, _PackageWhitelistValidator_instances,
|
|
7258
|
+
target: __privateMethod(this, _PackageWhitelistValidator_instances, target_fn16).call(this, "validate"),
|
|
7649
7259
|
arguments: [
|
|
7650
7260
|
tx.object(this.objects.packageWhitelistValidator),
|
|
7651
7261
|
tx.pure(bcs.vector(bcs.Address).serialize(packageAddresses))
|
|
@@ -7706,18 +7316,11 @@ _PackageWhitelistValidator_instances = new WeakSet();
|
|
|
7706
7316
|
* @returns The full module path for the move call
|
|
7707
7317
|
* @private
|
|
7708
7318
|
*/
|
|
7709
|
-
|
|
7319
|
+
target_fn16 = function(name, module_name = MODULE_NAME15) {
|
|
7710
7320
|
return `${this.packageId}::${module_name}::${name}`;
|
|
7711
7321
|
};
|
|
7712
7322
|
var MOVE_CALL_MODULE_NAME = "move_call";
|
|
7713
|
-
var
|
|
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;
|
|
7323
|
+
var _PtbBuilder_instances, buildMoveCalls_fn, appendMoveCall_fn, decodeMoveCalls_fn, decodeMoveCallsBytes_fn, calculateOffset_fn;
|
|
7721
7324
|
var PtbBuilder = class {
|
|
7722
7325
|
constructor(packageId, client) {
|
|
7723
7326
|
__privateAdd(this, _PtbBuilder_instances);
|
|
@@ -7746,8 +7349,8 @@ var PtbBuilder = class {
|
|
|
7746
7349
|
const ptbCallsResult = await simulateTransaction(this.client, tx, sender);
|
|
7747
7350
|
const buffer = Buffer.from(bcs.vector(bcs.u8()).parse(ptbCallsResult[0].value));
|
|
7748
7351
|
const version = buffer.readInt16BE();
|
|
7749
|
-
if (version ===
|
|
7750
|
-
return __privateMethod(this, _PtbBuilder_instances,
|
|
7352
|
+
if (version === LzReceiveVersion.VERSION_1) {
|
|
7353
|
+
return __privateMethod(this, _PtbBuilder_instances, decodeMoveCallsBytes_fn).call(this, new Uint8Array(buffer.subarray(2)));
|
|
7751
7354
|
}
|
|
7752
7355
|
throw new Error(`Unknown version: ${version}`);
|
|
7753
7356
|
}
|
|
@@ -7906,10 +7509,6 @@ decodeMoveCalls_fn = function(viewResult) {
|
|
|
7906
7509
|
}
|
|
7907
7510
|
return __privateMethod(this, _PtbBuilder_instances, decodeMoveCallsBytes_fn).call(this, value);
|
|
7908
7511
|
};
|
|
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
|
-
};
|
|
7913
7512
|
/**
|
|
7914
7513
|
* Decode move calls from raw bytes
|
|
7915
7514
|
* @param bytes - The raw bytes containing encoded move calls
|
|
@@ -7963,8 +7562,8 @@ calculateOffset_fn = function(index, baseOffset, placeholderInfos) {
|
|
|
7963
7562
|
};
|
|
7964
7563
|
|
|
7965
7564
|
// src/modules/ptb-builders/simple-message-lib-ptb-builder.ts
|
|
7966
|
-
var
|
|
7967
|
-
var _SimpleMessageLibPtbBuilder_instances,
|
|
7565
|
+
var MODULE_NAME16 = "simple_msglib_ptb_builder";
|
|
7566
|
+
var _SimpleMessageLibPtbBuilder_instances, target_fn17;
|
|
7968
7567
|
var SimpleMessageLibPtbBuilder = class {
|
|
7969
7568
|
constructor(packageId, client, objects, moduleManager) {
|
|
7970
7569
|
this.moduleManager = moduleManager;
|
|
@@ -7981,7 +7580,7 @@ var SimpleMessageLibPtbBuilder = class {
|
|
|
7981
7580
|
*/
|
|
7982
7581
|
getPtbBuilderInfoMoveCall(tx) {
|
|
7983
7582
|
return tx.moveCall({
|
|
7984
|
-
target: __privateMethod(this, _SimpleMessageLibPtbBuilder_instances,
|
|
7583
|
+
target: __privateMethod(this, _SimpleMessageLibPtbBuilder_instances, target_fn17).call(this, "get_ptb_builder_info"),
|
|
7985
7584
|
arguments: [
|
|
7986
7585
|
tx.object(this.objects.simpleMessageLibPtbBuilder),
|
|
7987
7586
|
tx.object(this.objects.endpointV2),
|
|
@@ -7998,15 +7597,11 @@ _SimpleMessageLibPtbBuilder_instances = new WeakSet();
|
|
|
7998
7597
|
* @returns The full module path for the move call
|
|
7999
7598
|
* @private
|
|
8000
7599
|
*/
|
|
8001
|
-
|
|
7600
|
+
target_fn17 = function(name, module_name = MODULE_NAME16) {
|
|
8002
7601
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8003
7602
|
};
|
|
8004
|
-
var
|
|
8005
|
-
var
|
|
8006
|
-
// ULN302 PTB Builder related errors (matching uln_302_ptb_builder.move)
|
|
8007
|
-
Uln302PtbBuilder_EWorkerPtbsNotFound: 1
|
|
8008
|
-
};
|
|
8009
|
-
var _Uln302PtbBuilder_instances, target_fn19;
|
|
7603
|
+
var MODULE_NAME17 = "uln_302_ptb_builder";
|
|
7604
|
+
var _Uln302PtbBuilder_instances, target_fn18;
|
|
8010
7605
|
var Uln302PtbBuilder = class {
|
|
8011
7606
|
constructor(packageId, client, objects, moduleManager) {
|
|
8012
7607
|
this.moduleManager = moduleManager;
|
|
@@ -8023,7 +7618,7 @@ var Uln302PtbBuilder = class {
|
|
|
8023
7618
|
*/
|
|
8024
7619
|
setWorkerPtbsMoveCall(tx, call) {
|
|
8025
7620
|
tx.moveCall({
|
|
8026
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7621
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "set_worker_ptbs"),
|
|
8027
7622
|
arguments: [tx.object(this.objects.uln302PtbBuilder), call]
|
|
8028
7623
|
});
|
|
8029
7624
|
}
|
|
@@ -8035,7 +7630,7 @@ var Uln302PtbBuilder = class {
|
|
|
8035
7630
|
*/
|
|
8036
7631
|
getPtbBuilderInfoMoveCall(tx) {
|
|
8037
7632
|
return tx.moveCall({
|
|
8038
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7633
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "get_ptb_builder_info"),
|
|
8039
7634
|
arguments: [
|
|
8040
7635
|
tx.object(this.objects.uln302PtbBuilder),
|
|
8041
7636
|
tx.object(this.objects.uln302),
|
|
@@ -8052,7 +7647,7 @@ var Uln302PtbBuilder = class {
|
|
|
8052
7647
|
*/
|
|
8053
7648
|
isWorkerPtbsSetMoveCall(tx, workerCap) {
|
|
8054
7649
|
return tx.moveCall({
|
|
8055
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7650
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "is_worker_ptbs_set"),
|
|
8056
7651
|
arguments: [tx.object(this.objects.uln302PtbBuilder), asAddress(tx, workerCap)]
|
|
8057
7652
|
});
|
|
8058
7653
|
}
|
|
@@ -8078,7 +7673,7 @@ var Uln302PtbBuilder = class {
|
|
|
8078
7673
|
*/
|
|
8079
7674
|
getWorkerPtbsMoveCall(tx, workerCap) {
|
|
8080
7675
|
return tx.moveCall({
|
|
8081
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7676
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "get_worker_ptbs"),
|
|
8082
7677
|
arguments: [tx.object(this.objects.uln302PtbBuilder), asAddress(tx, workerCap)]
|
|
8083
7678
|
});
|
|
8084
7679
|
}
|
|
@@ -8090,7 +7685,7 @@ var Uln302PtbBuilder = class {
|
|
|
8090
7685
|
*/
|
|
8091
7686
|
executorGetFeeCallIdMoveCall(tx) {
|
|
8092
7687
|
return tx.moveCall({
|
|
8093
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7688
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "executor_get_fee_call_id"),
|
|
8094
7689
|
arguments: []
|
|
8095
7690
|
});
|
|
8096
7691
|
}
|
|
@@ -8114,7 +7709,7 @@ var Uln302PtbBuilder = class {
|
|
|
8114
7709
|
*/
|
|
8115
7710
|
dvnGetFeeMultiCallIdMoveCall(tx) {
|
|
8116
7711
|
return tx.moveCall({
|
|
8117
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7712
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "dvn_get_fee_multi_call_id"),
|
|
8118
7713
|
arguments: []
|
|
8119
7714
|
});
|
|
8120
7715
|
}
|
|
@@ -8138,7 +7733,7 @@ var Uln302PtbBuilder = class {
|
|
|
8138
7733
|
*/
|
|
8139
7734
|
executorAssignJobCallIdMoveCall(tx) {
|
|
8140
7735
|
return tx.moveCall({
|
|
8141
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7736
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "executor_assign_job_call_id"),
|
|
8142
7737
|
arguments: []
|
|
8143
7738
|
});
|
|
8144
7739
|
}
|
|
@@ -8162,7 +7757,7 @@ var Uln302PtbBuilder = class {
|
|
|
8162
7757
|
*/
|
|
8163
7758
|
dvnAssignJobMultiCallIdMoveCall(tx) {
|
|
8164
7759
|
return tx.moveCall({
|
|
8165
|
-
target: __privateMethod(this, _Uln302PtbBuilder_instances,
|
|
7760
|
+
target: __privateMethod(this, _Uln302PtbBuilder_instances, target_fn18).call(this, "dvn_assign_job_multi_call_id"),
|
|
8166
7761
|
arguments: []
|
|
8167
7762
|
});
|
|
8168
7763
|
}
|
|
@@ -8188,13 +7783,13 @@ _Uln302PtbBuilder_instances = new WeakSet();
|
|
|
8188
7783
|
* @returns The full module path for the move call
|
|
8189
7784
|
* @private
|
|
8190
7785
|
*/
|
|
8191
|
-
|
|
7786
|
+
target_fn18 = function(name, module_name = MODULE_NAME17) {
|
|
8192
7787
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8193
7788
|
};
|
|
8194
7789
|
|
|
8195
7790
|
// src/modules/ptb-builders/blocked-message-lib-ptb-builder.ts
|
|
8196
|
-
var
|
|
8197
|
-
var _BlockedMessageLibPtbBuilder_instances,
|
|
7791
|
+
var MODULE_NAME18 = "blocked_msglib_ptb_builder";
|
|
7792
|
+
var _BlockedMessageLibPtbBuilder_instances, target_fn19;
|
|
8198
7793
|
var BlockedMessageLibPtbBuilder = class {
|
|
8199
7794
|
constructor(packageId, client, objects, moduleManager) {
|
|
8200
7795
|
this.moduleManager = moduleManager;
|
|
@@ -8211,7 +7806,7 @@ var BlockedMessageLibPtbBuilder = class {
|
|
|
8211
7806
|
*/
|
|
8212
7807
|
getPtbBuilderInfoMoveCall(tx) {
|
|
8213
7808
|
return tx.moveCall({
|
|
8214
|
-
target: __privateMethod(this, _BlockedMessageLibPtbBuilder_instances,
|
|
7809
|
+
target: __privateMethod(this, _BlockedMessageLibPtbBuilder_instances, target_fn19).call(this, "get_ptb_builder_info"),
|
|
8215
7810
|
arguments: [tx.object(this.objects.blockedMessageLibPtbBuilder), tx.object(this.objects.blockedMessageLib)]
|
|
8216
7811
|
});
|
|
8217
7812
|
}
|
|
@@ -8224,22 +7819,22 @@ _BlockedMessageLibPtbBuilder_instances = new WeakSet();
|
|
|
8224
7819
|
* @returns The full module path for the move call
|
|
8225
7820
|
* @private
|
|
8226
7821
|
*/
|
|
8227
|
-
|
|
7822
|
+
target_fn19 = function(name, module_name = MODULE_NAME18) {
|
|
8228
7823
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8229
7824
|
};
|
|
8230
|
-
var
|
|
7825
|
+
var MODULE_NAME19 = "counter";
|
|
8231
7826
|
var CounterErrorCode = {
|
|
8232
|
-
// Counter related errors
|
|
7827
|
+
// Counter related errors
|
|
8233
7828
|
Counter_EInvalidMsgType: 0,
|
|
8234
7829
|
Counter_EInvalidValue: 1,
|
|
8235
7830
|
Counter_EInvalidNonce: 2,
|
|
8236
7831
|
Counter_EOnlyEndpoint: 3,
|
|
8237
7832
|
Counter_ESelfComposeOnly: 4,
|
|
8238
7833
|
Counter_EInvalidOApp: 5,
|
|
8239
|
-
|
|
8240
|
-
|
|
7834
|
+
Counter_EInvalidAdminCap: 6,
|
|
7835
|
+
Counter_EAlreadyInitialized: 7
|
|
8241
7836
|
};
|
|
8242
|
-
var _Counter_instances,
|
|
7837
|
+
var _Counter_instances, target_fn20;
|
|
8243
7838
|
var Counter = class {
|
|
8244
7839
|
constructor(packageId, client, objects, moduleManager) {
|
|
8245
7840
|
this.moduleManager = moduleManager;
|
|
@@ -8257,7 +7852,7 @@ var Counter = class {
|
|
|
8257
7852
|
*/
|
|
8258
7853
|
initCounterMoveCall(tx, lzReceiveInfo, lzComposeInfo) {
|
|
8259
7854
|
tx.moveCall({
|
|
8260
|
-
target: __privateMethod(this, _Counter_instances,
|
|
7855
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "init_counter"),
|
|
8261
7856
|
arguments: [
|
|
8262
7857
|
tx.object(this.objects.counter),
|
|
8263
7858
|
tx.object(this.objects.counterOapp),
|
|
@@ -8276,10 +7871,10 @@ var Counter = class {
|
|
|
8276
7871
|
* @param payInZero - Whether to pay in ZRO tokens
|
|
8277
7872
|
* @returns Promise<MessagingFee> - The calculated messaging fees
|
|
8278
7873
|
*/
|
|
8279
|
-
async quote(dstEid, msgType, options, payInZero
|
|
7874
|
+
async quote(dstEid, msgType, options, payInZero) {
|
|
8280
7875
|
const tx = new Transaction();
|
|
8281
7876
|
const quoteCall = tx.moveCall({
|
|
8282
|
-
target: __privateMethod(this, _Counter_instances,
|
|
7877
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "quote"),
|
|
8283
7878
|
arguments: [
|
|
8284
7879
|
tx.object(this.objects.counter),
|
|
8285
7880
|
tx.object(this.objects.counterOapp),
|
|
@@ -8289,7 +7884,7 @@ var Counter = class {
|
|
|
8289
7884
|
asBool(tx, payInZero)
|
|
8290
7885
|
]
|
|
8291
7886
|
});
|
|
8292
|
-
return this.moduleManager.getEndpoint().quote(tx, quoteCall
|
|
7887
|
+
return this.moduleManager.getEndpoint().quote(tx, quoteCall);
|
|
8293
7888
|
}
|
|
8294
7889
|
/**
|
|
8295
7890
|
* Increment counter on destination chain
|
|
@@ -8303,11 +7898,11 @@ var Counter = class {
|
|
|
8303
7898
|
* @param zroFee - ZRO token fee amount
|
|
8304
7899
|
* @param refundAddress - Address for fee refunds
|
|
8305
7900
|
*/
|
|
8306
|
-
async incrementMoveCall(tx, sender, dstEid, msgType, options, sendValue, nativeFee, zroFee, refundAddress
|
|
7901
|
+
async incrementMoveCall(tx, sender, dstEid, msgType, options, sendValue, nativeFee, zroFee, refundAddress) {
|
|
8307
7902
|
const [nativeToken] = tx.splitCoins(tx.gas, [asU64(tx, nativeFee)]);
|
|
8308
7903
|
const zroToken = isTransactionArgument(zroFee) ? zroFee : await this.moduleManager.getZro().splitOptionZroTokenMoveCall(tx, sender, zroFee);
|
|
8309
7904
|
const incrementCall = tx.moveCall({
|
|
8310
|
-
target: __privateMethod(this, _Counter_instances,
|
|
7905
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "increment"),
|
|
8311
7906
|
arguments: [
|
|
8312
7907
|
tx.object(this.objects.counter),
|
|
8313
7908
|
tx.object(this.objects.counterOapp),
|
|
@@ -8320,50 +7915,64 @@ var Counter = class {
|
|
|
8320
7915
|
asAddress(tx, refundAddress)
|
|
8321
7916
|
]
|
|
8322
7917
|
});
|
|
8323
|
-
await this.moduleManager.getEndpoint().populateSendTransaction(tx, incrementCall, sender
|
|
7918
|
+
await this.moduleManager.getEndpoint().populateSendTransaction(tx, incrementCall, sender);
|
|
8324
7919
|
}
|
|
8325
7920
|
/**
|
|
8326
|
-
* Set
|
|
7921
|
+
* Set peer counter on another chain
|
|
8327
7922
|
* @param tx - The transaction to add the move call to
|
|
8328
|
-
* @param
|
|
7923
|
+
* @param messagingChannel - The messaging channel object ID or transaction argument
|
|
7924
|
+
* @param eid - The peer endpoint ID or transaction argument
|
|
7925
|
+
* @param peer - The peer counter address as bytes or transaction argument
|
|
8329
7926
|
*/
|
|
8330
|
-
|
|
7927
|
+
setPeerMoveCall(tx, messagingChannel, eid, peer) {
|
|
8331
7928
|
tx.moveCall({
|
|
8332
|
-
target: __privateMethod(this, _Counter_instances,
|
|
7929
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "set_peer"),
|
|
8333
7930
|
arguments: [
|
|
8334
7931
|
tx.object(this.objects.counter),
|
|
8335
7932
|
tx.object(this.objects.counterOapp),
|
|
8336
7933
|
tx.object(this.objects.counterAdminCap),
|
|
8337
7934
|
tx.object(this.objects.endpointV2),
|
|
8338
|
-
|
|
7935
|
+
asObject(tx, messagingChannel),
|
|
7936
|
+
asU32(tx, eid),
|
|
7937
|
+
asBytes32(tx, peer, this.moduleManager.getUtils())
|
|
8339
7938
|
]
|
|
8340
7939
|
});
|
|
8341
7940
|
}
|
|
8342
|
-
// === View Functions ===
|
|
8343
7941
|
/**
|
|
8344
|
-
*
|
|
7942
|
+
* Set delegate for the counter
|
|
8345
7943
|
* @param tx - The transaction to add the move call to
|
|
8346
|
-
* @
|
|
7944
|
+
* @param newDelegate - The new delegate address or transaction argument
|
|
8347
7945
|
*/
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8351
|
-
arguments: [
|
|
7946
|
+
setDelegateMoveCall(tx, newDelegate) {
|
|
7947
|
+
tx.moveCall({
|
|
7948
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "set_delegate"),
|
|
7949
|
+
arguments: [
|
|
7950
|
+
tx.object(this.objects.counter),
|
|
7951
|
+
tx.object(this.objects.counterOapp),
|
|
7952
|
+
tx.object(this.objects.counterAdminCap),
|
|
7953
|
+
tx.object(this.objects.endpointV2),
|
|
7954
|
+
asAddress(tx, newDelegate)
|
|
7955
|
+
]
|
|
8352
7956
|
});
|
|
8353
7957
|
}
|
|
8354
7958
|
/**
|
|
8355
|
-
*
|
|
8356
|
-
* @
|
|
7959
|
+
* Set LayerZero compose information for counter
|
|
7960
|
+
* @param tx - The transaction to add the move call to
|
|
7961
|
+
* @param lzComposeInfo - LayerZero compose information as bytes
|
|
8357
7962
|
*/
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
this.
|
|
8361
|
-
|
|
8362
|
-
this.
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
7963
|
+
setLzComposeInfoMoveCall(tx, lzComposeInfo) {
|
|
7964
|
+
tx.moveCall({
|
|
7965
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "set_lz_compose_info"),
|
|
7966
|
+
arguments: [
|
|
7967
|
+
tx.object(this.objects.counter),
|
|
7968
|
+
tx.object(this.objects.counterOapp),
|
|
7969
|
+
tx.object(this.objects.counterAdminCap),
|
|
7970
|
+
tx.object(this.objects.endpointV2),
|
|
7971
|
+
asBytes(tx, lzComposeInfo)
|
|
7972
|
+
]
|
|
7973
|
+
});
|
|
8366
7974
|
}
|
|
7975
|
+
// === View Functions ===
|
|
8367
7976
|
/**
|
|
8368
7977
|
* Get call capability address for counter
|
|
8369
7978
|
* @param tx - The transaction to add the move call to
|
|
@@ -8371,7 +7980,7 @@ var Counter = class {
|
|
|
8371
7980
|
*/
|
|
8372
7981
|
getCallCapAddressMoveCall(tx) {
|
|
8373
7982
|
return tx.moveCall({
|
|
8374
|
-
target: __privateMethod(this, _Counter_instances,
|
|
7983
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "call_cap_address"),
|
|
8375
7984
|
arguments: [tx.object(this.objects.counter)]
|
|
8376
7985
|
});
|
|
8377
7986
|
}
|
|
@@ -8395,7 +8004,7 @@ var Counter = class {
|
|
|
8395
8004
|
*/
|
|
8396
8005
|
getComposerAddressMoveCall(tx) {
|
|
8397
8006
|
return tx.moveCall({
|
|
8398
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8007
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "composer_address"),
|
|
8399
8008
|
arguments: [tx.object(this.objects.counter)]
|
|
8400
8009
|
});
|
|
8401
8010
|
}
|
|
@@ -8419,7 +8028,7 @@ var Counter = class {
|
|
|
8419
8028
|
*/
|
|
8420
8029
|
getCountMoveCall(tx) {
|
|
8421
8030
|
return tx.moveCall({
|
|
8422
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8031
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "get_count"),
|
|
8423
8032
|
arguments: [tx.object(this.objects.counter)]
|
|
8424
8033
|
});
|
|
8425
8034
|
}
|
|
@@ -8443,7 +8052,7 @@ var Counter = class {
|
|
|
8443
8052
|
*/
|
|
8444
8053
|
getComposedCountMoveCall(tx) {
|
|
8445
8054
|
return tx.moveCall({
|
|
8446
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8055
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "get_composed_count"),
|
|
8447
8056
|
arguments: [tx.object(this.objects.counter)]
|
|
8448
8057
|
});
|
|
8449
8058
|
}
|
|
@@ -8468,7 +8077,7 @@ var Counter = class {
|
|
|
8468
8077
|
*/
|
|
8469
8078
|
getOutboundCountMoveCall(tx, dstEid) {
|
|
8470
8079
|
return tx.moveCall({
|
|
8471
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8080
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "get_outbound_count"),
|
|
8472
8081
|
arguments: [tx.object(this.objects.counter), asU32(tx, dstEid)]
|
|
8473
8082
|
});
|
|
8474
8083
|
}
|
|
@@ -8494,7 +8103,7 @@ var Counter = class {
|
|
|
8494
8103
|
*/
|
|
8495
8104
|
getInboundCountMoveCall(tx, srcEid) {
|
|
8496
8105
|
return tx.moveCall({
|
|
8497
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8106
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "get_inbound_count"),
|
|
8498
8107
|
arguments: [tx.object(this.objects.counter), asU32(tx, srcEid)]
|
|
8499
8108
|
});
|
|
8500
8109
|
}
|
|
@@ -8514,7 +8123,7 @@ var Counter = class {
|
|
|
8514
8123
|
}
|
|
8515
8124
|
nextNonceMoveCall(tx, srcEid, sender) {
|
|
8516
8125
|
return tx.moveCall({
|
|
8517
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8126
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "next_nonce"),
|
|
8518
8127
|
arguments: [
|
|
8519
8128
|
tx.object(this.objects.counter),
|
|
8520
8129
|
asU32(tx, srcEid),
|
|
@@ -8533,7 +8142,7 @@ var Counter = class {
|
|
|
8533
8142
|
}
|
|
8534
8143
|
getMaxReceivedNonceMoveCall(tx, srcEid, sender) {
|
|
8535
8144
|
return tx.moveCall({
|
|
8536
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8145
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "get_max_received_nonce"),
|
|
8537
8146
|
arguments: [
|
|
8538
8147
|
tx.object(this.objects.counter),
|
|
8539
8148
|
asU32(tx, srcEid),
|
|
@@ -8552,7 +8161,7 @@ var Counter = class {
|
|
|
8552
8161
|
}
|
|
8553
8162
|
isOrderedNonceMoveCall(tx) {
|
|
8554
8163
|
return tx.moveCall({
|
|
8555
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8164
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "is_ordered_nonce"),
|
|
8556
8165
|
arguments: [tx.object(this.objects.counter)]
|
|
8557
8166
|
});
|
|
8558
8167
|
}
|
|
@@ -8568,7 +8177,7 @@ var Counter = class {
|
|
|
8568
8177
|
// === PTB Builder Functions ===
|
|
8569
8178
|
lzReceiveInfoMoveCall(tx) {
|
|
8570
8179
|
return tx.moveCall({
|
|
8571
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8180
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "lz_receive_info", "counter_ptb_builder"),
|
|
8572
8181
|
arguments: [
|
|
8573
8182
|
tx.object(this.objects.counter),
|
|
8574
8183
|
tx.object(this.objects.counterOapp),
|
|
@@ -8579,7 +8188,7 @@ var Counter = class {
|
|
|
8579
8188
|
}
|
|
8580
8189
|
lzComposeInfoMoveCall(tx) {
|
|
8581
8190
|
return tx.moveCall({
|
|
8582
|
-
target: __privateMethod(this, _Counter_instances,
|
|
8191
|
+
target: __privateMethod(this, _Counter_instances, target_fn20).call(this, "lz_compose_info", "counter_ptb_builder"),
|
|
8583
8192
|
arguments: [
|
|
8584
8193
|
tx.object(this.objects.counter),
|
|
8585
8194
|
tx.object(this.objects.counterOapp),
|
|
@@ -8598,44 +8207,33 @@ _Counter_instances = new WeakSet();
|
|
|
8598
8207
|
* @returns The full module path for the move call
|
|
8599
8208
|
* @private
|
|
8600
8209
|
*/
|
|
8601
|
-
|
|
8210
|
+
target_fn20 = function(name, module_name = MODULE_NAME19) {
|
|
8602
8211
|
return `${this.packageId}::${module_name}::${name}`;
|
|
8603
8212
|
};
|
|
8604
|
-
var
|
|
8213
|
+
var MODULE_NAME20 = "oapp";
|
|
8605
8214
|
var OAppErrorCode = {
|
|
8606
|
-
// OApp related errors
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
//
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
EnforcedOptions_EInvalidOptionsType: 3,
|
|
8621
|
-
// OAppInfoV1 related errors (matching oapp_info_v1.move)
|
|
8622
|
-
OAppInfoV1_EInvalidData: 1,
|
|
8623
|
-
OAppInfoV1_EInvalidVersion: 2
|
|
8624
|
-
};
|
|
8625
|
-
var _OApp_instances, oappInfo_fn, target_fn22;
|
|
8215
|
+
// OApp related errors
|
|
8216
|
+
OApp_EAlreadyInited: 1,
|
|
8217
|
+
OApp_EChannelNotInited: 2,
|
|
8218
|
+
OApp_EEndpointNotInited: 3,
|
|
8219
|
+
OApp_EInvalidAdminCap: 4,
|
|
8220
|
+
OApp_EInvalidCallCap: 5,
|
|
8221
|
+
OApp_EOnlyEndpoint: 6,
|
|
8222
|
+
OApp_EOnlyPeer: 7,
|
|
8223
|
+
// EndpointConfig related errors
|
|
8224
|
+
EndpointConfig_EInvalidAdminCap: 1,
|
|
8225
|
+
EndpointConfig_EInvalidIntentType: 2,
|
|
8226
|
+
EndpointConfig_EInvalidOAppCallCap: 3
|
|
8227
|
+
};
|
|
8228
|
+
var _OApp_instances, target_fn21;
|
|
8626
8229
|
var OApp = class {
|
|
8627
|
-
constructor(packageId,
|
|
8230
|
+
constructor(packageId, client, objects, moduleManager) {
|
|
8628
8231
|
this.moduleManager = moduleManager;
|
|
8629
8232
|
__privateAdd(this, _OApp_instances);
|
|
8630
|
-
this.oappInfo = null;
|
|
8631
8233
|
this.packageId = packageId;
|
|
8632
|
-
this.oappCallCapId = oappCallCapId;
|
|
8633
8234
|
this.client = client;
|
|
8634
8235
|
this.objects = objects;
|
|
8635
8236
|
}
|
|
8636
|
-
// setOAppInfo(oappInfo: OAppInfoV1): void {
|
|
8637
|
-
// this.oappInfo = oappInfo
|
|
8638
|
-
// }
|
|
8639
8237
|
// === Set Functions ===
|
|
8640
8238
|
/**
|
|
8641
8239
|
* Set enforced options for OApp messaging
|
|
@@ -8646,13 +8244,11 @@ var OApp = class {
|
|
|
8646
8244
|
* @param msgType - Message type or transaction argument
|
|
8647
8245
|
* @param options - Enforced options as bytes or transaction argument
|
|
8648
8246
|
*/
|
|
8649
|
-
|
|
8650
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8651
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8247
|
+
setEnforcedOptionsMoveCall(tx, oapp, adminCap, eid, msgType, options) {
|
|
8652
8248
|
tx.moveCall({
|
|
8653
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8249
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "set_enforced_options"),
|
|
8654
8250
|
arguments: [
|
|
8655
|
-
asObject(tx,
|
|
8251
|
+
asObject(tx, oapp),
|
|
8656
8252
|
asObject(tx, adminCap),
|
|
8657
8253
|
asU32(tx, eid),
|
|
8658
8254
|
asU16(tx, msgType),
|
|
@@ -8668,17 +8264,12 @@ var OApp = class {
|
|
|
8668
8264
|
* @param eid - Peer endpoint ID or transaction argument
|
|
8669
8265
|
* @param peer - Peer OApp address as bytes or transaction argument
|
|
8670
8266
|
*/
|
|
8671
|
-
|
|
8672
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8673
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8674
|
-
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
8267
|
+
setPeerMoveCall(tx, oapp, adminCap, eid, peer) {
|
|
8675
8268
|
tx.moveCall({
|
|
8676
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8269
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "set_peer"),
|
|
8677
8270
|
arguments: [
|
|
8678
|
-
asObject(tx,
|
|
8271
|
+
asObject(tx, oapp),
|
|
8679
8272
|
asObject(tx, adminCap),
|
|
8680
|
-
asObject(tx, this.objects.endpointV2),
|
|
8681
|
-
asObject(tx, messagingChannel),
|
|
8682
8273
|
asU32(tx, eid),
|
|
8683
8274
|
asBytes32(tx, peer, this.moduleManager.getUtils())
|
|
8684
8275
|
]
|
|
@@ -8686,54 +8277,53 @@ var OApp = class {
|
|
|
8686
8277
|
}
|
|
8687
8278
|
// === View Functions ===
|
|
8688
8279
|
/**
|
|
8689
|
-
* Get admin
|
|
8280
|
+
* Get admin address for OApp
|
|
8690
8281
|
* @param tx - The transaction to add the move call to
|
|
8691
8282
|
* @param oapp - The OApp object ID or transaction argument
|
|
8692
|
-
* @returns Transaction result containing the admin
|
|
8283
|
+
* @returns Transaction result containing the admin address
|
|
8693
8284
|
*/
|
|
8694
|
-
|
|
8285
|
+
getAdminMoveCall(tx, oapp) {
|
|
8695
8286
|
return tx.moveCall({
|
|
8696
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8287
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "admin"),
|
|
8697
8288
|
arguments: [asObject(tx, oapp)]
|
|
8698
8289
|
});
|
|
8699
8290
|
}
|
|
8700
8291
|
/**
|
|
8701
|
-
* Get admin
|
|
8292
|
+
* Get admin address for OApp
|
|
8702
8293
|
* @param oapp - The OApp object ID
|
|
8703
|
-
* @returns Promise<string> - The admin
|
|
8294
|
+
* @returns Promise<string> - The admin address
|
|
8704
8295
|
*/
|
|
8705
|
-
async
|
|
8296
|
+
async getAdmin(oapp) {
|
|
8706
8297
|
return executeSimulate(
|
|
8707
8298
|
this.client,
|
|
8708
8299
|
(tx) => {
|
|
8709
|
-
this.
|
|
8300
|
+
this.getAdminMoveCall(tx, oapp);
|
|
8710
8301
|
},
|
|
8711
8302
|
(result) => bcs.Address.parse(result[0].value)
|
|
8712
8303
|
);
|
|
8713
8304
|
}
|
|
8714
8305
|
/**
|
|
8715
|
-
* Get OApp
|
|
8306
|
+
* Get OApp address (call capability ID)
|
|
8716
8307
|
* @param tx - The transaction to add the move call to
|
|
8717
8308
|
* @param oapp - The OApp object ID or transaction argument
|
|
8718
|
-
* @returns Transaction result containing the OApp
|
|
8309
|
+
* @returns Transaction result containing the OApp address
|
|
8719
8310
|
*/
|
|
8720
|
-
|
|
8721
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8311
|
+
getOAppAddressMoveCall(tx, oapp) {
|
|
8722
8312
|
return tx.moveCall({
|
|
8723
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8724
|
-
arguments: [asObject(tx,
|
|
8313
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "oapp_address"),
|
|
8314
|
+
arguments: [asObject(tx, oapp)]
|
|
8725
8315
|
});
|
|
8726
8316
|
}
|
|
8727
8317
|
/**
|
|
8728
|
-
* Get OApp
|
|
8729
|
-
* @param oapp - The OApp object ID
|
|
8730
|
-
* @returns Promise<string> - The OApp
|
|
8318
|
+
* Get OApp address (call capability ID)
|
|
8319
|
+
* @param oapp - The OApp object ID
|
|
8320
|
+
* @returns Promise<string> - The OApp address
|
|
8731
8321
|
*/
|
|
8732
|
-
async
|
|
8322
|
+
async getOAppAddress(oapp) {
|
|
8733
8323
|
return executeSimulate(
|
|
8734
8324
|
this.client,
|
|
8735
|
-
|
|
8736
|
-
|
|
8325
|
+
(tx) => {
|
|
8326
|
+
this.getOAppAddressMoveCall(tx, oapp);
|
|
8737
8327
|
},
|
|
8738
8328
|
(result) => bcs.Address.parse(result[0].value)
|
|
8739
8329
|
);
|
|
@@ -8747,16 +8337,10 @@ var OApp = class {
|
|
|
8747
8337
|
* @param extraOptions - Extra options to combine with enforced options or transaction argument
|
|
8748
8338
|
* @returns Transaction result containing combined options
|
|
8749
8339
|
*/
|
|
8750
|
-
|
|
8751
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8340
|
+
combineOptionsMoveCall(tx, oapp, eid, msgType, extraOptions) {
|
|
8752
8341
|
return tx.moveCall({
|
|
8753
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8754
|
-
arguments: [
|
|
8755
|
-
asObject(tx, oappInfo.oapp_object),
|
|
8756
|
-
asU32(tx, eid),
|
|
8757
|
-
asU16(tx, msgType),
|
|
8758
|
-
asBytes(tx, extraOptions)
|
|
8759
|
-
]
|
|
8342
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "combine_options"),
|
|
8343
|
+
arguments: [asObject(tx, oapp), asU32(tx, eid), asU16(tx, msgType), asBytes(tx, extraOptions)]
|
|
8760
8344
|
});
|
|
8761
8345
|
}
|
|
8762
8346
|
/**
|
|
@@ -8767,11 +8351,11 @@ var OApp = class {
|
|
|
8767
8351
|
* @param extraOptions - Extra options to combine with enforced options
|
|
8768
8352
|
* @returns Promise<Uint8Array> - Combined options as bytes
|
|
8769
8353
|
*/
|
|
8770
|
-
async combineOptions(eid, msgType, extraOptions) {
|
|
8354
|
+
async combineOptions(oapp, eid, msgType, extraOptions) {
|
|
8771
8355
|
return executeSimulate(
|
|
8772
8356
|
this.client,
|
|
8773
|
-
|
|
8774
|
-
|
|
8357
|
+
(tx) => {
|
|
8358
|
+
this.combineOptionsMoveCall(tx, oapp, eid, msgType, extraOptions);
|
|
8775
8359
|
},
|
|
8776
8360
|
(result) => new Uint8Array(bcs.vector(bcs.u8()).parse(result[0].value))
|
|
8777
8361
|
);
|
|
@@ -8784,11 +8368,10 @@ var OApp = class {
|
|
|
8784
8368
|
* @param msgType - Message type or transaction argument
|
|
8785
8369
|
* @returns Transaction result containing enforced options
|
|
8786
8370
|
*/
|
|
8787
|
-
|
|
8788
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8371
|
+
getEnforcedOptionsMoveCall(tx, oapp, eid, msgType) {
|
|
8789
8372
|
return tx.moveCall({
|
|
8790
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8791
|
-
arguments: [asObject(tx,
|
|
8373
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "get_enforced_options"),
|
|
8374
|
+
arguments: [asObject(tx, oapp), asU32(tx, eid), asU16(tx, msgType)]
|
|
8792
8375
|
});
|
|
8793
8376
|
}
|
|
8794
8377
|
/**
|
|
@@ -8798,11 +8381,11 @@ var OApp = class {
|
|
|
8798
8381
|
* @param msgType - Message type
|
|
8799
8382
|
* @returns Promise<Uint8Array> - Enforced options as bytes
|
|
8800
8383
|
*/
|
|
8801
|
-
async getEnforcedOptions(eid, msgType) {
|
|
8384
|
+
async getEnforcedOptions(oapp, eid, msgType) {
|
|
8802
8385
|
return executeSimulate(
|
|
8803
8386
|
this.client,
|
|
8804
|
-
|
|
8805
|
-
|
|
8387
|
+
(tx) => {
|
|
8388
|
+
this.getEnforcedOptionsMoveCall(tx, oapp, eid, msgType);
|
|
8806
8389
|
},
|
|
8807
8390
|
(result) => new Uint8Array(bcs.vector(bcs.u8()).parse(result[0].value))
|
|
8808
8391
|
);
|
|
@@ -8814,11 +8397,10 @@ var OApp = class {
|
|
|
8814
8397
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
8815
8398
|
* @returns Transaction result containing boolean result
|
|
8816
8399
|
*/
|
|
8817
|
-
|
|
8818
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8400
|
+
hasPeerMoveCall(tx, oapp, dstEid) {
|
|
8819
8401
|
return tx.moveCall({
|
|
8820
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8821
|
-
arguments: [asObject(tx,
|
|
8402
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "has_peer"),
|
|
8403
|
+
arguments: [asObject(tx, oapp), asU32(tx, dstEid)]
|
|
8822
8404
|
});
|
|
8823
8405
|
}
|
|
8824
8406
|
/**
|
|
@@ -8827,11 +8409,11 @@ var OApp = class {
|
|
|
8827
8409
|
* @param dstEid - Destination endpoint ID
|
|
8828
8410
|
* @returns Promise<boolean> - True if peer is configured, false otherwise
|
|
8829
8411
|
*/
|
|
8830
|
-
async hasPeer(dstEid) {
|
|
8412
|
+
async hasPeer(oapp, dstEid) {
|
|
8831
8413
|
return executeSimulate(
|
|
8832
8414
|
this.client,
|
|
8833
|
-
|
|
8834
|
-
|
|
8415
|
+
(tx) => {
|
|
8416
|
+
this.hasPeerMoveCall(tx, oapp, dstEid);
|
|
8835
8417
|
},
|
|
8836
8418
|
(result) => bcs.Bool.parse(result[0].value)
|
|
8837
8419
|
);
|
|
@@ -8843,11 +8425,10 @@ var OApp = class {
|
|
|
8843
8425
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
8844
8426
|
* @returns Transaction result containing peer address
|
|
8845
8427
|
*/
|
|
8846
|
-
|
|
8847
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8428
|
+
getPeerMoveCall(tx, oapp, dstEid) {
|
|
8848
8429
|
return tx.moveCall({
|
|
8849
|
-
target: __privateMethod(this, _OApp_instances,
|
|
8850
|
-
arguments: [asObject(tx,
|
|
8430
|
+
target: __privateMethod(this, _OApp_instances, target_fn21).call(this, "get_peer"),
|
|
8431
|
+
arguments: [asObject(tx, oapp), asU32(tx, dstEid)]
|
|
8851
8432
|
});
|
|
8852
8433
|
}
|
|
8853
8434
|
/**
|
|
@@ -8856,333 +8437,27 @@ var OApp = class {
|
|
|
8856
8437
|
* @param dstEid - Destination endpoint ID
|
|
8857
8438
|
* @returns Promise<Uint8Array> - Peer address as bytes32
|
|
8858
8439
|
*/
|
|
8859
|
-
async getPeer(dstEid) {
|
|
8860
|
-
return executeSimulate(
|
|
8861
|
-
this.client,
|
|
8862
|
-
async (tx) => {
|
|
8863
|
-
await this.getPeerMoveCall(tx, dstEid);
|
|
8864
|
-
},
|
|
8865
|
-
(result) => {
|
|
8866
|
-
return new Uint8Array(bcs.vector(bcs.u8()).parse(result[0].value));
|
|
8867
|
-
}
|
|
8868
|
-
);
|
|
8869
|
-
}
|
|
8870
|
-
getOAppInfoV1MoveCall(tx) {
|
|
8871
|
-
const endpoint = this.moduleManager.getEndpoint();
|
|
8872
|
-
const oappInfoRaw = endpoint.getLzReceiveInfoMoveCall(tx, this.oappCallCapId);
|
|
8873
|
-
return tx.moveCall({
|
|
8874
|
-
target: `${this.packageId}::oapp_info_v1::decode`,
|
|
8875
|
-
arguments: [oappInfoRaw]
|
|
8876
|
-
});
|
|
8877
|
-
}
|
|
8878
|
-
async getOAppInfoV1() {
|
|
8440
|
+
async getPeer(oapp, dstEid) {
|
|
8879
8441
|
return executeSimulate(
|
|
8880
8442
|
this.client,
|
|
8881
8443
|
(tx) => {
|
|
8882
|
-
this.
|
|
8444
|
+
this.getPeerMoveCall(tx, oapp, dstEid);
|
|
8883
8445
|
},
|
|
8884
8446
|
(result) => {
|
|
8885
|
-
return
|
|
8447
|
+
return new Uint8Array(bcs.vector(bcs.u8()).parse(result[0].value));
|
|
8886
8448
|
}
|
|
8887
8449
|
);
|
|
8888
8450
|
}
|
|
8889
|
-
// === Endpoint Call Functions ===
|
|
8890
|
-
/**
|
|
8891
|
-
* Register OApp with the endpoint
|
|
8892
|
-
* @param tx - The transaction to add the move call to
|
|
8893
|
-
* @param oappInfo - OApp information as bytes (optional)
|
|
8894
|
-
* @returns Transaction result containing the messaging channel address
|
|
8895
|
-
*/
|
|
8896
|
-
async registerOAppMoveCall(tx, oappInfo) {
|
|
8897
|
-
let oappInfoArg;
|
|
8898
|
-
if (isTransactionArgument(oappInfo)) {
|
|
8899
|
-
oappInfoArg = oappInfo;
|
|
8900
|
-
} else if (oappInfo) {
|
|
8901
|
-
oappInfoArg = tx.pure.option("vector<u8>", Array.from(oappInfo));
|
|
8902
|
-
} else {
|
|
8903
|
-
oappInfoArg = tx.pure.option("vector<u8>", null);
|
|
8904
|
-
}
|
|
8905
|
-
const oappInfoObj = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8906
|
-
const adminCap = await this.getAdminCap(oappInfoObj.oapp_object);
|
|
8907
|
-
return tx.moveCall({
|
|
8908
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "register_oapp", "endpoint_calls"),
|
|
8909
|
-
arguments: [
|
|
8910
|
-
asObject(tx, oappInfoObj.oapp_object),
|
|
8911
|
-
asObject(tx, adminCap),
|
|
8912
|
-
asObject(tx, this.objects.endpointV2),
|
|
8913
|
-
oappInfoArg
|
|
8914
|
-
]
|
|
8915
|
-
});
|
|
8916
|
-
}
|
|
8917
|
-
/**
|
|
8918
|
-
* Set delegate for OApp
|
|
8919
|
-
* @param tx - The transaction to add the move call to
|
|
8920
|
-
* @param newDelegate - New delegate address
|
|
8921
|
-
*/
|
|
8922
|
-
async setDelegateMoveCall(tx, newDelegate) {
|
|
8923
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8924
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8925
|
-
tx.moveCall({
|
|
8926
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_delegate", "endpoint_calls"),
|
|
8927
|
-
arguments: [
|
|
8928
|
-
asObject(tx, oappInfo.oapp_object),
|
|
8929
|
-
asObject(tx, adminCap),
|
|
8930
|
-
asObject(tx, this.objects.endpointV2),
|
|
8931
|
-
asAddress(tx, newDelegate)
|
|
8932
|
-
]
|
|
8933
|
-
});
|
|
8934
|
-
}
|
|
8935
|
-
/**
|
|
8936
|
-
* Set OApp information in the endpoint
|
|
8937
|
-
* @param tx - The transaction to add the move call to
|
|
8938
|
-
* @param oappInfo - OApp information as bytes
|
|
8939
|
-
*/
|
|
8940
|
-
async setOAppInfoMoveCall(tx, oappInfo) {
|
|
8941
|
-
const oappInfoObj = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8942
|
-
const adminCap = await this.getAdminCap(oappInfoObj.oapp_object);
|
|
8943
|
-
tx.moveCall({
|
|
8944
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_oapp_info", "endpoint_calls"),
|
|
8945
|
-
arguments: [
|
|
8946
|
-
asObject(tx, oappInfoObj.oapp_object),
|
|
8947
|
-
asObject(tx, adminCap),
|
|
8948
|
-
asObject(tx, this.objects.endpointV2),
|
|
8949
|
-
asBytes(tx, oappInfo)
|
|
8950
|
-
]
|
|
8951
|
-
});
|
|
8952
|
-
}
|
|
8953
|
-
/**
|
|
8954
|
-
* Initialize channel with remote OApp
|
|
8955
|
-
* @param tx - The transaction to add the move call to
|
|
8956
|
-
* @param remoteEid - Remote endpoint ID
|
|
8957
|
-
* @param remoteOApp - Remote OApp address as bytes32
|
|
8958
|
-
*/
|
|
8959
|
-
async initChannelMoveCall(tx, remoteEid, remoteOApp) {
|
|
8960
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8961
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8962
|
-
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
8963
|
-
tx.moveCall({
|
|
8964
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "init_channel", "endpoint_calls"),
|
|
8965
|
-
arguments: [
|
|
8966
|
-
asObject(tx, oappInfo.oapp_object),
|
|
8967
|
-
asObject(tx, adminCap),
|
|
8968
|
-
asObject(tx, this.objects.endpointV2),
|
|
8969
|
-
asObject(tx, messagingChannel),
|
|
8970
|
-
asU32(tx, remoteEid),
|
|
8971
|
-
asBytes32(tx, remoteOApp, this.moduleManager.getUtils())
|
|
8972
|
-
]
|
|
8973
|
-
});
|
|
8974
|
-
}
|
|
8975
|
-
/**
|
|
8976
|
-
* Clear a message from the messaging channel
|
|
8977
|
-
* @param tx - The transaction to add the move call to
|
|
8978
|
-
* @param srcEid - Source endpoint ID
|
|
8979
|
-
* @param sender - Sender address as bytes32
|
|
8980
|
-
* @param nonce - Message nonce
|
|
8981
|
-
* @param guid - Message GUID as bytes32
|
|
8982
|
-
* @param message - Message payload
|
|
8983
|
-
*/
|
|
8984
|
-
async clearMoveCall(tx, srcEid, sender, nonce, guid, message) {
|
|
8985
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
8986
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
8987
|
-
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
8988
|
-
tx.moveCall({
|
|
8989
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "clear", "endpoint_calls"),
|
|
8990
|
-
arguments: [
|
|
8991
|
-
asObject(tx, oappInfo.oapp_object),
|
|
8992
|
-
asObject(tx, adminCap),
|
|
8993
|
-
asObject(tx, this.objects.endpointV2),
|
|
8994
|
-
asObject(tx, messagingChannel),
|
|
8995
|
-
asU32(tx, srcEid),
|
|
8996
|
-
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
8997
|
-
asU64(tx, nonce),
|
|
8998
|
-
asBytes32(tx, guid, this.moduleManager.getUtils()),
|
|
8999
|
-
asBytes(tx, message)
|
|
9000
|
-
]
|
|
9001
|
-
});
|
|
9002
|
-
}
|
|
9003
|
-
/**
|
|
9004
|
-
* Skip a message in the messaging channel
|
|
9005
|
-
* @param tx - The transaction to add the move call to
|
|
9006
|
-
* @param srcEid - Source endpoint ID
|
|
9007
|
-
* @param sender - Sender address as bytes32
|
|
9008
|
-
* @param nonce - Message nonce
|
|
9009
|
-
*/
|
|
9010
|
-
async skipMoveCall(tx, srcEid, sender, nonce) {
|
|
9011
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9012
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9013
|
-
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
9014
|
-
tx.moveCall({
|
|
9015
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "skip", "endpoint_calls"),
|
|
9016
|
-
arguments: [
|
|
9017
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9018
|
-
asObject(tx, adminCap),
|
|
9019
|
-
asObject(tx, this.objects.endpointV2),
|
|
9020
|
-
asObject(tx, messagingChannel),
|
|
9021
|
-
asU32(tx, srcEid),
|
|
9022
|
-
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
9023
|
-
asU64(tx, nonce)
|
|
9024
|
-
]
|
|
9025
|
-
});
|
|
9026
|
-
}
|
|
9027
|
-
/**
|
|
9028
|
-
* Nilify a message in the messaging channel
|
|
9029
|
-
* @param tx - The transaction to add the move call to
|
|
9030
|
-
* @param srcEid - Source endpoint ID
|
|
9031
|
-
* @param sender - Sender address as bytes32
|
|
9032
|
-
* @param nonce - Message nonce
|
|
9033
|
-
* @param payloadHash - Payload hash as bytes32
|
|
9034
|
-
*/
|
|
9035
|
-
async nilifyMoveCall(tx, srcEid, sender, nonce, payloadHash) {
|
|
9036
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9037
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9038
|
-
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
9039
|
-
tx.moveCall({
|
|
9040
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "nilify", "endpoint_calls"),
|
|
9041
|
-
arguments: [
|
|
9042
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9043
|
-
asObject(tx, adminCap),
|
|
9044
|
-
asObject(tx, this.objects.endpointV2),
|
|
9045
|
-
asObject(tx, messagingChannel),
|
|
9046
|
-
asU32(tx, srcEid),
|
|
9047
|
-
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
9048
|
-
asU64(tx, nonce),
|
|
9049
|
-
asBytes32(tx, payloadHash, this.moduleManager.getUtils())
|
|
9050
|
-
]
|
|
9051
|
-
});
|
|
9052
|
-
}
|
|
9053
|
-
/**
|
|
9054
|
-
* Burn a message in the messaging channel
|
|
9055
|
-
* @param tx - The transaction to add the move call to
|
|
9056
|
-
* @param srcEid - Source endpoint ID
|
|
9057
|
-
* @param sender - Sender address as bytes32
|
|
9058
|
-
* @param nonce - Message nonce
|
|
9059
|
-
* @param payloadHash - Payload hash as bytes32
|
|
9060
|
-
*/
|
|
9061
|
-
async burnMoveCall(tx, srcEid, sender, nonce, payloadHash) {
|
|
9062
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9063
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9064
|
-
const messagingChannel = await this.moduleManager.getEndpoint().getMessagingChannel(this.oappCallCapId);
|
|
9065
|
-
tx.moveCall({
|
|
9066
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "burn", "endpoint_calls"),
|
|
9067
|
-
arguments: [
|
|
9068
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9069
|
-
asObject(tx, adminCap),
|
|
9070
|
-
asObject(tx, this.objects.endpointV2),
|
|
9071
|
-
asObject(tx, messagingChannel),
|
|
9072
|
-
asU32(tx, srcEid),
|
|
9073
|
-
asBytes32(tx, sender, this.moduleManager.getUtils()),
|
|
9074
|
-
asU64(tx, nonce),
|
|
9075
|
-
asBytes32(tx, payloadHash, this.moduleManager.getUtils())
|
|
9076
|
-
]
|
|
9077
|
-
});
|
|
9078
|
-
}
|
|
9079
|
-
/**
|
|
9080
|
-
* Set send library for a destination chain
|
|
9081
|
-
* @param tx - The transaction to add the move call to
|
|
9082
|
-
* @param dstEid - Destination endpoint ID
|
|
9083
|
-
* @param sendLibrary - Send library address
|
|
9084
|
-
*/
|
|
9085
|
-
async setSendLibraryMoveCall(tx, dstEid, sendLibrary) {
|
|
9086
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9087
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9088
|
-
tx.moveCall({
|
|
9089
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_send_library", "endpoint_calls"),
|
|
9090
|
-
arguments: [
|
|
9091
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9092
|
-
asObject(tx, adminCap),
|
|
9093
|
-
asObject(tx, this.objects.endpointV2),
|
|
9094
|
-
asU32(tx, dstEid),
|
|
9095
|
-
asAddress(tx, sendLibrary)
|
|
9096
|
-
]
|
|
9097
|
-
});
|
|
9098
|
-
}
|
|
9099
|
-
/**
|
|
9100
|
-
* Set receive library for a source chain
|
|
9101
|
-
* @param tx - The transaction to add the move call to
|
|
9102
|
-
* @param srcEid - Source endpoint ID
|
|
9103
|
-
* @param receiveLibrary - Receive library address
|
|
9104
|
-
* @param gracePeriod - Grace period in seconds
|
|
9105
|
-
*/
|
|
9106
|
-
async setReceiveLibraryMoveCall(tx, srcEid, receiveLibrary, gracePeriod) {
|
|
9107
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9108
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9109
|
-
tx.moveCall({
|
|
9110
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_receive_library", "endpoint_calls"),
|
|
9111
|
-
arguments: [
|
|
9112
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9113
|
-
asObject(tx, adminCap),
|
|
9114
|
-
asObject(tx, this.objects.endpointV2),
|
|
9115
|
-
asU32(tx, srcEid),
|
|
9116
|
-
asAddress(tx, receiveLibrary),
|
|
9117
|
-
asU64(tx, gracePeriod),
|
|
9118
|
-
tx.object.clock()
|
|
9119
|
-
]
|
|
9120
|
-
});
|
|
9121
|
-
}
|
|
9122
|
-
/**
|
|
9123
|
-
* Set receive library timeout for a source chain
|
|
9124
|
-
* @param tx - The transaction to add the move call to
|
|
9125
|
-
* @param srcEid - Source endpoint ID
|
|
9126
|
-
* @param receiveLibrary - Receive library address
|
|
9127
|
-
* @param expiry - Expiry timestamp in seconds
|
|
9128
|
-
*/
|
|
9129
|
-
async setReceiveLibraryTimeoutMoveCall(tx, srcEid, receiveLibrary, expiry) {
|
|
9130
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9131
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9132
|
-
tx.moveCall({
|
|
9133
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_receive_library_timeout", "endpoint_calls"),
|
|
9134
|
-
arguments: [
|
|
9135
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9136
|
-
asObject(tx, adminCap),
|
|
9137
|
-
asObject(tx, this.objects.endpointV2),
|
|
9138
|
-
asU32(tx, srcEid),
|
|
9139
|
-
asAddress(tx, receiveLibrary),
|
|
9140
|
-
asU64(tx, expiry),
|
|
9141
|
-
tx.object.clock()
|
|
9142
|
-
]
|
|
9143
|
-
});
|
|
9144
|
-
}
|
|
9145
|
-
/**
|
|
9146
|
-
* Set configuration for a message library
|
|
9147
|
-
* @param tx - The transaction to add the move call to
|
|
9148
|
-
* @param lib - Library address
|
|
9149
|
-
* @param eid - Endpoint ID
|
|
9150
|
-
* @param configType - Configuration type
|
|
9151
|
-
* @param config - Configuration data as bytes
|
|
9152
|
-
* @returns Transaction result containing Call<MessageLibSetConfigParam, Void>
|
|
9153
|
-
*/
|
|
9154
|
-
async setConfigMoveCall(tx, lib, eid, configType, config) {
|
|
9155
|
-
const oappInfo = await __privateMethod(this, _OApp_instances, oappInfo_fn).call(this);
|
|
9156
|
-
const adminCap = await this.getAdminCap(oappInfo.oapp_object);
|
|
9157
|
-
return tx.moveCall({
|
|
9158
|
-
target: __privateMethod(this, _OApp_instances, target_fn22).call(this, "set_config", "endpoint_calls"),
|
|
9159
|
-
typeArguments: [],
|
|
9160
|
-
arguments: [
|
|
9161
|
-
asObject(tx, oappInfo.oapp_object),
|
|
9162
|
-
asObject(tx, adminCap),
|
|
9163
|
-
asObject(tx, this.objects.endpointV2),
|
|
9164
|
-
asAddress(tx, lib),
|
|
9165
|
-
asU32(tx, eid),
|
|
9166
|
-
asU32(tx, configType),
|
|
9167
|
-
asBytes(tx, config)
|
|
9168
|
-
]
|
|
9169
|
-
});
|
|
9170
|
-
}
|
|
9171
8451
|
};
|
|
9172
8452
|
_OApp_instances = new WeakSet();
|
|
9173
|
-
|
|
9174
|
-
if (!this.oappInfo) {
|
|
9175
|
-
this.oappInfo = await this.getOAppInfoV1();
|
|
9176
|
-
}
|
|
9177
|
-
return this.oappInfo;
|
|
9178
|
-
};
|
|
8453
|
+
// === Private Functions ===
|
|
9179
8454
|
/**
|
|
9180
8455
|
* Generate the full target path for move calls
|
|
9181
8456
|
* @param name - The function name to call
|
|
9182
8457
|
* @returns The full module path for the move call
|
|
9183
8458
|
* @private
|
|
9184
8459
|
*/
|
|
9185
|
-
|
|
8460
|
+
target_fn21 = function(name, module_name = MODULE_NAME20) {
|
|
9186
8461
|
return `${this.packageId}::${module_name}::${name}`;
|
|
9187
8462
|
};
|
|
9188
8463
|
var MODULE_NAME_ENDPOINT_VIEWS = "endpoint_views";
|
|
@@ -9351,24 +8626,16 @@ uln302ViewsTarget_fn = function(functionName) {
|
|
|
9351
8626
|
};
|
|
9352
8627
|
var DEFAULT_MODULE_NAME = "call";
|
|
9353
8628
|
var CallErrorCode = {
|
|
9354
|
-
// Call related errors (
|
|
9355
|
-
|
|
8629
|
+
// Call related errors (with Call_ prefix)
|
|
8630
|
+
Call_ECallNotCompletable: 1,
|
|
9356
8631
|
Call_ECallNotCompleted: 2,
|
|
9357
|
-
|
|
8632
|
+
Call_ECallNotSealed: 3,
|
|
9358
8633
|
Call_ECallNotRoot: 4,
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
Call_EUnauthorized: 10,
|
|
9365
|
-
// CallCap related errors (matching call_cap.move)
|
|
9366
|
-
CallCap_EBadWitness: 1,
|
|
9367
|
-
// MultiCall related errors (matching multi_call.move)
|
|
9368
|
-
MultiCall_ECalleeNotFound: 1,
|
|
9369
|
-
MultiCall_EUnauthorized: 2
|
|
9370
|
-
};
|
|
9371
|
-
var _Call_instances, target_fn23;
|
|
8634
|
+
Call_ECallSealed: 5,
|
|
8635
|
+
Call_EInvalidParent: 6,
|
|
8636
|
+
Call_EUnauthorized: 7
|
|
8637
|
+
};
|
|
8638
|
+
var _Call_instances, target_fn22;
|
|
9372
8639
|
var Call = class {
|
|
9373
8640
|
constructor(packageId, client) {
|
|
9374
8641
|
__privateAdd(this, _Call_instances);
|
|
@@ -9384,7 +8651,7 @@ var Call = class {
|
|
|
9384
8651
|
*/
|
|
9385
8652
|
newIndividualCapMoveCall(tx) {
|
|
9386
8653
|
return tx.moveCall({
|
|
9387
|
-
target: __privateMethod(this, _Call_instances,
|
|
8654
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "new_individual_cap", "call_cap"),
|
|
9388
8655
|
arguments: []
|
|
9389
8656
|
});
|
|
9390
8657
|
}
|
|
@@ -9395,7 +8662,7 @@ var Call = class {
|
|
|
9395
8662
|
*/
|
|
9396
8663
|
voidMoveCall(tx) {
|
|
9397
8664
|
return tx.moveCall({
|
|
9398
|
-
target: __privateMethod(this, _Call_instances,
|
|
8665
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "void"),
|
|
9399
8666
|
arguments: []
|
|
9400
8667
|
});
|
|
9401
8668
|
}
|
|
@@ -9410,7 +8677,7 @@ var Call = class {
|
|
|
9410
8677
|
*/
|
|
9411
8678
|
resultMoveCall(tx, paramType, resultType, call) {
|
|
9412
8679
|
return tx.moveCall({
|
|
9413
|
-
target: __privateMethod(this, _Call_instances,
|
|
8680
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "result"),
|
|
9414
8681
|
typeArguments: [paramType, resultType],
|
|
9415
8682
|
arguments: [call]
|
|
9416
8683
|
});
|
|
@@ -9425,7 +8692,7 @@ var Call = class {
|
|
|
9425
8692
|
*/
|
|
9426
8693
|
recipientMoveCall(tx, paramType, resultType, call) {
|
|
9427
8694
|
return tx.moveCall({
|
|
9428
|
-
target: __privateMethod(this, _Call_instances,
|
|
8695
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "recipient"),
|
|
9429
8696
|
typeArguments: [paramType, resultType],
|
|
9430
8697
|
arguments: [call]
|
|
9431
8698
|
});
|
|
@@ -9439,7 +8706,7 @@ var Call = class {
|
|
|
9439
8706
|
*/
|
|
9440
8707
|
callCapIdMoveCall(tx, callCap) {
|
|
9441
8708
|
return tx.moveCall({
|
|
9442
|
-
target: __privateMethod(this, _Call_instances,
|
|
8709
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "id", "call_cap"),
|
|
9443
8710
|
arguments: [asObject(tx, callCap)]
|
|
9444
8711
|
});
|
|
9445
8712
|
}
|
|
@@ -9466,7 +8733,7 @@ var Call = class {
|
|
|
9466
8733
|
*/
|
|
9467
8734
|
isIndividualCapMoveCall(tx, callCap) {
|
|
9468
8735
|
return tx.moveCall({
|
|
9469
|
-
target: __privateMethod(this, _Call_instances,
|
|
8736
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "is_individual", "call_cap"),
|
|
9470
8737
|
arguments: [asObject(tx, callCap)]
|
|
9471
8738
|
});
|
|
9472
8739
|
}
|
|
@@ -9492,7 +8759,7 @@ var Call = class {
|
|
|
9492
8759
|
*/
|
|
9493
8760
|
isPackageCapMoveCall(tx, callCap) {
|
|
9494
8761
|
return tx.moveCall({
|
|
9495
|
-
target: __privateMethod(this, _Call_instances,
|
|
8762
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "is_package", "call_cap"),
|
|
9496
8763
|
arguments: [asObject(tx, callCap)]
|
|
9497
8764
|
});
|
|
9498
8765
|
}
|
|
@@ -9519,7 +8786,7 @@ var Call = class {
|
|
|
9519
8786
|
*/
|
|
9520
8787
|
packageAddressMoveCall(tx, callCap) {
|
|
9521
8788
|
return tx.moveCall({
|
|
9522
|
-
target: __privateMethod(this, _Call_instances,
|
|
8789
|
+
target: __privateMethod(this, _Call_instances, target_fn22).call(this, "package_address", "call_cap"),
|
|
9523
8790
|
arguments: [asObject(tx, callCap)]
|
|
9524
8791
|
});
|
|
9525
8792
|
}
|
|
@@ -9554,7 +8821,7 @@ _Call_instances = new WeakSet();
|
|
|
9554
8821
|
* @returns The full module path for the move call
|
|
9555
8822
|
* @private
|
|
9556
8823
|
*/
|
|
9557
|
-
|
|
8824
|
+
target_fn22 = function(name, module_name = DEFAULT_MODULE_NAME) {
|
|
9558
8825
|
return `${this.packageId}::${module_name}::${name}`;
|
|
9559
8826
|
};
|
|
9560
8827
|
|
|
@@ -9567,7 +8834,7 @@ var UtilsErrorCode = {
|
|
|
9567
8834
|
// Utils related errors (with Utils_ prefix)
|
|
9568
8835
|
Utils_EInvalidLength: 1
|
|
9569
8836
|
};
|
|
9570
|
-
var _Utils_instances,
|
|
8837
|
+
var _Utils_instances, target_fn23, destroyZeroCoin_fn, fetchSufficientCoins_fn;
|
|
9571
8838
|
var Utils = class {
|
|
9572
8839
|
constructor(packageId, client) {
|
|
9573
8840
|
__privateAdd(this, _Utils_instances);
|
|
@@ -9583,7 +8850,7 @@ var Utils = class {
|
|
|
9583
8850
|
*/
|
|
9584
8851
|
fromBytesMoveCall(tx, peer) {
|
|
9585
8852
|
return tx.moveCall({
|
|
9586
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8853
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "from_bytes"),
|
|
9587
8854
|
arguments: [asBytes(tx, peer)]
|
|
9588
8855
|
});
|
|
9589
8856
|
}
|
|
@@ -9595,7 +8862,7 @@ var Utils = class {
|
|
|
9595
8862
|
*/
|
|
9596
8863
|
fromBytesLeftPaddedMoveCall(tx, bytes) {
|
|
9597
8864
|
return tx.moveCall({
|
|
9598
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8865
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "from_bytes_left_padded"),
|
|
9599
8866
|
arguments: [asBytes(tx, bytes)]
|
|
9600
8867
|
});
|
|
9601
8868
|
}
|
|
@@ -9607,7 +8874,7 @@ var Utils = class {
|
|
|
9607
8874
|
*/
|
|
9608
8875
|
fromBytesRightPaddedMoveCall(tx, bytes) {
|
|
9609
8876
|
return tx.moveCall({
|
|
9610
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8877
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "from_bytes_right_padded"),
|
|
9611
8878
|
arguments: [asBytes(tx, bytes)]
|
|
9612
8879
|
});
|
|
9613
8880
|
}
|
|
@@ -9619,7 +8886,7 @@ var Utils = class {
|
|
|
9619
8886
|
*/
|
|
9620
8887
|
fromAddressMoveCall(tx, address) {
|
|
9621
8888
|
return tx.moveCall({
|
|
9622
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8889
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "from_address"),
|
|
9623
8890
|
arguments: [asAddress(tx, address)]
|
|
9624
8891
|
});
|
|
9625
8892
|
}
|
|
@@ -9631,7 +8898,7 @@ var Utils = class {
|
|
|
9631
8898
|
*/
|
|
9632
8899
|
fromIdMoveCall(tx, id) {
|
|
9633
8900
|
return tx.moveCall({
|
|
9634
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8901
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "from_id"),
|
|
9635
8902
|
arguments: [asObject(tx, id)]
|
|
9636
8903
|
});
|
|
9637
8904
|
}
|
|
@@ -9642,7 +8909,7 @@ var Utils = class {
|
|
|
9642
8909
|
*/
|
|
9643
8910
|
zeroBytes32MoveCall(tx) {
|
|
9644
8911
|
return tx.moveCall({
|
|
9645
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8912
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "zero_bytes32")
|
|
9646
8913
|
});
|
|
9647
8914
|
}
|
|
9648
8915
|
/**
|
|
@@ -9652,7 +8919,7 @@ var Utils = class {
|
|
|
9652
8919
|
*/
|
|
9653
8920
|
ffBytes32MoveCall(tx) {
|
|
9654
8921
|
return tx.moveCall({
|
|
9655
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8922
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "ff_bytes32")
|
|
9656
8923
|
});
|
|
9657
8924
|
}
|
|
9658
8925
|
/**
|
|
@@ -9663,7 +8930,7 @@ var Utils = class {
|
|
|
9663
8930
|
*/
|
|
9664
8931
|
isZeroMoveCall(tx, bytes32) {
|
|
9665
8932
|
return tx.moveCall({
|
|
9666
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8933
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "is_zero"),
|
|
9667
8934
|
arguments: [bytes32]
|
|
9668
8935
|
});
|
|
9669
8936
|
}
|
|
@@ -9675,7 +8942,7 @@ var Utils = class {
|
|
|
9675
8942
|
*/
|
|
9676
8943
|
isFfMoveCall(tx, bytes32) {
|
|
9677
8944
|
return tx.moveCall({
|
|
9678
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8945
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "is_ff"),
|
|
9679
8946
|
arguments: [bytes32]
|
|
9680
8947
|
});
|
|
9681
8948
|
}
|
|
@@ -9687,7 +8954,7 @@ var Utils = class {
|
|
|
9687
8954
|
*/
|
|
9688
8955
|
toBytesMoveCall(tx, bytes32) {
|
|
9689
8956
|
return tx.moveCall({
|
|
9690
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8957
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "to_bytes"),
|
|
9691
8958
|
arguments: [bytes32]
|
|
9692
8959
|
});
|
|
9693
8960
|
}
|
|
@@ -9699,7 +8966,7 @@ var Utils = class {
|
|
|
9699
8966
|
*/
|
|
9700
8967
|
toAddressMoveCall(tx, bytes32) {
|
|
9701
8968
|
return tx.moveCall({
|
|
9702
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8969
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "to_address"),
|
|
9703
8970
|
arguments: [bytes32]
|
|
9704
8971
|
});
|
|
9705
8972
|
}
|
|
@@ -9711,7 +8978,7 @@ var Utils = class {
|
|
|
9711
8978
|
*/
|
|
9712
8979
|
toIdMoveCall(tx, bytes32) {
|
|
9713
8980
|
return tx.moveCall({
|
|
9714
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8981
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "to_id"),
|
|
9715
8982
|
arguments: [bytes32]
|
|
9716
8983
|
});
|
|
9717
8984
|
}
|
|
@@ -9724,7 +8991,7 @@ var Utils = class {
|
|
|
9724
8991
|
*/
|
|
9725
8992
|
newReaderMoveCall(tx, buffer) {
|
|
9726
8993
|
return tx.moveCall({
|
|
9727
|
-
target: __privateMethod(this, _Utils_instances,
|
|
8994
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "create", BUFFER_READER_MODULE_NAME),
|
|
9728
8995
|
arguments: [asBytes(tx, buffer)]
|
|
9729
8996
|
});
|
|
9730
8997
|
}
|
|
@@ -9736,7 +9003,7 @@ var Utils = class {
|
|
|
9736
9003
|
*/
|
|
9737
9004
|
positionMoveCall(tx, reader) {
|
|
9738
9005
|
return tx.moveCall({
|
|
9739
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9006
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "position", BUFFER_READER_MODULE_NAME),
|
|
9740
9007
|
arguments: [reader]
|
|
9741
9008
|
});
|
|
9742
9009
|
}
|
|
@@ -9748,7 +9015,7 @@ var Utils = class {
|
|
|
9748
9015
|
*/
|
|
9749
9016
|
remainingLengthMoveCall(tx, reader) {
|
|
9750
9017
|
return tx.moveCall({
|
|
9751
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9018
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "remaining_length", BUFFER_READER_MODULE_NAME),
|
|
9752
9019
|
arguments: [reader]
|
|
9753
9020
|
});
|
|
9754
9021
|
}
|
|
@@ -9761,7 +9028,7 @@ var Utils = class {
|
|
|
9761
9028
|
*/
|
|
9762
9029
|
skipMoveCall(tx, reader, len) {
|
|
9763
9030
|
return tx.moveCall({
|
|
9764
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9031
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "skip", BUFFER_READER_MODULE_NAME),
|
|
9765
9032
|
arguments: [reader, asU64(tx, len)]
|
|
9766
9033
|
});
|
|
9767
9034
|
}
|
|
@@ -9774,7 +9041,7 @@ var Utils = class {
|
|
|
9774
9041
|
*/
|
|
9775
9042
|
setPositionMoveCall(tx, reader, position) {
|
|
9776
9043
|
return tx.moveCall({
|
|
9777
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9044
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "set_position", BUFFER_READER_MODULE_NAME),
|
|
9778
9045
|
arguments: [reader, asU64(tx, position)]
|
|
9779
9046
|
});
|
|
9780
9047
|
}
|
|
@@ -9787,7 +9054,7 @@ var Utils = class {
|
|
|
9787
9054
|
*/
|
|
9788
9055
|
rewindMoveCall(tx, reader, len) {
|
|
9789
9056
|
return tx.moveCall({
|
|
9790
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9057
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "rewind", BUFFER_READER_MODULE_NAME),
|
|
9791
9058
|
arguments: [reader, asU64(tx, len)]
|
|
9792
9059
|
});
|
|
9793
9060
|
}
|
|
@@ -9799,7 +9066,7 @@ var Utils = class {
|
|
|
9799
9066
|
*/
|
|
9800
9067
|
readBoolMoveCall(tx, reader) {
|
|
9801
9068
|
return tx.moveCall({
|
|
9802
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9069
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_bool", BUFFER_READER_MODULE_NAME),
|
|
9803
9070
|
arguments: [reader]
|
|
9804
9071
|
});
|
|
9805
9072
|
}
|
|
@@ -9811,7 +9078,7 @@ var Utils = class {
|
|
|
9811
9078
|
*/
|
|
9812
9079
|
readU8MoveCall(tx, reader) {
|
|
9813
9080
|
return tx.moveCall({
|
|
9814
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9081
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_u8", BUFFER_READER_MODULE_NAME),
|
|
9815
9082
|
arguments: [reader]
|
|
9816
9083
|
});
|
|
9817
9084
|
}
|
|
@@ -9823,7 +9090,7 @@ var Utils = class {
|
|
|
9823
9090
|
*/
|
|
9824
9091
|
readU16MoveCall(tx, reader) {
|
|
9825
9092
|
return tx.moveCall({
|
|
9826
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9093
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_u16", BUFFER_READER_MODULE_NAME),
|
|
9827
9094
|
arguments: [reader]
|
|
9828
9095
|
});
|
|
9829
9096
|
}
|
|
@@ -9835,7 +9102,7 @@ var Utils = class {
|
|
|
9835
9102
|
*/
|
|
9836
9103
|
readU32MoveCall(tx, reader) {
|
|
9837
9104
|
return tx.moveCall({
|
|
9838
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9105
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_u32", BUFFER_READER_MODULE_NAME),
|
|
9839
9106
|
arguments: [reader]
|
|
9840
9107
|
});
|
|
9841
9108
|
}
|
|
@@ -9847,7 +9114,7 @@ var Utils = class {
|
|
|
9847
9114
|
*/
|
|
9848
9115
|
readU64MoveCall(tx, reader) {
|
|
9849
9116
|
return tx.moveCall({
|
|
9850
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9117
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_u64", BUFFER_READER_MODULE_NAME),
|
|
9851
9118
|
arguments: [reader]
|
|
9852
9119
|
});
|
|
9853
9120
|
}
|
|
@@ -9859,7 +9126,7 @@ var Utils = class {
|
|
|
9859
9126
|
*/
|
|
9860
9127
|
readU128MoveCall(tx, reader) {
|
|
9861
9128
|
return tx.moveCall({
|
|
9862
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9129
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_u128", BUFFER_READER_MODULE_NAME),
|
|
9863
9130
|
arguments: [reader]
|
|
9864
9131
|
});
|
|
9865
9132
|
}
|
|
@@ -9871,7 +9138,7 @@ var Utils = class {
|
|
|
9871
9138
|
*/
|
|
9872
9139
|
readU256MoveCall(tx, reader) {
|
|
9873
9140
|
return tx.moveCall({
|
|
9874
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9141
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_u256", BUFFER_READER_MODULE_NAME),
|
|
9875
9142
|
arguments: [reader]
|
|
9876
9143
|
});
|
|
9877
9144
|
}
|
|
@@ -9883,7 +9150,7 @@ var Utils = class {
|
|
|
9883
9150
|
*/
|
|
9884
9151
|
readBytes32MoveCall(tx, reader) {
|
|
9885
9152
|
return tx.moveCall({
|
|
9886
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9153
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_bytes32", BUFFER_READER_MODULE_NAME),
|
|
9887
9154
|
arguments: [reader]
|
|
9888
9155
|
});
|
|
9889
9156
|
}
|
|
@@ -9895,7 +9162,7 @@ var Utils = class {
|
|
|
9895
9162
|
*/
|
|
9896
9163
|
readAddressMoveCall(tx, reader) {
|
|
9897
9164
|
return tx.moveCall({
|
|
9898
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9165
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_address", BUFFER_READER_MODULE_NAME),
|
|
9899
9166
|
arguments: [reader]
|
|
9900
9167
|
});
|
|
9901
9168
|
}
|
|
@@ -9908,7 +9175,7 @@ var Utils = class {
|
|
|
9908
9175
|
*/
|
|
9909
9176
|
readFixedLenBytesMoveCall(tx, reader, len) {
|
|
9910
9177
|
return tx.moveCall({
|
|
9911
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9178
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_fixed_len_bytes", BUFFER_READER_MODULE_NAME),
|
|
9912
9179
|
arguments: [reader, asU64(tx, len)]
|
|
9913
9180
|
});
|
|
9914
9181
|
}
|
|
@@ -9920,7 +9187,7 @@ var Utils = class {
|
|
|
9920
9187
|
*/
|
|
9921
9188
|
readBytesUntilEndMoveCall(tx, reader) {
|
|
9922
9189
|
return tx.moveCall({
|
|
9923
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9190
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "read_bytes_until_end", BUFFER_READER_MODULE_NAME),
|
|
9924
9191
|
arguments: [reader]
|
|
9925
9192
|
});
|
|
9926
9193
|
}
|
|
@@ -9932,7 +9199,7 @@ var Utils = class {
|
|
|
9932
9199
|
*/
|
|
9933
9200
|
readerBufferLengthMoveCall(tx, reader) {
|
|
9934
9201
|
return tx.moveCall({
|
|
9935
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9202
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "length", BUFFER_READER_MODULE_NAME),
|
|
9936
9203
|
arguments: [reader]
|
|
9937
9204
|
});
|
|
9938
9205
|
}
|
|
@@ -9944,7 +9211,7 @@ var Utils = class {
|
|
|
9944
9211
|
*/
|
|
9945
9212
|
readerToBytesMoveCall(tx, reader) {
|
|
9946
9213
|
return tx.moveCall({
|
|
9947
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9214
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "to_bytes", BUFFER_READER_MODULE_NAME),
|
|
9948
9215
|
arguments: [reader]
|
|
9949
9216
|
});
|
|
9950
9217
|
}
|
|
@@ -9956,7 +9223,7 @@ var Utils = class {
|
|
|
9956
9223
|
*/
|
|
9957
9224
|
newWriterMoveCall(tx) {
|
|
9958
9225
|
return tx.moveCall({
|
|
9959
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9226
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "new", BUFFER_WRITER_MODULE_NAME)
|
|
9960
9227
|
});
|
|
9961
9228
|
}
|
|
9962
9229
|
/**
|
|
@@ -9967,7 +9234,7 @@ var Utils = class {
|
|
|
9967
9234
|
*/
|
|
9968
9235
|
createWriterMoveCall(tx, buffer) {
|
|
9969
9236
|
return tx.moveCall({
|
|
9970
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9237
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "create", BUFFER_WRITER_MODULE_NAME),
|
|
9971
9238
|
arguments: [asBytes(tx, buffer)]
|
|
9972
9239
|
});
|
|
9973
9240
|
}
|
|
@@ -9979,7 +9246,7 @@ var Utils = class {
|
|
|
9979
9246
|
*/
|
|
9980
9247
|
writerBufferLengthMoveCall(tx, writer) {
|
|
9981
9248
|
return tx.moveCall({
|
|
9982
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9249
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "length", BUFFER_WRITER_MODULE_NAME),
|
|
9983
9250
|
arguments: [writer]
|
|
9984
9251
|
});
|
|
9985
9252
|
}
|
|
@@ -9991,7 +9258,7 @@ var Utils = class {
|
|
|
9991
9258
|
*/
|
|
9992
9259
|
writerToBytesMoveCall(tx, writer) {
|
|
9993
9260
|
return tx.moveCall({
|
|
9994
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9261
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "to_bytes", BUFFER_WRITER_MODULE_NAME),
|
|
9995
9262
|
arguments: [writer]
|
|
9996
9263
|
});
|
|
9997
9264
|
}
|
|
@@ -10004,7 +9271,7 @@ var Utils = class {
|
|
|
10004
9271
|
*/
|
|
10005
9272
|
writeBoolMoveCall(tx, writer, value) {
|
|
10006
9273
|
return tx.moveCall({
|
|
10007
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9274
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_bool", BUFFER_WRITER_MODULE_NAME),
|
|
10008
9275
|
arguments: [writer, asBool(tx, value)]
|
|
10009
9276
|
});
|
|
10010
9277
|
}
|
|
@@ -10017,7 +9284,7 @@ var Utils = class {
|
|
|
10017
9284
|
*/
|
|
10018
9285
|
writeU8MoveCall(tx, writer, value) {
|
|
10019
9286
|
return tx.moveCall({
|
|
10020
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9287
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_u8", BUFFER_WRITER_MODULE_NAME),
|
|
10021
9288
|
arguments: [writer, asU8(tx, value)]
|
|
10022
9289
|
});
|
|
10023
9290
|
}
|
|
@@ -10030,7 +9297,7 @@ var Utils = class {
|
|
|
10030
9297
|
*/
|
|
10031
9298
|
writeU16MoveCall(tx, writer, value) {
|
|
10032
9299
|
return tx.moveCall({
|
|
10033
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9300
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_u16", BUFFER_WRITER_MODULE_NAME),
|
|
10034
9301
|
arguments: [writer, asU16(tx, value)]
|
|
10035
9302
|
});
|
|
10036
9303
|
}
|
|
@@ -10043,7 +9310,7 @@ var Utils = class {
|
|
|
10043
9310
|
*/
|
|
10044
9311
|
writeU32MoveCall(tx, writer, value) {
|
|
10045
9312
|
return tx.moveCall({
|
|
10046
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9313
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_u32", BUFFER_WRITER_MODULE_NAME),
|
|
10047
9314
|
arguments: [writer, asU32(tx, value)]
|
|
10048
9315
|
});
|
|
10049
9316
|
}
|
|
@@ -10056,7 +9323,7 @@ var Utils = class {
|
|
|
10056
9323
|
*/
|
|
10057
9324
|
writeU64MoveCall(tx, writer, value) {
|
|
10058
9325
|
return tx.moveCall({
|
|
10059
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9326
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_u64", BUFFER_WRITER_MODULE_NAME),
|
|
10060
9327
|
arguments: [writer, asU64(tx, value)]
|
|
10061
9328
|
});
|
|
10062
9329
|
}
|
|
@@ -10069,7 +9336,7 @@ var Utils = class {
|
|
|
10069
9336
|
*/
|
|
10070
9337
|
writeU128MoveCall(tx, writer, value) {
|
|
10071
9338
|
return tx.moveCall({
|
|
10072
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9339
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_u128", BUFFER_WRITER_MODULE_NAME),
|
|
10073
9340
|
arguments: [writer, asU128(tx, value)]
|
|
10074
9341
|
});
|
|
10075
9342
|
}
|
|
@@ -10082,7 +9349,7 @@ var Utils = class {
|
|
|
10082
9349
|
*/
|
|
10083
9350
|
writeU256MoveCall(tx, writer, value) {
|
|
10084
9351
|
return tx.moveCall({
|
|
10085
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9352
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_u256", BUFFER_WRITER_MODULE_NAME),
|
|
10086
9353
|
arguments: [writer, asU256(tx, value)]
|
|
10087
9354
|
});
|
|
10088
9355
|
}
|
|
@@ -10095,7 +9362,7 @@ var Utils = class {
|
|
|
10095
9362
|
*/
|
|
10096
9363
|
writeBytesMoveCall(tx, writer, bytes) {
|
|
10097
9364
|
return tx.moveCall({
|
|
10098
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9365
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_bytes", BUFFER_WRITER_MODULE_NAME),
|
|
10099
9366
|
arguments: [writer, asBytes(tx, bytes)]
|
|
10100
9367
|
});
|
|
10101
9368
|
}
|
|
@@ -10108,7 +9375,7 @@ var Utils = class {
|
|
|
10108
9375
|
*/
|
|
10109
9376
|
writeAddressMoveCall(tx, writer, address) {
|
|
10110
9377
|
return tx.moveCall({
|
|
10111
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9378
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_address", BUFFER_WRITER_MODULE_NAME),
|
|
10112
9379
|
arguments: [writer, asAddress(tx, address)]
|
|
10113
9380
|
});
|
|
10114
9381
|
}
|
|
@@ -10121,7 +9388,7 @@ var Utils = class {
|
|
|
10121
9388
|
*/
|
|
10122
9389
|
writeBytes32MoveCall(tx, writer, bytes32) {
|
|
10123
9390
|
return tx.moveCall({
|
|
10124
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9391
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "write_bytes32", BUFFER_WRITER_MODULE_NAME),
|
|
10125
9392
|
arguments: [writer, asBytes32(tx, bytes32, this)]
|
|
10126
9393
|
});
|
|
10127
9394
|
}
|
|
@@ -10134,7 +9401,7 @@ var Utils = class {
|
|
|
10134
9401
|
*/
|
|
10135
9402
|
originalPackageOfTypeMoveCall(tx, typeArgument) {
|
|
10136
9403
|
return tx.moveCall({
|
|
10137
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9404
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "original_package_of_type", PACKAGE_MODULE_NAME),
|
|
10138
9405
|
typeArguments: [typeArgument]
|
|
10139
9406
|
});
|
|
10140
9407
|
}
|
|
@@ -10146,7 +9413,7 @@ var Utils = class {
|
|
|
10146
9413
|
*/
|
|
10147
9414
|
packageOfTypeMoveCall(tx, typeArgument) {
|
|
10148
9415
|
return tx.moveCall({
|
|
10149
|
-
target: __privateMethod(this, _Utils_instances,
|
|
9416
|
+
target: __privateMethod(this, _Utils_instances, target_fn23).call(this, "package_of_type", PACKAGE_MODULE_NAME),
|
|
10150
9417
|
typeArguments: [typeArgument]
|
|
10151
9418
|
});
|
|
10152
9419
|
}
|
|
@@ -10247,7 +9514,7 @@ _Utils_instances = new WeakSet();
|
|
|
10247
9514
|
* @returns The full module path for the move call
|
|
10248
9515
|
* @private
|
|
10249
9516
|
*/
|
|
10250
|
-
|
|
9517
|
+
target_fn23 = function(name, module_name = BYTES32_MODULE_NAME) {
|
|
10251
9518
|
return `${this.packageId}::${module_name}::${name}`;
|
|
10252
9519
|
};
|
|
10253
9520
|
/**
|
|
@@ -10463,7 +9730,8 @@ var ModuleManager = class {
|
|
|
10463
9730
|
["call" /* Call */]: new Call(packages.call, client),
|
|
10464
9731
|
["treasury" /* Treasury */]: new Treasury(packages.treasury, client, objects, this),
|
|
10465
9732
|
["layerZeroViews" /* LayerZeroViews */]: new LayerZeroViews(packages.layerzeroViews, client, objects, this),
|
|
10466
|
-
["ptbBuilder" /* PtbBuilder */]: new PtbBuilder(packages.ptbMoveCall, client)
|
|
9733
|
+
["ptbBuilder" /* PtbBuilder */]: new PtbBuilder(packages.ptbMoveCall, client),
|
|
9734
|
+
["oapp" /* Oapp */]: new OApp(packages.oapp, client, objects, this)
|
|
10467
9735
|
});
|
|
10468
9736
|
}
|
|
10469
9737
|
// === Core Module Getters ===
|
|
@@ -10497,12 +9765,8 @@ var ModuleManager = class {
|
|
|
10497
9765
|
getPtbBuilder() {
|
|
10498
9766
|
return this.getModule("ptbBuilder" /* PtbBuilder */);
|
|
10499
9767
|
}
|
|
10500
|
-
getOApp(
|
|
10501
|
-
return this.
|
|
10502
|
-
const packageId = options?.packageId ?? this.packages.oapp;
|
|
10503
|
-
const objects = this.mergeObjectsOptions(options);
|
|
10504
|
-
return new OApp(packageId, callCapId, client, objects, this);
|
|
10505
|
-
});
|
|
9768
|
+
getOApp() {
|
|
9769
|
+
return this.getModule("oapp" /* Oapp */);
|
|
10506
9770
|
}
|
|
10507
9771
|
// === Non-core Module Getters (created on-demand with caching) ===
|
|
10508
9772
|
getCounter(client, options) {
|
|
@@ -10608,13 +9872,6 @@ var ModuleManager = class {
|
|
|
10608
9872
|
return new BlockedMessageLibPtbBuilder(packageId, client, objects, this);
|
|
10609
9873
|
});
|
|
10610
9874
|
}
|
|
10611
|
-
getWorkerRegistry(client, options) {
|
|
10612
|
-
return this.getOrCreateModule("workerRegistry" /* WorkerRegistry */, options, () => {
|
|
10613
|
-
const packageId = options?.packageId ?? this.packages.workerRegistry;
|
|
10614
|
-
const objects = this.mergeObjectsOptions(options);
|
|
10615
|
-
return new WorkerRegistry(packageId, client, objects, this);
|
|
10616
|
-
});
|
|
10617
|
-
}
|
|
10618
9875
|
// === Private Utility Methods ===
|
|
10619
9876
|
/**
|
|
10620
9877
|
* Merge objects configuration with options, avoiding unnecessary object spreading
|
|
@@ -10634,42 +9891,42 @@ var PACKAGE_UTILS_ADDRESS = {
|
|
|
10634
9891
|
var PACKAGE_ENDPOINT_V2_ADDRESS = {
|
|
10635
9892
|
[Stage.MAINNET]: "0xf625a8bde20d64850a4ec7b01c1918d9a0a29495546de7a0144440275f9b933c",
|
|
10636
9893
|
[Stage.TESTNET]: "0x85dd52af20c3d8047685dcb6fddc443934b8cd2b6fbe9d2d262a5f6943f24557",
|
|
10637
|
-
[Stage.SANDBOX]: "
|
|
9894
|
+
[Stage.SANDBOX]: "0xcd97606354aaa69e476f2f3cfa374ed73f2a3d08cfc305d74489b2fcbb988805"
|
|
10638
9895
|
};
|
|
10639
9896
|
var PACKAGE_COUNTER_V2_ADDRESS = {
|
|
10640
9897
|
[Stage.MAINNET]: "0xfe1e336fdb42fa5ef85ab9a9c932b58c43e0bb58273cecea9d00cb5d05159914",
|
|
10641
9898
|
[Stage.TESTNET]: "0xa6a19e84c7df2014e384cdd56f5674e5a0c06b92cc5d33fca89633680a9ebcd7",
|
|
10642
|
-
[Stage.SANDBOX]: "
|
|
9899
|
+
[Stage.SANDBOX]: "0xa8e56b7c5ec0dee71349e0018407eea5eb72482f074670469206c9897e46b53b"
|
|
10643
9900
|
};
|
|
10644
9901
|
var PACKAGE_SIMPLE_MESSAGE_LIB_ADDRESS = {
|
|
10645
9902
|
[Stage.MAINNET]: "0x83651370065f70112b20007137c7235a2a243055d9f59cb5e162c00c4a1680a7",
|
|
10646
9903
|
[Stage.TESTNET]: "0xd1fbc2529b4c581c5105031b495866cece446f2123319f6d82a76151b999717e",
|
|
10647
|
-
[Stage.SANDBOX]: "
|
|
9904
|
+
[Stage.SANDBOX]: "0xf4bb61efa1420dfe668c741c51b37d6a920282bfe5a8b443e0fe745be57ebf93"
|
|
10648
9905
|
};
|
|
10649
9906
|
var PACKAGE_ULN_302_ADDRESS = {
|
|
10650
9907
|
[Stage.MAINNET]: "0xd73c9d588717c32fa327335d9beaf59b983b808577a382e013d8c7161a323d8e",
|
|
10651
9908
|
[Stage.TESTNET]: "0x556bd8fba10ba9e8be88a3ed54b8cbeb8b512b95e5c107cde7d7b10b754069c2",
|
|
10652
|
-
[Stage.SANDBOX]: "
|
|
9909
|
+
[Stage.SANDBOX]: "0x46d99d235e3990496e2b45c207086fef54e07c64a38f43b6439c4adc762002c5"
|
|
10653
9910
|
};
|
|
10654
9911
|
var PACKAGE_ULN_302_PTB_BUILDER_ADDRESS = {
|
|
10655
9912
|
[Stage.MAINNET]: "0x67b3a43a3aa962e1a6012b04f68e6f358803f5970858f4de22684d6d13fcd747",
|
|
10656
9913
|
[Stage.TESTNET]: "0x71a23cdd1cb88b52a40cd2862c4ca607bd27e0f02f136e18f95351050fec9a89",
|
|
10657
|
-
[Stage.SANDBOX]: "
|
|
9914
|
+
[Stage.SANDBOX]: "0x2ec29789577956a8d34e415319a3f4d9e91bf58bbb78ffc0586610839392b411"
|
|
10658
9915
|
};
|
|
10659
9916
|
var PACKAGE_DVN_PTB_BUILDER_ADDRESS = {
|
|
10660
9917
|
[Stage.MAINNET]: "0xb3f3a6d39a441a0f41a621d27427cedf624d500b3da5cd7051bc5835b21ac3ba",
|
|
10661
9918
|
[Stage.TESTNET]: "0xe7723903288eb1a38fb7166edce4307dfce985c7a9771af579f4f3d003dda2ec",
|
|
10662
|
-
[Stage.SANDBOX]: "
|
|
9919
|
+
[Stage.SANDBOX]: "0x7389aa98677cedbd03edf5201b389802f10e1d9e42e63b08958eb4f47fae37d7"
|
|
10663
9920
|
};
|
|
10664
9921
|
var PACKAGE_EXECUTOR_PTB_BUILDER_ADDRESS = {
|
|
10665
9922
|
[Stage.MAINNET]: "0x9d26806bb023ccd5b79d8ad50bf503e0e91c07b5bbfeb5b20a79e073571a5196",
|
|
10666
9923
|
[Stage.TESTNET]: "0xafed5368176963fa0474724a019e4fae6643d31c06b653fa1364b2282d5049dd",
|
|
10667
|
-
[Stage.SANDBOX]: "
|
|
9924
|
+
[Stage.SANDBOX]: "0xf77b3c5aa806c6d1ac4a90eb9c57cb9f2d681e0cc14aad9c45fd455795eaa949"
|
|
10668
9925
|
};
|
|
10669
9926
|
var PACKAGE_EXECUTOR_ADDRESS = {
|
|
10670
9927
|
[Stage.MAINNET]: "0x749420cc42b47d3db83fe316eb8accd8126bed9a779c0b7e06fa084c7fa1d76d",
|
|
10671
9928
|
[Stage.TESTNET]: "0x5bcded2dfa21094d5ffdd6256a2a73984e901201e84a6783aa8233b187ffdb51",
|
|
10672
|
-
[Stage.SANDBOX]: "
|
|
9929
|
+
[Stage.SANDBOX]: "0xa0eca8f1204a1b2b30f07c58584711ed5c18907aaf7b4c119d28a6f986303a3a"
|
|
10673
9930
|
};
|
|
10674
9931
|
var PACKAGE_ZRO_ADDRESS = {
|
|
10675
9932
|
[Stage.MAINNET]: "0xcdf19828a455468c4e4ffbd74ad641dddb58b49cd7d043da4cfa12f76c599d0a",
|
|
@@ -10684,147 +9941,137 @@ var PACKAGE_CALL_ADDRESS = {
|
|
|
10684
9941
|
var PACKAGE_ENDPOINT_PTB_BUILDER_ADDRESS = {
|
|
10685
9942
|
[Stage.MAINNET]: "0x387af0542c79874a52c3e8812390c0fd02a8e947ce54aea8d80481ac2b5b3acb",
|
|
10686
9943
|
[Stage.TESTNET]: "0xe0a904685954e5dc73a720f6dd29c8b5a22d2d4ca0864536b7befaf4cec44676",
|
|
10687
|
-
[Stage.SANDBOX]: "
|
|
9944
|
+
[Stage.SANDBOX]: "0x34dc069cfaca897c914dc7e4f6b187db6dca9057dc5ae9fdb32dbffdd494cf37"
|
|
10688
9945
|
};
|
|
10689
9946
|
var PACKAGE_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10690
9947
|
[Stage.MAINNET]: "0xba557037446a5b114205c868db114957945dd21df9770796fea2b558fc4a20fd",
|
|
10691
9948
|
[Stage.TESTNET]: "0x4badf1bba6f630905bc413b89f1c22669593b0e7aea60012a14fd42f44e2a7fe",
|
|
10692
|
-
[Stage.SANDBOX]: "
|
|
9949
|
+
[Stage.SANDBOX]: "0x06277f6dc34000229e58225f3696d0f8174167ec51a68d0840d40b68811468ae"
|
|
10693
9950
|
};
|
|
10694
9951
|
var PACKAGE_PTB_MOVE_CALL_ADDRESS = {
|
|
10695
9952
|
[Stage.MAINNET]: "0x0dd38c96b282271279247c26dba1f51d6e45209396a9e548154881e04549db66",
|
|
10696
9953
|
[Stage.TESTNET]: "0x8bdf374fe8576f28d71eecd219601cebafa38e2c79387eea92e2f27a71359197",
|
|
10697
|
-
[Stage.SANDBOX]: "
|
|
9954
|
+
[Stage.SANDBOX]: "0xeb4d0c77dad48d13bc35dd58faaa1c21c31aeabf4379ab6f884c6c8558b53d9d"
|
|
10698
9955
|
};
|
|
10699
9956
|
var PACKAGE_DVN_ADDRESS = {
|
|
10700
9957
|
[Stage.MAINNET]: "0x6810f5568936a9a2b5fcb043f59a3cbf681e06f0db61c90bf3ff5530d4f470c0",
|
|
10701
9958
|
[Stage.TESTNET]: "0x7c04479b475305685ad24fd3e91437aa3f6e0df95d1417fad1b4640d8363be9b",
|
|
10702
|
-
[Stage.SANDBOX]: "
|
|
9959
|
+
[Stage.SANDBOX]: "0x3e4f47a79339dedf94886fa73f008645790deff8f77311a28fcb30b9c1d91c60"
|
|
10703
9960
|
};
|
|
10704
9961
|
var PACKAGE_DVN_FEE_LIB_ADDRESS = {
|
|
10705
9962
|
[Stage.MAINNET]: "0xb94f476ccd37034f4f5fb9c541320b85f86e61ae7f654fa66f3b987e8fb3f825",
|
|
10706
9963
|
[Stage.TESTNET]: "0x7f6a8ca6e6f136605be10b502d4e03fda2ee9983f57c10c6199a63744977d951",
|
|
10707
|
-
[Stage.SANDBOX]: "
|
|
9964
|
+
[Stage.SANDBOX]: "0x9457382d9ed65c3b7d96f8ca32866c432f3aca772de185cc7b0df0a08c13c14b"
|
|
10708
9965
|
};
|
|
10709
9966
|
var PACKAGE_EXECUTOR_FEE_LIB_ADDRESS = {
|
|
10710
9967
|
[Stage.MAINNET]: "0x4cdd97cf2dee8387b004915c293d0565577e0194fff4894e604a09db54ac62c7",
|
|
10711
9968
|
[Stage.TESTNET]: "0x36a441e73ed70e9fc900d021381a3d833c8b15305b7a116dbd7a2d1a156432e1",
|
|
10712
|
-
[Stage.SANDBOX]: "
|
|
9969
|
+
[Stage.SANDBOX]: "0xe864c9cf1690ba00d18dbfa6c706b06d6b2e70e223f11400e79ebf060ff0cac5"
|
|
10713
9970
|
};
|
|
10714
9971
|
var PACKAGE_PRICE_FEED_ADDRESS = {
|
|
10715
9972
|
[Stage.MAINNET]: "0x9f12f79a355fca76492bc1908fc7a9a8518d2a83e65cffc93f134144dfa4e5bb",
|
|
10716
9973
|
[Stage.TESTNET]: "0x703efe3215e8249a490b4889d20bff10f09838d200835d53d056bbf30a80fe37",
|
|
10717
|
-
[Stage.SANDBOX]: "
|
|
9974
|
+
[Stage.SANDBOX]: "0xa6db98425af6398a485a8dd9f9b21eefcc74aece57de250932b937a2bd7d6108"
|
|
10718
9975
|
};
|
|
10719
9976
|
var PACKAGE_TREASURY_ADDRESS = {
|
|
10720
9977
|
[Stage.MAINNET]: "0xcb8bc76ad2dde43cb83fe4f27a702df0874e99c047317251ee878893c17c83c5",
|
|
10721
9978
|
[Stage.TESTNET]: "0x5589cb216e702c9d18c8864b75a233a8f8b4591156fff871c129519e95d5aa3e",
|
|
10722
|
-
[Stage.SANDBOX]: "
|
|
9979
|
+
[Stage.SANDBOX]: "0x4338932a1659dd212cddbc7ef7dc610e5f9d430682a2706515ac62382fc911b5"
|
|
10723
9980
|
};
|
|
10724
9981
|
var PACKAGE_OAPP_ADDRESS = {
|
|
10725
9982
|
[Stage.MAINNET]: "0x7c93d6d8288fa0f8df5a595dcde2413b849d8c839fc59fc09243fd5bf44c96ab",
|
|
10726
9983
|
[Stage.TESTNET]: "0x50d5a0038394ddff138900335e56315b2aed79475cad3fe3737a50dc12c884d6",
|
|
10727
|
-
[Stage.SANDBOX]: "
|
|
9984
|
+
[Stage.SANDBOX]: "0x658d364c1a245c8e126cab40b215c77173cdab3288d56c4ce51158674a8204f4"
|
|
10728
9985
|
};
|
|
10729
9986
|
var PACKAGE_LAYERZERO_VIEWS_ADDRESS = {
|
|
10730
9987
|
[Stage.MAINNET]: "0x74803ac88036cbd57bf1a46347e22143a47081f7159efb01419f1ed14a17ad67",
|
|
10731
9988
|
[Stage.TESTNET]: "0xa4a72308ec518a2103f9f31435d07df740736bc03b778ca1200071805c5414da",
|
|
10732
|
-
[Stage.SANDBOX]: "
|
|
9989
|
+
[Stage.SANDBOX]: "0xb06760345da493b5f65040109ede722d93063614dedb0e34be7002153619615e"
|
|
10733
9990
|
};
|
|
10734
9991
|
var PACKAGE_DVN_LAYERZERO_ADDRESS = {
|
|
10735
9992
|
[Stage.MAINNET]: "0xc3f25fb140745ca0d4cde0ec382fd76e2f20d5a76a7fd9264340b4af949fd38b",
|
|
10736
9993
|
[Stage.TESTNET]: "0x725e5c54d11578942f4b45ebdce1cc91244dae658a667c2186c277b6a5673f9c",
|
|
10737
|
-
[Stage.SANDBOX]: "
|
|
9994
|
+
[Stage.SANDBOX]: "0x00ae2cd83670b2292f917a21dee2e268560167b1e44059cc583d43d3dcf7d0b2"
|
|
10738
9995
|
};
|
|
10739
9996
|
var PACKAGE_EXECUTOR_LAYERZERO_ADDRESS = {
|
|
10740
9997
|
[Stage.MAINNET]: "0x2111256b15f5d0a20f6352084dac268c737b47c113b4da5eacb316f8a536f9bf",
|
|
10741
9998
|
[Stage.TESTNET]: "0xb8db282fff4358b67915bb76eb18bde3406e4e30a1d219c852c7ccf5a121a3ff",
|
|
10742
|
-
[Stage.SANDBOX]: "
|
|
9999
|
+
[Stage.SANDBOX]: "0x4cdbc0ebf748f44bfd0f94cda6129f9e0dc4976bae9304338795440fc4239fd2"
|
|
10743
10000
|
};
|
|
10744
10001
|
var PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS = {
|
|
10745
10002
|
[Stage.MAINNET]: "0xbdce35f2801192bb218e47bb6e9cf08e136037b271157e8db8fdc9acf0bd225e",
|
|
10746
10003
|
[Stage.TESTNET]: "0x5ad1acba7eb1b381ab3f08da17938ffa930375c0904e78ccd6e634957f6b3ef6",
|
|
10747
|
-
[Stage.SANDBOX]: "
|
|
10004
|
+
[Stage.SANDBOX]: "0x1e1aa40e521c0192001957909dd522ff7b944b194d555644b755643d540a5193"
|
|
10748
10005
|
};
|
|
10749
10006
|
var PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS = {
|
|
10750
10007
|
[Stage.MAINNET]: "0x9f6107b708d7650b1484ae10cb98340af343f46bd63793ea91c2379bab9a7abb",
|
|
10751
10008
|
[Stage.TESTNET]: "0xd3f0cab5eca2cfb870e5390b572e67ce1d0d96bc89d097d089914014bf581e5d",
|
|
10752
|
-
[Stage.SANDBOX]: "
|
|
10009
|
+
[Stage.SANDBOX]: "0xf3564021638d705174b80c7917480b49b62284c92a516f599972c7c657533d64"
|
|
10753
10010
|
};
|
|
10754
10011
|
var PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10755
10012
|
[Stage.MAINNET]: "0xd90430a0b1b5bf932586d7d52e67e2242b1276ad7944b41c21acd4f950671335",
|
|
10756
10013
|
[Stage.TESTNET]: "0xf2c5b342b99544fbd225ed45a76096f7ed6199624d2f2f4d04b76e2afb84654e",
|
|
10757
|
-
[Stage.SANDBOX]: "
|
|
10758
|
-
};
|
|
10759
|
-
var PACKAGE_WORKER_REGISTRY_ADDRESS = {
|
|
10760
|
-
[Stage.MAINNET]: "",
|
|
10761
|
-
[Stage.TESTNET]: "",
|
|
10762
|
-
[Stage.SANDBOX]: "0xbf1e087bc40af272f98519a31ac5e889b95b3112b6bf28e652909cd199141cdd"
|
|
10763
|
-
};
|
|
10764
|
-
var PACKAGE_WORKER_COMMON_ADDRESS = {
|
|
10765
|
-
[Stage.MAINNET]: "0x6b29b0abf9da88be53a9ea1dfab8f600930b9ab6961eee65d67c1eecdd8cb695",
|
|
10766
|
-
[Stage.TESTNET]: "0xbd1b4591ff06b36113c28ec2f5ce10151b6a2998699e3d8364ec9f77efe950c8",
|
|
10767
|
-
[Stage.SANDBOX]: "0x27d3deb156d4b0145608971a0f4a5409f6fb9ab6888757a2dcf954dcab36a2d5"
|
|
10014
|
+
[Stage.SANDBOX]: "0x9b02a69ee4ea8841cf6203db30a34552429504b5cac88de024f93b42c354be31"
|
|
10768
10015
|
};
|
|
10769
10016
|
var OBJECT_ENDPOINT_V2_ADDRESS = {
|
|
10770
10017
|
[Stage.MAINNET]: "0xd84dfbd6b21f2a6e2d9ecfd8204d20a420f2528746381c2db29c2f4caae67fcd",
|
|
10771
10018
|
[Stage.TESTNET]: "0xbba9beee809d8010f5dc1c3529d75708f1fbf2fa7bbf40bb6031a4bc8ae9c9b6",
|
|
10772
|
-
[Stage.SANDBOX]: "
|
|
10019
|
+
[Stage.SANDBOX]: "0xcda0200851fd0a5c1feafe78bccac740579c15245a62b36b2f53468124b2c05d"
|
|
10773
10020
|
};
|
|
10774
10021
|
var OBJECT_SIMPLE_MESSAGE_LIB_ADDRESS = {
|
|
10775
10022
|
[Stage.MAINNET]: "0xd18907d32aa9e95fc2eed2d02fec562442877bec8680620c05fa5b3c110ccd81",
|
|
10776
10023
|
[Stage.TESTNET]: "0xe893810a3399bf50ec4fd7affa931bcb66dbab21e37aff80b7ce73f25e78ac4f",
|
|
10777
|
-
[Stage.SANDBOX]: "
|
|
10024
|
+
[Stage.SANDBOX]: "0xd926e5e7c3551f3da7c840ded2056f5322bf051859492075009835bfdd1875f0"
|
|
10778
10025
|
};
|
|
10779
10026
|
var OBJECT_SIMPLE_MESSAGE_LIB_ADMIN_CAP_ADDRESS = {
|
|
10780
10027
|
[Stage.MAINNET]: "0x617aceffed0b17cc5b5f5ad4cd1e8b9d965a9ef73a923b474e4763dec7c175f6",
|
|
10781
10028
|
[Stage.TESTNET]: "0x3115ca5bf047a17629099b1845db595a42b4e7d5c5916439036c18d0afd7181b",
|
|
10782
|
-
[Stage.SANDBOX]: "
|
|
10029
|
+
[Stage.SANDBOX]: "0x0c995f624010b1f5da9ae8ecf1571ae7bedf3eb1397513880138f203ab9ec482"
|
|
10783
10030
|
};
|
|
10784
10031
|
var OBJECT_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10785
10032
|
[Stage.MAINNET]: "0x2a0c8a426823cc7fcb89dd849810b42643fda344286d493d0ce8593d9b2be280",
|
|
10786
10033
|
[Stage.TESTNET]: "0xacaa1b7ed87084cea9c593d1df4a76bfa0bce1b214559d79de8a9167705292a3",
|
|
10787
|
-
[Stage.SANDBOX]: "
|
|
10034
|
+
[Stage.SANDBOX]: "0xdc0fae3db4a0d357d7c727c0d3986d2d19f659ec5bf48fe4091056b87cfa0214"
|
|
10788
10035
|
};
|
|
10789
10036
|
var OBJECT_ULN_302_ADDRESS = {
|
|
10790
10037
|
[Stage.MAINNET]: "0x7d140391ed97fcdb3f87aa13a7727b7354cb0a6ca2a3e7156f8b3767dd634266",
|
|
10791
10038
|
[Stage.TESTNET]: "0xea27cd132fe6e4cad973f642f1450b0da2490b5350e6104365a7a48a3d97fb1e",
|
|
10792
|
-
[Stage.SANDBOX]: "
|
|
10039
|
+
[Stage.SANDBOX]: "0x11912ed43188135c45f69b3947e837f96957c30bcb7c33084815aeb910740e29"
|
|
10793
10040
|
};
|
|
10794
10041
|
var OBJECT_ULN_302_ADMIN_CAP_ADDRESS = {
|
|
10795
10042
|
[Stage.MAINNET]: "0xece25d7e8aad8a6295a7821bd4b7f29896714c3fc8472a5e7dbb19d67ff77e00",
|
|
10796
10043
|
[Stage.TESTNET]: "0x791622d24d7ec1c33beea371f7d2e1d8cffaaa6596a785f61684227ccd379270",
|
|
10797
|
-
[Stage.SANDBOX]: "
|
|
10044
|
+
[Stage.SANDBOX]: "0x750ae0c9069131666463405502da42a97dbabcee852d9e661dcbbe40a033a926"
|
|
10798
10045
|
};
|
|
10799
10046
|
var OBJECT_ULN_302_VERIFICATION_ADDRESS = {
|
|
10800
10047
|
[Stage.MAINNET]: "0x2e672e3cb4f4992b3e790ce50c7b3e464a60633ca5f68de3039cc5f20116f6e7",
|
|
10801
10048
|
[Stage.TESTNET]: "0xf308d39e3bab9ec37019d955c31abac6b3e7444f915a77be203f92c1d6a9a67e",
|
|
10802
|
-
[Stage.SANDBOX]: "
|
|
10049
|
+
[Stage.SANDBOX]: "0x0cfc1cd618291331a7627782536608c43fa0165149a5b9aba05bf2aaddf920fb"
|
|
10803
10050
|
};
|
|
10804
10051
|
var OBJECT_ULN_302_PTB_BUILDER_ADDRESS = {
|
|
10805
10052
|
[Stage.MAINNET]: "0xb41c8c88899debceb5982ff0333a0026bb68159758af8557ee1b12433f539ec8",
|
|
10806
10053
|
[Stage.TESTNET]: "0x44c82a3a33294c1ac36f1baf931f57ec0a60bb183b5474211b8397465e3dffac",
|
|
10807
|
-
[Stage.SANDBOX]: "
|
|
10054
|
+
[Stage.SANDBOX]: "0xca27fab304e428da446b66756dfa24ea1d633cfa6db704d1b10fe20156cfa67b"
|
|
10808
10055
|
};
|
|
10809
10056
|
var OBJECT_TREASURY_ADDRESS = {
|
|
10810
10057
|
[Stage.MAINNET]: "0xa6fd139692050fb7fea2a5d924d5cc637b2b617982b1537b98ab51f6074a6335",
|
|
10811
10058
|
[Stage.TESTNET]: "0xa082a4eac93a7525738511f7a00816f982545296175e54be355f813eebe20691",
|
|
10812
|
-
[Stage.SANDBOX]: "
|
|
10059
|
+
[Stage.SANDBOX]: "0x6d17fd9f1064b974d095251ff53717bbeb780b29156702809c9c3104827fa19d"
|
|
10813
10060
|
};
|
|
10814
10061
|
var OBJECT_TREASURY_ADMIN_CAP_ADDRESS = {
|
|
10815
10062
|
[Stage.MAINNET]: "0x6fafabbb6f8dd963fb926b2075de90ed86e550bc67c900768e6b4c6002bc2b7d",
|
|
10816
10063
|
[Stage.TESTNET]: "0x3ec6669b54589abb6d12aa338c4f2962a5d1ab835e6385242698f3efd9ae2582",
|
|
10817
|
-
[Stage.SANDBOX]: "
|
|
10064
|
+
[Stage.SANDBOX]: "0x48a1c8e1de673691dc66320fe3caf2e8ccb292752fa2159b6e7140db575c29c8"
|
|
10818
10065
|
};
|
|
10819
10066
|
var OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS = {
|
|
10820
10067
|
[Stage.MAINNET]: "0x48761f1a6591f4ad761f8ef9ec85ad6d5255805c35d4c9a90c97c40e7820aa85",
|
|
10821
10068
|
[Stage.TESTNET]: "0xcc83422f225aef3300596dae1119510cf56d620a686dc1e73c9db15c49d70e31",
|
|
10822
|
-
[Stage.SANDBOX]: "
|
|
10069
|
+
[Stage.SANDBOX]: "0x4aa4ef7097190d05105bf2cdc9b2f5386566fca57f8d7a2d6a73371857a9e4ab"
|
|
10823
10070
|
};
|
|
10824
10071
|
var OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS = {
|
|
10825
10072
|
[Stage.MAINNET]: "0xba9a66cdc77ae59264b7481e6d0d04426f380169b9afbb5176aaf58718fad6d1",
|
|
10826
10073
|
[Stage.TESTNET]: "0x28d0ec1e88734b94e38d2a8305cb89b9e81bdee41f71f4159166e99f058758c5",
|
|
10827
|
-
[Stage.SANDBOX]: "
|
|
10074
|
+
[Stage.SANDBOX]: "0xbd20951baeab3e769bf2da0b546f206c2dd23d8c2842c7a65c9ac12bd43802b2"
|
|
10828
10075
|
};
|
|
10829
10076
|
var OBJECT_DISCOVERY_ADDRESS = {
|
|
10830
10077
|
[Stage.MAINNET]: "",
|
|
@@ -10834,47 +10081,47 @@ var OBJECT_DISCOVERY_ADDRESS = {
|
|
|
10834
10081
|
var OBJECT_COUNTER_ADDRESS = {
|
|
10835
10082
|
[Stage.MAINNET]: "0xe44f7b2ff80b8450e0d09ec84198dd22d9e2ad6e9c9688d2db605736b99ae965",
|
|
10836
10083
|
[Stage.TESTNET]: "0x85e63925789db09ee8021dfa66cb61a31913861b4abf7d97689061cf113ca61a",
|
|
10837
|
-
[Stage.SANDBOX]: "
|
|
10084
|
+
[Stage.SANDBOX]: "0x34c3bd241345e15c118bc310f87153e3f4e329236a6bd7f6639afd3854e10fd6"
|
|
10838
10085
|
};
|
|
10839
10086
|
var OBJECT_COUNTER_OAPP_ADDRESS = {
|
|
10840
10087
|
[Stage.MAINNET]: "0x84e16eed83a2e9787860bd0324a3a69adc9ec181e5f7f2bfcca11222c113414c",
|
|
10841
10088
|
[Stage.TESTNET]: "0xf96322c7067fb9dbd77c7cc62bd35490dc86db507837b4310eacaef3b327ce75",
|
|
10842
|
-
[Stage.SANDBOX]: "
|
|
10089
|
+
[Stage.SANDBOX]: "0x33d75362a4ab3c939d51754f18b3afdac5aa8b4f3af5ba9e9ad44b3351dca623"
|
|
10843
10090
|
};
|
|
10844
10091
|
var OBJECT_COUNTER_ADMIN_CAP_ADDRESS = {
|
|
10845
10092
|
[Stage.MAINNET]: "0x7c1250bbfb0e72ff58985112746d361ad729ac6f47a404c76d4e447b93b49984",
|
|
10846
10093
|
[Stage.TESTNET]: "0x63350eccf073e3b86ab7dd04566e8b62d4fa184f633ef383998b3230f66cc1de",
|
|
10847
|
-
[Stage.SANDBOX]: "
|
|
10094
|
+
[Stage.SANDBOX]: "0x2b35a82ccdd841b38d468969dce5d090f00f07a1e713a1c802476402c7272bcd"
|
|
10848
10095
|
};
|
|
10849
10096
|
var OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS = {
|
|
10850
10097
|
[Stage.MAINNET]: "0x78d0ef45ccf4e6247162c09aa73ea0bb59467057960c23fe41a976ca67e916ab",
|
|
10851
10098
|
[Stage.TESTNET]: "0xe91a479f58bd7335f620d45488bc713fd0e25ac37c1c282a8150c301dac97453",
|
|
10852
|
-
[Stage.SANDBOX]: "
|
|
10099
|
+
[Stage.SANDBOX]: "0xfab761dfade0a1f68d2dd9ceb8abfa8826be50ef91676eb47aa00ae8c9b86500"
|
|
10853
10100
|
};
|
|
10854
10101
|
var OBJECT_ENDPOINT_PTB_BUILDER_ADDRESS = {
|
|
10855
10102
|
[Stage.MAINNET]: "0x2954f9997631409cf067785477b800ced4a2a9ccc75032076f8129ee07ca2caa",
|
|
10856
10103
|
[Stage.TESTNET]: "0x060ba8cc7a0e858c138ff00391bfec71dc863ac7d35cb36b14f4e52987cb9542",
|
|
10857
|
-
[Stage.SANDBOX]: "
|
|
10104
|
+
[Stage.SANDBOX]: "0x80da1c4617dc27755ef53a12a96056c461e75a6953b3e51d6780cff03e5f7f4d"
|
|
10858
10105
|
};
|
|
10859
10106
|
var OBJECT_ENDPOINT_PTB_BUILDER_ADMIN_CAP_ADDRESS = {
|
|
10860
10107
|
[Stage.MAINNET]: "0x2a705654d837e75ee88e1f03003cccf3faa9a683cf0434468745532cc55e148f",
|
|
10861
10108
|
[Stage.TESTNET]: "0xd5da31144a1a30e4fea6ad9074b04fc732d95ee4f84575ade95ec524ee351abf",
|
|
10862
|
-
[Stage.SANDBOX]: "
|
|
10109
|
+
[Stage.SANDBOX]: "0x1358128be7cd28bed08496242b9c5827dc57b046996a41a8b789e8ffb48aceda"
|
|
10863
10110
|
};
|
|
10864
10111
|
var OBJECT_DVN_ADDRESS = {
|
|
10865
10112
|
[Stage.MAINNET]: "0x607471cac2ed025cbb2874cd5a175e6000939747097bbd0ea89664c1fbe9672c",
|
|
10866
10113
|
[Stage.TESTNET]: "0xd97457fdd827f0b9d9c35cb9b6a8560364822c57545a10be53106dfc7c26f2b4",
|
|
10867
|
-
[Stage.SANDBOX]: "
|
|
10114
|
+
[Stage.SANDBOX]: "0xb2a39ae5c222a62aa9a13374c151ad5a44c4b92ed8f037f2b2580c2b377955e1"
|
|
10868
10115
|
};
|
|
10869
10116
|
var OBJECT_DVN_CAP_ADDRESS = {
|
|
10870
10117
|
[Stage.MAINNET]: "0x67d3d9e3537fc8ad2efd674bdce3b7f98ba2892971ab91a6f3bb611844dcc2e1",
|
|
10871
10118
|
[Stage.TESTNET]: "0x6b29694aaf32600eba62f0f91aed2c31a7c34540a513403f23351a8cd1372d3c",
|
|
10872
|
-
[Stage.SANDBOX]: "
|
|
10119
|
+
[Stage.SANDBOX]: "0xb952d8b84fee0d99c5e20f25984703828f94f7a020363c304702bdf7f55eeada"
|
|
10873
10120
|
};
|
|
10874
10121
|
var OBJECT_DVN_FEE_LIB_ADDRESS = {
|
|
10875
10122
|
[Stage.MAINNET]: "0x5ff9119265b39b59260a7f1df2b7af5390f39fb33aeaf8b099e1ddc6673da1f0",
|
|
10876
10123
|
[Stage.TESTNET]: "0xc0f5802549ca974579ff193affff53a1566fffc1586f83584fc3432f85dc4859",
|
|
10877
|
-
[Stage.SANDBOX]: "
|
|
10124
|
+
[Stage.SANDBOX]: "0x45096197e8d1565a969d853ec334b84b449e4199c5ccacb25817c5108772d846"
|
|
10878
10125
|
};
|
|
10879
10126
|
var OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
10880
10127
|
[Stage.MAINNET]: "",
|
|
@@ -10884,22 +10131,22 @@ var OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
|
10884
10131
|
var OBJECT_EXECUTOR_ADDRESS = {
|
|
10885
10132
|
[Stage.MAINNET]: "0xf5848ad4863f3594a96b4af26ab8d47414e5d17a9da76db1ab1489f1db3a75ae",
|
|
10886
10133
|
[Stage.TESTNET]: "0x69c3cd711b6730e699e2423a15f75c0fc9d96b3f6596bca140452184381a4abe",
|
|
10887
|
-
[Stage.SANDBOX]: "
|
|
10134
|
+
[Stage.SANDBOX]: "0x3b2399477ed15d57ee04d54fc014f67c228bdd39c8c16494f98f19bcc8fe952b"
|
|
10888
10135
|
};
|
|
10889
10136
|
var OBJECT_EXECUTOR_CAP_ADDRESS = {
|
|
10890
10137
|
[Stage.MAINNET]: "0x4f86b866513949acb7728b33dc9334c9b0439c5f368f527b99db3cbf69a0282f",
|
|
10891
10138
|
[Stage.TESTNET]: "0x19bf02f900658874be5cb12af901008420c8e09fce73bfd9359dd78914a33eda",
|
|
10892
|
-
[Stage.SANDBOX]: "
|
|
10139
|
+
[Stage.SANDBOX]: "0x537fcdb67272fb0defbd65f56e877df2120522025032ed4e5df66efcb848e057"
|
|
10893
10140
|
};
|
|
10894
10141
|
var OBJECT_EXECUTOR_OWNER_CAP_ADDRESS = {
|
|
10895
10142
|
[Stage.MAINNET]: "0x26082897ee964836468287f28e091078257d4fa27a6b309321b3d171cef3850d",
|
|
10896
10143
|
[Stage.TESTNET]: "0x6bbd9c69eaa8e52245a7c248c04847b0e1d31ed6945f5e2ada2e4d83c2f4c655",
|
|
10897
|
-
[Stage.SANDBOX]: "
|
|
10144
|
+
[Stage.SANDBOX]: "0x52fb07f5997f1677307fcfba521ad24ddb4633ccfb047db863ab6c1ec280ef85"
|
|
10898
10145
|
};
|
|
10899
10146
|
var OBJECT_EXECUTOR_FEE_LIB_ADDRESS = {
|
|
10900
10147
|
[Stage.MAINNET]: "0x1d505d1cfdd0ac8938826269b93c35cec0cd97ba783e073fa3b0206b35ca0378",
|
|
10901
10148
|
[Stage.TESTNET]: "0x8826aad865a485ec779b5f08c74c07dbad3063f58f7b66c5f099137af7024519",
|
|
10902
|
-
[Stage.SANDBOX]: "
|
|
10149
|
+
[Stage.SANDBOX]: "0xbf426a5c517b839f00664c0bf9b5a5021ba8acdf8a24bf402a3f7d88c224e966"
|
|
10903
10150
|
};
|
|
10904
10151
|
var OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
10905
10152
|
[Stage.MAINNET]: "",
|
|
@@ -10909,22 +10156,17 @@ var OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS = {
|
|
|
10909
10156
|
var OBJECT_PRICE_FEED_ADDRESS = {
|
|
10910
10157
|
[Stage.MAINNET]: "0x17a24b91f720a8f170386d920df3c605fe7a0b96e43424283b30b11ced0f0156",
|
|
10911
10158
|
[Stage.TESTNET]: "0x10e0e26966b7eee36e0009e67c0deeb8f7e5ea1a42ecefca53bf2d5d22031ba4",
|
|
10912
|
-
[Stage.SANDBOX]: "
|
|
10159
|
+
[Stage.SANDBOX]: "0x58d4c62e24c842ad44eb1d890834de9b6c4c8dbf92c60bdae1ebb10ff655571e"
|
|
10913
10160
|
};
|
|
10914
10161
|
var OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS = {
|
|
10915
10162
|
[Stage.MAINNET]: "0x809d4b17a59a2b832b9222b09d4d6d805b6b2aaf340b6a52babea814ef5637a4",
|
|
10916
10163
|
[Stage.TESTNET]: "0x6d42367426b654045c2c9eccf622caf43e552b3f983bbd293b1ef362e82504bd",
|
|
10917
|
-
[Stage.SANDBOX]: "
|
|
10164
|
+
[Stage.SANDBOX]: "0x34a4563571d8bdde8a8158c0ac16b651d1c262f7872f4a90f6d79989d20abbb0"
|
|
10918
10165
|
};
|
|
10919
10166
|
var OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS = {
|
|
10920
10167
|
[Stage.MAINNET]: "0x9d29be17482e050324db3a4b10755e4adc5a1aa062ed80528e0fbe94654055b5",
|
|
10921
10168
|
[Stage.TESTNET]: "0xcdbefbceffe2d9f0c0d46733ef4be0145e7af60241962738e98f136bff1557e2",
|
|
10922
|
-
[Stage.SANDBOX]: "
|
|
10923
|
-
};
|
|
10924
|
-
var OBJECT_WORKER_REGISTRY_ADDRESS = {
|
|
10925
|
-
[Stage.MAINNET]: "",
|
|
10926
|
-
[Stage.TESTNET]: "",
|
|
10927
|
-
[Stage.SANDBOX]: "0x55bb2926901fa69afb1466b39d0d9acb3a2ea15b0164b8770d05505781251c7a"
|
|
10169
|
+
[Stage.SANDBOX]: "0x4e07c6ed9cefd6eb80a86bb99fdfc4c2cb3482fdfd0f2225fb96830dc2789cc7"
|
|
10928
10170
|
};
|
|
10929
10171
|
|
|
10930
10172
|
// src/resource.ts
|
|
@@ -10954,9 +10196,7 @@ var PACKAGE_ADDRESS_MAP = {
|
|
|
10954
10196
|
treasury: PACKAGE_TREASURY_ADDRESS,
|
|
10955
10197
|
oapp: PACKAGE_OAPP_ADDRESS,
|
|
10956
10198
|
layerzeroViews: PACKAGE_LAYERZERO_VIEWS_ADDRESS,
|
|
10957
|
-
packageWhitelistValidator: PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS
|
|
10958
|
-
workerRegistry: PACKAGE_WORKER_REGISTRY_ADDRESS,
|
|
10959
|
-
workerCommon: PACKAGE_WORKER_COMMON_ADDRESS
|
|
10199
|
+
packageWhitelistValidator: PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS
|
|
10960
10200
|
};
|
|
10961
10201
|
var OBJECT_ADDRESS_MAP = {
|
|
10962
10202
|
endpointV2: OBJECT_ENDPOINT_V2_ADDRESS,
|
|
@@ -10986,8 +10226,7 @@ var OBJECT_ADDRESS_MAP = {
|
|
|
10986
10226
|
executorFeeLib: OBJECT_EXECUTOR_FEE_LIB_ADDRESS,
|
|
10987
10227
|
priceFeed: OBJECT_PRICE_FEED_ADDRESS,
|
|
10988
10228
|
priceFeedOwnerCap: OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS,
|
|
10989
|
-
packageWhitelistValidator: OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS
|
|
10990
|
-
workerRegistry: OBJECT_WORKER_REGISTRY_ADDRESS
|
|
10229
|
+
packageWhitelistValidator: OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS
|
|
10991
10230
|
};
|
|
10992
10231
|
var ResourceManager = class {
|
|
10993
10232
|
/**
|
|
@@ -11059,8 +10298,8 @@ var SDK = class {
|
|
|
11059
10298
|
getLayerZeroViews() {
|
|
11060
10299
|
return this.moduleManager.getLayerZeroViews();
|
|
11061
10300
|
}
|
|
11062
|
-
getOApp(
|
|
11063
|
-
return this.moduleManager.getOApp(
|
|
10301
|
+
getOApp() {
|
|
10302
|
+
return this.moduleManager.getOApp();
|
|
11064
10303
|
}
|
|
11065
10304
|
// === Non-Core Module Getters (created on-demand with caching) ===
|
|
11066
10305
|
getCounter(options) {
|
|
@@ -11108,14 +10347,11 @@ var SDK = class {
|
|
|
11108
10347
|
getBlockedMessageLibPtbBuilder(options) {
|
|
11109
10348
|
return this.moduleManager.getBlockedMessageLibPtbBuilder(this.client, options);
|
|
11110
10349
|
}
|
|
11111
|
-
getWorkerRegistry(options) {
|
|
11112
|
-
return this.moduleManager.getWorkerRegistry(this.client, options);
|
|
11113
|
-
}
|
|
11114
10350
|
getOrCreateModule(moduleName, options, factory) {
|
|
11115
10351
|
return this.moduleManager.getOrCreateModule(moduleName, options, factory);
|
|
11116
10352
|
}
|
|
11117
10353
|
};
|
|
11118
10354
|
|
|
11119
|
-
export { ALL_EXECUTOR_OPTION_TYPES, ArbitrumPriceExtBcs, ArgumentBCS, BlockedMessageLib, BlockedMessageLibErrorCode, BlockedMessageLibPtbBuilder, Bytes32Bcs, CONFIG_TYPE, Call, CallErrorCode, CallTypeName, Counter, CounterErrorCode, DEFAULT_SIMULATION_TIMES, DVN, DVNErrorCode, DVNFeeLib, DVNFeeLibErrorCode,
|
|
10355
|
+
export { ALL_EXECUTOR_OPTION_TYPES, ArbitrumPriceExtBcs, ArgumentBCS, BlockedMessageLib, BlockedMessageLibErrorCode, BlockedMessageLibPtbBuilder, Bytes32Bcs, CONFIG_TYPE, Call, CallErrorCode, CallTypeName, Counter, CounterErrorCode, DEFAULT_SIMULATION_TIMES, DVN, DVNErrorCode, DVNFeeLib, DVNFeeLibErrorCode, DstConfigBcs, DvnDstConfigBcs, DvnLayerZero, DvnPtbBuilder, Endpoint, EndpointErrorCode, EndpointExecutionState, EndpointPtbBuilder, Executor, ExecutorConfigBcs, ExecutorErrorCode, ExecutorFeeLib, ExecutorFeeLibErrorCode, ExecutorLayerZero, ExecutorOptionType, ExecutorPtbBuilder, FunctionBCS, LayerZeroViews, LibBuilderManagerErrorCode, LzComposeVersion, LzReceiveVersion, LzTypeName, MAX_BATCH_SIZE, MessageLibType, MessagingFeeBcs, ModelType, ModelTypeBcs, Modules, MoveAbortError, MoveCallBCS, NativeDropParamsBcs, NonSenderObjectValidator, OApp, OAppErrorCode, OAppUlnConfigBcs, OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS, OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS, OBJECT_COUNTER_ADDRESS, OBJECT_COUNTER_ADMIN_CAP_ADDRESS, OBJECT_COUNTER_OAPP_ADDRESS, OBJECT_DISCOVERY_ADDRESS, OBJECT_DVN_ADDRESS, OBJECT_DVN_CAP_ADDRESS, OBJECT_DVN_FEE_LIB_ADDRESS, OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_PTB_BUILDER_ADDRESS, OBJECT_ENDPOINT_PTB_BUILDER_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_V2_ADDRESS, OBJECT_EXECUTOR_ADDRESS, OBJECT_EXECUTOR_CAP_ADDRESS, OBJECT_EXECUTOR_FEE_LIB_ADDRESS, OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS, OBJECT_EXECUTOR_OWNER_CAP_ADDRESS, OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS, OBJECT_PRICE_FEED_ADDRESS, OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_ADMIN_CAP_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS, OBJECT_TREASURY_ADDRESS, OBJECT_TREASURY_ADMIN_CAP_ADDRESS, OBJECT_ULN_302_ADDRESS, OBJECT_ULN_302_ADMIN_CAP_ADDRESS, OBJECT_ULN_302_PTB_BUILDER_ADDRESS, OBJECT_ULN_302_VERIFICATION_ADDRESS, PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS, PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS, PACKAGE_CALL_ADDRESS, PACKAGE_COUNTER_V2_ADDRESS, PACKAGE_DVN_ADDRESS, PACKAGE_DVN_FEE_LIB_ADDRESS, PACKAGE_DVN_LAYERZERO_ADDRESS, PACKAGE_DVN_PTB_BUILDER_ADDRESS, PACKAGE_ENDPOINT_PTB_BUILDER_ADDRESS, PACKAGE_ENDPOINT_V2_ADDRESS, PACKAGE_EXECUTOR_ADDRESS, PACKAGE_EXECUTOR_FEE_LIB_ADDRESS, PACKAGE_EXECUTOR_LAYERZERO_ADDRESS, PACKAGE_EXECUTOR_PTB_BUILDER_ADDRESS, PACKAGE_LAYERZERO_VIEWS_ADDRESS, PACKAGE_OAPP_ADDRESS, PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS, PACKAGE_PRICE_FEED_ADDRESS, PACKAGE_PTB_MOVE_CALL_ADDRESS, PACKAGE_SIMPLE_MESSAGE_LIB_ADDRESS, PACKAGE_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS, PACKAGE_TREASURY_ADDRESS, PACKAGE_ULN_302_ADDRESS, PACKAGE_ULN_302_PTB_BUILDER_ADDRESS, PACKAGE_UTILS_ADDRESS, PACKAGE_ZRO_ADDRESS, PackageAllowlistValidator, PackageWhitelistValidator, PriceBcs, PriceFeed, PriceFeedErrorCode, PtbBuilder, SDK, ShareObjectValidator, SimpleMessageLib, SimpleMessageLibErrorCode, SimpleMessageLibPtbBuilder, TimeoutBcs, Treasury, TreasuryErrorCode, Uln302, Uln302ErrorCode, Uln302PtbBuilder, UlnConfigBcs, UlnVerificationState, UnclassifiedError, Utils, UtilsErrorCode, ValidatorErrorCode, VectorMoveCallBCS, Zro, asAddress, asAddressVector, asArg, asArgWithTx, asArgWithTxAsync, asBool, asBytes, asBytes32, asBytesVector, asObject, asString, asU128, asU16, asU256, asU32, asU64, asU8, executeSimulate, handleError, isTransactionArgument, simulateTransaction, simulateTransactionMultiResult, validateTransaction, validateWithDetails };
|
|
11120
10356
|
//# sourceMappingURL=index.mjs.map
|
|
11121
10357
|
//# sourceMappingURL=index.mjs.map
|