@pyxisjs/chains 0.2.2 → 0.2.4
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/dist/index.d.mts +63 -6969
- package/dist/index.d.ts +63 -6969
- package/dist/index.js +1859 -112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1873 -115
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -392,18 +392,19 @@ var require_utc = __commonJS({
|
|
|
392
392
|
// src/index.ts
|
|
393
393
|
var index_exports = {};
|
|
394
394
|
__export(index_exports, {
|
|
395
|
-
AccountantABI: () =>
|
|
396
|
-
AccountantAptosABI: () =>
|
|
395
|
+
AccountantABI: () => AccountantABI,
|
|
396
|
+
AccountantAptosABI: () => AccountantAptosABI,
|
|
397
397
|
AptosAnalyticsClient: () => AptosAnalyticsClient,
|
|
398
398
|
AptosChainAdapter: () => AptosChainAdapter,
|
|
399
|
-
AtomicQueueABI: () =>
|
|
400
|
-
AtomicQueueAptosABI: () =>
|
|
401
|
-
BoringVaultABI: () =>
|
|
399
|
+
AtomicQueueABI: () => AtomicQueueABI,
|
|
400
|
+
AtomicQueueAptosABI: () => AtomicQueueAptosABI,
|
|
401
|
+
BoringVaultABI: () => BoringVaultABI,
|
|
402
402
|
CONTRACTS: () => CONTRACTS,
|
|
403
403
|
EthereumChainAdapter: () => EthereumChainAdapter,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
404
|
+
MultiChainLayerZeroTellerAptosABI: () => MultiChainLayerZeroTellerAptosABI,
|
|
405
|
+
TellerAptosABI: () => TellerAptosABI,
|
|
406
|
+
TellerWithMultiAssetSupportABI: () => TellerWithMultiAssetSupportABI,
|
|
407
|
+
VaultAptosABI: () => VaultAptosABI,
|
|
407
408
|
getContractABI: () => getContractABI,
|
|
408
409
|
getFunctionSignature: () => getFunctionSignature,
|
|
409
410
|
mapIndexerToVaultActivity: () => mapIndexerToVaultActivity
|
|
@@ -2753,9 +2754,171 @@ var Vault_default = {
|
|
|
2753
2754
|
]
|
|
2754
2755
|
};
|
|
2755
2756
|
|
|
2757
|
+
// src/aptos/abis/MultiChainLayerZeroTeller.json
|
|
2758
|
+
var MultiChainLayerZeroTeller_default = {
|
|
2759
|
+
address: "0xfa6387d040ba849299b684f853ab302e83fe9e51121047a3b312f89bf4efda5f",
|
|
2760
|
+
name: "multi_chain_lz_teller",
|
|
2761
|
+
friends: [
|
|
2762
|
+
"0xfa6387d040ba849299b684f853ab302e83fe9e51121047a3b312f89bf4efda5f::oapp_receive"
|
|
2763
|
+
],
|
|
2764
|
+
exposed_functions: [
|
|
2765
|
+
{
|
|
2766
|
+
name: "initialize",
|
|
2767
|
+
visibility: "public",
|
|
2768
|
+
is_entry: false,
|
|
2769
|
+
is_view: false,
|
|
2770
|
+
generic_type_params: [],
|
|
2771
|
+
params: ["&signer"],
|
|
2772
|
+
return: []
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
name: "bridge",
|
|
2776
|
+
visibility: "public",
|
|
2777
|
+
is_entry: true,
|
|
2778
|
+
is_view: false,
|
|
2779
|
+
generic_type_params: [],
|
|
2780
|
+
params: [
|
|
2781
|
+
"&signer",
|
|
2782
|
+
"address",
|
|
2783
|
+
"u32",
|
|
2784
|
+
"vector<u8>",
|
|
2785
|
+
"u64",
|
|
2786
|
+
"u64",
|
|
2787
|
+
"u64",
|
|
2788
|
+
"vector<u8>"
|
|
2789
|
+
],
|
|
2790
|
+
return: []
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
name: "deposit_and_bridge",
|
|
2794
|
+
visibility: "public",
|
|
2795
|
+
is_entry: true,
|
|
2796
|
+
is_view: false,
|
|
2797
|
+
generic_type_params: [],
|
|
2798
|
+
params: [
|
|
2799
|
+
"&signer",
|
|
2800
|
+
"address",
|
|
2801
|
+
"address",
|
|
2802
|
+
"u64",
|
|
2803
|
+
"u64",
|
|
2804
|
+
"u32",
|
|
2805
|
+
"vector<u8>",
|
|
2806
|
+
"u64",
|
|
2807
|
+
"u64",
|
|
2808
|
+
"vector<u8>"
|
|
2809
|
+
],
|
|
2810
|
+
return: []
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
name: "lz_receive",
|
|
2814
|
+
visibility: "friend",
|
|
2815
|
+
is_entry: false,
|
|
2816
|
+
is_view: false,
|
|
2817
|
+
generic_type_params: [],
|
|
2818
|
+
params: [
|
|
2819
|
+
"u32",
|
|
2820
|
+
"vector<u8>",
|
|
2821
|
+
"u64",
|
|
2822
|
+
"0xe60045e20fc2c99e869c1c34a65b9291c020cd12a0d37a00a53ac1348af4f43c::endpoint::WrappedGuid",
|
|
2823
|
+
"vector<u8>",
|
|
2824
|
+
"vector<u8>",
|
|
2825
|
+
"0x1::option::Option<0x1::fungible_asset::FungibleAsset>"
|
|
2826
|
+
],
|
|
2827
|
+
return: []
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
name: "quote_bridge",
|
|
2831
|
+
visibility: "public",
|
|
2832
|
+
is_entry: false,
|
|
2833
|
+
is_view: true,
|
|
2834
|
+
generic_type_params: [],
|
|
2835
|
+
params: ["address", "u32", "u64", "vector<u8>", "vector<u8>", "bool"],
|
|
2836
|
+
return: ["u64", "u64"]
|
|
2837
|
+
}
|
|
2838
|
+
],
|
|
2839
|
+
structs: [
|
|
2840
|
+
{
|
|
2841
|
+
name: "TellerCapabilities",
|
|
2842
|
+
is_native: false,
|
|
2843
|
+
is_event: false,
|
|
2844
|
+
is_enum: true,
|
|
2845
|
+
abilities: ["key"],
|
|
2846
|
+
generic_type_params: [],
|
|
2847
|
+
fields: []
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
name: "MessageReceived",
|
|
2851
|
+
is_native: false,
|
|
2852
|
+
is_event: true,
|
|
2853
|
+
is_enum: false,
|
|
2854
|
+
abilities: ["drop", "store"],
|
|
2855
|
+
generic_type_params: [],
|
|
2856
|
+
fields: [
|
|
2857
|
+
{
|
|
2858
|
+
name: "message_id",
|
|
2859
|
+
type: "vector<u8>"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
name: "share_amount_ld",
|
|
2863
|
+
type: "u64"
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
name: "recipient",
|
|
2867
|
+
type: "address"
|
|
2868
|
+
}
|
|
2869
|
+
]
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
name: "MessageSent",
|
|
2873
|
+
is_native: false,
|
|
2874
|
+
is_event: true,
|
|
2875
|
+
is_enum: false,
|
|
2876
|
+
abilities: ["drop", "store"],
|
|
2877
|
+
generic_type_params: [],
|
|
2878
|
+
fields: [
|
|
2879
|
+
{
|
|
2880
|
+
name: "message_id",
|
|
2881
|
+
type: "vector<u8>"
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
name: "share_amount_ld",
|
|
2885
|
+
type: "u64"
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
name: "recipient_raw",
|
|
2889
|
+
type: "vector<u8>"
|
|
2890
|
+
}
|
|
2891
|
+
]
|
|
2892
|
+
}
|
|
2893
|
+
]
|
|
2894
|
+
};
|
|
2895
|
+
|
|
2896
|
+
// src/aptos/abis/index.ts
|
|
2897
|
+
var AccountantAptosABI = Accountant_default;
|
|
2898
|
+
var AtomicQueueAptosABI = AtomicQueue_default;
|
|
2899
|
+
var TellerAptosABI = Teller_default;
|
|
2900
|
+
var VaultAptosABI = Vault_default;
|
|
2901
|
+
var MultiChainLayerZeroTellerAptosABI = MultiChainLayerZeroTeller_default;
|
|
2902
|
+
|
|
2756
2903
|
// src/aptos/adapter.ts
|
|
2757
2904
|
var import_ts_sdk = require("@aptos-labs/ts-sdk");
|
|
2758
2905
|
var import_core2 = require("@pyxisjs/core");
|
|
2906
|
+
var import_lz_v2_utilities = require("@layerzerolabs/lz-v2-utilities");
|
|
2907
|
+
|
|
2908
|
+
// ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
2909
|
+
var isProduction = process.env.NODE_ENV === "production";
|
|
2910
|
+
var prefix = "Invariant failed";
|
|
2911
|
+
function invariant(condition, message) {
|
|
2912
|
+
if (condition) {
|
|
2913
|
+
return;
|
|
2914
|
+
}
|
|
2915
|
+
if (isProduction) {
|
|
2916
|
+
throw new Error(prefix);
|
|
2917
|
+
}
|
|
2918
|
+
var provided = typeof message === "function" ? message() : message;
|
|
2919
|
+
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
2920
|
+
throw new Error(value);
|
|
2921
|
+
}
|
|
2759
2922
|
|
|
2760
2923
|
// src/common/contracts.ts
|
|
2761
2924
|
var import_core = require("@pyxisjs/core");
|
|
@@ -6691,88 +6854,1403 @@ var Teller_default2 = [
|
|
|
6691
6854
|
}
|
|
6692
6855
|
];
|
|
6693
6856
|
|
|
6694
|
-
// src/
|
|
6695
|
-
var
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6857
|
+
// src/evm/abis/MultiChainLayerZeroTeller.json
|
|
6858
|
+
var MultiChainLayerZeroTeller_default2 = [
|
|
6859
|
+
{
|
|
6860
|
+
type: "constructor",
|
|
6861
|
+
inputs: [
|
|
6862
|
+
{ name: "_owner", type: "address", internalType: "address" },
|
|
6863
|
+
{ name: "_vault", type: "address", internalType: "address" },
|
|
6864
|
+
{ name: "_accountant", type: "address", internalType: "address" },
|
|
6865
|
+
{ name: "_endpoint", type: "address", internalType: "address" }
|
|
6866
|
+
],
|
|
6867
|
+
stateMutability: "nonpayable"
|
|
6868
|
+
},
|
|
6869
|
+
{
|
|
6870
|
+
type: "function",
|
|
6871
|
+
name: "accountant",
|
|
6872
|
+
inputs: [],
|
|
6873
|
+
outputs: [
|
|
6874
|
+
{
|
|
6875
|
+
name: "",
|
|
6876
|
+
type: "address",
|
|
6877
|
+
internalType: "contract AccountantWithRateProviders"
|
|
6715
6878
|
}
|
|
6716
|
-
|
|
6879
|
+
],
|
|
6880
|
+
stateMutability: "view"
|
|
6717
6881
|
},
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6882
|
+
{
|
|
6883
|
+
type: "function",
|
|
6884
|
+
name: "addAsset",
|
|
6885
|
+
inputs: [
|
|
6886
|
+
{ name: "asset", type: "address", internalType: "contract ERC20" }
|
|
6887
|
+
],
|
|
6888
|
+
outputs: [],
|
|
6889
|
+
stateMutability: "nonpayable"
|
|
6890
|
+
},
|
|
6891
|
+
{
|
|
6892
|
+
type: "function",
|
|
6893
|
+
name: "addChain",
|
|
6894
|
+
inputs: [
|
|
6895
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" },
|
|
6896
|
+
{ name: "allowMessagesFrom", type: "bool", internalType: "bool" },
|
|
6897
|
+
{ name: "allowMessagesTo", type: "bool", internalType: "bool" },
|
|
6898
|
+
{
|
|
6899
|
+
name: "targetTeller",
|
|
6900
|
+
type: "address",
|
|
6901
|
+
internalType: "address"
|
|
6731
6902
|
},
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6903
|
+
{
|
|
6904
|
+
name: "messageGasLimit",
|
|
6905
|
+
type: "uint64",
|
|
6906
|
+
internalType: "uint64"
|
|
6907
|
+
},
|
|
6908
|
+
{ name: "messageGasMin", type: "uint64", internalType: "uint64" }
|
|
6909
|
+
],
|
|
6910
|
+
outputs: [],
|
|
6911
|
+
stateMutability: "nonpayable"
|
|
6912
|
+
},
|
|
6913
|
+
{
|
|
6914
|
+
type: "function",
|
|
6915
|
+
name: "allowInitializePath",
|
|
6916
|
+
inputs: [
|
|
6917
|
+
{
|
|
6918
|
+
name: "origin",
|
|
6919
|
+
type: "tuple",
|
|
6920
|
+
internalType: "struct Origin",
|
|
6921
|
+
components: [
|
|
6922
|
+
{ name: "srcEid", type: "uint32", internalType: "uint32" },
|
|
6923
|
+
{ name: "sender", type: "bytes32", internalType: "bytes32" },
|
|
6924
|
+
{ name: "nonce", type: "uint64", internalType: "uint64" }
|
|
6925
|
+
]
|
|
6738
6926
|
}
|
|
6739
|
-
|
|
6927
|
+
],
|
|
6928
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
6929
|
+
stateMutability: "view"
|
|
6740
6930
|
},
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6931
|
+
{
|
|
6932
|
+
type: "function",
|
|
6933
|
+
name: "allowMessagesFromChain",
|
|
6934
|
+
inputs: [
|
|
6935
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" },
|
|
6936
|
+
{ name: "targetTeller", type: "address", internalType: "address" }
|
|
6937
|
+
],
|
|
6938
|
+
outputs: [],
|
|
6939
|
+
stateMutability: "nonpayable"
|
|
6940
|
+
},
|
|
6941
|
+
{
|
|
6942
|
+
type: "function",
|
|
6943
|
+
name: "allowMessagesToChain",
|
|
6944
|
+
inputs: [
|
|
6945
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" },
|
|
6946
|
+
{
|
|
6947
|
+
name: "targetTeller",
|
|
6948
|
+
type: "address",
|
|
6949
|
+
internalType: "address"
|
|
6760
6950
|
},
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
update_atomic_request: "updateAtomicRequest",
|
|
6766
|
-
get_request_updated_at: "getRequestUpdatedAt",
|
|
6767
|
-
get_user_atomic_requests: "getUserAtomicRequests"
|
|
6951
|
+
{
|
|
6952
|
+
name: "messageGasLimit",
|
|
6953
|
+
type: "uint64",
|
|
6954
|
+
internalType: "uint64"
|
|
6768
6955
|
}
|
|
6769
|
-
|
|
6956
|
+
],
|
|
6957
|
+
outputs: [],
|
|
6958
|
+
stateMutability: "nonpayable"
|
|
6770
6959
|
},
|
|
6771
|
-
|
|
6772
|
-
|
|
6960
|
+
{
|
|
6961
|
+
type: "function",
|
|
6962
|
+
name: "authority",
|
|
6963
|
+
inputs: [],
|
|
6964
|
+
outputs: [
|
|
6965
|
+
{ name: "", type: "address", internalType: "contract Authority" }
|
|
6966
|
+
],
|
|
6967
|
+
stateMutability: "view"
|
|
6968
|
+
},
|
|
6969
|
+
{
|
|
6970
|
+
type: "function",
|
|
6971
|
+
name: "beforeTransfer",
|
|
6972
|
+
inputs: [
|
|
6973
|
+
{ name: "from", type: "address", internalType: "address" },
|
|
6974
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
6975
|
+
],
|
|
6976
|
+
outputs: [],
|
|
6977
|
+
stateMutability: "view"
|
|
6978
|
+
},
|
|
6979
|
+
{
|
|
6980
|
+
type: "function",
|
|
6981
|
+
name: "bridge",
|
|
6982
|
+
inputs: [
|
|
6983
|
+
{ name: "shareAmount", type: "uint256", internalType: "uint256" },
|
|
6984
|
+
{
|
|
6985
|
+
name: "data",
|
|
6986
|
+
type: "tuple",
|
|
6987
|
+
internalType: "struct BridgeData",
|
|
6988
|
+
components: [
|
|
6989
|
+
{
|
|
6990
|
+
name: "chainSelector",
|
|
6991
|
+
type: "uint32",
|
|
6992
|
+
internalType: "uint32"
|
|
6993
|
+
},
|
|
6994
|
+
{
|
|
6995
|
+
name: "messageGas",
|
|
6996
|
+
type: "uint64",
|
|
6997
|
+
internalType: "uint64"
|
|
6998
|
+
},
|
|
6999
|
+
{
|
|
7000
|
+
name: "destinationChainReceiver",
|
|
7001
|
+
type: "bytes32",
|
|
7002
|
+
internalType: "bytes32"
|
|
7003
|
+
},
|
|
7004
|
+
{
|
|
7005
|
+
name: "bridgeFeeToken",
|
|
7006
|
+
type: "address",
|
|
7007
|
+
internalType: "contract ERC20"
|
|
7008
|
+
},
|
|
7009
|
+
{ name: "data", type: "bytes", internalType: "bytes" }
|
|
7010
|
+
]
|
|
7011
|
+
}
|
|
7012
|
+
],
|
|
7013
|
+
outputs: [
|
|
7014
|
+
{ name: "messageId", type: "bytes32", internalType: "bytes32" }
|
|
7015
|
+
],
|
|
7016
|
+
stateMutability: "payable"
|
|
7017
|
+
},
|
|
7018
|
+
{
|
|
7019
|
+
type: "function",
|
|
7020
|
+
name: "bulkDeposit",
|
|
7021
|
+
inputs: [
|
|
7022
|
+
{
|
|
7023
|
+
name: "depositAsset",
|
|
7024
|
+
type: "address",
|
|
7025
|
+
internalType: "contract ERC20"
|
|
7026
|
+
},
|
|
7027
|
+
{
|
|
7028
|
+
name: "depositAmount",
|
|
7029
|
+
type: "uint256",
|
|
7030
|
+
internalType: "uint256"
|
|
7031
|
+
},
|
|
7032
|
+
{ name: "minimumMint", type: "uint256", internalType: "uint256" },
|
|
7033
|
+
{ name: "to", type: "address", internalType: "address" }
|
|
7034
|
+
],
|
|
7035
|
+
outputs: [
|
|
7036
|
+
{ name: "shares", type: "uint256", internalType: "uint256" }
|
|
7037
|
+
],
|
|
7038
|
+
stateMutability: "nonpayable"
|
|
7039
|
+
},
|
|
7040
|
+
{
|
|
7041
|
+
type: "function",
|
|
7042
|
+
name: "bulkWithdraw",
|
|
7043
|
+
inputs: [
|
|
7044
|
+
{
|
|
7045
|
+
name: "withdrawAsset",
|
|
7046
|
+
type: "address",
|
|
7047
|
+
internalType: "contract ERC20"
|
|
7048
|
+
},
|
|
7049
|
+
{ name: "shareAmount", type: "uint256", internalType: "uint256" },
|
|
7050
|
+
{
|
|
7051
|
+
name: "minimumAssets",
|
|
7052
|
+
type: "uint256",
|
|
7053
|
+
internalType: "uint256"
|
|
7054
|
+
},
|
|
7055
|
+
{ name: "to", type: "address", internalType: "address" }
|
|
7056
|
+
],
|
|
7057
|
+
outputs: [
|
|
7058
|
+
{ name: "assetsOut", type: "uint256", internalType: "uint256" }
|
|
7059
|
+
],
|
|
7060
|
+
stateMutability: "nonpayable"
|
|
7061
|
+
},
|
|
7062
|
+
{
|
|
7063
|
+
type: "function",
|
|
7064
|
+
name: "deposit",
|
|
7065
|
+
inputs: [
|
|
7066
|
+
{
|
|
7067
|
+
name: "depositAsset",
|
|
7068
|
+
type: "address",
|
|
7069
|
+
internalType: "contract ERC20"
|
|
7070
|
+
},
|
|
7071
|
+
{
|
|
7072
|
+
name: "depositAmount",
|
|
7073
|
+
type: "uint256",
|
|
7074
|
+
internalType: "uint256"
|
|
7075
|
+
},
|
|
7076
|
+
{ name: "minimumMint", type: "uint256", internalType: "uint256" }
|
|
7077
|
+
],
|
|
7078
|
+
outputs: [
|
|
7079
|
+
{ name: "shares", type: "uint256", internalType: "uint256" }
|
|
7080
|
+
],
|
|
7081
|
+
stateMutability: "nonpayable"
|
|
7082
|
+
},
|
|
7083
|
+
{
|
|
7084
|
+
type: "function",
|
|
7085
|
+
name: "depositAndBridge",
|
|
7086
|
+
inputs: [
|
|
7087
|
+
{
|
|
7088
|
+
name: "depositAsset",
|
|
7089
|
+
type: "address",
|
|
7090
|
+
internalType: "contract ERC20"
|
|
7091
|
+
},
|
|
7092
|
+
{
|
|
7093
|
+
name: "depositAmount",
|
|
7094
|
+
type: "uint256",
|
|
7095
|
+
internalType: "uint256"
|
|
7096
|
+
},
|
|
7097
|
+
{ name: "minimumMint", type: "uint256", internalType: "uint256" },
|
|
7098
|
+
{
|
|
7099
|
+
name: "data",
|
|
7100
|
+
type: "tuple",
|
|
7101
|
+
internalType: "struct BridgeData",
|
|
7102
|
+
components: [
|
|
7103
|
+
{
|
|
7104
|
+
name: "chainSelector",
|
|
7105
|
+
type: "uint32",
|
|
7106
|
+
internalType: "uint32"
|
|
7107
|
+
},
|
|
7108
|
+
{
|
|
7109
|
+
name: "messageGas",
|
|
7110
|
+
type: "uint64",
|
|
7111
|
+
internalType: "uint64"
|
|
7112
|
+
},
|
|
7113
|
+
{
|
|
7114
|
+
name: "destinationChainReceiver",
|
|
7115
|
+
type: "bytes32",
|
|
7116
|
+
internalType: "bytes32"
|
|
7117
|
+
},
|
|
7118
|
+
{
|
|
7119
|
+
name: "bridgeFeeToken",
|
|
7120
|
+
type: "address",
|
|
7121
|
+
internalType: "contract ERC20"
|
|
7122
|
+
},
|
|
7123
|
+
{ name: "data", type: "bytes", internalType: "bytes" }
|
|
7124
|
+
]
|
|
7125
|
+
}
|
|
7126
|
+
],
|
|
7127
|
+
outputs: [],
|
|
7128
|
+
stateMutability: "payable"
|
|
7129
|
+
},
|
|
7130
|
+
{
|
|
7131
|
+
type: "function",
|
|
7132
|
+
name: "depositNonce",
|
|
7133
|
+
inputs: [],
|
|
7134
|
+
outputs: [{ name: "", type: "uint96", internalType: "uint96" }],
|
|
7135
|
+
stateMutability: "view"
|
|
7136
|
+
},
|
|
7137
|
+
{
|
|
7138
|
+
type: "function",
|
|
7139
|
+
name: "depositWithPermit",
|
|
7140
|
+
inputs: [
|
|
7141
|
+
{
|
|
7142
|
+
name: "depositAsset",
|
|
7143
|
+
type: "address",
|
|
7144
|
+
internalType: "contract ERC20"
|
|
7145
|
+
},
|
|
7146
|
+
{
|
|
7147
|
+
name: "depositAmount",
|
|
7148
|
+
type: "uint256",
|
|
7149
|
+
internalType: "uint256"
|
|
7150
|
+
},
|
|
7151
|
+
{ name: "minimumMint", type: "uint256", internalType: "uint256" },
|
|
7152
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" },
|
|
7153
|
+
{ name: "v", type: "uint8", internalType: "uint8" },
|
|
7154
|
+
{ name: "r", type: "bytes32", internalType: "bytes32" },
|
|
7155
|
+
{ name: "s", type: "bytes32", internalType: "bytes32" }
|
|
7156
|
+
],
|
|
7157
|
+
outputs: [
|
|
7158
|
+
{ name: "shares", type: "uint256", internalType: "uint256" }
|
|
7159
|
+
],
|
|
7160
|
+
stateMutability: "nonpayable"
|
|
7161
|
+
},
|
|
7162
|
+
{
|
|
7163
|
+
type: "function",
|
|
7164
|
+
name: "endpoint",
|
|
7165
|
+
inputs: [],
|
|
7166
|
+
outputs: [
|
|
7167
|
+
{
|
|
7168
|
+
name: "",
|
|
7169
|
+
type: "address",
|
|
7170
|
+
internalType: "contract ILayerZeroEndpointV2"
|
|
7171
|
+
}
|
|
7172
|
+
],
|
|
7173
|
+
stateMutability: "view"
|
|
7174
|
+
},
|
|
7175
|
+
{
|
|
7176
|
+
type: "function",
|
|
7177
|
+
name: "isComposeMsgSender",
|
|
7178
|
+
inputs: [
|
|
7179
|
+
{
|
|
7180
|
+
name: "",
|
|
7181
|
+
type: "tuple",
|
|
7182
|
+
internalType: "struct Origin",
|
|
7183
|
+
components: [
|
|
7184
|
+
{ name: "srcEid", type: "uint32", internalType: "uint32" },
|
|
7185
|
+
{ name: "sender", type: "bytes32", internalType: "bytes32" },
|
|
7186
|
+
{ name: "nonce", type: "uint64", internalType: "uint64" }
|
|
7187
|
+
]
|
|
7188
|
+
},
|
|
7189
|
+
{ name: "", type: "bytes", internalType: "bytes" },
|
|
7190
|
+
{ name: "_sender", type: "address", internalType: "address" }
|
|
7191
|
+
],
|
|
7192
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
7193
|
+
stateMutability: "view"
|
|
7194
|
+
},
|
|
7195
|
+
{
|
|
7196
|
+
type: "function",
|
|
7197
|
+
name: "isPaused",
|
|
7198
|
+
inputs: [],
|
|
7199
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
7200
|
+
stateMutability: "view"
|
|
7201
|
+
},
|
|
7202
|
+
{
|
|
7203
|
+
type: "function",
|
|
7204
|
+
name: "isSupported",
|
|
7205
|
+
inputs: [
|
|
7206
|
+
{ name: "", type: "address", internalType: "contract ERC20" }
|
|
7207
|
+
],
|
|
7208
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
7209
|
+
stateMutability: "view"
|
|
7210
|
+
},
|
|
7211
|
+
{
|
|
7212
|
+
type: "function",
|
|
7213
|
+
name: "lzReceive",
|
|
7214
|
+
inputs: [
|
|
7215
|
+
{
|
|
7216
|
+
name: "_origin",
|
|
7217
|
+
type: "tuple",
|
|
7218
|
+
internalType: "struct Origin",
|
|
7219
|
+
components: [
|
|
7220
|
+
{ name: "srcEid", type: "uint32", internalType: "uint32" },
|
|
7221
|
+
{ name: "sender", type: "bytes32", internalType: "bytes32" },
|
|
7222
|
+
{ name: "nonce", type: "uint64", internalType: "uint64" }
|
|
7223
|
+
]
|
|
7224
|
+
},
|
|
7225
|
+
{ name: "_guid", type: "bytes32", internalType: "bytes32" },
|
|
7226
|
+
{ name: "_message", type: "bytes", internalType: "bytes" },
|
|
7227
|
+
{ name: "_executor", type: "address", internalType: "address" },
|
|
7228
|
+
{ name: "_extraData", type: "bytes", internalType: "bytes" }
|
|
7229
|
+
],
|
|
7230
|
+
outputs: [],
|
|
7231
|
+
stateMutability: "payable"
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
type: "function",
|
|
7235
|
+
name: "minDepositAmount",
|
|
7236
|
+
inputs: [
|
|
7237
|
+
{ name: "", type: "address", internalType: "contract ERC20" }
|
|
7238
|
+
],
|
|
7239
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
7240
|
+
stateMutability: "view"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
type: "function",
|
|
7244
|
+
name: "nextNonce",
|
|
7245
|
+
inputs: [
|
|
7246
|
+
{ name: "", type: "uint32", internalType: "uint32" },
|
|
7247
|
+
{ name: "", type: "bytes32", internalType: "bytes32" }
|
|
7248
|
+
],
|
|
7249
|
+
outputs: [
|
|
7250
|
+
{ name: "nonce", type: "uint64", internalType: "uint64" }
|
|
7251
|
+
],
|
|
7252
|
+
stateMutability: "view"
|
|
7253
|
+
},
|
|
7254
|
+
{
|
|
7255
|
+
type: "function",
|
|
7256
|
+
name: "oAppVersion",
|
|
7257
|
+
inputs: [],
|
|
7258
|
+
outputs: [
|
|
7259
|
+
{ name: "senderVersion", type: "uint64", internalType: "uint64" },
|
|
7260
|
+
{
|
|
7261
|
+
name: "receiverVersion",
|
|
7262
|
+
type: "uint64",
|
|
7263
|
+
internalType: "uint64"
|
|
7264
|
+
}
|
|
7265
|
+
],
|
|
7266
|
+
stateMutability: "pure"
|
|
7267
|
+
},
|
|
7268
|
+
{
|
|
7269
|
+
type: "function",
|
|
7270
|
+
name: "owner",
|
|
7271
|
+
inputs: [],
|
|
7272
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
7273
|
+
stateMutability: "view"
|
|
7274
|
+
},
|
|
7275
|
+
{
|
|
7276
|
+
type: "function",
|
|
7277
|
+
name: "pause",
|
|
7278
|
+
inputs: [],
|
|
7279
|
+
outputs: [],
|
|
7280
|
+
stateMutability: "nonpayable"
|
|
7281
|
+
},
|
|
7282
|
+
{
|
|
7283
|
+
type: "function",
|
|
7284
|
+
name: "peers",
|
|
7285
|
+
inputs: [{ name: "eid", type: "uint32", internalType: "uint32" }],
|
|
7286
|
+
outputs: [
|
|
7287
|
+
{ name: "peer", type: "bytes32", internalType: "bytes32" }
|
|
7288
|
+
],
|
|
7289
|
+
stateMutability: "view"
|
|
7290
|
+
},
|
|
7291
|
+
{
|
|
7292
|
+
type: "function",
|
|
7293
|
+
name: "previewFee",
|
|
7294
|
+
inputs: [
|
|
7295
|
+
{ name: "shareAmount", type: "uint256", internalType: "uint256" },
|
|
7296
|
+
{
|
|
7297
|
+
name: "data",
|
|
7298
|
+
type: "tuple",
|
|
7299
|
+
internalType: "struct BridgeData",
|
|
7300
|
+
components: [
|
|
7301
|
+
{
|
|
7302
|
+
name: "chainSelector",
|
|
7303
|
+
type: "uint32",
|
|
7304
|
+
internalType: "uint32"
|
|
7305
|
+
},
|
|
7306
|
+
{
|
|
7307
|
+
name: "messageGas",
|
|
7308
|
+
type: "uint64",
|
|
7309
|
+
internalType: "uint64"
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
name: "destinationChainReceiver",
|
|
7313
|
+
type: "bytes32",
|
|
7314
|
+
internalType: "bytes32"
|
|
7315
|
+
},
|
|
7316
|
+
{
|
|
7317
|
+
name: "bridgeFeeToken",
|
|
7318
|
+
type: "address",
|
|
7319
|
+
internalType: "contract ERC20"
|
|
7320
|
+
},
|
|
7321
|
+
{ name: "data", type: "bytes", internalType: "bytes" }
|
|
7322
|
+
]
|
|
7323
|
+
}
|
|
7324
|
+
],
|
|
7325
|
+
outputs: [
|
|
7326
|
+
{ name: "fee", type: "uint256", internalType: "uint256" }
|
|
7327
|
+
],
|
|
7328
|
+
stateMutability: "view"
|
|
7329
|
+
},
|
|
7330
|
+
{
|
|
7331
|
+
type: "function",
|
|
7332
|
+
name: "publicDepositHistory",
|
|
7333
|
+
inputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
7334
|
+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
7335
|
+
stateMutability: "view"
|
|
7336
|
+
},
|
|
7337
|
+
{
|
|
7338
|
+
type: "function",
|
|
7339
|
+
name: "refundDeposit",
|
|
7340
|
+
inputs: [
|
|
7341
|
+
{ name: "nonce", type: "uint256", internalType: "uint256" },
|
|
7342
|
+
{ name: "receiver", type: "address", internalType: "address" },
|
|
7343
|
+
{
|
|
7344
|
+
name: "depositAsset",
|
|
7345
|
+
type: "address",
|
|
7346
|
+
internalType: "address"
|
|
7347
|
+
},
|
|
7348
|
+
{
|
|
7349
|
+
name: "depositAmount",
|
|
7350
|
+
type: "uint256",
|
|
7351
|
+
internalType: "uint256"
|
|
7352
|
+
},
|
|
7353
|
+
{ name: "shareAmount", type: "uint256", internalType: "uint256" },
|
|
7354
|
+
{
|
|
7355
|
+
name: "depositTimestamp",
|
|
7356
|
+
type: "uint256",
|
|
7357
|
+
internalType: "uint256"
|
|
7358
|
+
},
|
|
7359
|
+
{
|
|
7360
|
+
name: "shareLockUpPeriodAtTimeOfDeposit",
|
|
7361
|
+
type: "uint256",
|
|
7362
|
+
internalType: "uint256"
|
|
7363
|
+
}
|
|
7364
|
+
],
|
|
7365
|
+
outputs: [],
|
|
7366
|
+
stateMutability: "nonpayable"
|
|
7367
|
+
},
|
|
7368
|
+
{
|
|
7369
|
+
type: "function",
|
|
7370
|
+
name: "removeAsset",
|
|
7371
|
+
inputs: [
|
|
7372
|
+
{ name: "asset", type: "address", internalType: "contract ERC20" }
|
|
7373
|
+
],
|
|
7374
|
+
outputs: [],
|
|
7375
|
+
stateMutability: "nonpayable"
|
|
7376
|
+
},
|
|
7377
|
+
{
|
|
7378
|
+
type: "function",
|
|
7379
|
+
name: "removeChain",
|
|
7380
|
+
inputs: [
|
|
7381
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" }
|
|
7382
|
+
],
|
|
7383
|
+
outputs: [],
|
|
7384
|
+
stateMutability: "nonpayable"
|
|
7385
|
+
},
|
|
7386
|
+
{
|
|
7387
|
+
type: "function",
|
|
7388
|
+
name: "selectorToChains",
|
|
7389
|
+
inputs: [{ name: "", type: "uint32", internalType: "uint32" }],
|
|
7390
|
+
outputs: [
|
|
7391
|
+
{ name: "allowMessagesFrom", type: "bool", internalType: "bool" },
|
|
7392
|
+
{ name: "allowMessagesTo", type: "bool", internalType: "bool" },
|
|
7393
|
+
{
|
|
7394
|
+
name: "targetTeller",
|
|
7395
|
+
type: "address",
|
|
7396
|
+
internalType: "address"
|
|
7397
|
+
},
|
|
7398
|
+
{
|
|
7399
|
+
name: "messageGasLimit",
|
|
7400
|
+
type: "uint64",
|
|
7401
|
+
internalType: "uint64"
|
|
7402
|
+
},
|
|
7403
|
+
{
|
|
7404
|
+
name: "minimumMessageGas",
|
|
7405
|
+
type: "uint64",
|
|
7406
|
+
internalType: "uint64"
|
|
7407
|
+
}
|
|
7408
|
+
],
|
|
7409
|
+
stateMutability: "view"
|
|
7410
|
+
},
|
|
7411
|
+
{
|
|
7412
|
+
type: "function",
|
|
7413
|
+
name: "setAuthority",
|
|
7414
|
+
inputs: [
|
|
7415
|
+
{
|
|
7416
|
+
name: "newAuthority",
|
|
7417
|
+
type: "address",
|
|
7418
|
+
internalType: "contract Authority"
|
|
7419
|
+
}
|
|
7420
|
+
],
|
|
7421
|
+
outputs: [],
|
|
7422
|
+
stateMutability: "nonpayable"
|
|
7423
|
+
},
|
|
7424
|
+
{
|
|
7425
|
+
type: "function",
|
|
7426
|
+
name: "setChainGasLimit",
|
|
7427
|
+
inputs: [
|
|
7428
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" },
|
|
7429
|
+
{
|
|
7430
|
+
name: "messageGasLimit",
|
|
7431
|
+
type: "uint64",
|
|
7432
|
+
internalType: "uint64"
|
|
7433
|
+
}
|
|
7434
|
+
],
|
|
7435
|
+
outputs: [],
|
|
7436
|
+
stateMutability: "nonpayable"
|
|
7437
|
+
},
|
|
7438
|
+
{
|
|
7439
|
+
type: "function",
|
|
7440
|
+
name: "setDelegate",
|
|
7441
|
+
inputs: [
|
|
7442
|
+
{ name: "_delegate", type: "address", internalType: "address" }
|
|
7443
|
+
],
|
|
7444
|
+
outputs: [],
|
|
7445
|
+
stateMutability: "nonpayable"
|
|
7446
|
+
},
|
|
7447
|
+
{
|
|
7448
|
+
type: "function",
|
|
7449
|
+
name: "setMinDepositAmount",
|
|
7450
|
+
inputs: [
|
|
7451
|
+
{
|
|
7452
|
+
name: "asset",
|
|
7453
|
+
type: "address",
|
|
7454
|
+
internalType: "contract ERC20"
|
|
7455
|
+
},
|
|
7456
|
+
{ name: "minAmount", type: "uint256", internalType: "uint256" }
|
|
7457
|
+
],
|
|
7458
|
+
outputs: [],
|
|
7459
|
+
stateMutability: "nonpayable"
|
|
7460
|
+
},
|
|
7461
|
+
{
|
|
7462
|
+
type: "function",
|
|
7463
|
+
name: "setPeer",
|
|
7464
|
+
inputs: [
|
|
7465
|
+
{ name: "_eid", type: "uint32", internalType: "uint32" },
|
|
7466
|
+
{ name: "_peer", type: "bytes32", internalType: "bytes32" }
|
|
7467
|
+
],
|
|
7468
|
+
outputs: [],
|
|
7469
|
+
stateMutability: "nonpayable"
|
|
7470
|
+
},
|
|
7471
|
+
{
|
|
7472
|
+
type: "function",
|
|
7473
|
+
name: "setShareLockPeriod",
|
|
7474
|
+
inputs: [
|
|
7475
|
+
{
|
|
7476
|
+
name: "_shareLockPeriod",
|
|
7477
|
+
type: "uint64",
|
|
7478
|
+
internalType: "uint64"
|
|
7479
|
+
}
|
|
7480
|
+
],
|
|
7481
|
+
outputs: [],
|
|
7482
|
+
stateMutability: "nonpayable"
|
|
7483
|
+
},
|
|
7484
|
+
{
|
|
7485
|
+
type: "function",
|
|
7486
|
+
name: "shareLockPeriod",
|
|
7487
|
+
inputs: [],
|
|
7488
|
+
outputs: [{ name: "", type: "uint64", internalType: "uint64" }],
|
|
7489
|
+
stateMutability: "view"
|
|
7490
|
+
},
|
|
7491
|
+
{
|
|
7492
|
+
type: "function",
|
|
7493
|
+
name: "shareLockers",
|
|
7494
|
+
inputs: [
|
|
7495
|
+
{ name: "", type: "address", internalType: "address" },
|
|
7496
|
+
{ name: "", type: "uint256", internalType: "uint256" }
|
|
7497
|
+
],
|
|
7498
|
+
outputs: [
|
|
7499
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
7500
|
+
{ name: "unlockTime", type: "uint64", internalType: "uint64" }
|
|
7501
|
+
],
|
|
7502
|
+
stateMutability: "view"
|
|
7503
|
+
},
|
|
7504
|
+
{
|
|
7505
|
+
type: "function",
|
|
7506
|
+
name: "stopMessagesFromChain",
|
|
7507
|
+
inputs: [
|
|
7508
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" }
|
|
7509
|
+
],
|
|
7510
|
+
outputs: [],
|
|
7511
|
+
stateMutability: "nonpayable"
|
|
7512
|
+
},
|
|
7513
|
+
{
|
|
7514
|
+
type: "function",
|
|
7515
|
+
name: "stopMessagesToChain",
|
|
7516
|
+
inputs: [
|
|
7517
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" }
|
|
7518
|
+
],
|
|
7519
|
+
outputs: [],
|
|
7520
|
+
stateMutability: "nonpayable"
|
|
7521
|
+
},
|
|
7522
|
+
{
|
|
7523
|
+
type: "function",
|
|
7524
|
+
name: "transferOwnership",
|
|
7525
|
+
inputs: [
|
|
7526
|
+
{ name: "newOwner", type: "address", internalType: "address" }
|
|
7527
|
+
],
|
|
7528
|
+
outputs: [],
|
|
7529
|
+
stateMutability: "nonpayable"
|
|
7530
|
+
},
|
|
7531
|
+
{
|
|
7532
|
+
type: "function",
|
|
7533
|
+
name: "unpause",
|
|
7534
|
+
inputs: [],
|
|
7535
|
+
outputs: [],
|
|
7536
|
+
stateMutability: "nonpayable"
|
|
7537
|
+
},
|
|
7538
|
+
{
|
|
7539
|
+
type: "function",
|
|
7540
|
+
name: "vault",
|
|
7541
|
+
inputs: [],
|
|
7542
|
+
outputs: [
|
|
7543
|
+
{
|
|
7544
|
+
name: "",
|
|
7545
|
+
type: "address",
|
|
7546
|
+
internalType: "contract BoringVault"
|
|
7547
|
+
}
|
|
7548
|
+
],
|
|
7549
|
+
stateMutability: "view"
|
|
7550
|
+
},
|
|
7551
|
+
{
|
|
7552
|
+
type: "event",
|
|
7553
|
+
name: "AssetAdded",
|
|
7554
|
+
inputs: [
|
|
7555
|
+
{
|
|
7556
|
+
name: "asset",
|
|
7557
|
+
type: "address",
|
|
7558
|
+
indexed: true,
|
|
7559
|
+
internalType: "address"
|
|
7560
|
+
}
|
|
7561
|
+
],
|
|
7562
|
+
anonymous: false
|
|
7563
|
+
},
|
|
7564
|
+
{
|
|
7565
|
+
type: "event",
|
|
7566
|
+
name: "AssetRemoved",
|
|
7567
|
+
inputs: [
|
|
7568
|
+
{
|
|
7569
|
+
name: "asset",
|
|
7570
|
+
type: "address",
|
|
7571
|
+
indexed: true,
|
|
7572
|
+
internalType: "address"
|
|
7573
|
+
}
|
|
7574
|
+
],
|
|
7575
|
+
anonymous: false
|
|
7576
|
+
},
|
|
7577
|
+
{
|
|
7578
|
+
type: "event",
|
|
7579
|
+
name: "AuthorityUpdated",
|
|
7580
|
+
inputs: [
|
|
7581
|
+
{
|
|
7582
|
+
name: "user",
|
|
7583
|
+
type: "address",
|
|
7584
|
+
indexed: true,
|
|
7585
|
+
internalType: "address"
|
|
7586
|
+
},
|
|
7587
|
+
{
|
|
7588
|
+
name: "newAuthority",
|
|
7589
|
+
type: "address",
|
|
7590
|
+
indexed: true,
|
|
7591
|
+
internalType: "contract Authority"
|
|
7592
|
+
}
|
|
7593
|
+
],
|
|
7594
|
+
anonymous: false
|
|
7595
|
+
},
|
|
7596
|
+
{
|
|
7597
|
+
type: "event",
|
|
7598
|
+
name: "BulkDeposit",
|
|
7599
|
+
inputs: [
|
|
7600
|
+
{
|
|
7601
|
+
name: "asset",
|
|
7602
|
+
type: "address",
|
|
7603
|
+
indexed: true,
|
|
7604
|
+
internalType: "address"
|
|
7605
|
+
},
|
|
7606
|
+
{
|
|
7607
|
+
name: "depositAmount",
|
|
7608
|
+
type: "uint256",
|
|
7609
|
+
indexed: true,
|
|
7610
|
+
internalType: "uint256"
|
|
7611
|
+
}
|
|
7612
|
+
],
|
|
7613
|
+
anonymous: false
|
|
7614
|
+
},
|
|
7615
|
+
{
|
|
7616
|
+
type: "event",
|
|
7617
|
+
name: "BulkWithdraw",
|
|
7618
|
+
inputs: [
|
|
7619
|
+
{
|
|
7620
|
+
name: "asset",
|
|
7621
|
+
type: "address",
|
|
7622
|
+
indexed: true,
|
|
7623
|
+
internalType: "address"
|
|
7624
|
+
},
|
|
7625
|
+
{
|
|
7626
|
+
name: "shareAmount",
|
|
7627
|
+
type: "uint256",
|
|
7628
|
+
indexed: true,
|
|
7629
|
+
internalType: "uint256"
|
|
7630
|
+
}
|
|
7631
|
+
],
|
|
7632
|
+
anonymous: false
|
|
7633
|
+
},
|
|
7634
|
+
{
|
|
7635
|
+
type: "event",
|
|
7636
|
+
name: "ChainAdded",
|
|
7637
|
+
inputs: [
|
|
7638
|
+
{
|
|
7639
|
+
name: "chainSelector",
|
|
7640
|
+
type: "uint256",
|
|
7641
|
+
indexed: true,
|
|
7642
|
+
internalType: "uint256"
|
|
7643
|
+
},
|
|
7644
|
+
{
|
|
7645
|
+
name: "allowMessagesFrom",
|
|
7646
|
+
type: "bool",
|
|
7647
|
+
indexed: false,
|
|
7648
|
+
internalType: "bool"
|
|
7649
|
+
},
|
|
7650
|
+
{
|
|
7651
|
+
name: "allowMessagesTo",
|
|
7652
|
+
type: "bool",
|
|
7653
|
+
indexed: false,
|
|
7654
|
+
internalType: "bool"
|
|
7655
|
+
},
|
|
7656
|
+
{
|
|
7657
|
+
name: "targetTeller",
|
|
7658
|
+
type: "address",
|
|
7659
|
+
indexed: true,
|
|
7660
|
+
internalType: "address"
|
|
7661
|
+
},
|
|
7662
|
+
{
|
|
7663
|
+
name: "messageGasLimit",
|
|
7664
|
+
type: "uint64",
|
|
7665
|
+
indexed: true,
|
|
7666
|
+
internalType: "uint64"
|
|
7667
|
+
},
|
|
7668
|
+
{
|
|
7669
|
+
name: "messageGasMin",
|
|
7670
|
+
type: "uint64",
|
|
7671
|
+
indexed: false,
|
|
7672
|
+
internalType: "uint64"
|
|
7673
|
+
}
|
|
7674
|
+
],
|
|
7675
|
+
anonymous: false
|
|
7676
|
+
},
|
|
7677
|
+
{
|
|
7678
|
+
type: "event",
|
|
7679
|
+
name: "ChainAllowMessagesFrom",
|
|
7680
|
+
inputs: [
|
|
7681
|
+
{
|
|
7682
|
+
name: "chainSelector",
|
|
7683
|
+
type: "uint256",
|
|
7684
|
+
indexed: true,
|
|
7685
|
+
internalType: "uint256"
|
|
7686
|
+
},
|
|
7687
|
+
{
|
|
7688
|
+
name: "targetTeller",
|
|
7689
|
+
type: "address",
|
|
7690
|
+
indexed: true,
|
|
7691
|
+
internalType: "address"
|
|
7692
|
+
}
|
|
7693
|
+
],
|
|
7694
|
+
anonymous: false
|
|
7695
|
+
},
|
|
7696
|
+
{
|
|
7697
|
+
type: "event",
|
|
7698
|
+
name: "ChainAllowMessagesTo",
|
|
7699
|
+
inputs: [
|
|
7700
|
+
{
|
|
7701
|
+
name: "chainSelector",
|
|
7702
|
+
type: "uint256",
|
|
7703
|
+
indexed: true,
|
|
7704
|
+
internalType: "uint256"
|
|
7705
|
+
},
|
|
7706
|
+
{
|
|
7707
|
+
name: "targetTeller",
|
|
7708
|
+
type: "address",
|
|
7709
|
+
indexed: true,
|
|
7710
|
+
internalType: "address"
|
|
7711
|
+
}
|
|
7712
|
+
],
|
|
7713
|
+
anonymous: false
|
|
7714
|
+
},
|
|
7715
|
+
{
|
|
7716
|
+
type: "event",
|
|
7717
|
+
name: "ChainRemoved",
|
|
7718
|
+
inputs: [
|
|
7719
|
+
{
|
|
7720
|
+
name: "chainSelector",
|
|
7721
|
+
type: "uint256",
|
|
7722
|
+
indexed: true,
|
|
7723
|
+
internalType: "uint256"
|
|
7724
|
+
}
|
|
7725
|
+
],
|
|
7726
|
+
anonymous: false
|
|
7727
|
+
},
|
|
7728
|
+
{
|
|
7729
|
+
type: "event",
|
|
7730
|
+
name: "ChainSetGasLimit",
|
|
7731
|
+
inputs: [
|
|
7732
|
+
{
|
|
7733
|
+
name: "chainSelector",
|
|
7734
|
+
type: "uint256",
|
|
7735
|
+
indexed: true,
|
|
7736
|
+
internalType: "uint256"
|
|
7737
|
+
},
|
|
7738
|
+
{
|
|
7739
|
+
name: "messageGasLimit",
|
|
7740
|
+
type: "uint64",
|
|
7741
|
+
indexed: true,
|
|
7742
|
+
internalType: "uint64"
|
|
7743
|
+
}
|
|
7744
|
+
],
|
|
7745
|
+
anonymous: false
|
|
7746
|
+
},
|
|
7747
|
+
{
|
|
7748
|
+
type: "event",
|
|
7749
|
+
name: "ChainStopMessagesFrom",
|
|
7750
|
+
inputs: [
|
|
7751
|
+
{
|
|
7752
|
+
name: "chainSelector",
|
|
7753
|
+
type: "uint256",
|
|
7754
|
+
indexed: true,
|
|
7755
|
+
internalType: "uint256"
|
|
7756
|
+
}
|
|
7757
|
+
],
|
|
7758
|
+
anonymous: false
|
|
7759
|
+
},
|
|
7760
|
+
{
|
|
7761
|
+
type: "event",
|
|
7762
|
+
name: "ChainStopMessagesTo",
|
|
7763
|
+
inputs: [
|
|
7764
|
+
{
|
|
7765
|
+
name: "chainSelector",
|
|
7766
|
+
type: "uint256",
|
|
7767
|
+
indexed: true,
|
|
7768
|
+
internalType: "uint256"
|
|
7769
|
+
}
|
|
7770
|
+
],
|
|
7771
|
+
anonymous: false
|
|
7772
|
+
},
|
|
7773
|
+
{
|
|
7774
|
+
type: "event",
|
|
7775
|
+
name: "Deposit",
|
|
7776
|
+
inputs: [
|
|
7777
|
+
{
|
|
7778
|
+
name: "nonce",
|
|
7779
|
+
type: "uint256",
|
|
7780
|
+
indexed: true,
|
|
7781
|
+
internalType: "uint256"
|
|
7782
|
+
},
|
|
7783
|
+
{
|
|
7784
|
+
name: "receiver",
|
|
7785
|
+
type: "address",
|
|
7786
|
+
indexed: true,
|
|
7787
|
+
internalType: "address"
|
|
7788
|
+
},
|
|
7789
|
+
{
|
|
7790
|
+
name: "depositAsset",
|
|
7791
|
+
type: "address",
|
|
7792
|
+
indexed: true,
|
|
7793
|
+
internalType: "address"
|
|
7794
|
+
},
|
|
7795
|
+
{
|
|
7796
|
+
name: "depositAmount",
|
|
7797
|
+
type: "uint256",
|
|
7798
|
+
indexed: false,
|
|
7799
|
+
internalType: "uint256"
|
|
7800
|
+
},
|
|
7801
|
+
{
|
|
7802
|
+
name: "shareAmount",
|
|
7803
|
+
type: "uint256",
|
|
7804
|
+
indexed: false,
|
|
7805
|
+
internalType: "uint256"
|
|
7806
|
+
},
|
|
7807
|
+
{
|
|
7808
|
+
name: "depositTimestamp",
|
|
7809
|
+
type: "uint256",
|
|
7810
|
+
indexed: false,
|
|
7811
|
+
internalType: "uint256"
|
|
7812
|
+
},
|
|
7813
|
+
{
|
|
7814
|
+
name: "shareLockPeriodAtTimeOfDeposit",
|
|
7815
|
+
type: "uint256",
|
|
7816
|
+
indexed: false,
|
|
7817
|
+
internalType: "uint256"
|
|
7818
|
+
}
|
|
7819
|
+
],
|
|
7820
|
+
anonymous: false
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
type: "event",
|
|
7824
|
+
name: "DepositRefunded",
|
|
7825
|
+
inputs: [
|
|
7826
|
+
{
|
|
7827
|
+
name: "nonce",
|
|
7828
|
+
type: "uint256",
|
|
7829
|
+
indexed: true,
|
|
7830
|
+
internalType: "uint256"
|
|
7831
|
+
},
|
|
7832
|
+
{
|
|
7833
|
+
name: "depositHash",
|
|
7834
|
+
type: "bytes32",
|
|
7835
|
+
indexed: false,
|
|
7836
|
+
internalType: "bytes32"
|
|
7837
|
+
},
|
|
7838
|
+
{
|
|
7839
|
+
name: "user",
|
|
7840
|
+
type: "address",
|
|
7841
|
+
indexed: true,
|
|
7842
|
+
internalType: "address"
|
|
7843
|
+
}
|
|
7844
|
+
],
|
|
7845
|
+
anonymous: false
|
|
7846
|
+
},
|
|
7847
|
+
{
|
|
7848
|
+
type: "event",
|
|
7849
|
+
name: "MessageReceived",
|
|
7850
|
+
inputs: [
|
|
7851
|
+
{
|
|
7852
|
+
name: "messageId",
|
|
7853
|
+
type: "bytes32",
|
|
7854
|
+
indexed: false,
|
|
7855
|
+
internalType: "bytes32"
|
|
7856
|
+
},
|
|
7857
|
+
{
|
|
7858
|
+
name: "shareAmount",
|
|
7859
|
+
type: "uint256",
|
|
7860
|
+
indexed: true,
|
|
7861
|
+
internalType: "uint256"
|
|
7862
|
+
},
|
|
7863
|
+
{
|
|
7864
|
+
name: "to",
|
|
7865
|
+
type: "bytes32",
|
|
7866
|
+
indexed: true,
|
|
7867
|
+
internalType: "bytes32"
|
|
7868
|
+
}
|
|
7869
|
+
],
|
|
7870
|
+
anonymous: false
|
|
7871
|
+
},
|
|
7872
|
+
{
|
|
7873
|
+
type: "event",
|
|
7874
|
+
name: "MessageSent",
|
|
7875
|
+
inputs: [
|
|
7876
|
+
{
|
|
7877
|
+
name: "messageId",
|
|
7878
|
+
type: "bytes32",
|
|
7879
|
+
indexed: false,
|
|
7880
|
+
internalType: "bytes32"
|
|
7881
|
+
},
|
|
7882
|
+
{
|
|
7883
|
+
name: "shareAmount",
|
|
7884
|
+
type: "uint256",
|
|
7885
|
+
indexed: true,
|
|
7886
|
+
internalType: "uint256"
|
|
7887
|
+
},
|
|
7888
|
+
{
|
|
7889
|
+
name: "to",
|
|
7890
|
+
type: "bytes32",
|
|
7891
|
+
indexed: true,
|
|
7892
|
+
internalType: "bytes32"
|
|
7893
|
+
}
|
|
7894
|
+
],
|
|
7895
|
+
anonymous: false
|
|
7896
|
+
},
|
|
7897
|
+
{
|
|
7898
|
+
type: "event",
|
|
7899
|
+
name: "MinDepositAmountSet",
|
|
7900
|
+
inputs: [
|
|
7901
|
+
{
|
|
7902
|
+
name: "asset",
|
|
7903
|
+
type: "address",
|
|
7904
|
+
indexed: true,
|
|
7905
|
+
internalType: "address"
|
|
7906
|
+
},
|
|
7907
|
+
{
|
|
7908
|
+
name: "minAmount",
|
|
7909
|
+
type: "uint256",
|
|
7910
|
+
indexed: false,
|
|
7911
|
+
internalType: "uint256"
|
|
7912
|
+
}
|
|
7913
|
+
],
|
|
7914
|
+
anonymous: false
|
|
7915
|
+
},
|
|
7916
|
+
{
|
|
7917
|
+
type: "event",
|
|
7918
|
+
name: "OwnershipTransferred",
|
|
7919
|
+
inputs: [
|
|
7920
|
+
{
|
|
7921
|
+
name: "user",
|
|
7922
|
+
type: "address",
|
|
7923
|
+
indexed: true,
|
|
7924
|
+
internalType: "address"
|
|
7925
|
+
},
|
|
7926
|
+
{
|
|
7927
|
+
name: "newOwner",
|
|
7928
|
+
type: "address",
|
|
7929
|
+
indexed: true,
|
|
7930
|
+
internalType: "address"
|
|
7931
|
+
}
|
|
7932
|
+
],
|
|
7933
|
+
anonymous: false
|
|
7934
|
+
},
|
|
7935
|
+
{ type: "event", name: "Paused", inputs: [], anonymous: false },
|
|
7936
|
+
{
|
|
7937
|
+
type: "event",
|
|
7938
|
+
name: "PeerSet",
|
|
7939
|
+
inputs: [
|
|
7940
|
+
{
|
|
7941
|
+
name: "eid",
|
|
7942
|
+
type: "uint32",
|
|
7943
|
+
indexed: false,
|
|
7944
|
+
internalType: "uint32"
|
|
7945
|
+
},
|
|
7946
|
+
{
|
|
7947
|
+
name: "peer",
|
|
7948
|
+
type: "bytes32",
|
|
7949
|
+
indexed: false,
|
|
7950
|
+
internalType: "bytes32"
|
|
7951
|
+
}
|
|
7952
|
+
],
|
|
7953
|
+
anonymous: false
|
|
7954
|
+
},
|
|
7955
|
+
{ type: "event", name: "Unpaused", inputs: [], anonymous: false },
|
|
7956
|
+
{
|
|
7957
|
+
type: "error",
|
|
7958
|
+
name: "AmountNotDivisible",
|
|
7959
|
+
inputs: [
|
|
7960
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
7961
|
+
]
|
|
7962
|
+
},
|
|
7963
|
+
{
|
|
7964
|
+
type: "error",
|
|
7965
|
+
name: "CrossChainTellerBase__AmountTooSmallToBridge",
|
|
7966
|
+
inputs: [
|
|
7967
|
+
{ name: "shareAmount", type: "uint256", internalType: "uint256" }
|
|
7968
|
+
]
|
|
7969
|
+
},
|
|
7970
|
+
{ type: "error", name: "InvalidDelegate", inputs: [] },
|
|
7971
|
+
{ type: "error", name: "InvalidEndpointCall", inputs: [] },
|
|
7972
|
+
{
|
|
7973
|
+
type: "error",
|
|
7974
|
+
name: "InvalidOptionType",
|
|
7975
|
+
inputs: [
|
|
7976
|
+
{ name: "optionType", type: "uint16", internalType: "uint16" }
|
|
7977
|
+
]
|
|
7978
|
+
},
|
|
7979
|
+
{
|
|
7980
|
+
type: "error",
|
|
7981
|
+
name: "LocalDecimalsTooLow",
|
|
7982
|
+
inputs: [
|
|
7983
|
+
{
|
|
7984
|
+
name: "localDecimals",
|
|
7985
|
+
type: "uint256",
|
|
7986
|
+
internalType: "uint256"
|
|
7987
|
+
}
|
|
7988
|
+
]
|
|
7989
|
+
},
|
|
7990
|
+
{ type: "error", name: "LzTokenUnavailable", inputs: [] },
|
|
7991
|
+
{
|
|
7992
|
+
type: "error",
|
|
7993
|
+
name: "MultiChainLayerZeroTellerWithMultiAssetSupport_InvalidAptosAddressForEVM",
|
|
7994
|
+
inputs: [
|
|
7995
|
+
{ name: "receiver", type: "bytes32", internalType: "bytes32" }
|
|
7996
|
+
]
|
|
7997
|
+
},
|
|
7998
|
+
{
|
|
7999
|
+
type: "error",
|
|
8000
|
+
name: "MultiChainLayerZeroTellerWithMultiAssetSupport_InvalidToken",
|
|
8001
|
+
inputs: []
|
|
8002
|
+
},
|
|
8003
|
+
{
|
|
8004
|
+
type: "error",
|
|
8005
|
+
name: "MultiChainTellerBase_DestinationChainReceiverIsZeroBytes32",
|
|
8006
|
+
inputs: []
|
|
8007
|
+
},
|
|
8008
|
+
{
|
|
8009
|
+
type: "error",
|
|
8010
|
+
name: "MultiChainTellerBase_GasLimitExceeded",
|
|
8011
|
+
inputs: []
|
|
8012
|
+
},
|
|
8013
|
+
{ type: "error", name: "MultiChainTellerBase_GasTooLow", inputs: [] },
|
|
8014
|
+
{
|
|
8015
|
+
type: "error",
|
|
8016
|
+
name: "MultiChainTellerBase_MessagesNotAllowedFrom",
|
|
8017
|
+
inputs: [
|
|
8018
|
+
{ name: "chainSelector", type: "uint32", internalType: "uint32" }
|
|
8019
|
+
]
|
|
8020
|
+
},
|
|
8021
|
+
{
|
|
8022
|
+
type: "error",
|
|
8023
|
+
name: "MultiChainTellerBase_MessagesNotAllowedTo",
|
|
8024
|
+
inputs: [
|
|
8025
|
+
{
|
|
8026
|
+
name: "chainSelector",
|
|
8027
|
+
type: "uint256",
|
|
8028
|
+
internalType: "uint256"
|
|
8029
|
+
}
|
|
8030
|
+
]
|
|
8031
|
+
},
|
|
8032
|
+
{
|
|
8033
|
+
type: "error",
|
|
8034
|
+
name: "MultiChainTellerBase_TargetTellerIsZeroAddress",
|
|
8035
|
+
inputs: []
|
|
8036
|
+
},
|
|
8037
|
+
{
|
|
8038
|
+
type: "error",
|
|
8039
|
+
name: "MultiChainTellerBase_ZeroMessageGasLimit",
|
|
8040
|
+
inputs: []
|
|
8041
|
+
},
|
|
8042
|
+
{
|
|
8043
|
+
type: "error",
|
|
8044
|
+
name: "NoPeer",
|
|
8045
|
+
inputs: [{ name: "eid", type: "uint32", internalType: "uint32" }]
|
|
8046
|
+
},
|
|
8047
|
+
{
|
|
8048
|
+
type: "error",
|
|
8049
|
+
name: "NotEnoughNative",
|
|
8050
|
+
inputs: [
|
|
8051
|
+
{ name: "msgValue", type: "uint256", internalType: "uint256" }
|
|
8052
|
+
]
|
|
8053
|
+
},
|
|
8054
|
+
{
|
|
8055
|
+
type: "error",
|
|
8056
|
+
name: "OnlyEndpoint",
|
|
8057
|
+
inputs: [{ name: "addr", type: "address", internalType: "address" }]
|
|
8058
|
+
},
|
|
8059
|
+
{
|
|
8060
|
+
type: "error",
|
|
8061
|
+
name: "OnlyPeer",
|
|
8062
|
+
inputs: [
|
|
8063
|
+
{ name: "eid", type: "uint32", internalType: "uint32" },
|
|
8064
|
+
{ name: "sender", type: "bytes32", internalType: "bytes32" }
|
|
8065
|
+
]
|
|
8066
|
+
},
|
|
8067
|
+
{
|
|
8068
|
+
type: "error",
|
|
8069
|
+
name: "SafeCastOverflowedUintDowncast",
|
|
8070
|
+
inputs: [
|
|
8071
|
+
{ name: "bits", type: "uint8", internalType: "uint8" },
|
|
8072
|
+
{ name: "value", type: "uint256", internalType: "uint256" }
|
|
8073
|
+
]
|
|
8074
|
+
},
|
|
8075
|
+
{
|
|
8076
|
+
type: "error",
|
|
8077
|
+
name: "SafeERC20FailedOperation",
|
|
8078
|
+
inputs: [
|
|
8079
|
+
{ name: "token", type: "address", internalType: "address" }
|
|
8080
|
+
]
|
|
8081
|
+
},
|
|
8082
|
+
{
|
|
8083
|
+
type: "error",
|
|
8084
|
+
name: "TellerWithMultiAssetSupport__AssetAlreadySupported",
|
|
8085
|
+
inputs: []
|
|
8086
|
+
},
|
|
8087
|
+
{
|
|
8088
|
+
type: "error",
|
|
8089
|
+
name: "TellerWithMultiAssetSupport__AssetNotSupported",
|
|
8090
|
+
inputs: []
|
|
8091
|
+
},
|
|
8092
|
+
{
|
|
8093
|
+
type: "error",
|
|
8094
|
+
name: "TellerWithMultiAssetSupport__BadDepositHash",
|
|
8095
|
+
inputs: []
|
|
8096
|
+
},
|
|
8097
|
+
{
|
|
8098
|
+
type: "error",
|
|
8099
|
+
name: "TellerWithMultiAssetSupport__DepositBelowMinimum",
|
|
8100
|
+
inputs: []
|
|
8101
|
+
},
|
|
8102
|
+
{
|
|
8103
|
+
type: "error",
|
|
8104
|
+
name: "TellerWithMultiAssetSupport__DepositNotFound",
|
|
8105
|
+
inputs: []
|
|
8106
|
+
},
|
|
8107
|
+
{
|
|
8108
|
+
type: "error",
|
|
8109
|
+
name: "TellerWithMultiAssetSupport__InsufficientUnlockedShares",
|
|
8110
|
+
inputs: [
|
|
8111
|
+
{ name: "user", type: "address", internalType: "address" },
|
|
8112
|
+
{ name: "requested", type: "uint256", internalType: "uint256" }
|
|
8113
|
+
]
|
|
8114
|
+
},
|
|
8115
|
+
{
|
|
8116
|
+
type: "error",
|
|
8117
|
+
name: "TellerWithMultiAssetSupport__MinimumAssetsNotMet",
|
|
8118
|
+
inputs: []
|
|
8119
|
+
},
|
|
8120
|
+
{
|
|
8121
|
+
type: "error",
|
|
8122
|
+
name: "TellerWithMultiAssetSupport__MinimumMintNotMet",
|
|
8123
|
+
inputs: []
|
|
8124
|
+
},
|
|
8125
|
+
{
|
|
8126
|
+
type: "error",
|
|
8127
|
+
name: "TellerWithMultiAssetSupport__Paused",
|
|
8128
|
+
inputs: []
|
|
8129
|
+
},
|
|
8130
|
+
{
|
|
8131
|
+
type: "error",
|
|
8132
|
+
name: "TellerWithMultiAssetSupport__PermitFailedAndAllowanceTooLow",
|
|
8133
|
+
inputs: []
|
|
8134
|
+
},
|
|
8135
|
+
{
|
|
8136
|
+
type: "error",
|
|
8137
|
+
name: "TellerWithMultiAssetSupport__ShareLockPeriodTooLong",
|
|
8138
|
+
inputs: []
|
|
8139
|
+
},
|
|
8140
|
+
{
|
|
8141
|
+
type: "error",
|
|
8142
|
+
name: "TellerWithMultiAssetSupport__SharesAreLocked",
|
|
8143
|
+
inputs: []
|
|
8144
|
+
},
|
|
8145
|
+
{
|
|
8146
|
+
type: "error",
|
|
8147
|
+
name: "TellerWithMultiAssetSupport__SharesAreUnLocked",
|
|
8148
|
+
inputs: []
|
|
8149
|
+
},
|
|
8150
|
+
{
|
|
8151
|
+
type: "error",
|
|
8152
|
+
name: "TellerWithMultiAssetSupport__ZeroAssets",
|
|
8153
|
+
inputs: []
|
|
8154
|
+
},
|
|
8155
|
+
{
|
|
8156
|
+
type: "error",
|
|
8157
|
+
name: "TellerWithMultiAssetSupport__ZeroShares",
|
|
8158
|
+
inputs: []
|
|
8159
|
+
},
|
|
8160
|
+
{ type: "error", name: "Unauthorized", inputs: [] }
|
|
8161
|
+
];
|
|
8162
|
+
|
|
8163
|
+
// src/evm/abis/index.ts
|
|
8164
|
+
var AccountantABI = Accountant_default2;
|
|
8165
|
+
var AtomicQueueABI = AtomicQueue_default2;
|
|
8166
|
+
var BoringVaultABI = Vault_default2;
|
|
8167
|
+
var TellerWithMultiAssetSupportABI = Teller_default2;
|
|
8168
|
+
var MultiChainLayerZeroTellerEVMABI = MultiChainLayerZeroTeller_default2;
|
|
8169
|
+
|
|
8170
|
+
// src/common/contracts.ts
|
|
8171
|
+
var CONTRACTS = {
|
|
8172
|
+
accountant: {
|
|
8173
|
+
name: "Accountant",
|
|
8174
|
+
abi: {
|
|
8175
|
+
[import_core.ChainType.MoveVM]: AccountantAptosABI,
|
|
8176
|
+
[import_core.ChainType.EVM]: AccountantABI
|
|
8177
|
+
},
|
|
8178
|
+
functionSignatures: {
|
|
8179
|
+
[import_core.ChainType.MoveVM]: {
|
|
8180
|
+
calculate_shares_from_assets_safe: "{address}::accountant::calculate_shares_from_assets_safe",
|
|
8181
|
+
calculate_assets_from_shares_safe: "{address}::accountant::calculate_assets_from_shares_safe",
|
|
8182
|
+
get_withdraw_rate_in_quote_safe: "{address}::accountant::get_withdraw_rate_in_quote_safe",
|
|
8183
|
+
get_deposit_rate_in_quote_safe: "{address}::accountant::get_deposit_rate_in_quote_safe"
|
|
8184
|
+
},
|
|
8185
|
+
[import_core.ChainType.EVM]: {
|
|
8186
|
+
calculate_shares_from_assets_safe: "calculateSharesFromAssetsSafe",
|
|
8187
|
+
calculate_assets_from_shares_safe: "calculateAssetsFromSharesSafe",
|
|
8188
|
+
// EVM contract doesn't have safe functions
|
|
8189
|
+
get_withdraw_rate_in_quote_safe: "getWithdrawRateInQuote",
|
|
8190
|
+
get_deposit_rate_in_quote_safe: "getDepositRateInQuote"
|
|
8191
|
+
}
|
|
8192
|
+
}
|
|
8193
|
+
},
|
|
8194
|
+
teller: {
|
|
8195
|
+
name: "Teller",
|
|
8196
|
+
abi: {
|
|
8197
|
+
[import_core.ChainType.MoveVM]: TellerAptosABI,
|
|
8198
|
+
[import_core.ChainType.EVM]: TellerWithMultiAssetSupportABI
|
|
8199
|
+
},
|
|
8200
|
+
functionSignatures: {
|
|
8201
|
+
[import_core.ChainType.MoveVM]: {
|
|
8202
|
+
deposit: "{address}::teller::deposit",
|
|
8203
|
+
deposit_with_referral: "{address}::teller::deposit_with_referral",
|
|
8204
|
+
deposit_for: "{address}::teller::deposit_for",
|
|
8205
|
+
mint_shares: "{address}::teller::mint_shares",
|
|
8206
|
+
create_withdrawal_request: "{address}::teller::create_withdrawal_request"
|
|
8207
|
+
},
|
|
8208
|
+
[import_core.ChainType.EVM]: {
|
|
8209
|
+
deposit: "deposit",
|
|
8210
|
+
deposit_with_referral: "depositWithReferral",
|
|
8211
|
+
deposit_for: "depositFor",
|
|
8212
|
+
mint_shares: "mintShares",
|
|
8213
|
+
create_withdrawal_request: "createWithdrawalRequest"
|
|
8214
|
+
}
|
|
8215
|
+
}
|
|
8216
|
+
},
|
|
8217
|
+
atomicQueue: {
|
|
8218
|
+
name: "AtomicQueue",
|
|
8219
|
+
abi: {
|
|
8220
|
+
[import_core.ChainType.MoveVM]: AtomicQueueAptosABI,
|
|
8221
|
+
[import_core.ChainType.EVM]: AtomicQueueABI
|
|
8222
|
+
},
|
|
8223
|
+
functionSignatures: {
|
|
8224
|
+
[import_core.ChainType.MoveVM]: {
|
|
8225
|
+
get_minimum_request_age: "{address}::atomic_queue::get_minimum_request_age",
|
|
8226
|
+
get_all_atomic_requests: "{address}::atomic_queue::get_all_atomic_requests",
|
|
8227
|
+
get_request_update_cooldown: "{address}::atomic_queue::get_request_update_cooldown",
|
|
8228
|
+
get_request_updated_at: "{address}::atomic_queue::get_request_updated_at",
|
|
8229
|
+
get_user_atomic_request: "{address}::atomic_queue::get_user_atomic_request",
|
|
8230
|
+
get_user_atomic_requests: "{address}::atomic_queue::get_user_atomic_requests",
|
|
8231
|
+
is_atomic_request_valid: "{address}::atomic_queue::is_atomic_request_valid",
|
|
8232
|
+
is_paused: "{address}::atomic_queue::is_paused",
|
|
8233
|
+
update_atomic_request: "{address}::atomic_queue::update_atomic_request",
|
|
8234
|
+
cancel_atomic_request: "{address}::atomic_queue::cancel_atomic_request",
|
|
8235
|
+
cancel_withdrawal_request: "{address}::atomic_queue::cancel_atomic_request"
|
|
8236
|
+
},
|
|
8237
|
+
[import_core.ChainType.EVM]: {
|
|
8238
|
+
get_minimum_request_age: "minimumRequestAge",
|
|
8239
|
+
cancel_atomic_request: "cancelAtomicRequest",
|
|
8240
|
+
update_atomic_request: "updateAtomicRequest",
|
|
8241
|
+
get_request_updated_at: "getRequestUpdatedAt",
|
|
8242
|
+
get_user_atomic_requests: "getUserAtomicRequests",
|
|
8243
|
+
get_all_atomic_requests: "getAtomicRequests",
|
|
8244
|
+
// Private functions
|
|
8245
|
+
view_solve_metadata: "viewSolveMetaData"
|
|
8246
|
+
}
|
|
8247
|
+
}
|
|
8248
|
+
},
|
|
8249
|
+
vault: {
|
|
8250
|
+
name: "Vault",
|
|
6773
8251
|
abi: {
|
|
6774
|
-
[import_core.ChainType.MoveVM]:
|
|
6775
|
-
[import_core.ChainType.EVM]:
|
|
8252
|
+
[import_core.ChainType.MoveVM]: VaultAptosABI,
|
|
8253
|
+
[import_core.ChainType.EVM]: BoringVaultABI
|
|
6776
8254
|
},
|
|
6777
8255
|
functionSignatures: {
|
|
6778
8256
|
[import_core.ChainType.MoveVM]: {
|
|
@@ -6786,6 +8264,23 @@ var CONTRACTS = {
|
|
|
6786
8264
|
get_total_shares: "totalShares"
|
|
6787
8265
|
}
|
|
6788
8266
|
}
|
|
8267
|
+
},
|
|
8268
|
+
multiChainLzTeller: {
|
|
8269
|
+
name: "MultiChainLayerZeroTeller",
|
|
8270
|
+
abi: {
|
|
8271
|
+
[import_core.ChainType.MoveVM]: MultiChainLayerZeroTellerAptosABI,
|
|
8272
|
+
[import_core.ChainType.EVM]: MultiChainLayerZeroTellerEVMABI
|
|
8273
|
+
},
|
|
8274
|
+
functionSignatures: {
|
|
8275
|
+
[import_core.ChainType.MoveVM]: {
|
|
8276
|
+
quote_bridge: "{address}::multi_chain_lz_teller::quote_bridge",
|
|
8277
|
+
bridge: "{address}::multi_chain_lz_teller::bridge"
|
|
8278
|
+
},
|
|
8279
|
+
[import_core.ChainType.EVM]: {
|
|
8280
|
+
preview_fee: "previewFee",
|
|
8281
|
+
bridge: "bridge"
|
|
8282
|
+
}
|
|
8283
|
+
}
|
|
6789
8284
|
}
|
|
6790
8285
|
};
|
|
6791
8286
|
function getFunctionSignature(type, contractName, functionName, contractAddress) {
|
|
@@ -6817,6 +8312,22 @@ function getContractABI(type, contractName) {
|
|
|
6817
8312
|
console.warn(`ABI for ${contractName} on ${type} is missing`);
|
|
6818
8313
|
return [];
|
|
6819
8314
|
}
|
|
8315
|
+
if (type === import_core.ChainType.MoveVM) {
|
|
8316
|
+
const aptosAbi = abi;
|
|
8317
|
+
const signatures = contract.functionSignatures[import_core.ChainType.MoveVM] || {};
|
|
8318
|
+
const usedFunctionNames = new Set(
|
|
8319
|
+
Object.values(signatures).map((sig) => sig?.split("::").pop())
|
|
8320
|
+
);
|
|
8321
|
+
return {
|
|
8322
|
+
...aptosAbi,
|
|
8323
|
+
exposed_functions: aptosAbi.exposed_functions.filter(
|
|
8324
|
+
(fn) => usedFunctionNames.has(fn.name)
|
|
8325
|
+
),
|
|
8326
|
+
// For now, keep all structs as they might be needed for type decoding
|
|
8327
|
+
// but we could also filter them based on usage in functions
|
|
8328
|
+
structs: aptosAbi.structs
|
|
8329
|
+
};
|
|
8330
|
+
}
|
|
6820
8331
|
return abi;
|
|
6821
8332
|
}
|
|
6822
8333
|
|
|
@@ -6875,7 +8386,7 @@ var AptosChainAdapter = class extends import_core2.BaseChainAdapter {
|
|
|
6875
8386
|
typeArguments: params.typeArguments || [],
|
|
6876
8387
|
functionArguments: params.arguments || []
|
|
6877
8388
|
};
|
|
6878
|
-
const
|
|
8389
|
+
const result = await this.getClient().view({
|
|
6879
8390
|
payload
|
|
6880
8391
|
});
|
|
6881
8392
|
return result;
|
|
@@ -6978,7 +8489,7 @@ var AptosChainAdapter = class extends import_core2.BaseChainAdapter {
|
|
|
6978
8489
|
"accountant",
|
|
6979
8490
|
"get_withdraw_rate_in_quote_safe"
|
|
6980
8491
|
);
|
|
6981
|
-
const result = await this.viewContract({
|
|
8492
|
+
const [result] = await this.viewContract({
|
|
6982
8493
|
address: this.getContractAddress("accountant"),
|
|
6983
8494
|
function: functionSignature,
|
|
6984
8495
|
arguments: [args.vault, args.quoteAsset],
|
|
@@ -6991,7 +8502,7 @@ var AptosChainAdapter = class extends import_core2.BaseChainAdapter {
|
|
|
6991
8502
|
"accountant",
|
|
6992
8503
|
"get_deposit_rate_in_quote_safe"
|
|
6993
8504
|
);
|
|
6994
|
-
const result = await this.viewContract({
|
|
8505
|
+
const [result] = await this.viewContract({
|
|
6995
8506
|
address: this.getContractAddress("accountant"),
|
|
6996
8507
|
function: functionSignature,
|
|
6997
8508
|
arguments: [args.vault, args.quoteAsset],
|
|
@@ -7008,7 +8519,7 @@ var AptosChainAdapter = class extends import_core2.BaseChainAdapter {
|
|
|
7008
8519
|
"accountant",
|
|
7009
8520
|
"calculate_shares_from_assets_safe"
|
|
7010
8521
|
);
|
|
7011
|
-
const result = await this.viewContract({
|
|
8522
|
+
const [result] = await this.viewContract({
|
|
7012
8523
|
address: this.getContractAddress("accountant"),
|
|
7013
8524
|
function: functionSignature,
|
|
7014
8525
|
arguments: [vault, asset, amount],
|
|
@@ -7025,7 +8536,7 @@ var AptosChainAdapter = class extends import_core2.BaseChainAdapter {
|
|
|
7025
8536
|
"accountant",
|
|
7026
8537
|
"calculate_assets_from_shares_safe"
|
|
7027
8538
|
);
|
|
7028
|
-
const result = await this.viewContract({
|
|
8539
|
+
const [result] = await this.viewContract({
|
|
7029
8540
|
address: this.getContractAddress("accountant"),
|
|
7030
8541
|
function: functionSignature,
|
|
7031
8542
|
arguments: [vault, wantAsset, amount],
|
|
@@ -7033,6 +8544,110 @@ var AptosChainAdapter = class extends import_core2.BaseChainAdapter {
|
|
|
7033
8544
|
});
|
|
7034
8545
|
return result;
|
|
7035
8546
|
}
|
|
8547
|
+
async quoteBridge({
|
|
8548
|
+
vault,
|
|
8549
|
+
amount,
|
|
8550
|
+
destinationChain,
|
|
8551
|
+
recipient
|
|
8552
|
+
}) {
|
|
8553
|
+
invariant(vault, "vault address is required for bridging");
|
|
8554
|
+
const contractAddresses = this.getContractAddresses();
|
|
8555
|
+
const lzTellerAddress = contractAddresses.multiChainLzTeller;
|
|
8556
|
+
if (!lzTellerAddress) {
|
|
8557
|
+
throw new Error(
|
|
8558
|
+
"Vault does not support bridging. multiChainLzTeller contract address not configured."
|
|
8559
|
+
);
|
|
8560
|
+
}
|
|
8561
|
+
const config = (0, import_core2.getChainConfig)(this.chain.id);
|
|
8562
|
+
const functionSignature = getFunctionSignature(
|
|
8563
|
+
config.type,
|
|
8564
|
+
"multiChainLzTeller",
|
|
8565
|
+
"quote_bridge",
|
|
8566
|
+
lzTellerAddress
|
|
8567
|
+
);
|
|
8568
|
+
const gasLimit = (0, import_core2.getLayerZeroGasLimit)(this.chain.id, destinationChain);
|
|
8569
|
+
const options = import_lz_v2_utilities.Options.newOptions().addExecutorLzReceiveOption(gasLimit);
|
|
8570
|
+
const extraOptions = options.toBytes();
|
|
8571
|
+
const payInZro = false;
|
|
8572
|
+
const dstEid = (0, import_core2.getLayerZeroEndpointId)(destinationChain);
|
|
8573
|
+
const recipientBytes = this.addressToBytes(recipient);
|
|
8574
|
+
const [nativeFee] = await this.viewContract({
|
|
8575
|
+
address: lzTellerAddress,
|
|
8576
|
+
function: functionSignature,
|
|
8577
|
+
arguments: [
|
|
8578
|
+
vault,
|
|
8579
|
+
dstEid,
|
|
8580
|
+
amount,
|
|
8581
|
+
recipientBytes,
|
|
8582
|
+
extraOptions,
|
|
8583
|
+
payInZro
|
|
8584
|
+
],
|
|
8585
|
+
abi: getContractABI(config.type, "multiChainLzTeller")
|
|
8586
|
+
});
|
|
8587
|
+
return {
|
|
8588
|
+
fee: nativeFee,
|
|
8589
|
+
feeTokenAddress: import_ts_sdk.APTOS_COIN,
|
|
8590
|
+
method: "LayerZero",
|
|
8591
|
+
estimatedTime: (0, import_core2.getEstimatedBridgeTime)(this.chain.id, destinationChain),
|
|
8592
|
+
extraOptions,
|
|
8593
|
+
// Pay only with native (payInZro = false)
|
|
8594
|
+
zroFee: "0"
|
|
8595
|
+
};
|
|
8596
|
+
}
|
|
8597
|
+
async buildBridgeTx(args) {
|
|
8598
|
+
invariant(args.vault, "vault address is required for bridging");
|
|
8599
|
+
const contractAddresses = this.getContractAddresses();
|
|
8600
|
+
const lzTellerAddress = contractAddresses.multiChainLzTeller;
|
|
8601
|
+
invariant(
|
|
8602
|
+
lzTellerAddress,
|
|
8603
|
+
"Vault does not support bridging. multiChainLzTeller contract address not configured."
|
|
8604
|
+
);
|
|
8605
|
+
const config = (0, import_core2.getChainConfig)(this.chain.id);
|
|
8606
|
+
const functionSignature = getFunctionSignature(
|
|
8607
|
+
config.type,
|
|
8608
|
+
"multiChainLzTeller",
|
|
8609
|
+
"bridge",
|
|
8610
|
+
lzTellerAddress
|
|
8611
|
+
);
|
|
8612
|
+
const dstEid = (0, import_core2.getLayerZeroEndpointId)(args.destinationChain);
|
|
8613
|
+
const recipientBytes = this.addressToBytes(args.recipient.toLowerCase());
|
|
8614
|
+
const extraOptions = args.extraOptions;
|
|
8615
|
+
const zroFee = BigInt(args.zroFee);
|
|
8616
|
+
return await this.buildPayload({
|
|
8617
|
+
to: lzTellerAddress,
|
|
8618
|
+
function: functionSignature,
|
|
8619
|
+
arguments: [
|
|
8620
|
+
args.vault,
|
|
8621
|
+
dstEid,
|
|
8622
|
+
recipientBytes,
|
|
8623
|
+
args.amount,
|
|
8624
|
+
args.fee,
|
|
8625
|
+
zroFee,
|
|
8626
|
+
extraOptions
|
|
8627
|
+
],
|
|
8628
|
+
abi: getContractABI(config.type, "multiChainLzTeller")
|
|
8629
|
+
});
|
|
8630
|
+
}
|
|
8631
|
+
/**
|
|
8632
|
+
* Convert address to 32-byte format for LayerZero
|
|
8633
|
+
* - EVM addresses (20 bytes): pad with 12 leading zero bytes
|
|
8634
|
+
* - Aptos addresses (32 or 66 hex chars): use as-is
|
|
8635
|
+
*/
|
|
8636
|
+
addressToBytes(address) {
|
|
8637
|
+
const cleanAddress = address.replace("0x", "").toLowerCase();
|
|
8638
|
+
if (cleanAddress.length === 40) {
|
|
8639
|
+
const padded = "0".repeat(24) + cleanAddress;
|
|
8640
|
+
return this.hexToBytes(padded);
|
|
8641
|
+
}
|
|
8642
|
+
if (cleanAddress.length === 64) {
|
|
8643
|
+
return this.hexToBytes(cleanAddress);
|
|
8644
|
+
}
|
|
8645
|
+
throw new Error(`Invalid address format: ${address}`);
|
|
8646
|
+
}
|
|
8647
|
+
/** Convert hex string to Uint8Array */
|
|
8648
|
+
hexToBytes(hex) {
|
|
8649
|
+
return import_ts_sdk.Hex.fromHexString(hex).toUint8Array();
|
|
8650
|
+
}
|
|
7036
8651
|
async buildDepositTx(args) {
|
|
7037
8652
|
const functionSignature = this.getFunctionSignature("teller", "deposit");
|
|
7038
8653
|
return await this.buildPayload({
|
|
@@ -7148,21 +8763,6 @@ var import_core3 = require("@pyxisjs/core");
|
|
|
7148
8763
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
7149
8764
|
var import_utc = __toESM(require_utc());
|
|
7150
8765
|
|
|
7151
|
-
// ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
7152
|
-
var isProduction = process.env.NODE_ENV === "production";
|
|
7153
|
-
var prefix = "Invariant failed";
|
|
7154
|
-
function invariant(condition, message) {
|
|
7155
|
-
if (condition) {
|
|
7156
|
-
return;
|
|
7157
|
-
}
|
|
7158
|
-
if (isProduction) {
|
|
7159
|
-
throw new Error(prefix);
|
|
7160
|
-
}
|
|
7161
|
-
var provided = typeof message === "function" ? message() : message;
|
|
7162
|
-
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
7163
|
-
throw new Error(value);
|
|
7164
|
-
}
|
|
7165
|
-
|
|
7166
8766
|
// src/aptos/analytics-utils.ts
|
|
7167
8767
|
var apyWindowDaysMap = {
|
|
7168
8768
|
"7d": 7,
|
|
@@ -7444,7 +9044,9 @@ var AptosAnalyticsClient = class {
|
|
|
7444
9044
|
};
|
|
7445
9045
|
|
|
7446
9046
|
// src/evm/adapter.ts
|
|
9047
|
+
var import_lz_v2_utilities2 = require("@layerzerolabs/lz-v2-utilities");
|
|
7447
9048
|
var import_core4 = require("@pyxisjs/core");
|
|
9049
|
+
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
7448
9050
|
var import_viem = require("viem");
|
|
7449
9051
|
var import_chains = require("viem/chains");
|
|
7450
9052
|
var viemChainMap = {
|
|
@@ -7677,6 +9279,85 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7677
9279
|
});
|
|
7678
9280
|
return result.toString();
|
|
7679
9281
|
}
|
|
9282
|
+
async quoteBridge({
|
|
9283
|
+
vault,
|
|
9284
|
+
amount,
|
|
9285
|
+
destinationChain,
|
|
9286
|
+
recipient
|
|
9287
|
+
}) {
|
|
9288
|
+
invariant(vault, "vault address is required for bridging");
|
|
9289
|
+
const contractAddresses = this.getContractAddresses();
|
|
9290
|
+
const lzTellerAddress = contractAddresses.multiChainLzTeller;
|
|
9291
|
+
invariant(
|
|
9292
|
+
lzTellerAddress,
|
|
9293
|
+
"multiChainLzTeller contract address not configured."
|
|
9294
|
+
);
|
|
9295
|
+
const dstEid = (0, import_core4.getLayerZeroEndpointId)(destinationChain);
|
|
9296
|
+
const config = (0, import_core4.getChainConfig)(this.chain.id);
|
|
9297
|
+
const functionSignature = getFunctionSignature(
|
|
9298
|
+
config.type,
|
|
9299
|
+
"multiChainLzTeller",
|
|
9300
|
+
"preview_fee",
|
|
9301
|
+
lzTellerAddress
|
|
9302
|
+
);
|
|
9303
|
+
const bridgeData = {
|
|
9304
|
+
chainSelector: dstEid,
|
|
9305
|
+
destinationChainReceiver: recipient,
|
|
9306
|
+
messageGas: (0, import_core4.getLayerZeroGasLimit)(this.chain.id, destinationChain),
|
|
9307
|
+
bridgeFeeToken: import_viem.ethAddress,
|
|
9308
|
+
data: "0x"
|
|
9309
|
+
// Empty extra data
|
|
9310
|
+
};
|
|
9311
|
+
const result = await this.viewContract({
|
|
9312
|
+
address: lzTellerAddress,
|
|
9313
|
+
function: functionSignature,
|
|
9314
|
+
arguments: [amount, bridgeData],
|
|
9315
|
+
abi: getContractABI(config.type, "multiChainLzTeller")
|
|
9316
|
+
});
|
|
9317
|
+
return {
|
|
9318
|
+
fee: result.toString(),
|
|
9319
|
+
feeTokenAddress: import_viem.zeroAddress,
|
|
9320
|
+
method: import_core4.BridgeMethod.LayerZero,
|
|
9321
|
+
estimatedTime: (0, import_core4.getEstimatedBridgeTime)(this.chain.id, destinationChain),
|
|
9322
|
+
extraOptions: import_lz_v2_utilities2.Options.newOptions().addExecutorLzReceiveOption(
|
|
9323
|
+
(0, import_core4.getLayerZeroGasLimit)(this.chain.id, destinationChain)
|
|
9324
|
+
).toBytes(),
|
|
9325
|
+
zroFee: "0"
|
|
9326
|
+
};
|
|
9327
|
+
}
|
|
9328
|
+
async buildBridgeTx(args) {
|
|
9329
|
+
invariant(args.vault, "vault address is required for bridging");
|
|
9330
|
+
const contractAddresses = this.getContractAddresses();
|
|
9331
|
+
const lzTellerAddress = contractAddresses.multiChainLzTeller;
|
|
9332
|
+
invariant(
|
|
9333
|
+
lzTellerAddress,
|
|
9334
|
+
"Vault does not support bridging. multiChainLzTeller contract address not configured."
|
|
9335
|
+
);
|
|
9336
|
+
const config = (0, import_core4.getChainConfig)(this.chain.id);
|
|
9337
|
+
const functionSignature = getFunctionSignature(
|
|
9338
|
+
config.type,
|
|
9339
|
+
"multiChainLzTeller",
|
|
9340
|
+
"bridge",
|
|
9341
|
+
lzTellerAddress
|
|
9342
|
+
);
|
|
9343
|
+
const dstEid = (0, import_core4.getLayerZeroEndpointId)(args.destinationChain);
|
|
9344
|
+
const extraOptionsHex = "0x" + Buffer.from(args.extraOptions).toString("hex");
|
|
9345
|
+
const bridgeData = {
|
|
9346
|
+
chainSelector: dstEid,
|
|
9347
|
+
messageGas: (0, import_core4.getLayerZeroGasLimit)(this.chain.id, args.destinationChain),
|
|
9348
|
+
destinationChainReceiver: args.recipient,
|
|
9349
|
+
bridgeFeeToken: import_viem.ethAddress,
|
|
9350
|
+
data: extraOptionsHex
|
|
9351
|
+
};
|
|
9352
|
+
const payload = await this.buildPayload({
|
|
9353
|
+
to: lzTellerAddress,
|
|
9354
|
+
function: functionSignature,
|
|
9355
|
+
arguments: [args.amount, bridgeData],
|
|
9356
|
+
abi: getContractABI(config.type, "multiChainLzTeller"),
|
|
9357
|
+
value: args.fee
|
|
9358
|
+
});
|
|
9359
|
+
return payload;
|
|
9360
|
+
}
|
|
7680
9361
|
async buildDepositTx(args) {
|
|
7681
9362
|
const functionSignature = this.getFunctionSignature("teller", "deposit");
|
|
7682
9363
|
const tellerAddress = this.getContractAddress("teller");
|
|
@@ -7713,11 +9394,18 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7713
9394
|
to: this.getContractAddress("atomicQueue"),
|
|
7714
9395
|
function: functionSignature,
|
|
7715
9396
|
arguments: [
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
9397
|
+
[
|
|
9398
|
+
args.user,
|
|
9399
|
+
args.offerAsset,
|
|
9400
|
+
args.wantAsset,
|
|
9401
|
+
Number(args.deadline),
|
|
9402
|
+
Number(args.price),
|
|
9403
|
+
Number(args.offerAmount),
|
|
9404
|
+
false,
|
|
9405
|
+
// inSolve: Default false
|
|
9406
|
+
(0, import_dayjs2.default)().unix()
|
|
9407
|
+
// UpdatedAt: current unix timestamp
|
|
9408
|
+
]
|
|
7721
9409
|
],
|
|
7722
9410
|
abi
|
|
7723
9411
|
});
|
|
@@ -7725,7 +9413,7 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7725
9413
|
async buildReclaimWithdrawalRequestTx(args) {
|
|
7726
9414
|
const functionSignature = this.getFunctionSignature(
|
|
7727
9415
|
"atomicQueue",
|
|
7728
|
-
"
|
|
9416
|
+
"cancel_atomic_request"
|
|
7729
9417
|
);
|
|
7730
9418
|
const abi = this.getContractABI("atomicQueue");
|
|
7731
9419
|
return await this.buildPayload({
|
|
@@ -7738,7 +9426,7 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7738
9426
|
async buildCancelWithdrawalRequestTx(args) {
|
|
7739
9427
|
const functionSignature = this.getFunctionSignature(
|
|
7740
9428
|
"atomicQueue",
|
|
7741
|
-
"
|
|
9429
|
+
"cancel_atomic_request"
|
|
7742
9430
|
);
|
|
7743
9431
|
const abi = this.getContractABI("atomicQueue");
|
|
7744
9432
|
return await this.buildPayload({
|
|
@@ -7748,7 +9436,7 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7748
9436
|
abi
|
|
7749
9437
|
});
|
|
7750
9438
|
}
|
|
7751
|
-
async getMinimumRequestAge(
|
|
9439
|
+
async getMinimumRequestAge(_args) {
|
|
7752
9440
|
const functionSignature = this.getFunctionSignature(
|
|
7753
9441
|
"atomicQueue",
|
|
7754
9442
|
"get_minimum_request_age"
|
|
@@ -7756,13 +9444,71 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7756
9444
|
const result = await this.viewContract({
|
|
7757
9445
|
address: this.getContractAddress("atomicQueue"),
|
|
7758
9446
|
function: functionSignature,
|
|
7759
|
-
arguments: [
|
|
9447
|
+
arguments: [],
|
|
7760
9448
|
abi: this.getContractABI("atomicQueue")
|
|
7761
9449
|
});
|
|
7762
9450
|
return Number(result);
|
|
7763
9451
|
}
|
|
7764
|
-
async getUserWithdrawalRequests(
|
|
7765
|
-
|
|
9452
|
+
async getUserWithdrawalRequests({
|
|
9453
|
+
userAddress,
|
|
9454
|
+
flag,
|
|
9455
|
+
matchAll
|
|
9456
|
+
}) {
|
|
9457
|
+
const requestFlag = import_core4.PyxisUtils.buildRequestFlags(flag);
|
|
9458
|
+
const getAllWithdrawalRequestFn = this.getFunctionSignature(
|
|
9459
|
+
"atomicQueue",
|
|
9460
|
+
"get_all_atomic_requests"
|
|
9461
|
+
);
|
|
9462
|
+
const withdrawalRequests = await this.viewContract({
|
|
9463
|
+
address: this.getContractAddress("atomicQueue"),
|
|
9464
|
+
function: getAllWithdrawalRequestFn,
|
|
9465
|
+
arguments: [0, Number.MAX_SAFE_INTEGER, requestFlag, matchAll],
|
|
9466
|
+
abi: this.getContractABI("atomicQueue")
|
|
9467
|
+
});
|
|
9468
|
+
const userRequests = withdrawalRequests.filter(
|
|
9469
|
+
(request) => request.user === userAddress
|
|
9470
|
+
);
|
|
9471
|
+
return Promise.all(
|
|
9472
|
+
userRequests.map((request) => this.mapEVMWithdrawalRequest(request))
|
|
9473
|
+
);
|
|
9474
|
+
}
|
|
9475
|
+
async mapEVMWithdrawalRequest(request) {
|
|
9476
|
+
const solveData = await this.viewSolveData({
|
|
9477
|
+
offerAsset: request.offerToken,
|
|
9478
|
+
wantAsset: request.wantToken,
|
|
9479
|
+
user: request.user
|
|
9480
|
+
});
|
|
9481
|
+
return {
|
|
9482
|
+
atomicPrice: request.atomicPrice,
|
|
9483
|
+
deadline: request.deadline,
|
|
9484
|
+
flags: import_core4.PyxisUtils.parseRequestFlags(solveData.flags),
|
|
9485
|
+
offerAmount: request.offerAmount,
|
|
9486
|
+
offerToken: request.offerToken,
|
|
9487
|
+
userAddress: request.user,
|
|
9488
|
+
wantToken: request.wantToken,
|
|
9489
|
+
wantAmount: String(solveData.assetsForWant),
|
|
9490
|
+
updatedAt: request.updatedAt
|
|
9491
|
+
};
|
|
9492
|
+
}
|
|
9493
|
+
async viewSolveData({
|
|
9494
|
+
offerAsset,
|
|
9495
|
+
wantAsset,
|
|
9496
|
+
user
|
|
9497
|
+
}) {
|
|
9498
|
+
const functionSignature = this.getFunctionSignature(
|
|
9499
|
+
"atomicQueue",
|
|
9500
|
+
"view_solve_metadata"
|
|
9501
|
+
);
|
|
9502
|
+
const [requestMetadata] = await this.viewContract({
|
|
9503
|
+
address: this.getContractAddress("atomicQueue"),
|
|
9504
|
+
function: functionSignature,
|
|
9505
|
+
arguments: [offerAsset, wantAsset, [user]],
|
|
9506
|
+
abi: this.getContractABI("atomicQueue")
|
|
9507
|
+
});
|
|
9508
|
+
if (!requestMetadata[0]) {
|
|
9509
|
+
throw new Error("Solve metadata not found");
|
|
9510
|
+
}
|
|
9511
|
+
return requestMetadata[0];
|
|
7766
9512
|
}
|
|
7767
9513
|
};
|
|
7768
9514
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -7776,6 +9522,7 @@ var EthereumChainAdapter = class extends import_core4.BaseChainAdapter {
|
|
|
7776
9522
|
BoringVaultABI,
|
|
7777
9523
|
CONTRACTS,
|
|
7778
9524
|
EthereumChainAdapter,
|
|
9525
|
+
MultiChainLayerZeroTellerAptosABI,
|
|
7779
9526
|
TellerAptosABI,
|
|
7780
9527
|
TellerWithMultiAssetSupportABI,
|
|
7781
9528
|
VaultAptosABI,
|