@layerzerolabs/lz-aptos-sdk-v1 3.0.113-aptos.0 → 3.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/deployments/aptos-sandbox-local/Common.json +1 -1
- package/deployments/aptos-sandbox-local/Endpoint.json +1 -1
- package/deployments/aptos-sandbox-local/ExecutorAuth.json +1 -1
- package/deployments/aptos-sandbox-local/ExecutorExt.json +1 -1
- package/deployments/aptos-sandbox-local/ExecutorV2.json +1 -1
- package/deployments/aptos-sandbox-local/MsgLibV1.json +1 -1
- package/deployments/aptos-sandbox-local/MsgLibV2.json +1 -1
- package/deployments/aptos-sandbox-local/MsgLibV21.json +1 -1
- package/deployments/aptos-sandbox-local/MsgLibV3.json +1 -1
- package/deployments/aptos-sandbox-local/MsglibAuth.json +1 -1
- package/deployments/aptos-sandbox-local/Zro.json +1 -1
- package/deployments/aptos-sandbox-local/airdrop_wrapper.json +1 -1
- package/deployments/aptos-sandbox-local/executor_fee_lib_router_v1.json +1 -1
- package/deployments/aptos-sandbox-local/executor_fee_lib_router_v2.json +1 -1
- package/deployments/aptos-sandbox-local/executor_fee_lib_router_v3.json +1 -1
- package/deployments/aptos-sandbox-local/executor_fee_lib_v1.json +1 -1
- package/deployments/aptos-sandbox-local/executor_v2_fee_lib_router_v1.json +1 -1
- package/deployments/aptos-sandbox-local/executor_v2_fee_lib_router_v2.json +1 -1
- package/deployments/aptos-sandbox-local/fa_converter.json +1 -1
- package/deployments/aptos-sandbox-local/layerzero_view.json +1 -1
- package/deployments/aptos-sandbox-local/layerzero_view_uln301.json +1 -1
- package/deployments/aptos-sandbox-local/msglib_routing_helper.json +1 -1
- package/deployments/aptos-sandbox-local/packet_converter.json +1 -1
- package/deployments/aptos-sandbox-local/uln_301.json +1 -1
- package/deployments/aptos-sandbox-local/uln_301_receive_helper.json +1 -1
- package/dist/index.cjs +6 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -32
- package/dist/index.d.ts +4 -32
- package/dist/index.mjs +6 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.cts
CHANGED
|
@@ -797,22 +797,6 @@ declare class ExecutorConfig {
|
|
|
797
797
|
setDefaultExecutorPayload(remoteChainId: aptos.BCS.Uint16, version: aptos.BCS.Uint8, executor: aptos.MaybeHexString): aptos.Types.EntryFunctionPayload;
|
|
798
798
|
}
|
|
799
799
|
|
|
800
|
-
declare class ExecutorV2 {
|
|
801
|
-
private sdk;
|
|
802
|
-
/**
|
|
803
|
-
* The module name.
|
|
804
|
-
*/
|
|
805
|
-
readonly module: string;
|
|
806
|
-
readonly type: string;
|
|
807
|
-
/**
|
|
808
|
-
* Creates an instance of the UlnReceive class.
|
|
809
|
-
*
|
|
810
|
-
* @param {SDK} sdk - The SDK instance.
|
|
811
|
-
*/
|
|
812
|
-
constructor(sdk: SDK);
|
|
813
|
-
quoteFee(uaAddress: string, executorAddress: string, dstChainId: bigint, adapterParams: Uint8Array): Promise<aptos.BCS.Uint64>;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
800
|
declare class MsgLib {
|
|
817
801
|
private sdk;
|
|
818
802
|
/**
|
|
@@ -1918,11 +1902,6 @@ declare class Layerzero {
|
|
|
1918
1902
|
* @see {@link Executor}
|
|
1919
1903
|
*/
|
|
1920
1904
|
Executor: Executor;
|
|
1921
|
-
/**
|
|
1922
|
-
* The ExecutorV2 instance.
|
|
1923
|
-
* @see {@link ExecutorV2}
|
|
1924
|
-
*/
|
|
1925
|
-
ExecutorV2: ExecutorV2;
|
|
1926
1905
|
/**
|
|
1927
1906
|
* The Endpoint instance.
|
|
1928
1907
|
* @see {@link Endpoint}
|
|
@@ -2040,9 +2019,6 @@ declare const EXECUTOR_EXT_ADDRESS: {
|
|
|
2040
2019
|
declare const EXECUTOR_V2_ADDRESS: {
|
|
2041
2020
|
[stage in Stage]?: string;
|
|
2042
2021
|
};
|
|
2043
|
-
declare const EXECUTOR_FEE_LIB_V1_ADDRESS: {
|
|
2044
|
-
[stage in Stage]?: string;
|
|
2045
|
-
};
|
|
2046
2022
|
/**
|
|
2047
2023
|
* Layerzero apps public keys for different stages.
|
|
2048
2024
|
*/
|
|
@@ -2089,7 +2065,6 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
|
|
|
2089
2065
|
declare const constants_COUNTER_ADDRESS: typeof COUNTER_ADDRESS;
|
|
2090
2066
|
declare const constants_EXECUTOR_ADDRESS: typeof EXECUTOR_ADDRESS;
|
|
2091
2067
|
declare const constants_EXECUTOR_EXT_ADDRESS: typeof EXECUTOR_EXT_ADDRESS;
|
|
2092
|
-
declare const constants_EXECUTOR_FEE_LIB_V1_ADDRESS: typeof EXECUTOR_FEE_LIB_V1_ADDRESS;
|
|
2093
2068
|
declare const constants_EXECUTOR_V2_ADDRESS: typeof EXECUTOR_V2_ADDRESS;
|
|
2094
2069
|
declare const constants_FAUCET_URL: typeof FAUCET_URL;
|
|
2095
2070
|
declare const constants_LAYERZERO_ADDRESS: typeof LAYERZERO_ADDRESS;
|
|
@@ -2106,7 +2081,7 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
|
|
|
2106
2081
|
declare const constants_ULN_301_ADDRESS: typeof ULN_301_ADDRESS;
|
|
2107
2082
|
declare const constants_ULN_301_RECEIVE_HELPER_ADDRESS: typeof ULN_301_RECEIVE_HELPER_ADDRESS;
|
|
2108
2083
|
declare namespace constants {
|
|
2109
|
-
export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS,
|
|
2084
|
+
export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS, constants_EXECUTOR_V2_ADDRESS as EXECUTOR_V2_ADDRESS, constants_FAUCET_URL as FAUCET_URL, constants_LAYERZERO_ADDRESS as LAYERZERO_ADDRESS, constants_LAYERZERO_APPS_ADDRESS as LAYERZERO_APPS_ADDRESS, constants_LAYERZERO_APPS_PUBKEY as LAYERZERO_APPS_PUBKEY, constants_LAYERZERO_VIEW_ADDRESS as LAYERZERO_VIEW_ADDRESS, constants_LAYERZERO_VIEW_ULN301_ADDRESS as LAYERZERO_VIEW_ULN301_ADDRESS, constants_MSGLIB_ROUTING_HELPER_ADDRESS as MSGLIB_ROUTING_HELPER_ADDRESS, constants_NODE_URL as NODE_URL, constants_OFT_PRECRIME_ADDRESS as OFT_PRECRIME_ADDRESS, constants_ORACLE_ADDRESS as ORACLE_ADDRESS, constants_ORACLE_SIGNER_ADDRESS as ORACLE_SIGNER_ADDRESS, constants_RELAYER_SIGNER_ADDRESS as RELAYER_SIGNER_ADDRESS, constants_ULN_301_ADDRESS as ULN_301_ADDRESS, constants_ULN_301_RECEIVE_HELPER_ADDRESS as ULN_301_RECEIVE_HELPER_ADDRESS };
|
|
2110
2085
|
}
|
|
2111
2086
|
|
|
2112
2087
|
/**
|
|
@@ -2786,10 +2761,9 @@ declare class Counter {
|
|
|
2786
2761
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
2787
2762
|
* @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
|
|
2788
2763
|
* @param {Uint8Array} adapterParams - The adapter parameters.
|
|
2789
|
-
* @param {Uint8Array} msglibParams - The msglib parameters.
|
|
2790
2764
|
* @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
|
|
2791
2765
|
*/
|
|
2792
|
-
sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array
|
|
2766
|
+
sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): aptos.Types.EntryFunctionPayload;
|
|
2793
2767
|
/**
|
|
2794
2768
|
* Sends data to a remote chain.
|
|
2795
2769
|
*
|
|
@@ -2797,10 +2771,9 @@ declare class Counter {
|
|
|
2797
2771
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
2798
2772
|
* @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
|
|
2799
2773
|
* @param {Uint8Array} adapterParams - The adapter parameters.
|
|
2800
|
-
* @param {Uint8Array} msglibParams - The msglib parameters.
|
|
2801
2774
|
* @returns {Promise<aptos.Types.Transaction>} The transaction result.
|
|
2802
2775
|
*/
|
|
2803
|
-
sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array
|
|
2776
|
+
sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): Promise<aptos.Types.Transaction>;
|
|
2804
2777
|
/**
|
|
2805
2778
|
* Receives data from a remote chain.
|
|
2806
2779
|
*
|
|
@@ -2823,11 +2796,10 @@ declare class Counter {
|
|
|
2823
2796
|
*
|
|
2824
2797
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
2825
2798
|
* @param {string} adapterParams - The adapter parameters.
|
|
2826
|
-
* @param {string} msglibParams - The msglib parameters.
|
|
2827
2799
|
* @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
|
|
2828
2800
|
* @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
|
|
2829
2801
|
*/
|
|
2830
|
-
quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string,
|
|
2802
|
+
quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
|
|
2831
2803
|
}
|
|
2832
2804
|
|
|
2833
2805
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -797,22 +797,6 @@ declare class ExecutorConfig {
|
|
|
797
797
|
setDefaultExecutorPayload(remoteChainId: aptos.BCS.Uint16, version: aptos.BCS.Uint8, executor: aptos.MaybeHexString): aptos.Types.EntryFunctionPayload;
|
|
798
798
|
}
|
|
799
799
|
|
|
800
|
-
declare class ExecutorV2 {
|
|
801
|
-
private sdk;
|
|
802
|
-
/**
|
|
803
|
-
* The module name.
|
|
804
|
-
*/
|
|
805
|
-
readonly module: string;
|
|
806
|
-
readonly type: string;
|
|
807
|
-
/**
|
|
808
|
-
* Creates an instance of the UlnReceive class.
|
|
809
|
-
*
|
|
810
|
-
* @param {SDK} sdk - The SDK instance.
|
|
811
|
-
*/
|
|
812
|
-
constructor(sdk: SDK);
|
|
813
|
-
quoteFee(uaAddress: string, executorAddress: string, dstChainId: bigint, adapterParams: Uint8Array): Promise<aptos.BCS.Uint64>;
|
|
814
|
-
}
|
|
815
|
-
|
|
816
800
|
declare class MsgLib {
|
|
817
801
|
private sdk;
|
|
818
802
|
/**
|
|
@@ -1918,11 +1902,6 @@ declare class Layerzero {
|
|
|
1918
1902
|
* @see {@link Executor}
|
|
1919
1903
|
*/
|
|
1920
1904
|
Executor: Executor;
|
|
1921
|
-
/**
|
|
1922
|
-
* The ExecutorV2 instance.
|
|
1923
|
-
* @see {@link ExecutorV2}
|
|
1924
|
-
*/
|
|
1925
|
-
ExecutorV2: ExecutorV2;
|
|
1926
1905
|
/**
|
|
1927
1906
|
* The Endpoint instance.
|
|
1928
1907
|
* @see {@link Endpoint}
|
|
@@ -2040,9 +2019,6 @@ declare const EXECUTOR_EXT_ADDRESS: {
|
|
|
2040
2019
|
declare const EXECUTOR_V2_ADDRESS: {
|
|
2041
2020
|
[stage in Stage]?: string;
|
|
2042
2021
|
};
|
|
2043
|
-
declare const EXECUTOR_FEE_LIB_V1_ADDRESS: {
|
|
2044
|
-
[stage in Stage]?: string;
|
|
2045
|
-
};
|
|
2046
2022
|
/**
|
|
2047
2023
|
* Layerzero apps public keys for different stages.
|
|
2048
2024
|
*/
|
|
@@ -2089,7 +2065,6 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
|
|
|
2089
2065
|
declare const constants_COUNTER_ADDRESS: typeof COUNTER_ADDRESS;
|
|
2090
2066
|
declare const constants_EXECUTOR_ADDRESS: typeof EXECUTOR_ADDRESS;
|
|
2091
2067
|
declare const constants_EXECUTOR_EXT_ADDRESS: typeof EXECUTOR_EXT_ADDRESS;
|
|
2092
|
-
declare const constants_EXECUTOR_FEE_LIB_V1_ADDRESS: typeof EXECUTOR_FEE_LIB_V1_ADDRESS;
|
|
2093
2068
|
declare const constants_EXECUTOR_V2_ADDRESS: typeof EXECUTOR_V2_ADDRESS;
|
|
2094
2069
|
declare const constants_FAUCET_URL: typeof FAUCET_URL;
|
|
2095
2070
|
declare const constants_LAYERZERO_ADDRESS: typeof LAYERZERO_ADDRESS;
|
|
@@ -2106,7 +2081,7 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
|
|
|
2106
2081
|
declare const constants_ULN_301_ADDRESS: typeof ULN_301_ADDRESS;
|
|
2107
2082
|
declare const constants_ULN_301_RECEIVE_HELPER_ADDRESS: typeof ULN_301_RECEIVE_HELPER_ADDRESS;
|
|
2108
2083
|
declare namespace constants {
|
|
2109
|
-
export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS,
|
|
2084
|
+
export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS, constants_EXECUTOR_V2_ADDRESS as EXECUTOR_V2_ADDRESS, constants_FAUCET_URL as FAUCET_URL, constants_LAYERZERO_ADDRESS as LAYERZERO_ADDRESS, constants_LAYERZERO_APPS_ADDRESS as LAYERZERO_APPS_ADDRESS, constants_LAYERZERO_APPS_PUBKEY as LAYERZERO_APPS_PUBKEY, constants_LAYERZERO_VIEW_ADDRESS as LAYERZERO_VIEW_ADDRESS, constants_LAYERZERO_VIEW_ULN301_ADDRESS as LAYERZERO_VIEW_ULN301_ADDRESS, constants_MSGLIB_ROUTING_HELPER_ADDRESS as MSGLIB_ROUTING_HELPER_ADDRESS, constants_NODE_URL as NODE_URL, constants_OFT_PRECRIME_ADDRESS as OFT_PRECRIME_ADDRESS, constants_ORACLE_ADDRESS as ORACLE_ADDRESS, constants_ORACLE_SIGNER_ADDRESS as ORACLE_SIGNER_ADDRESS, constants_RELAYER_SIGNER_ADDRESS as RELAYER_SIGNER_ADDRESS, constants_ULN_301_ADDRESS as ULN_301_ADDRESS, constants_ULN_301_RECEIVE_HELPER_ADDRESS as ULN_301_RECEIVE_HELPER_ADDRESS };
|
|
2110
2085
|
}
|
|
2111
2086
|
|
|
2112
2087
|
/**
|
|
@@ -2786,10 +2761,9 @@ declare class Counter {
|
|
|
2786
2761
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
2787
2762
|
* @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
|
|
2788
2763
|
* @param {Uint8Array} adapterParams - The adapter parameters.
|
|
2789
|
-
* @param {Uint8Array} msglibParams - The msglib parameters.
|
|
2790
2764
|
* @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
|
|
2791
2765
|
*/
|
|
2792
|
-
sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array
|
|
2766
|
+
sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): aptos.Types.EntryFunctionPayload;
|
|
2793
2767
|
/**
|
|
2794
2768
|
* Sends data to a remote chain.
|
|
2795
2769
|
*
|
|
@@ -2797,10 +2771,9 @@ declare class Counter {
|
|
|
2797
2771
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
2798
2772
|
* @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
|
|
2799
2773
|
* @param {Uint8Array} adapterParams - The adapter parameters.
|
|
2800
|
-
* @param {Uint8Array} msglibParams - The msglib parameters.
|
|
2801
2774
|
* @returns {Promise<aptos.Types.Transaction>} The transaction result.
|
|
2802
2775
|
*/
|
|
2803
|
-
sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array
|
|
2776
|
+
sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): Promise<aptos.Types.Transaction>;
|
|
2804
2777
|
/**
|
|
2805
2778
|
* Receives data from a remote chain.
|
|
2806
2779
|
*
|
|
@@ -2823,11 +2796,10 @@ declare class Counter {
|
|
|
2823
2796
|
*
|
|
2824
2797
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
2825
2798
|
* @param {string} adapterParams - The adapter parameters.
|
|
2826
|
-
* @param {string} msglibParams - The msglib parameters.
|
|
2827
2799
|
* @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
|
|
2828
2800
|
* @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
|
|
2829
2801
|
*/
|
|
2830
|
-
quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string,
|
|
2802
|
+
quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
|
|
2831
2803
|
}
|
|
2832
2804
|
|
|
2833
2805
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -25,7 +25,6 @@ __export(constants_exports, {
|
|
|
25
25
|
COUNTER_ADDRESS: () => COUNTER_ADDRESS,
|
|
26
26
|
EXECUTOR_ADDRESS: () => EXECUTOR_ADDRESS,
|
|
27
27
|
EXECUTOR_EXT_ADDRESS: () => EXECUTOR_EXT_ADDRESS,
|
|
28
|
-
EXECUTOR_FEE_LIB_V1_ADDRESS: () => EXECUTOR_FEE_LIB_V1_ADDRESS,
|
|
29
28
|
EXECUTOR_V2_ADDRESS: () => EXECUTOR_V2_ADDRESS,
|
|
30
29
|
FAUCET_URL: () => FAUCET_URL,
|
|
31
30
|
LAYERZERO_ADDRESS: () => LAYERZERO_ADDRESS,
|
|
@@ -125,12 +124,6 @@ var EXECUTOR_V2_ADDRESS = {
|
|
|
125
124
|
[Stage.TESTNET]: "0x1759cc0d3161f1eb79f65847d4feb9d1f74fb79014698a23b16b28b9cd4c37e3",
|
|
126
125
|
[Stage.SANDBOX]: "0xf2e1e034475dc0439487dd09dfc3950c462f731599e53a6b015dd85502352e68"
|
|
127
126
|
};
|
|
128
|
-
var EXECUTOR_FEE_LIB_V1_ADDRESS = {
|
|
129
|
-
[Stage.MAINNET]: "",
|
|
130
|
-
// MAINNET
|
|
131
|
-
[Stage.TESTNET]: "",
|
|
132
|
-
[Stage.SANDBOX]: "0x53268a3c075dbe2518b60b5e6f9f8a4df7433f48cd350375538c5f5205d7b6b3"
|
|
133
|
-
};
|
|
134
127
|
var LAYERZERO_APPS_PUBKEY = {
|
|
135
128
|
[Stage.MAINNET]: "0xf57e5a95ae0e2b5f999ac14abd0ff73daf64e6e7e2a1fad024f2e44422e88d76",
|
|
136
129
|
// MAINNET
|
|
@@ -3117,34 +3110,6 @@ var ExecutorConfig = class {
|
|
|
3117
3110
|
};
|
|
3118
3111
|
}
|
|
3119
3112
|
};
|
|
3120
|
-
|
|
3121
|
-
// src/modules/executor_v2.ts
|
|
3122
|
-
var ExecutorV2 = class {
|
|
3123
|
-
/**
|
|
3124
|
-
* Creates an instance of the UlnReceive class.
|
|
3125
|
-
*
|
|
3126
|
-
* @param {SDK} sdk - The SDK instance.
|
|
3127
|
-
*/
|
|
3128
|
-
constructor(sdk) {
|
|
3129
|
-
this.sdk = sdk;
|
|
3130
|
-
this.module = `${sdk.accounts.executor_v2}::executor_v2`;
|
|
3131
|
-
this.type = `${this.module}::Executor`;
|
|
3132
|
-
}
|
|
3133
|
-
/**
|
|
3134
|
-
* The module name.
|
|
3135
|
-
*/
|
|
3136
|
-
module;
|
|
3137
|
-
type;
|
|
3138
|
-
async quoteFee(uaAddress, executorAddress, dstChainId, adapterParams) {
|
|
3139
|
-
const payload = {
|
|
3140
|
-
function: `${this.module}::quote_fee`,
|
|
3141
|
-
type_arguments: [],
|
|
3142
|
-
arguments: [uaAddress, executorAddress, dstChainId, adapterParams]
|
|
3143
|
-
};
|
|
3144
|
-
const ret = await this.sdk.client.view(payload);
|
|
3145
|
-
return ret[0];
|
|
3146
|
-
}
|
|
3147
|
-
};
|
|
3148
3113
|
var MsgLib = class {
|
|
3149
3114
|
/**
|
|
3150
3115
|
* Creates an instance of the MsgLib class.
|
|
@@ -4695,11 +4660,6 @@ var Layerzero = class {
|
|
|
4695
4660
|
* @see {@link Executor}
|
|
4696
4661
|
*/
|
|
4697
4662
|
Executor;
|
|
4698
|
-
/**
|
|
4699
|
-
* The ExecutorV2 instance.
|
|
4700
|
-
* @see {@link ExecutorV2}
|
|
4701
|
-
*/
|
|
4702
|
-
ExecutorV2;
|
|
4703
4663
|
/**
|
|
4704
4664
|
* The Endpoint instance.
|
|
4705
4665
|
* @see {@link Endpoint}
|
|
@@ -4748,7 +4708,6 @@ var Layerzero = class {
|
|
|
4748
4708
|
constructor(sdk) {
|
|
4749
4709
|
this.Channel = new Channel(sdk);
|
|
4750
4710
|
this.Executor = new Executor(sdk);
|
|
4751
|
-
this.ExecutorV2 = new ExecutorV2(sdk);
|
|
4752
4711
|
this.Endpoint = new Endpoint(sdk);
|
|
4753
4712
|
this.MsgLibConfig = new MsgLibConfig(sdk);
|
|
4754
4713
|
this.MsgLibAuth = new MsgLibAuth(sdk);
|
|
@@ -6149,14 +6108,13 @@ var Counter = class {
|
|
|
6149
6108
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
6150
6109
|
* @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
|
|
6151
6110
|
* @param {Uint8Array} adapterParams - The adapter parameters.
|
|
6152
|
-
* @param {Uint8Array} msglibParams - The msglib parameters.
|
|
6153
6111
|
* @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
|
|
6154
6112
|
*/
|
|
6155
|
-
sendToRemotePayload(remoteChainId, fee, adapterParams
|
|
6113
|
+
sendToRemotePayload(remoteChainId, fee, adapterParams) {
|
|
6156
6114
|
const result = {
|
|
6157
6115
|
function: `${this.address}::counter::send_to_remote`,
|
|
6158
6116
|
type_arguments: [],
|
|
6159
|
-
arguments: [remoteChainId, fee, Array.from(adapterParams)
|
|
6117
|
+
arguments: [remoteChainId, fee, Array.from(adapterParams)]
|
|
6160
6118
|
};
|
|
6161
6119
|
return result;
|
|
6162
6120
|
}
|
|
@@ -6167,14 +6125,13 @@ var Counter = class {
|
|
|
6167
6125
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
6168
6126
|
* @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
|
|
6169
6127
|
* @param {Uint8Array} adapterParams - The adapter parameters.
|
|
6170
|
-
* @param {Uint8Array} msglibParams - The msglib parameters.
|
|
6171
6128
|
* @returns {Promise<aptos.Types.Transaction>} The transaction result.
|
|
6172
6129
|
*/
|
|
6173
|
-
async sendToRemote(signer, remoteChainId, fee, adapterParams
|
|
6130
|
+
async sendToRemote(signer, remoteChainId, fee, adapterParams) {
|
|
6174
6131
|
const transaction = {
|
|
6175
6132
|
function: `${this.address}::counter::send_to_remote`,
|
|
6176
6133
|
type_arguments: [],
|
|
6177
|
-
arguments: [remoteChainId, fee, Array.from(adapterParams)
|
|
6134
|
+
arguments: [remoteChainId, fee, Array.from(adapterParams)]
|
|
6178
6135
|
};
|
|
6179
6136
|
return this.sdk.sendAndConfirmTransaction(signer, transaction);
|
|
6180
6137
|
}
|
|
@@ -6218,15 +6175,14 @@ var Counter = class {
|
|
|
6218
6175
|
*
|
|
6219
6176
|
* @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
|
|
6220
6177
|
* @param {string} adapterParams - The adapter parameters.
|
|
6221
|
-
* @param {string} msglibParams - The msglib parameters.
|
|
6222
6178
|
* @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
|
|
6223
6179
|
* @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
|
|
6224
6180
|
*/
|
|
6225
|
-
async quoteFee(remoteChainId, adapterParams,
|
|
6181
|
+
async quoteFee(remoteChainId, adapterParams, payInZro) {
|
|
6226
6182
|
const payload = {
|
|
6227
6183
|
function: `${this.address}::counter::quote_fee`,
|
|
6228
6184
|
type_arguments: [],
|
|
6229
|
-
arguments: [remoteChainId.toString(), adapterParams,
|
|
6185
|
+
arguments: [remoteChainId.toString(), adapterParams, payInZro]
|
|
6230
6186
|
};
|
|
6231
6187
|
const view = await this.sdk.viewFunction(payload);
|
|
6232
6188
|
return view[0];
|