@optimex-xyz/market-maker-sdk 0.7.0 → 0.8.0-dev-91a0821
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/README.md +17 -4
- package/dist/index.d.mts +1406 -909
- package/dist/index.d.ts +1406 -909
- package/dist/index.js +1212 -889
- package/dist/index.mjs +985 -663
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -9,15 +9,17 @@ var environments = {
|
|
|
9
9
|
dev: {
|
|
10
10
|
backendUrl: "https://api-dev.bitdex.xyz",
|
|
11
11
|
rpcUrl: "https://rpc-bitfi-p00c4t1rul.t.conduit.xyz",
|
|
12
|
-
routerAddress: "
|
|
12
|
+
routerAddress: "0xe6DCDc525051F773EaC3e58B9b5f902D4E03fD55",
|
|
13
|
+
protocolFetcherProxyAddress: "0x0267Fc04eE866b31907dEe123aBdCdB67d03B297",
|
|
13
14
|
paymentAddressMap: {
|
|
14
|
-
ethereum_sepolia: "
|
|
15
|
+
ethereum_sepolia: "0x1d8b58438D5Ccc8Fcb4b738C89078f7b4168C9c0"
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
18
|
staging: {
|
|
18
19
|
backendUrl: "https://api-stg.bitdex.xyz",
|
|
19
20
|
rpcUrl: "https://rpc-bitfi-p00c4t1rul.t.conduit.xyz",
|
|
20
|
-
routerAddress: "
|
|
21
|
+
routerAddress: "0xa6E13A3c6c63C64d45bB453E0402B7D2eE53E564",
|
|
22
|
+
protocolFetcherProxyAddress: "0x7c07151ca4DFd93F352Ab9B132A95866697c38c2",
|
|
21
23
|
paymentAddressMap: {
|
|
22
24
|
ethereum_sepolia: "0x7387DcCfE2f1D5F80b4ECDF91eF58541517e90D2"
|
|
23
25
|
}
|
|
@@ -25,7 +27,8 @@ var environments = {
|
|
|
25
27
|
prelive: {
|
|
26
28
|
backendUrl: "https://pre-api.optimex.xyz",
|
|
27
29
|
rpcUrl: "https://rpc.optimex.xyz",
|
|
28
|
-
routerAddress: "
|
|
30
|
+
routerAddress: "0xF7fedF4A250157010807E6eA60258E3B768149Ff",
|
|
31
|
+
protocolFetcherProxyAddress: "0xFDEd4CEf9aE1E03D0BeF161262a266c1c157a32b",
|
|
29
32
|
paymentAddressMap: {
|
|
30
33
|
ethereum: "0x0A497AC4261E37FA4062762C23Cf3cB642C839b8"
|
|
31
34
|
}
|
|
@@ -33,7 +36,8 @@ var environments = {
|
|
|
33
36
|
production: {
|
|
34
37
|
backendUrl: "https://api.optimex.xyz",
|
|
35
38
|
rpcUrl: "https://rpc.optimex.xyz",
|
|
36
|
-
routerAddress: "
|
|
39
|
+
routerAddress: "0xF7fedF4A250157010807E6eA60258E3B768149Ff",
|
|
40
|
+
protocolFetcherProxyAddress: "0xFDEd4CEf9aE1E03D0BeF161262a266c1c157a32b",
|
|
37
41
|
paymentAddressMap: {
|
|
38
42
|
ethereum: "0x0A497AC4261E37FA4062762C23Cf3cB642C839b8"
|
|
39
43
|
}
|
|
@@ -94,6 +98,9 @@ var Config = class {
|
|
|
94
98
|
getPaymentAddress(networkId) {
|
|
95
99
|
return this.config.paymentAddressMap[networkId];
|
|
96
100
|
}
|
|
101
|
+
getProtocolFetcherAddress() {
|
|
102
|
+
return this.config.protocolFetcherProxyAddress;
|
|
103
|
+
}
|
|
97
104
|
};
|
|
98
105
|
var config = new Config();
|
|
99
106
|
|
|
@@ -116,16 +123,17 @@ var SDK = class {
|
|
|
116
123
|
};
|
|
117
124
|
var sdk = new SDK();
|
|
118
125
|
|
|
119
|
-
// src/contracts/
|
|
126
|
+
// src/contracts/contracts/factories/index.ts
|
|
120
127
|
var factories_exports = {};
|
|
121
128
|
__export(factories_exports, {
|
|
122
129
|
ERC20__factory: () => ERC20__factory,
|
|
123
130
|
Payment__factory: () => Payment__factory,
|
|
131
|
+
ProtocolFetcherProxy__factory: () => ProtocolFetcherProxy__factory,
|
|
124
132
|
Router__factory: () => Router__factory,
|
|
125
133
|
Signer__factory: () => Signer__factory
|
|
126
134
|
});
|
|
127
135
|
|
|
128
|
-
// src/contracts/
|
|
136
|
+
// src/contracts/contracts/factories/ERC20__factory.ts
|
|
129
137
|
import { Contract, Interface } from "ethers";
|
|
130
138
|
var _abi = [
|
|
131
139
|
{
|
|
@@ -1525,7 +1533,7 @@ var ERC20__factory = class {
|
|
|
1525
1533
|
};
|
|
1526
1534
|
ERC20__factory.abi = _abi;
|
|
1527
1535
|
|
|
1528
|
-
// src/contracts/
|
|
1536
|
+
// src/contracts/contracts/factories/Payment__factory.ts
|
|
1529
1537
|
import { Contract as Contract2, Interface as Interface2 } from "ethers";
|
|
1530
1538
|
var _abi2 = [
|
|
1531
1539
|
{
|
|
@@ -1744,7 +1752,7 @@ var Payment__factory = class {
|
|
|
1744
1752
|
};
|
|
1745
1753
|
Payment__factory.abi = _abi2;
|
|
1746
1754
|
|
|
1747
|
-
// src/contracts/
|
|
1755
|
+
// src/contracts/contracts/factories/ProtocolFetcherProxy__factory.ts
|
|
1748
1756
|
import { Contract as Contract3, Interface as Interface3 } from "ethers";
|
|
1749
1757
|
var _abi3 = [
|
|
1750
1758
|
{
|
|
@@ -1755,8 +1763,18 @@ var _abi3 = [
|
|
|
1755
1763
|
type: "address"
|
|
1756
1764
|
},
|
|
1757
1765
|
{
|
|
1758
|
-
internalType: "
|
|
1759
|
-
name: "
|
|
1766
|
+
internalType: "contract IVaultRegistry",
|
|
1767
|
+
name: "vaultRegistry_",
|
|
1768
|
+
type: "address"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
internalType: "contract IRouter",
|
|
1772
|
+
name: "router_",
|
|
1773
|
+
type: "address"
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
internalType: "contract ISignerExtension",
|
|
1777
|
+
name: "signerExtension_",
|
|
1760
1778
|
type: "address"
|
|
1761
1779
|
}
|
|
1762
1780
|
],
|
|
@@ -1770,140 +1788,704 @@ var _abi3 = [
|
|
|
1770
1788
|
},
|
|
1771
1789
|
{
|
|
1772
1790
|
inputs: [],
|
|
1773
|
-
name: "
|
|
1774
|
-
type: "error"
|
|
1775
|
-
},
|
|
1776
|
-
{
|
|
1777
|
-
inputs: [],
|
|
1778
|
-
name: "InconsistentCoreType",
|
|
1779
|
-
type: "error"
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
inputs: [],
|
|
1783
|
-
name: "InconsistentPMM",
|
|
1791
|
+
name: "Unauthorized",
|
|
1784
1792
|
type: "error"
|
|
1785
1793
|
},
|
|
1786
1794
|
{
|
|
1787
|
-
inputs: [
|
|
1788
|
-
|
|
1789
|
-
|
|
1795
|
+
inputs: [
|
|
1796
|
+
{
|
|
1797
|
+
internalType: "bytes",
|
|
1798
|
+
name: "networkId",
|
|
1799
|
+
type: "bytes"
|
|
1800
|
+
}
|
|
1801
|
+
],
|
|
1802
|
+
name: "getLatestMPCInfo",
|
|
1803
|
+
outputs: [
|
|
1804
|
+
{
|
|
1805
|
+
components: [
|
|
1806
|
+
{
|
|
1807
|
+
internalType: "address",
|
|
1808
|
+
name: "mpcL2Address",
|
|
1809
|
+
type: "address"
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
internalType: "uint64",
|
|
1813
|
+
name: "expireTime",
|
|
1814
|
+
type: "uint64"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
internalType: "bytes",
|
|
1818
|
+
name: "mpcL2Pubkey",
|
|
1819
|
+
type: "bytes"
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
internalType: "bytes",
|
|
1823
|
+
name: "mpcAssetPubkey",
|
|
1824
|
+
type: "bytes"
|
|
1825
|
+
}
|
|
1826
|
+
],
|
|
1827
|
+
internalType: "struct ITypes.MPCInfo",
|
|
1828
|
+
name: "",
|
|
1829
|
+
type: "tuple"
|
|
1830
|
+
}
|
|
1831
|
+
],
|
|
1832
|
+
stateMutability: "view",
|
|
1833
|
+
type: "function"
|
|
1790
1834
|
},
|
|
1791
1835
|
{
|
|
1792
|
-
inputs: [
|
|
1793
|
-
|
|
1794
|
-
|
|
1836
|
+
inputs: [
|
|
1837
|
+
{
|
|
1838
|
+
internalType: "bytes",
|
|
1839
|
+
name: "networkId",
|
|
1840
|
+
type: "bytes"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
internalType: "bytes",
|
|
1844
|
+
name: "pubkey",
|
|
1845
|
+
type: "bytes"
|
|
1846
|
+
}
|
|
1847
|
+
],
|
|
1848
|
+
name: "getMPCInfo",
|
|
1849
|
+
outputs: [
|
|
1850
|
+
{
|
|
1851
|
+
components: [
|
|
1852
|
+
{
|
|
1853
|
+
internalType: "address",
|
|
1854
|
+
name: "mpcL2Address",
|
|
1855
|
+
type: "address"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
internalType: "uint64",
|
|
1859
|
+
name: "expireTime",
|
|
1860
|
+
type: "uint64"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
internalType: "bytes",
|
|
1864
|
+
name: "mpcL2Pubkey",
|
|
1865
|
+
type: "bytes"
|
|
1866
|
+
},
|
|
1867
|
+
{
|
|
1868
|
+
internalType: "bytes",
|
|
1869
|
+
name: "mpcAssetPubkey",
|
|
1870
|
+
type: "bytes"
|
|
1871
|
+
}
|
|
1872
|
+
],
|
|
1873
|
+
internalType: "struct ITypes.MPCInfo",
|
|
1874
|
+
name: "info",
|
|
1875
|
+
type: "tuple"
|
|
1876
|
+
}
|
|
1877
|
+
],
|
|
1878
|
+
stateMutability: "view",
|
|
1879
|
+
type: "function"
|
|
1795
1880
|
},
|
|
1796
1881
|
{
|
|
1797
1882
|
inputs: [],
|
|
1798
|
-
name: "
|
|
1799
|
-
|
|
1883
|
+
name: "getManagementOwner",
|
|
1884
|
+
outputs: [
|
|
1885
|
+
{
|
|
1886
|
+
internalType: "address",
|
|
1887
|
+
name: "",
|
|
1888
|
+
type: "address"
|
|
1889
|
+
}
|
|
1890
|
+
],
|
|
1891
|
+
stateMutability: "view",
|
|
1892
|
+
type: "function"
|
|
1800
1893
|
},
|
|
1801
1894
|
{
|
|
1802
|
-
inputs: [
|
|
1803
|
-
|
|
1804
|
-
|
|
1895
|
+
inputs: [
|
|
1896
|
+
{
|
|
1897
|
+
internalType: "bytes[4]",
|
|
1898
|
+
name: "pairInfo",
|
|
1899
|
+
type: "bytes[4]"
|
|
1900
|
+
}
|
|
1901
|
+
],
|
|
1902
|
+
name: "getPFeeRate",
|
|
1903
|
+
outputs: [
|
|
1904
|
+
{
|
|
1905
|
+
internalType: "uint256",
|
|
1906
|
+
name: "",
|
|
1907
|
+
type: "uint256"
|
|
1908
|
+
}
|
|
1909
|
+
],
|
|
1910
|
+
stateMutability: "view",
|
|
1911
|
+
type: "function"
|
|
1805
1912
|
},
|
|
1806
1913
|
{
|
|
1807
|
-
anonymous: false,
|
|
1808
1914
|
inputs: [
|
|
1809
1915
|
{
|
|
1810
|
-
indexed: true,
|
|
1811
|
-
internalType: "address",
|
|
1812
|
-
name: "mpc",
|
|
1813
|
-
type: "address"
|
|
1814
|
-
},
|
|
1815
|
-
{
|
|
1816
|
-
indexed: true,
|
|
1817
1916
|
internalType: "bytes32",
|
|
1818
|
-
name: "
|
|
1917
|
+
name: "pmmId",
|
|
1819
1918
|
type: "bytes32"
|
|
1820
1919
|
},
|
|
1821
1920
|
{
|
|
1822
|
-
indexed: false,
|
|
1823
1921
|
internalType: "uint256",
|
|
1824
|
-
name: "
|
|
1922
|
+
name: "fromIdx",
|
|
1825
1923
|
type: "uint256"
|
|
1826
1924
|
},
|
|
1827
1925
|
{
|
|
1828
|
-
indexed: false,
|
|
1829
1926
|
internalType: "uint256",
|
|
1830
|
-
name: "
|
|
1927
|
+
name: "toIdx",
|
|
1831
1928
|
type: "uint256"
|
|
1832
|
-
}
|
|
1929
|
+
}
|
|
1930
|
+
],
|
|
1931
|
+
name: "getPMMAccounts",
|
|
1932
|
+
outputs: [
|
|
1833
1933
|
{
|
|
1834
|
-
|
|
1835
|
-
internalType: "bytes[]",
|
|
1934
|
+
internalType: "address[]",
|
|
1836
1935
|
name: "list",
|
|
1837
|
-
type: "
|
|
1936
|
+
type: "address[]"
|
|
1838
1937
|
}
|
|
1839
1938
|
],
|
|
1840
|
-
|
|
1841
|
-
type: "
|
|
1939
|
+
stateMutability: "view",
|
|
1940
|
+
type: "function"
|
|
1842
1941
|
},
|
|
1843
1942
|
{
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
indexed: true,
|
|
1848
|
-
internalType: "address",
|
|
1849
|
-
name: "mpc",
|
|
1850
|
-
type: "address"
|
|
1851
|
-
},
|
|
1943
|
+
inputs: [],
|
|
1944
|
+
name: "getProtocolState",
|
|
1945
|
+
outputs: [
|
|
1852
1946
|
{
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
type: "bytes32"
|
|
1947
|
+
internalType: "uint256",
|
|
1948
|
+
name: "",
|
|
1949
|
+
type: "uint256"
|
|
1857
1950
|
}
|
|
1858
1951
|
],
|
|
1859
|
-
|
|
1860
|
-
type: "
|
|
1952
|
+
stateMutability: "view",
|
|
1953
|
+
type: "function"
|
|
1861
1954
|
},
|
|
1862
1955
|
{
|
|
1863
|
-
anonymous: false,
|
|
1864
1956
|
inputs: [
|
|
1865
1957
|
{
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
type: "address"
|
|
1958
|
+
internalType: "uint256",
|
|
1959
|
+
name: "fromIdx",
|
|
1960
|
+
type: "uint256"
|
|
1870
1961
|
},
|
|
1871
1962
|
{
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
type: "bytes32"
|
|
1963
|
+
internalType: "uint256",
|
|
1964
|
+
name: "toIdx",
|
|
1965
|
+
type: "uint256"
|
|
1876
1966
|
}
|
|
1877
1967
|
],
|
|
1878
|
-
name: "
|
|
1879
|
-
|
|
1968
|
+
name: "getTokens",
|
|
1969
|
+
outputs: [
|
|
1970
|
+
{
|
|
1971
|
+
components: [
|
|
1972
|
+
{
|
|
1973
|
+
internalType: "bytes[5]",
|
|
1974
|
+
name: "info",
|
|
1975
|
+
type: "bytes[5]"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
internalType: "uint256",
|
|
1979
|
+
name: "decimals",
|
|
1980
|
+
type: "uint256"
|
|
1981
|
+
}
|
|
1982
|
+
],
|
|
1983
|
+
internalType: "struct ITypes.TokenInfo[]",
|
|
1984
|
+
name: "list",
|
|
1985
|
+
type: "tuple[]"
|
|
1986
|
+
}
|
|
1987
|
+
],
|
|
1988
|
+
stateMutability: "view",
|
|
1989
|
+
type: "function"
|
|
1880
1990
|
},
|
|
1881
1991
|
{
|
|
1882
|
-
anonymous: false,
|
|
1883
1992
|
inputs: [
|
|
1884
1993
|
{
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
type: "address"
|
|
1994
|
+
internalType: "bytes",
|
|
1995
|
+
name: "networkId",
|
|
1996
|
+
type: "bytes"
|
|
1889
1997
|
},
|
|
1890
1998
|
{
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
type: "bytes32"
|
|
1999
|
+
internalType: "bytes",
|
|
2000
|
+
name: "tokenId",
|
|
2001
|
+
type: "bytes"
|
|
1895
2002
|
}
|
|
1896
2003
|
],
|
|
1897
|
-
name: "
|
|
1898
|
-
|
|
2004
|
+
name: "getVault",
|
|
2005
|
+
outputs: [
|
|
2006
|
+
{
|
|
2007
|
+
internalType: "address",
|
|
2008
|
+
name: "",
|
|
2009
|
+
type: "address"
|
|
2010
|
+
}
|
|
2011
|
+
],
|
|
2012
|
+
stateMutability: "view",
|
|
2013
|
+
type: "function"
|
|
1899
2014
|
},
|
|
1900
2015
|
{
|
|
1901
|
-
anonymous: false,
|
|
1902
2016
|
inputs: [
|
|
1903
2017
|
{
|
|
1904
|
-
indexed: true,
|
|
1905
2018
|
internalType: "address",
|
|
1906
|
-
name: "
|
|
2019
|
+
name: "account",
|
|
2020
|
+
type: "address"
|
|
2021
|
+
}
|
|
2022
|
+
],
|
|
2023
|
+
name: "isMPCNode",
|
|
2024
|
+
outputs: [
|
|
2025
|
+
{
|
|
2026
|
+
internalType: "bool",
|
|
2027
|
+
name: "",
|
|
2028
|
+
type: "bool"
|
|
2029
|
+
}
|
|
2030
|
+
],
|
|
2031
|
+
stateMutability: "view",
|
|
2032
|
+
type: "function"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
inputs: [
|
|
2036
|
+
{
|
|
2037
|
+
internalType: "address",
|
|
2038
|
+
name: "account",
|
|
2039
|
+
type: "address"
|
|
2040
|
+
}
|
|
2041
|
+
],
|
|
2042
|
+
name: "isSolver",
|
|
2043
|
+
outputs: [
|
|
2044
|
+
{
|
|
2045
|
+
internalType: "bool",
|
|
2046
|
+
name: "",
|
|
2047
|
+
type: "bool"
|
|
2048
|
+
}
|
|
2049
|
+
],
|
|
2050
|
+
stateMutability: "view",
|
|
2051
|
+
type: "function"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
inputs: [
|
|
2055
|
+
{
|
|
2056
|
+
internalType: "bytes",
|
|
2057
|
+
name: "networkId",
|
|
2058
|
+
type: "bytes"
|
|
2059
|
+
}
|
|
2060
|
+
],
|
|
2061
|
+
name: "isValidNetwork",
|
|
2062
|
+
outputs: [
|
|
2063
|
+
{
|
|
2064
|
+
internalType: "bool",
|
|
2065
|
+
name: "",
|
|
2066
|
+
type: "bool"
|
|
2067
|
+
}
|
|
2068
|
+
],
|
|
2069
|
+
stateMutability: "view",
|
|
2070
|
+
type: "function"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
inputs: [
|
|
2074
|
+
{
|
|
2075
|
+
internalType: "bytes32",
|
|
2076
|
+
name: "pmmId",
|
|
2077
|
+
type: "bytes32"
|
|
2078
|
+
}
|
|
2079
|
+
],
|
|
2080
|
+
name: "isValidPMM",
|
|
2081
|
+
outputs: [
|
|
2082
|
+
{
|
|
2083
|
+
internalType: "bool",
|
|
2084
|
+
name: "",
|
|
2085
|
+
type: "bool"
|
|
2086
|
+
}
|
|
2087
|
+
],
|
|
2088
|
+
stateMutability: "view",
|
|
2089
|
+
type: "function"
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
inputs: [
|
|
2093
|
+
{
|
|
2094
|
+
internalType: "bytes32",
|
|
2095
|
+
name: "pmmId",
|
|
2096
|
+
type: "bytes32"
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
internalType: "address",
|
|
2100
|
+
name: "account",
|
|
2101
|
+
type: "address"
|
|
2102
|
+
}
|
|
2103
|
+
],
|
|
2104
|
+
name: "isValidPMMAccount",
|
|
2105
|
+
outputs: [
|
|
2106
|
+
{
|
|
2107
|
+
internalType: "bool",
|
|
2108
|
+
name: "",
|
|
2109
|
+
type: "bool"
|
|
2110
|
+
}
|
|
2111
|
+
],
|
|
2112
|
+
stateMutability: "view",
|
|
2113
|
+
type: "function"
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
inputs: [
|
|
2117
|
+
{
|
|
2118
|
+
internalType: "bytes",
|
|
2119
|
+
name: "networkId",
|
|
2120
|
+
type: "bytes"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
internalType: "bytes",
|
|
2124
|
+
name: "pubkey",
|
|
2125
|
+
type: "bytes"
|
|
2126
|
+
}
|
|
2127
|
+
],
|
|
2128
|
+
name: "isValidPubkey",
|
|
2129
|
+
outputs: [
|
|
2130
|
+
{
|
|
2131
|
+
internalType: "bool",
|
|
2132
|
+
name: "",
|
|
2133
|
+
type: "bool"
|
|
2134
|
+
}
|
|
2135
|
+
],
|
|
2136
|
+
stateMutability: "view",
|
|
2137
|
+
type: "function"
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
inputs: [
|
|
2141
|
+
{
|
|
2142
|
+
internalType: "bytes",
|
|
2143
|
+
name: "networkId",
|
|
2144
|
+
type: "bytes"
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
internalType: "bytes",
|
|
2148
|
+
name: "tokenId",
|
|
2149
|
+
type: "bytes"
|
|
2150
|
+
}
|
|
2151
|
+
],
|
|
2152
|
+
name: "isValidToken",
|
|
2153
|
+
outputs: [
|
|
2154
|
+
{
|
|
2155
|
+
internalType: "bool",
|
|
2156
|
+
name: "",
|
|
2157
|
+
type: "bool"
|
|
2158
|
+
}
|
|
2159
|
+
],
|
|
2160
|
+
stateMutability: "view",
|
|
2161
|
+
type: "function"
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
inputs: [
|
|
2165
|
+
{
|
|
2166
|
+
internalType: "bytes32",
|
|
2167
|
+
name: "pmmId",
|
|
2168
|
+
type: "bytes32"
|
|
2169
|
+
}
|
|
2170
|
+
],
|
|
2171
|
+
name: "numOfPMMAccounts",
|
|
2172
|
+
outputs: [
|
|
2173
|
+
{
|
|
2174
|
+
internalType: "uint256",
|
|
2175
|
+
name: "",
|
|
2176
|
+
type: "uint256"
|
|
2177
|
+
}
|
|
2178
|
+
],
|
|
2179
|
+
stateMutability: "view",
|
|
2180
|
+
type: "function"
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
inputs: [],
|
|
2184
|
+
name: "numOfSupportedTokens",
|
|
2185
|
+
outputs: [
|
|
2186
|
+
{
|
|
2187
|
+
internalType: "uint256",
|
|
2188
|
+
name: "",
|
|
2189
|
+
type: "uint256"
|
|
2190
|
+
}
|
|
2191
|
+
],
|
|
2192
|
+
stateMutability: "view",
|
|
2193
|
+
type: "function"
|
|
2194
|
+
},
|
|
2195
|
+
{
|
|
2196
|
+
inputs: [],
|
|
2197
|
+
name: "pManagement",
|
|
2198
|
+
outputs: [
|
|
2199
|
+
{
|
|
2200
|
+
internalType: "contract IManagement",
|
|
2201
|
+
name: "",
|
|
2202
|
+
type: "address"
|
|
2203
|
+
}
|
|
2204
|
+
],
|
|
2205
|
+
stateMutability: "view",
|
|
2206
|
+
type: "function"
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
inputs: [],
|
|
2210
|
+
name: "registry",
|
|
2211
|
+
outputs: [
|
|
2212
|
+
{
|
|
2213
|
+
internalType: "contract IVaultRegistry",
|
|
2214
|
+
name: "",
|
|
2215
|
+
type: "address"
|
|
2216
|
+
}
|
|
2217
|
+
],
|
|
2218
|
+
stateMutability: "view",
|
|
2219
|
+
type: "function"
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
inputs: [],
|
|
2223
|
+
name: "router",
|
|
2224
|
+
outputs: [
|
|
2225
|
+
{
|
|
2226
|
+
internalType: "contract IRouter",
|
|
2227
|
+
name: "",
|
|
2228
|
+
type: "address"
|
|
2229
|
+
}
|
|
2230
|
+
],
|
|
2231
|
+
stateMutability: "view",
|
|
2232
|
+
type: "function"
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
inputs: [
|
|
2236
|
+
{
|
|
2237
|
+
internalType: "address",
|
|
2238
|
+
name: "newManagement",
|
|
2239
|
+
type: "address"
|
|
2240
|
+
}
|
|
2241
|
+
],
|
|
2242
|
+
name: "setProtocolManagement",
|
|
2243
|
+
outputs: [],
|
|
2244
|
+
stateMutability: "nonpayable",
|
|
2245
|
+
type: "function"
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
inputs: [
|
|
2249
|
+
{
|
|
2250
|
+
internalType: "address",
|
|
2251
|
+
name: "newRouter",
|
|
2252
|
+
type: "address"
|
|
2253
|
+
}
|
|
2254
|
+
],
|
|
2255
|
+
name: "setRouter",
|
|
2256
|
+
outputs: [],
|
|
2257
|
+
stateMutability: "nonpayable",
|
|
2258
|
+
type: "function"
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
inputs: [
|
|
2262
|
+
{
|
|
2263
|
+
internalType: "address",
|
|
2264
|
+
name: "newSignerExtension",
|
|
2265
|
+
type: "address"
|
|
2266
|
+
}
|
|
2267
|
+
],
|
|
2268
|
+
name: "setSignerExtension",
|
|
2269
|
+
outputs: [],
|
|
2270
|
+
stateMutability: "nonpayable",
|
|
2271
|
+
type: "function"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
inputs: [
|
|
2275
|
+
{
|
|
2276
|
+
internalType: "address",
|
|
2277
|
+
name: "newRegistry",
|
|
2278
|
+
type: "address"
|
|
2279
|
+
}
|
|
2280
|
+
],
|
|
2281
|
+
name: "setVaultRegistry",
|
|
2282
|
+
outputs: [],
|
|
2283
|
+
stateMutability: "nonpayable",
|
|
2284
|
+
type: "function"
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
inputs: [],
|
|
2288
|
+
name: "signerExtension",
|
|
2289
|
+
outputs: [
|
|
2290
|
+
{
|
|
2291
|
+
internalType: "contract ISignerExtension",
|
|
2292
|
+
name: "",
|
|
2293
|
+
type: "address"
|
|
2294
|
+
}
|
|
2295
|
+
],
|
|
2296
|
+
stateMutability: "view",
|
|
2297
|
+
type: "function"
|
|
2298
|
+
}
|
|
2299
|
+
];
|
|
2300
|
+
var ProtocolFetcherProxy__factory = class {
|
|
2301
|
+
static createInterface() {
|
|
2302
|
+
return new Interface3(_abi3);
|
|
2303
|
+
}
|
|
2304
|
+
static connect(address, runner) {
|
|
2305
|
+
return new Contract3(
|
|
2306
|
+
address,
|
|
2307
|
+
_abi3,
|
|
2308
|
+
runner
|
|
2309
|
+
);
|
|
2310
|
+
}
|
|
2311
|
+
};
|
|
2312
|
+
ProtocolFetcherProxy__factory.abi = _abi3;
|
|
2313
|
+
|
|
2314
|
+
// src/contracts/contracts/factories/Router__factory.ts
|
|
2315
|
+
import { Contract as Contract4, Interface as Interface4 } from "ethers";
|
|
2316
|
+
var _abi4 = [
|
|
2317
|
+
{
|
|
2318
|
+
inputs: [
|
|
2319
|
+
{
|
|
2320
|
+
internalType: "contract IManagement",
|
|
2321
|
+
name: "management_",
|
|
2322
|
+
type: "address"
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
internalType: "address",
|
|
2326
|
+
name: "signer",
|
|
2327
|
+
type: "address"
|
|
2328
|
+
}
|
|
2329
|
+
],
|
|
2330
|
+
stateMutability: "nonpayable",
|
|
2331
|
+
type: "constructor"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
inputs: [],
|
|
2335
|
+
name: "AddressZero",
|
|
2336
|
+
type: "error"
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
inputs: [],
|
|
2340
|
+
name: "BundlePaymentEmpty",
|
|
2341
|
+
type: "error"
|
|
2342
|
+
},
|
|
2343
|
+
{
|
|
2344
|
+
inputs: [],
|
|
2345
|
+
name: "DepositAlreadySubmitted",
|
|
2346
|
+
type: "error"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
inputs: [],
|
|
2350
|
+
name: "LengthMismatch",
|
|
2351
|
+
type: "error"
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
inputs: [],
|
|
2355
|
+
name: "RegisteredAlready",
|
|
2356
|
+
type: "error"
|
|
2357
|
+
},
|
|
2358
|
+
{
|
|
2359
|
+
inputs: [],
|
|
2360
|
+
name: "RouteNotSupported",
|
|
2361
|
+
type: "error"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
inputs: [],
|
|
2365
|
+
name: "Unauthorized",
|
|
2366
|
+
type: "error"
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
anonymous: false,
|
|
2370
|
+
inputs: [
|
|
2371
|
+
{
|
|
2372
|
+
indexed: true,
|
|
2373
|
+
internalType: "address",
|
|
2374
|
+
name: "solver",
|
|
2375
|
+
type: "address"
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
indexed: true,
|
|
2379
|
+
internalType: "bytes32",
|
|
2380
|
+
name: "tradeId",
|
|
2381
|
+
type: "bytes32"
|
|
2382
|
+
}
|
|
2383
|
+
],
|
|
2384
|
+
name: "Abort",
|
|
2385
|
+
type: "event"
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
anonymous: false,
|
|
2389
|
+
inputs: [
|
|
2390
|
+
{
|
|
2391
|
+
indexed: true,
|
|
2392
|
+
internalType: "address",
|
|
2393
|
+
name: "mpc",
|
|
2394
|
+
type: "address"
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
indexed: true,
|
|
2398
|
+
internalType: "bytes32",
|
|
2399
|
+
name: "tradeId",
|
|
2400
|
+
type: "bytes32"
|
|
2401
|
+
}
|
|
2402
|
+
],
|
|
2403
|
+
name: "ConfirmDeposit",
|
|
2404
|
+
type: "event"
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
anonymous: false,
|
|
2408
|
+
inputs: [
|
|
2409
|
+
{
|
|
2410
|
+
indexed: true,
|
|
2411
|
+
internalType: "address",
|
|
2412
|
+
name: "mpc",
|
|
2413
|
+
type: "address"
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
indexed: true,
|
|
2417
|
+
internalType: "bytes32",
|
|
2418
|
+
name: "tradeId",
|
|
2419
|
+
type: "bytes32"
|
|
2420
|
+
}
|
|
2421
|
+
],
|
|
2422
|
+
name: "ConfirmPayment",
|
|
2423
|
+
type: "event"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
anonymous: false,
|
|
2427
|
+
inputs: [
|
|
2428
|
+
{
|
|
2429
|
+
indexed: true,
|
|
2430
|
+
internalType: "address",
|
|
2431
|
+
name: "mpc",
|
|
2432
|
+
type: "address"
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
indexed: true,
|
|
2436
|
+
internalType: "bytes32",
|
|
2437
|
+
name: "tradeId",
|
|
2438
|
+
type: "bytes32"
|
|
2439
|
+
}
|
|
2440
|
+
],
|
|
2441
|
+
name: "ConfirmPresign",
|
|
2442
|
+
type: "event"
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
anonymous: false,
|
|
2446
|
+
inputs: [
|
|
2447
|
+
{
|
|
2448
|
+
indexed: true,
|
|
2449
|
+
internalType: "address",
|
|
2450
|
+
name: "mpc",
|
|
2451
|
+
type: "address"
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
indexed: true,
|
|
2455
|
+
internalType: "bytes32",
|
|
2456
|
+
name: "tradeId",
|
|
2457
|
+
type: "bytes32"
|
|
2458
|
+
}
|
|
2459
|
+
],
|
|
2460
|
+
name: "ConfirmRefund",
|
|
2461
|
+
type: "event"
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
anonymous: false,
|
|
2465
|
+
inputs: [
|
|
2466
|
+
{
|
|
2467
|
+
indexed: true,
|
|
2468
|
+
internalType: "address",
|
|
2469
|
+
name: "mpc",
|
|
2470
|
+
type: "address"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
indexed: true,
|
|
2474
|
+
internalType: "bytes32",
|
|
2475
|
+
name: "tradeId",
|
|
2476
|
+
type: "bytes32"
|
|
2477
|
+
}
|
|
2478
|
+
],
|
|
2479
|
+
name: "ConfirmSettlement",
|
|
2480
|
+
type: "event"
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
anonymous: false,
|
|
2484
|
+
inputs: [
|
|
2485
|
+
{
|
|
2486
|
+
indexed: true,
|
|
2487
|
+
internalType: "address",
|
|
2488
|
+
name: "operator",
|
|
1907
2489
|
type: "address"
|
|
1908
2490
|
},
|
|
1909
2491
|
{
|
|
@@ -1957,7 +2539,26 @@ var _abi3 = [
|
|
|
1957
2539
|
type: "bytes32"
|
|
1958
2540
|
}
|
|
1959
2541
|
],
|
|
1960
|
-
name: "SelectPMM",
|
|
2542
|
+
name: "SelectPMM",
|
|
2543
|
+
type: "event"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
anonymous: false,
|
|
2547
|
+
inputs: [
|
|
2548
|
+
{
|
|
2549
|
+
indexed: true,
|
|
2550
|
+
internalType: "address",
|
|
2551
|
+
name: "solver",
|
|
2552
|
+
type: "address"
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
indexed: true,
|
|
2556
|
+
internalType: "bytes32",
|
|
2557
|
+
name: "tradeId",
|
|
2558
|
+
type: "bytes32"
|
|
2559
|
+
}
|
|
2560
|
+
],
|
|
2561
|
+
name: "SubmitDeposit",
|
|
1961
2562
|
type: "event"
|
|
1962
2563
|
},
|
|
1963
2564
|
{
|
|
@@ -1985,25 +2586,38 @@ var _abi3 = [
|
|
|
1985
2586
|
{
|
|
1986
2587
|
indexed: true,
|
|
1987
2588
|
internalType: "address",
|
|
1988
|
-
name: "
|
|
2589
|
+
name: "operator",
|
|
1989
2590
|
type: "address"
|
|
1990
2591
|
},
|
|
1991
2592
|
{
|
|
1992
2593
|
indexed: true,
|
|
1993
|
-
internalType: "
|
|
1994
|
-
name: "
|
|
1995
|
-
type: "
|
|
2594
|
+
internalType: "address",
|
|
2595
|
+
name: "newManagement",
|
|
2596
|
+
type: "address"
|
|
2597
|
+
}
|
|
2598
|
+
],
|
|
2599
|
+
name: "UpdatedManagement",
|
|
2600
|
+
type: "event"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
anonymous: false,
|
|
2604
|
+
inputs: [
|
|
2605
|
+
{
|
|
2606
|
+
indexed: true,
|
|
2607
|
+
internalType: "address",
|
|
2608
|
+
name: "handler",
|
|
2609
|
+
type: "address"
|
|
1996
2610
|
},
|
|
1997
2611
|
{
|
|
1998
2612
|
indexed: false,
|
|
1999
2613
|
internalType: "bytes",
|
|
2000
|
-
name: "
|
|
2614
|
+
name: "fromNetwork",
|
|
2001
2615
|
type: "bytes"
|
|
2002
2616
|
},
|
|
2003
2617
|
{
|
|
2004
2618
|
indexed: false,
|
|
2005
2619
|
internalType: "bytes",
|
|
2006
|
-
name: "
|
|
2620
|
+
name: "toNetwork",
|
|
2007
2621
|
type: "bytes"
|
|
2008
2622
|
}
|
|
2009
2623
|
],
|
|
@@ -2023,6 +2637,41 @@ var _abi3 = [
|
|
|
2023
2637
|
stateMutability: "view",
|
|
2024
2638
|
type: "function"
|
|
2025
2639
|
},
|
|
2640
|
+
{
|
|
2641
|
+
inputs: [
|
|
2642
|
+
{
|
|
2643
|
+
internalType: "bytes32",
|
|
2644
|
+
name: "tradeId",
|
|
2645
|
+
type: "bytes32"
|
|
2646
|
+
},
|
|
2647
|
+
{
|
|
2648
|
+
components: [
|
|
2649
|
+
{
|
|
2650
|
+
internalType: "uint256",
|
|
2651
|
+
name: "minAmountOut",
|
|
2652
|
+
type: "uint256"
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
internalType: "uint64",
|
|
2656
|
+
name: "tradeTimeout",
|
|
2657
|
+
type: "uint64"
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
internalType: "bytes",
|
|
2661
|
+
name: "rfqInfoSignature",
|
|
2662
|
+
type: "bytes"
|
|
2663
|
+
}
|
|
2664
|
+
],
|
|
2665
|
+
internalType: "struct ITypes.RFQInfo",
|
|
2666
|
+
name: "rfqInfo",
|
|
2667
|
+
type: "tuple"
|
|
2668
|
+
}
|
|
2669
|
+
],
|
|
2670
|
+
name: "abort",
|
|
2671
|
+
outputs: [],
|
|
2672
|
+
stateMutability: "nonpayable",
|
|
2673
|
+
type: "function"
|
|
2674
|
+
},
|
|
2026
2675
|
{
|
|
2027
2676
|
inputs: [
|
|
2028
2677
|
{
|
|
@@ -2104,6 +2753,24 @@ var _abi3 = [
|
|
|
2104
2753
|
stateMutability: "nonpayable",
|
|
2105
2754
|
type: "function"
|
|
2106
2755
|
},
|
|
2756
|
+
{
|
|
2757
|
+
inputs: [
|
|
2758
|
+
{
|
|
2759
|
+
internalType: "bytes32",
|
|
2760
|
+
name: "tradeId",
|
|
2761
|
+
type: "bytes32"
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
internalType: "bytes",
|
|
2765
|
+
name: "signature",
|
|
2766
|
+
type: "bytes"
|
|
2767
|
+
}
|
|
2768
|
+
],
|
|
2769
|
+
name: "confirmPresign",
|
|
2770
|
+
outputs: [],
|
|
2771
|
+
stateMutability: "nonpayable",
|
|
2772
|
+
type: "function"
|
|
2773
|
+
},
|
|
2107
2774
|
{
|
|
2108
2775
|
inputs: [
|
|
2109
2776
|
{
|
|
@@ -2166,14 +2833,9 @@ var _abi3 = [
|
|
|
2166
2833
|
{
|
|
2167
2834
|
inputs: [
|
|
2168
2835
|
{
|
|
2169
|
-
internalType: "
|
|
2170
|
-
name: "
|
|
2171
|
-
type: "
|
|
2172
|
-
},
|
|
2173
|
-
{
|
|
2174
|
-
internalType: "bytes",
|
|
2175
|
-
name: "toChain",
|
|
2176
|
-
type: "bytes"
|
|
2836
|
+
internalType: "address",
|
|
2837
|
+
name: "handler",
|
|
2838
|
+
type: "address"
|
|
2177
2839
|
}
|
|
2178
2840
|
],
|
|
2179
2841
|
name: "getCurrentEpoch",
|
|
@@ -2209,27 +2871,13 @@ var _abi3 = [
|
|
|
2209
2871
|
outputs: [
|
|
2210
2872
|
{
|
|
2211
2873
|
internalType: "uint256",
|
|
2212
|
-
name: "",
|
|
2874
|
+
name: "stage",
|
|
2213
2875
|
type: "uint256"
|
|
2214
|
-
}
|
|
2215
|
-
],
|
|
2216
|
-
stateMutability: "view",
|
|
2217
|
-
type: "function"
|
|
2218
|
-
},
|
|
2219
|
-
{
|
|
2220
|
-
inputs: [
|
|
2221
|
-
{
|
|
2222
|
-
internalType: "bytes32",
|
|
2223
|
-
name: "tradeId",
|
|
2224
|
-
type: "bytes32"
|
|
2225
|
-
}
|
|
2226
|
-
],
|
|
2227
|
-
name: "getDepositAddressList",
|
|
2228
|
-
outputs: [
|
|
2876
|
+
},
|
|
2229
2877
|
{
|
|
2230
|
-
internalType: "
|
|
2231
|
-
name: "",
|
|
2232
|
-
type: "
|
|
2878
|
+
internalType: "string",
|
|
2879
|
+
name: "swapType",
|
|
2880
|
+
type: "string"
|
|
2233
2881
|
}
|
|
2234
2882
|
],
|
|
2235
2883
|
stateMutability: "view",
|
|
@@ -2316,12 +2964,12 @@ var _abi3 = [
|
|
|
2316
2964
|
inputs: [
|
|
2317
2965
|
{
|
|
2318
2966
|
internalType: "bytes",
|
|
2319
|
-
name: "
|
|
2967
|
+
name: "fromNetwork",
|
|
2320
2968
|
type: "bytes"
|
|
2321
2969
|
},
|
|
2322
2970
|
{
|
|
2323
2971
|
internalType: "bytes",
|
|
2324
|
-
name: "
|
|
2972
|
+
name: "toNetwork",
|
|
2325
2973
|
type: "bytes"
|
|
2326
2974
|
}
|
|
2327
2975
|
],
|
|
@@ -2365,186 +3013,25 @@ var _abi3 = [
|
|
|
2365
3013
|
stateMutability: "view",
|
|
2366
3014
|
type: "function"
|
|
2367
3015
|
},
|
|
2368
|
-
{
|
|
2369
|
-
inputs: [
|
|
2370
|
-
{
|
|
2371
|
-
internalType: "bytes32",
|
|
2372
|
-
name: "tradeId",
|
|
2373
|
-
type: "bytes32"
|
|
2374
|
-
}
|
|
2375
|
-
],
|
|
2376
|
-
name: "getLastSignedPayment",
|
|
2377
|
-
outputs: [
|
|
2378
|
-
{
|
|
2379
|
-
internalType: "uint64",
|
|
2380
|
-
name: "",
|
|
2381
|
-
type: "uint64"
|
|
2382
|
-
}
|
|
2383
|
-
],
|
|
2384
|
-
stateMutability: "view",
|
|
2385
|
-
type: "function"
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
inputs: [
|
|
2389
|
-
{
|
|
2390
|
-
internalType: "bytes",
|
|
2391
|
-
name: "networkId",
|
|
2392
|
-
type: "bytes"
|
|
2393
|
-
}
|
|
2394
|
-
],
|
|
2395
|
-
name: "getLatestMPCInfo",
|
|
2396
|
-
outputs: [
|
|
2397
|
-
{
|
|
2398
|
-
components: [
|
|
2399
|
-
{
|
|
2400
|
-
internalType: "address",
|
|
2401
|
-
name: "mpcL2Address",
|
|
2402
|
-
type: "address"
|
|
2403
|
-
},
|
|
2404
|
-
{
|
|
2405
|
-
internalType: "uint64",
|
|
2406
|
-
name: "expireTime",
|
|
2407
|
-
type: "uint64"
|
|
2408
|
-
},
|
|
2409
|
-
{
|
|
2410
|
-
internalType: "bytes",
|
|
2411
|
-
name: "mpcL2Pubkey",
|
|
2412
|
-
type: "bytes"
|
|
2413
|
-
},
|
|
2414
|
-
{
|
|
2415
|
-
internalType: "bytes",
|
|
2416
|
-
name: "mpcAssetPubkey",
|
|
2417
|
-
type: "bytes"
|
|
2418
|
-
}
|
|
2419
|
-
],
|
|
2420
|
-
internalType: "struct ITypes.MPCInfo",
|
|
2421
|
-
name: "",
|
|
2422
|
-
type: "tuple"
|
|
2423
|
-
}
|
|
2424
|
-
],
|
|
2425
|
-
stateMutability: "view",
|
|
2426
|
-
type: "function"
|
|
2427
|
-
},
|
|
2428
|
-
{
|
|
2429
|
-
inputs: [
|
|
2430
|
-
{
|
|
2431
|
-
internalType: "bytes",
|
|
2432
|
-
name: "networkId",
|
|
2433
|
-
type: "bytes"
|
|
2434
|
-
},
|
|
2435
|
-
{
|
|
2436
|
-
internalType: "bytes",
|
|
2437
|
-
name: "pubkey",
|
|
2438
|
-
type: "bytes"
|
|
2439
|
-
}
|
|
2440
|
-
],
|
|
2441
|
-
name: "getMPCInfo",
|
|
2442
|
-
outputs: [
|
|
2443
|
-
{
|
|
2444
|
-
components: [
|
|
2445
|
-
{
|
|
2446
|
-
internalType: "address",
|
|
2447
|
-
name: "mpcL2Address",
|
|
2448
|
-
type: "address"
|
|
2449
|
-
},
|
|
2450
|
-
{
|
|
2451
|
-
internalType: "uint64",
|
|
2452
|
-
name: "expireTime",
|
|
2453
|
-
type: "uint64"
|
|
2454
|
-
},
|
|
2455
|
-
{
|
|
2456
|
-
internalType: "bytes",
|
|
2457
|
-
name: "mpcL2Pubkey",
|
|
2458
|
-
type: "bytes"
|
|
2459
|
-
},
|
|
2460
|
-
{
|
|
2461
|
-
internalType: "bytes",
|
|
2462
|
-
name: "mpcAssetPubkey",
|
|
2463
|
-
type: "bytes"
|
|
2464
|
-
}
|
|
2465
|
-
],
|
|
2466
|
-
internalType: "struct ITypes.MPCInfo",
|
|
2467
|
-
name: "info",
|
|
2468
|
-
type: "tuple"
|
|
2469
|
-
}
|
|
2470
|
-
],
|
|
2471
|
-
stateMutability: "view",
|
|
2472
|
-
type: "function"
|
|
2473
|
-
},
|
|
2474
|
-
{
|
|
2475
|
-
inputs: [],
|
|
2476
|
-
name: "getManagementOwner",
|
|
2477
|
-
outputs: [
|
|
2478
|
-
{
|
|
2479
|
-
internalType: "address",
|
|
2480
|
-
name: "",
|
|
2481
|
-
type: "address"
|
|
2482
|
-
}
|
|
2483
|
-
],
|
|
2484
|
-
stateMutability: "view",
|
|
2485
|
-
type: "function"
|
|
2486
|
-
},
|
|
2487
3016
|
{
|
|
2488
3017
|
inputs: [
|
|
2489
3018
|
{
|
|
2490
3019
|
internalType: "bytes",
|
|
2491
|
-
name: "
|
|
3020
|
+
name: "fromNetwork",
|
|
2492
3021
|
type: "bytes"
|
|
2493
3022
|
},
|
|
2494
3023
|
{
|
|
2495
|
-
internalType: "bytes",
|
|
2496
|
-
name: "
|
|
2497
|
-
type: "bytes"
|
|
2498
|
-
}
|
|
2499
|
-
],
|
|
2500
|
-
name: "getMaxAffiliateFeeRate",
|
|
2501
|
-
outputs: [
|
|
2502
|
-
{
|
|
2503
|
-
internalType: "uint256",
|
|
2504
|
-
name: "",
|
|
2505
|
-
type: "uint256"
|
|
2506
|
-
}
|
|
2507
|
-
],
|
|
2508
|
-
stateMutability: "view",
|
|
2509
|
-
type: "function"
|
|
2510
|
-
},
|
|
2511
|
-
{
|
|
2512
|
-
inputs: [],
|
|
2513
|
-
name: "getPFeeRate",
|
|
2514
|
-
outputs: [
|
|
2515
|
-
{
|
|
2516
|
-
internalType: "uint256",
|
|
2517
|
-
name: "",
|
|
2518
|
-
type: "uint256"
|
|
2519
|
-
}
|
|
2520
|
-
],
|
|
2521
|
-
stateMutability: "view",
|
|
2522
|
-
type: "function"
|
|
2523
|
-
},
|
|
2524
|
-
{
|
|
2525
|
-
inputs: [
|
|
2526
|
-
{
|
|
2527
|
-
internalType: "bytes32",
|
|
2528
|
-
name: "pmmId",
|
|
2529
|
-
type: "bytes32"
|
|
2530
|
-
},
|
|
2531
|
-
{
|
|
2532
|
-
internalType: "uint256",
|
|
2533
|
-
name: "fromIdx",
|
|
2534
|
-
type: "uint256"
|
|
2535
|
-
},
|
|
2536
|
-
{
|
|
2537
|
-
internalType: "uint256",
|
|
2538
|
-
name: "toIdx",
|
|
2539
|
-
type: "uint256"
|
|
3024
|
+
internalType: "bytes",
|
|
3025
|
+
name: "toNetwork",
|
|
3026
|
+
type: "bytes"
|
|
2540
3027
|
}
|
|
2541
3028
|
],
|
|
2542
|
-
name: "
|
|
3029
|
+
name: "getHistoryCount",
|
|
2543
3030
|
outputs: [
|
|
2544
3031
|
{
|
|
2545
|
-
internalType: "
|
|
2546
|
-
name: "
|
|
2547
|
-
type: "
|
|
3032
|
+
internalType: "uint256",
|
|
3033
|
+
name: "",
|
|
3034
|
+
type: "uint256"
|
|
2548
3035
|
}
|
|
2549
3036
|
],
|
|
2550
3037
|
stateMutability: "view",
|
|
@@ -2622,6 +3109,11 @@ var _abi3 = [
|
|
|
2622
3109
|
},
|
|
2623
3110
|
{
|
|
2624
3111
|
inputs: [
|
|
3112
|
+
{
|
|
3113
|
+
internalType: "address",
|
|
3114
|
+
name: "handler",
|
|
3115
|
+
type: "address"
|
|
3116
|
+
},
|
|
2625
3117
|
{
|
|
2626
3118
|
internalType: "uint256",
|
|
2627
3119
|
name: "epochNo",
|
|
@@ -2636,16 +3128,6 @@ var _abi3 = [
|
|
|
2636
3128
|
internalType: "uint256",
|
|
2637
3129
|
name: "toIdx",
|
|
2638
3130
|
type: "uint256"
|
|
2639
|
-
},
|
|
2640
|
-
{
|
|
2641
|
-
internalType: "bytes",
|
|
2642
|
-
name: "fromChain",
|
|
2643
|
-
type: "bytes"
|
|
2644
|
-
},
|
|
2645
|
-
{
|
|
2646
|
-
internalType: "bytes",
|
|
2647
|
-
name: "toChain",
|
|
2648
|
-
type: "bytes"
|
|
2649
3131
|
}
|
|
2650
3132
|
],
|
|
2651
3133
|
name: "getPendingTrades",
|
|
@@ -2662,35 +3144,17 @@ var _abi3 = [
|
|
|
2662
3144
|
{
|
|
2663
3145
|
inputs: [
|
|
2664
3146
|
{
|
|
2665
|
-
internalType: "
|
|
2666
|
-
name: "
|
|
2667
|
-
type: "
|
|
2668
|
-
},
|
|
2669
|
-
{
|
|
2670
|
-
internalType: "bytes",
|
|
2671
|
-
name: "fromChain",
|
|
2672
|
-
type: "bytes"
|
|
3147
|
+
internalType: "address",
|
|
3148
|
+
name: "handler",
|
|
3149
|
+
type: "address"
|
|
2673
3150
|
},
|
|
2674
|
-
{
|
|
2675
|
-
internalType: "bytes",
|
|
2676
|
-
name: "toChain",
|
|
2677
|
-
type: "bytes"
|
|
2678
|
-
}
|
|
2679
|
-
],
|
|
2680
|
-
name: "getPendingTradesCount",
|
|
2681
|
-
outputs: [
|
|
2682
3151
|
{
|
|
2683
3152
|
internalType: "uint256",
|
|
2684
|
-
name: "",
|
|
3153
|
+
name: "epochNo",
|
|
2685
3154
|
type: "uint256"
|
|
2686
3155
|
}
|
|
2687
3156
|
],
|
|
2688
|
-
|
|
2689
|
-
type: "function"
|
|
2690
|
-
},
|
|
2691
|
-
{
|
|
2692
|
-
inputs: [],
|
|
2693
|
-
name: "getProtocolState",
|
|
3157
|
+
name: "getPendingTradesCount",
|
|
2694
3158
|
outputs: [
|
|
2695
3159
|
{
|
|
2696
3160
|
internalType: "uint256",
|
|
@@ -2709,7 +3173,7 @@ var _abi3 = [
|
|
|
2709
3173
|
type: "bytes32"
|
|
2710
3174
|
}
|
|
2711
3175
|
],
|
|
2712
|
-
name: "
|
|
3176
|
+
name: "getRefundPresign",
|
|
2713
3177
|
outputs: [
|
|
2714
3178
|
{
|
|
2715
3179
|
components: [
|
|
@@ -2732,6 +3196,40 @@ var _abi3 = [
|
|
|
2732
3196
|
stateMutability: "view",
|
|
2733
3197
|
type: "function"
|
|
2734
3198
|
},
|
|
3199
|
+
{
|
|
3200
|
+
inputs: [
|
|
3201
|
+
{
|
|
3202
|
+
internalType: "uint256",
|
|
3203
|
+
name: "fromIdx",
|
|
3204
|
+
type: "uint256"
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
internalType: "uint256",
|
|
3208
|
+
name: "toIdx",
|
|
3209
|
+
type: "uint256"
|
|
3210
|
+
},
|
|
3211
|
+
{
|
|
3212
|
+
internalType: "bytes",
|
|
3213
|
+
name: "fromNetwork",
|
|
3214
|
+
type: "bytes"
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
internalType: "bytes",
|
|
3218
|
+
name: "toNetwork",
|
|
3219
|
+
type: "bytes"
|
|
3220
|
+
}
|
|
3221
|
+
],
|
|
3222
|
+
name: "getRegisteredHandlers",
|
|
3223
|
+
outputs: [
|
|
3224
|
+
{
|
|
3225
|
+
internalType: "address[]",
|
|
3226
|
+
name: "list",
|
|
3227
|
+
type: "address[]"
|
|
3228
|
+
}
|
|
3229
|
+
],
|
|
3230
|
+
stateMutability: "view",
|
|
3231
|
+
type: "function"
|
|
3232
|
+
},
|
|
2735
3233
|
{
|
|
2736
3234
|
inputs: [
|
|
2737
3235
|
{
|
|
@@ -2771,34 +3269,17 @@ var _abi3 = [
|
|
|
2771
3269
|
{
|
|
2772
3270
|
inputs: [
|
|
2773
3271
|
{
|
|
2774
|
-
internalType: "
|
|
2775
|
-
name: "
|
|
2776
|
-
type: "
|
|
2777
|
-
},
|
|
2778
|
-
{
|
|
2779
|
-
internalType: "uint256",
|
|
2780
|
-
name: "toIdx",
|
|
2781
|
-
type: "uint256"
|
|
3272
|
+
internalType: "bytes32",
|
|
3273
|
+
name: "tradeId",
|
|
3274
|
+
type: "bytes32"
|
|
2782
3275
|
}
|
|
2783
3276
|
],
|
|
2784
|
-
name: "
|
|
3277
|
+
name: "getSolver",
|
|
2785
3278
|
outputs: [
|
|
2786
3279
|
{
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
name: "info",
|
|
2791
|
-
type: "bytes[5]"
|
|
2792
|
-
},
|
|
2793
|
-
{
|
|
2794
|
-
internalType: "uint256",
|
|
2795
|
-
name: "decimals",
|
|
2796
|
-
type: "uint256"
|
|
2797
|
-
}
|
|
2798
|
-
],
|
|
2799
|
-
internalType: "struct ITypes.TokenInfo[]",
|
|
2800
|
-
name: "list",
|
|
2801
|
-
type: "tuple[]"
|
|
3280
|
+
internalType: "address",
|
|
3281
|
+
name: "",
|
|
3282
|
+
type: "address"
|
|
2802
3283
|
}
|
|
2803
3284
|
],
|
|
2804
3285
|
stateMutability: "view",
|
|
@@ -2878,215 +3359,48 @@ var _abi3 = [
|
|
|
2878
3359
|
inputs: [
|
|
2879
3360
|
{
|
|
2880
3361
|
internalType: "bytes32",
|
|
2881
|
-
name: "tradeId",
|
|
2882
|
-
type: "bytes32"
|
|
2883
|
-
}
|
|
2884
|
-
],
|
|
2885
|
-
name: "getTradeFinalization",
|
|
2886
|
-
outputs: [
|
|
2887
|
-
{
|
|
2888
|
-
components: [
|
|
2889
|
-
{
|
|
2890
|
-
internalType: "bytes32",
|
|
2891
|
-
name: "bundlerHash",
|
|
2892
|
-
type: "bytes32"
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
internalType: "uint256",
|
|
2896
|
-
name: "index",
|
|
2897
|
-
type: "uint256"
|
|
2898
|
-
},
|
|
2899
|
-
{
|
|
2900
|
-
internalType: "bytes",
|
|
2901
|
-
name: "paymentTxId",
|
|
2902
|
-
type: "bytes"
|
|
2903
|
-
},
|
|
2904
|
-
{
|
|
2905
|
-
internalType: "bytes",
|
|
2906
|
-
name: "releaseTxId",
|
|
2907
|
-
type: "bytes"
|
|
2908
|
-
},
|
|
2909
|
-
{
|
|
2910
|
-
internalType: "bytes",
|
|
2911
|
-
name: "refundTxId",
|
|
2912
|
-
type: "bytes"
|
|
2913
|
-
},
|
|
2914
|
-
{
|
|
2915
|
-
internalType: "bool",
|
|
2916
|
-
name: "isConfirmed",
|
|
2917
|
-
type: "bool"
|
|
2918
|
-
}
|
|
2919
|
-
],
|
|
2920
|
-
internalType: "struct ITypes.TradeFinalization",
|
|
2921
|
-
name: "",
|
|
2922
|
-
type: "tuple"
|
|
2923
|
-
}
|
|
2924
|
-
],
|
|
2925
|
-
stateMutability: "view",
|
|
2926
|
-
type: "function"
|
|
2927
|
-
},
|
|
2928
|
-
{
|
|
2929
|
-
inputs: [
|
|
2930
|
-
{
|
|
2931
|
-
internalType: "address",
|
|
2932
|
-
name: "account",
|
|
2933
|
-
type: "address"
|
|
2934
|
-
}
|
|
2935
|
-
],
|
|
2936
|
-
name: "isMPCNode",
|
|
2937
|
-
outputs: [
|
|
2938
|
-
{
|
|
2939
|
-
internalType: "bool",
|
|
2940
|
-
name: "",
|
|
2941
|
-
type: "bool"
|
|
2942
|
-
}
|
|
2943
|
-
],
|
|
2944
|
-
stateMutability: "view",
|
|
2945
|
-
type: "function"
|
|
2946
|
-
},
|
|
2947
|
-
{
|
|
2948
|
-
inputs: [
|
|
2949
|
-
{
|
|
2950
|
-
internalType: "address",
|
|
2951
|
-
name: "account",
|
|
2952
|
-
type: "address"
|
|
2953
|
-
}
|
|
2954
|
-
],
|
|
2955
|
-
name: "isSolver",
|
|
2956
|
-
outputs: [
|
|
2957
|
-
{
|
|
2958
|
-
internalType: "bool",
|
|
2959
|
-
name: "",
|
|
2960
|
-
type: "bool"
|
|
2961
|
-
}
|
|
2962
|
-
],
|
|
2963
|
-
stateMutability: "view",
|
|
2964
|
-
type: "function"
|
|
2965
|
-
},
|
|
2966
|
-
{
|
|
2967
|
-
inputs: [
|
|
2968
|
-
{
|
|
2969
|
-
internalType: "enum ITypes.STAGE",
|
|
2970
|
-
name: "stage",
|
|
2971
|
-
type: "uint8"
|
|
2972
|
-
}
|
|
2973
|
-
],
|
|
2974
|
-
name: "isSuspended",
|
|
2975
|
-
outputs: [
|
|
2976
|
-
{
|
|
2977
|
-
internalType: "bool",
|
|
2978
|
-
name: "",
|
|
2979
|
-
type: "bool"
|
|
2980
|
-
}
|
|
2981
|
-
],
|
|
2982
|
-
stateMutability: "view",
|
|
2983
|
-
type: "function"
|
|
2984
|
-
},
|
|
2985
|
-
{
|
|
2986
|
-
inputs: [
|
|
2987
|
-
{
|
|
2988
|
-
internalType: "bytes",
|
|
2989
|
-
name: "networkId",
|
|
2990
|
-
type: "bytes"
|
|
2991
|
-
}
|
|
2992
|
-
],
|
|
2993
|
-
name: "isValidNetwork",
|
|
2994
|
-
outputs: [
|
|
2995
|
-
{
|
|
2996
|
-
internalType: "bool",
|
|
2997
|
-
name: "",
|
|
2998
|
-
type: "bool"
|
|
2999
|
-
}
|
|
3000
|
-
],
|
|
3001
|
-
stateMutability: "view",
|
|
3002
|
-
type: "function"
|
|
3003
|
-
},
|
|
3004
|
-
{
|
|
3005
|
-
inputs: [
|
|
3006
|
-
{
|
|
3007
|
-
internalType: "bytes32",
|
|
3008
|
-
name: "pmmId",
|
|
3009
|
-
type: "bytes32"
|
|
3010
|
-
}
|
|
3011
|
-
],
|
|
3012
|
-
name: "isValidPMM",
|
|
3013
|
-
outputs: [
|
|
3014
|
-
{
|
|
3015
|
-
internalType: "bool",
|
|
3016
|
-
name: "",
|
|
3017
|
-
type: "bool"
|
|
3018
|
-
}
|
|
3019
|
-
],
|
|
3020
|
-
stateMutability: "view",
|
|
3021
|
-
type: "function"
|
|
3022
|
-
},
|
|
3023
|
-
{
|
|
3024
|
-
inputs: [
|
|
3025
|
-
{
|
|
3026
|
-
internalType: "bytes32",
|
|
3027
|
-
name: "pmmId",
|
|
3362
|
+
name: "tradeId",
|
|
3028
3363
|
type: "bytes32"
|
|
3029
|
-
},
|
|
3030
|
-
{
|
|
3031
|
-
internalType: "address",
|
|
3032
|
-
name: "account",
|
|
3033
|
-
type: "address"
|
|
3034
|
-
}
|
|
3035
|
-
],
|
|
3036
|
-
name: "isValidPMMAccount",
|
|
3037
|
-
outputs: [
|
|
3038
|
-
{
|
|
3039
|
-
internalType: "bool",
|
|
3040
|
-
name: "",
|
|
3041
|
-
type: "bool"
|
|
3042
|
-
}
|
|
3043
|
-
],
|
|
3044
|
-
stateMutability: "view",
|
|
3045
|
-
type: "function"
|
|
3046
|
-
},
|
|
3047
|
-
{
|
|
3048
|
-
inputs: [
|
|
3049
|
-
{
|
|
3050
|
-
internalType: "bytes",
|
|
3051
|
-
name: "networkId",
|
|
3052
|
-
type: "bytes"
|
|
3053
|
-
},
|
|
3054
|
-
{
|
|
3055
|
-
internalType: "bytes",
|
|
3056
|
-
name: "pubkey",
|
|
3057
|
-
type: "bytes"
|
|
3058
|
-
}
|
|
3059
|
-
],
|
|
3060
|
-
name: "isValidPubkey",
|
|
3061
|
-
outputs: [
|
|
3062
|
-
{
|
|
3063
|
-
internalType: "bool",
|
|
3064
|
-
name: "",
|
|
3065
|
-
type: "bool"
|
|
3066
|
-
}
|
|
3067
|
-
],
|
|
3068
|
-
stateMutability: "view",
|
|
3069
|
-
type: "function"
|
|
3070
|
-
},
|
|
3071
|
-
{
|
|
3072
|
-
inputs: [
|
|
3073
|
-
{
|
|
3074
|
-
internalType: "bytes",
|
|
3075
|
-
name: "networkId",
|
|
3076
|
-
type: "bytes"
|
|
3077
|
-
},
|
|
3078
|
-
{
|
|
3079
|
-
internalType: "bytes",
|
|
3080
|
-
name: "tokenId",
|
|
3081
|
-
type: "bytes"
|
|
3082
3364
|
}
|
|
3083
3365
|
],
|
|
3084
|
-
name: "
|
|
3366
|
+
name: "getTradeFinalization",
|
|
3085
3367
|
outputs: [
|
|
3086
3368
|
{
|
|
3087
|
-
|
|
3369
|
+
components: [
|
|
3370
|
+
{
|
|
3371
|
+
internalType: "bytes32",
|
|
3372
|
+
name: "bundlerHash",
|
|
3373
|
+
type: "bytes32"
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
internalType: "uint256",
|
|
3377
|
+
name: "index",
|
|
3378
|
+
type: "uint256"
|
|
3379
|
+
},
|
|
3380
|
+
{
|
|
3381
|
+
internalType: "bytes",
|
|
3382
|
+
name: "paymentTxId",
|
|
3383
|
+
type: "bytes"
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
internalType: "bytes",
|
|
3387
|
+
name: "releaseTxId",
|
|
3388
|
+
type: "bytes"
|
|
3389
|
+
},
|
|
3390
|
+
{
|
|
3391
|
+
internalType: "bytes",
|
|
3392
|
+
name: "refundTxId",
|
|
3393
|
+
type: "bytes"
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
internalType: "bool",
|
|
3397
|
+
name: "isConfirmed",
|
|
3398
|
+
type: "bool"
|
|
3399
|
+
}
|
|
3400
|
+
],
|
|
3401
|
+
internalType: "struct ITypes.TradeFinalization",
|
|
3088
3402
|
name: "",
|
|
3089
|
-
type: "
|
|
3403
|
+
type: "tuple"
|
|
3090
3404
|
}
|
|
3091
3405
|
],
|
|
3092
3406
|
stateMutability: "view",
|
|
@@ -3108,33 +3422,19 @@ var _abi3 = [
|
|
|
3108
3422
|
{
|
|
3109
3423
|
inputs: [
|
|
3110
3424
|
{
|
|
3111
|
-
internalType: "bytes32",
|
|
3112
|
-
name: "
|
|
3113
|
-
type: "bytes32"
|
|
3114
|
-
}
|
|
3115
|
-
],
|
|
3116
|
-
name: "numOfPMMAccounts",
|
|
3117
|
-
outputs: [
|
|
3118
|
-
{
|
|
3119
|
-
internalType: "uint256",
|
|
3120
|
-
name: "",
|
|
3121
|
-
type: "uint256"
|
|
3122
|
-
}
|
|
3123
|
-
],
|
|
3124
|
-
stateMutability: "view",
|
|
3125
|
-
type: "function"
|
|
3126
|
-
},
|
|
3127
|
-
{
|
|
3128
|
-
inputs: [],
|
|
3129
|
-
name: "numOfSupportedTokens",
|
|
3130
|
-
outputs: [
|
|
3425
|
+
internalType: "bytes32[]",
|
|
3426
|
+
name: "referenceIds",
|
|
3427
|
+
type: "bytes32[]"
|
|
3428
|
+
},
|
|
3131
3429
|
{
|
|
3132
|
-
internalType: "
|
|
3133
|
-
name: "",
|
|
3134
|
-
type: "
|
|
3430
|
+
internalType: "address[]",
|
|
3431
|
+
name: "handlers",
|
|
3432
|
+
type: "address[]"
|
|
3135
3433
|
}
|
|
3136
3434
|
],
|
|
3137
|
-
|
|
3435
|
+
name: "migrate",
|
|
3436
|
+
outputs: [],
|
|
3437
|
+
stateMutability: "nonpayable",
|
|
3138
3438
|
type: "function"
|
|
3139
3439
|
},
|
|
3140
3440
|
{
|
|
@@ -3172,6 +3472,11 @@ var _abi3 = [
|
|
|
3172
3472
|
name: "msgError",
|
|
3173
3473
|
type: "bytes"
|
|
3174
3474
|
},
|
|
3475
|
+
{
|
|
3476
|
+
internalType: "bytes",
|
|
3477
|
+
name: "referenceInfo",
|
|
3478
|
+
type: "bytes"
|
|
3479
|
+
},
|
|
3175
3480
|
{
|
|
3176
3481
|
internalType: "bytes",
|
|
3177
3482
|
name: "signature",
|
|
@@ -3274,12 +3579,12 @@ var _abi3 = [
|
|
|
3274
3579
|
},
|
|
3275
3580
|
{
|
|
3276
3581
|
internalType: "bytes",
|
|
3277
|
-
name: "
|
|
3582
|
+
name: "fromNetwork",
|
|
3278
3583
|
type: "bytes"
|
|
3279
3584
|
},
|
|
3280
3585
|
{
|
|
3281
3586
|
internalType: "bytes",
|
|
3282
|
-
name: "
|
|
3587
|
+
name: "toNetwork",
|
|
3283
3588
|
type: "bytes"
|
|
3284
3589
|
}
|
|
3285
3590
|
],
|
|
@@ -3288,6 +3593,92 @@ var _abi3 = [
|
|
|
3288
3593
|
stateMutability: "nonpayable",
|
|
3289
3594
|
type: "function"
|
|
3290
3595
|
},
|
|
3596
|
+
{
|
|
3597
|
+
inputs: [
|
|
3598
|
+
{
|
|
3599
|
+
internalType: "bytes32",
|
|
3600
|
+
name: "tradeId",
|
|
3601
|
+
type: "bytes32"
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
components: [
|
|
3605
|
+
{
|
|
3606
|
+
internalType: "uint256",
|
|
3607
|
+
name: "sessionId",
|
|
3608
|
+
type: "uint256"
|
|
3609
|
+
},
|
|
3610
|
+
{
|
|
3611
|
+
components: [
|
|
3612
|
+
{
|
|
3613
|
+
internalType: "uint256",
|
|
3614
|
+
name: "amountIn",
|
|
3615
|
+
type: "uint256"
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
internalType: "bytes[3]",
|
|
3619
|
+
name: "fromChain",
|
|
3620
|
+
type: "bytes[3]"
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
internalType: "bytes[3]",
|
|
3624
|
+
name: "toChain",
|
|
3625
|
+
type: "bytes[3]"
|
|
3626
|
+
}
|
|
3627
|
+
],
|
|
3628
|
+
internalType: "struct ITypes.TradeInfo",
|
|
3629
|
+
name: "tradeInfo",
|
|
3630
|
+
type: "tuple"
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
components: [
|
|
3634
|
+
{
|
|
3635
|
+
internalType: "bytes[5]",
|
|
3636
|
+
name: "depositInfo",
|
|
3637
|
+
type: "bytes[5]"
|
|
3638
|
+
},
|
|
3639
|
+
{
|
|
3640
|
+
internalType: "address",
|
|
3641
|
+
name: "userEphemeralL2Address",
|
|
3642
|
+
type: "address"
|
|
3643
|
+
},
|
|
3644
|
+
{
|
|
3645
|
+
internalType: "uint64",
|
|
3646
|
+
name: "scriptTimeout",
|
|
3647
|
+
type: "uint64"
|
|
3648
|
+
}
|
|
3649
|
+
],
|
|
3650
|
+
internalType: "struct ITypes.ScriptInfo",
|
|
3651
|
+
name: "scriptInfo",
|
|
3652
|
+
type: "tuple"
|
|
3653
|
+
}
|
|
3654
|
+
],
|
|
3655
|
+
internalType: "struct ITypes.TradeData",
|
|
3656
|
+
name: "tradeData",
|
|
3657
|
+
type: "tuple"
|
|
3658
|
+
},
|
|
3659
|
+
{
|
|
3660
|
+
components: [
|
|
3661
|
+
{
|
|
3662
|
+
internalType: "bytes",
|
|
3663
|
+
name: "refundAddress",
|
|
3664
|
+
type: "bytes"
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
internalType: "bytes[]",
|
|
3668
|
+
name: "presigns",
|
|
3669
|
+
type: "bytes[]"
|
|
3670
|
+
}
|
|
3671
|
+
],
|
|
3672
|
+
internalType: "struct ITypes.RefundPresign",
|
|
3673
|
+
name: "refundPresign",
|
|
3674
|
+
type: "tuple"
|
|
3675
|
+
}
|
|
3676
|
+
],
|
|
3677
|
+
name: "submitDeposit",
|
|
3678
|
+
outputs: [],
|
|
3679
|
+
stateMutability: "nonpayable",
|
|
3680
|
+
type: "function"
|
|
3681
|
+
},
|
|
3291
3682
|
{
|
|
3292
3683
|
inputs: [
|
|
3293
3684
|
{
|
|
@@ -3417,40 +3808,21 @@ var _abi3 = [
|
|
|
3417
3808
|
outputs: [],
|
|
3418
3809
|
stateMutability: "nonpayable",
|
|
3419
3810
|
type: "function"
|
|
3420
|
-
},
|
|
3421
|
-
{
|
|
3422
|
-
inputs: [
|
|
3423
|
-
{
|
|
3424
|
-
internalType: "address",
|
|
3425
|
-
name: "",
|
|
3426
|
-
type: "address"
|
|
3427
|
-
}
|
|
3428
|
-
],
|
|
3429
|
-
name: "version",
|
|
3430
|
-
outputs: [
|
|
3431
|
-
{
|
|
3432
|
-
internalType: "uint256",
|
|
3433
|
-
name: "",
|
|
3434
|
-
type: "uint256"
|
|
3435
|
-
}
|
|
3436
|
-
],
|
|
3437
|
-
stateMutability: "view",
|
|
3438
|
-
type: "function"
|
|
3439
3811
|
}
|
|
3440
3812
|
];
|
|
3441
3813
|
var Router__factory = class {
|
|
3442
3814
|
static createInterface() {
|
|
3443
|
-
return new
|
|
3815
|
+
return new Interface4(_abi4);
|
|
3444
3816
|
}
|
|
3445
3817
|
static connect(address, runner) {
|
|
3446
|
-
return new
|
|
3818
|
+
return new Contract4(address, _abi4, runner);
|
|
3447
3819
|
}
|
|
3448
3820
|
};
|
|
3449
|
-
Router__factory.abi =
|
|
3821
|
+
Router__factory.abi = _abi4;
|
|
3450
3822
|
|
|
3451
|
-
// src/contracts/
|
|
3452
|
-
import { Contract as
|
|
3453
|
-
var
|
|
3823
|
+
// src/contracts/contracts/factories/Signer__factory.ts
|
|
3824
|
+
import { Contract as Contract5, Interface as Interface5 } from "ethers";
|
|
3825
|
+
var _abi5 = [
|
|
3454
3826
|
{
|
|
3455
3827
|
inputs: [],
|
|
3456
3828
|
stateMutability: "nonpayable",
|
|
@@ -3778,16 +4150,16 @@ var _abi4 = [
|
|
|
3778
4150
|
];
|
|
3779
4151
|
var Signer__factory = class {
|
|
3780
4152
|
static createInterface() {
|
|
3781
|
-
return new
|
|
4153
|
+
return new Interface5(_abi5);
|
|
3782
4154
|
}
|
|
3783
4155
|
static connect(address, runner) {
|
|
3784
|
-
return new
|
|
4156
|
+
return new Contract5(address, _abi5, runner);
|
|
3785
4157
|
}
|
|
3786
4158
|
};
|
|
3787
|
-
Signer__factory.abi =
|
|
4159
|
+
Signer__factory.abi = _abi5;
|
|
3788
4160
|
|
|
3789
4161
|
// src/services/router.service.ts
|
|
3790
|
-
import {
|
|
4162
|
+
import { JsonRpcProvider } from "ethers";
|
|
3791
4163
|
var RouterService = class {
|
|
3792
4164
|
constructor() {
|
|
3793
4165
|
this.provider = new JsonRpcProvider(config.getRpcUrl());
|
|
@@ -3805,75 +4177,24 @@ var RouterService = class {
|
|
|
3805
4177
|
async getSigner() {
|
|
3806
4178
|
return await this.contract.SIGNER();
|
|
3807
4179
|
}
|
|
3808
|
-
async getCurrentPubkey(network) {
|
|
3809
|
-
return this.contract.getLatestMPCInfo(ethers.toUtf8Bytes(network));
|
|
3810
|
-
}
|
|
3811
|
-
async getCurrentStage(tradeId) {
|
|
3812
|
-
return await this.contract.getCurrentStage(tradeId);
|
|
3813
|
-
}
|
|
3814
|
-
async getDepositAddressList(tradeId) {
|
|
3815
|
-
return await this.contract.getDepositAddressList(tradeId);
|
|
3816
|
-
}
|
|
3817
4180
|
async getHandler(fromChain, toChain) {
|
|
3818
4181
|
return await this.contract.getHandler(fromChain, toChain);
|
|
3819
4182
|
}
|
|
3820
|
-
async getPFeeRate() {
|
|
3821
|
-
return await this.contract.getPFeeRate();
|
|
3822
|
-
}
|
|
3823
4183
|
async getPMMSelection(tradeId) {
|
|
3824
4184
|
return await this.contract.getPMMSelection(tradeId);
|
|
3825
4185
|
}
|
|
3826
4186
|
async getSettlementPresigns(tradeId) {
|
|
3827
4187
|
return await this.contract.getSettlementPresigns(tradeId);
|
|
3828
4188
|
}
|
|
3829
|
-
async getRefundPresigns(tradeId) {
|
|
3830
|
-
return await this.contract.getRefundPresigns(tradeId);
|
|
3831
|
-
}
|
|
3832
|
-
async getProtocolState() {
|
|
3833
|
-
return await this.contract.getProtocolState();
|
|
3834
|
-
}
|
|
3835
4189
|
async getFeeDetails(tradeId) {
|
|
3836
4190
|
return await this.contract.getFeeDetails(tradeId);
|
|
3837
4191
|
}
|
|
3838
|
-
async getTradeFinalization(tradeId) {
|
|
3839
|
-
return await this.contract.getTradeFinalization(tradeId);
|
|
3840
|
-
}
|
|
3841
|
-
async getTokens(fromIdx, toIdx) {
|
|
3842
|
-
return await this.contract.getTokens(fromIdx, toIdx);
|
|
3843
|
-
}
|
|
3844
4192
|
async getTradeData(tradeId) {
|
|
3845
4193
|
return await this.contract.getTradeData(tradeId);
|
|
3846
4194
|
}
|
|
3847
|
-
async isMPCNode(account) {
|
|
3848
|
-
return await this.contract.isMPCNode(account);
|
|
3849
|
-
}
|
|
3850
|
-
async isSolver(account) {
|
|
3851
|
-
return await this.contract.isSolver(account);
|
|
3852
|
-
}
|
|
3853
|
-
async isSuspended(stage) {
|
|
3854
|
-
return await this.contract.isSuspended(stage);
|
|
3855
|
-
}
|
|
3856
|
-
async isValidNetwork(networkId) {
|
|
3857
|
-
return await this.contract.isValidNetwork(networkId);
|
|
3858
|
-
}
|
|
3859
|
-
async isValidPMM(pmmId) {
|
|
3860
|
-
return await this.contract.isValidPMM(pmmId);
|
|
3861
|
-
}
|
|
3862
|
-
async isValidPMMAccount(pmmId, account) {
|
|
3863
|
-
return await this.contract.isValidPMMAccount(pmmId, account);
|
|
3864
|
-
}
|
|
3865
|
-
async isValidToken(networkId, tokenId) {
|
|
3866
|
-
return await this.contract.isValidToken(networkId, tokenId);
|
|
3867
|
-
}
|
|
3868
4195
|
async getManagement() {
|
|
3869
4196
|
return await this.contract.management();
|
|
3870
4197
|
}
|
|
3871
|
-
async getNumOfSupportedTokens() {
|
|
3872
|
-
return await this.contract.numOfSupportedTokens();
|
|
3873
|
-
}
|
|
3874
|
-
async getVersion(address) {
|
|
3875
|
-
return await this.contract.version(address);
|
|
3876
|
-
}
|
|
3877
4198
|
};
|
|
3878
4199
|
var routerService = new RouterService();
|
|
3879
4200
|
|
|
@@ -4336,6 +4657,7 @@ async function getSignature(Signer2, provider, signerHelper, tradeId, infoHash,
|
|
|
4336
4657
|
export {
|
|
4337
4658
|
ERC20__factory,
|
|
4338
4659
|
Payment__factory,
|
|
4660
|
+
ProtocolFetcherProxy__factory,
|
|
4339
4661
|
RouterService,
|
|
4340
4662
|
Router__factory,
|
|
4341
4663
|
SDK,
|