@optimex-xyz/market-maker-sdk 0.7.0 → 0.7.1
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 +1416 -949
- package/dist/index.d.ts +1416 -949
- package/dist/index.js +1165 -861
- package/dist/index.mjs +982 -679
- 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: "0x5008a47004b1cACD0Fd7CE689973F6b0CB345802",
|
|
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: "depositId",
|
|
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
|
{
|
|
@@ -1938,7 +2520,26 @@ var _abi3 = [
|
|
|
1938
2520
|
type: "bytes"
|
|
1939
2521
|
}
|
|
1940
2522
|
],
|
|
1941
|
-
name: "ReportFailure",
|
|
2523
|
+
name: "ReportFailure",
|
|
2524
|
+
type: "event"
|
|
2525
|
+
},
|
|
2526
|
+
{
|
|
2527
|
+
anonymous: false,
|
|
2528
|
+
inputs: [
|
|
2529
|
+
{
|
|
2530
|
+
indexed: true,
|
|
2531
|
+
internalType: "address",
|
|
2532
|
+
name: "solver",
|
|
2533
|
+
type: "address"
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
indexed: true,
|
|
2537
|
+
internalType: "bytes32",
|
|
2538
|
+
name: "tradeId",
|
|
2539
|
+
type: "bytes32"
|
|
2540
|
+
}
|
|
2541
|
+
],
|
|
2542
|
+
name: "SelectPMM",
|
|
1942
2543
|
type: "event"
|
|
1943
2544
|
},
|
|
1944
2545
|
{
|
|
@@ -1953,11 +2554,11 @@ var _abi3 = [
|
|
|
1953
2554
|
{
|
|
1954
2555
|
indexed: true,
|
|
1955
2556
|
internalType: "bytes32",
|
|
1956
|
-
name: "
|
|
2557
|
+
name: "depositId",
|
|
1957
2558
|
type: "bytes32"
|
|
1958
2559
|
}
|
|
1959
2560
|
],
|
|
1960
|
-
name: "
|
|
2561
|
+
name: "SubmitDeposit",
|
|
1961
2562
|
type: "event"
|
|
1962
2563
|
},
|
|
1963
2564
|
{
|
|
@@ -1988,22 +2589,16 @@ var _abi3 = [
|
|
|
1988
2589
|
name: "handler",
|
|
1989
2590
|
type: "address"
|
|
1990
2591
|
},
|
|
1991
|
-
{
|
|
1992
|
-
indexed: true,
|
|
1993
|
-
internalType: "uint256",
|
|
1994
|
-
name: "version",
|
|
1995
|
-
type: "uint256"
|
|
1996
|
-
},
|
|
1997
2592
|
{
|
|
1998
2593
|
indexed: false,
|
|
1999
2594
|
internalType: "bytes",
|
|
2000
|
-
name: "
|
|
2595
|
+
name: "fromNetwork",
|
|
2001
2596
|
type: "bytes"
|
|
2002
2597
|
},
|
|
2003
2598
|
{
|
|
2004
2599
|
indexed: false,
|
|
2005
2600
|
internalType: "bytes",
|
|
2006
|
-
name: "
|
|
2601
|
+
name: "toNetwork",
|
|
2007
2602
|
type: "bytes"
|
|
2008
2603
|
}
|
|
2009
2604
|
],
|
|
@@ -2023,6 +2618,41 @@ var _abi3 = [
|
|
|
2023
2618
|
stateMutability: "view",
|
|
2024
2619
|
type: "function"
|
|
2025
2620
|
},
|
|
2621
|
+
{
|
|
2622
|
+
inputs: [
|
|
2623
|
+
{
|
|
2624
|
+
internalType: "bytes32",
|
|
2625
|
+
name: "tradeId",
|
|
2626
|
+
type: "bytes32"
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
components: [
|
|
2630
|
+
{
|
|
2631
|
+
internalType: "uint256",
|
|
2632
|
+
name: "minAmountOut",
|
|
2633
|
+
type: "uint256"
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
internalType: "uint64",
|
|
2637
|
+
name: "tradeTimeout",
|
|
2638
|
+
type: "uint64"
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
internalType: "bytes",
|
|
2642
|
+
name: "rfqInfoSignature",
|
|
2643
|
+
type: "bytes"
|
|
2644
|
+
}
|
|
2645
|
+
],
|
|
2646
|
+
internalType: "struct ITypes.RFQInfo",
|
|
2647
|
+
name: "rfqInfo",
|
|
2648
|
+
type: "tuple"
|
|
2649
|
+
}
|
|
2650
|
+
],
|
|
2651
|
+
name: "abort",
|
|
2652
|
+
outputs: [],
|
|
2653
|
+
stateMutability: "nonpayable",
|
|
2654
|
+
type: "function"
|
|
2655
|
+
},
|
|
2026
2656
|
{
|
|
2027
2657
|
inputs: [
|
|
2028
2658
|
{
|
|
@@ -2067,7 +2697,7 @@ var _abi3 = [
|
|
|
2067
2697
|
inputs: [
|
|
2068
2698
|
{
|
|
2069
2699
|
internalType: "bytes32",
|
|
2070
|
-
name: "
|
|
2700
|
+
name: "referenceId",
|
|
2071
2701
|
type: "bytes32"
|
|
2072
2702
|
},
|
|
2073
2703
|
{
|
|
@@ -2104,6 +2734,24 @@ var _abi3 = [
|
|
|
2104
2734
|
stateMutability: "nonpayable",
|
|
2105
2735
|
type: "function"
|
|
2106
2736
|
},
|
|
2737
|
+
{
|
|
2738
|
+
inputs: [
|
|
2739
|
+
{
|
|
2740
|
+
internalType: "bytes32",
|
|
2741
|
+
name: "tradeId",
|
|
2742
|
+
type: "bytes32"
|
|
2743
|
+
},
|
|
2744
|
+
{
|
|
2745
|
+
internalType: "bytes",
|
|
2746
|
+
name: "signature",
|
|
2747
|
+
type: "bytes"
|
|
2748
|
+
}
|
|
2749
|
+
],
|
|
2750
|
+
name: "confirmPresign",
|
|
2751
|
+
outputs: [],
|
|
2752
|
+
stateMutability: "nonpayable",
|
|
2753
|
+
type: "function"
|
|
2754
|
+
},
|
|
2107
2755
|
{
|
|
2108
2756
|
inputs: [
|
|
2109
2757
|
{
|
|
@@ -2131,7 +2779,7 @@ var _abi3 = [
|
|
|
2131
2779
|
inputs: [
|
|
2132
2780
|
{
|
|
2133
2781
|
internalType: "bytes32",
|
|
2134
|
-
name: "
|
|
2782
|
+
name: "referenceId",
|
|
2135
2783
|
type: "bytes32"
|
|
2136
2784
|
}
|
|
2137
2785
|
],
|
|
@@ -2166,14 +2814,9 @@ var _abi3 = [
|
|
|
2166
2814
|
{
|
|
2167
2815
|
inputs: [
|
|
2168
2816
|
{
|
|
2169
|
-
internalType: "
|
|
2170
|
-
name: "
|
|
2171
|
-
type: "
|
|
2172
|
-
},
|
|
2173
|
-
{
|
|
2174
|
-
internalType: "bytes",
|
|
2175
|
-
name: "toChain",
|
|
2176
|
-
type: "bytes"
|
|
2817
|
+
internalType: "address",
|
|
2818
|
+
name: "handler",
|
|
2819
|
+
type: "address"
|
|
2177
2820
|
}
|
|
2178
2821
|
],
|
|
2179
2822
|
name: "getCurrentEpoch",
|
|
@@ -2201,7 +2844,7 @@ var _abi3 = [
|
|
|
2201
2844
|
inputs: [
|
|
2202
2845
|
{
|
|
2203
2846
|
internalType: "bytes32",
|
|
2204
|
-
name: "
|
|
2847
|
+
name: "referenceId",
|
|
2205
2848
|
type: "bytes32"
|
|
2206
2849
|
}
|
|
2207
2850
|
],
|
|
@@ -2209,27 +2852,13 @@ var _abi3 = [
|
|
|
2209
2852
|
outputs: [
|
|
2210
2853
|
{
|
|
2211
2854
|
internalType: "uint256",
|
|
2212
|
-
name: "",
|
|
2855
|
+
name: "stage",
|
|
2213
2856
|
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: [
|
|
2857
|
+
},
|
|
2229
2858
|
{
|
|
2230
|
-
internalType: "
|
|
2231
|
-
name: "",
|
|
2232
|
-
type: "
|
|
2859
|
+
internalType: "string",
|
|
2860
|
+
name: "swapType",
|
|
2861
|
+
type: "string"
|
|
2233
2862
|
}
|
|
2234
2863
|
],
|
|
2235
2864
|
stateMutability: "view",
|
|
@@ -2239,7 +2868,7 @@ var _abi3 = [
|
|
|
2239
2868
|
inputs: [
|
|
2240
2869
|
{
|
|
2241
2870
|
internalType: "bytes32",
|
|
2242
|
-
name: "
|
|
2871
|
+
name: "referenceId",
|
|
2243
2872
|
type: "bytes32"
|
|
2244
2873
|
}
|
|
2245
2874
|
],
|
|
@@ -2270,7 +2899,7 @@ var _abi3 = [
|
|
|
2270
2899
|
inputs: [
|
|
2271
2900
|
{
|
|
2272
2901
|
internalType: "bytes32",
|
|
2273
|
-
name: "
|
|
2902
|
+
name: "referenceId",
|
|
2274
2903
|
type: "bytes32"
|
|
2275
2904
|
}
|
|
2276
2905
|
],
|
|
@@ -2316,12 +2945,12 @@ var _abi3 = [
|
|
|
2316
2945
|
inputs: [
|
|
2317
2946
|
{
|
|
2318
2947
|
internalType: "bytes",
|
|
2319
|
-
name: "
|
|
2948
|
+
name: "fromNetwork",
|
|
2320
2949
|
type: "bytes"
|
|
2321
2950
|
},
|
|
2322
2951
|
{
|
|
2323
2952
|
internalType: "bytes",
|
|
2324
|
-
name: "
|
|
2953
|
+
name: "toNetwork",
|
|
2325
2954
|
type: "bytes"
|
|
2326
2955
|
}
|
|
2327
2956
|
],
|
|
@@ -2345,7 +2974,7 @@ var _abi3 = [
|
|
|
2345
2974
|
inputs: [
|
|
2346
2975
|
{
|
|
2347
2976
|
internalType: "bytes32",
|
|
2348
|
-
name: "
|
|
2977
|
+
name: "referenceId",
|
|
2349
2978
|
type: "bytes32"
|
|
2350
2979
|
}
|
|
2351
2980
|
],
|
|
@@ -2367,184 +2996,23 @@ var _abi3 = [
|
|
|
2367
2996
|
},
|
|
2368
2997
|
{
|
|
2369
2998
|
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
|
-
{
|
|
2488
|
-
inputs: [
|
|
2489
|
-
{
|
|
2490
|
-
internalType: "bytes",
|
|
2491
|
-
name: "fromChain",
|
|
2492
|
-
type: "bytes"
|
|
2493
|
-
},
|
|
2494
2999
|
{
|
|
2495
3000
|
internalType: "bytes",
|
|
2496
|
-
name: "
|
|
3001
|
+
name: "fromNetwork",
|
|
2497
3002
|
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
3003
|
},
|
|
2531
3004
|
{
|
|
2532
|
-
internalType: "
|
|
2533
|
-
name: "
|
|
2534
|
-
type: "
|
|
2535
|
-
},
|
|
2536
|
-
{
|
|
2537
|
-
internalType: "uint256",
|
|
2538
|
-
name: "toIdx",
|
|
2539
|
-
type: "uint256"
|
|
3005
|
+
internalType: "bytes",
|
|
3006
|
+
name: "toNetwork",
|
|
3007
|
+
type: "bytes"
|
|
2540
3008
|
}
|
|
2541
3009
|
],
|
|
2542
|
-
name: "
|
|
3010
|
+
name: "getHistoryCount",
|
|
2543
3011
|
outputs: [
|
|
2544
3012
|
{
|
|
2545
|
-
internalType: "
|
|
2546
|
-
name: "
|
|
2547
|
-
type: "
|
|
3013
|
+
internalType: "uint256",
|
|
3014
|
+
name: "",
|
|
3015
|
+
type: "uint256"
|
|
2548
3016
|
}
|
|
2549
3017
|
],
|
|
2550
3018
|
stateMutability: "view",
|
|
@@ -2554,7 +3022,7 @@ var _abi3 = [
|
|
|
2554
3022
|
inputs: [
|
|
2555
3023
|
{
|
|
2556
3024
|
internalType: "bytes32",
|
|
2557
|
-
name: "
|
|
3025
|
+
name: "referenceId",
|
|
2558
3026
|
type: "bytes32"
|
|
2559
3027
|
}
|
|
2560
3028
|
],
|
|
@@ -2622,6 +3090,11 @@ var _abi3 = [
|
|
|
2622
3090
|
},
|
|
2623
3091
|
{
|
|
2624
3092
|
inputs: [
|
|
3093
|
+
{
|
|
3094
|
+
internalType: "address",
|
|
3095
|
+
name: "handler",
|
|
3096
|
+
type: "address"
|
|
3097
|
+
},
|
|
2625
3098
|
{
|
|
2626
3099
|
internalType: "uint256",
|
|
2627
3100
|
name: "epochNo",
|
|
@@ -2636,16 +3109,6 @@ var _abi3 = [
|
|
|
2636
3109
|
internalType: "uint256",
|
|
2637
3110
|
name: "toIdx",
|
|
2638
3111
|
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
3112
|
}
|
|
2650
3113
|
],
|
|
2651
3114
|
name: "getPendingTrades",
|
|
@@ -2662,35 +3125,17 @@ var _abi3 = [
|
|
|
2662
3125
|
{
|
|
2663
3126
|
inputs: [
|
|
2664
3127
|
{
|
|
2665
|
-
internalType: "
|
|
2666
|
-
name: "
|
|
2667
|
-
type: "
|
|
2668
|
-
},
|
|
2669
|
-
{
|
|
2670
|
-
internalType: "bytes",
|
|
2671
|
-
name: "fromChain",
|
|
2672
|
-
type: "bytes"
|
|
3128
|
+
internalType: "address",
|
|
3129
|
+
name: "handler",
|
|
3130
|
+
type: "address"
|
|
2673
3131
|
},
|
|
2674
|
-
{
|
|
2675
|
-
internalType: "bytes",
|
|
2676
|
-
name: "toChain",
|
|
2677
|
-
type: "bytes"
|
|
2678
|
-
}
|
|
2679
|
-
],
|
|
2680
|
-
name: "getPendingTradesCount",
|
|
2681
|
-
outputs: [
|
|
2682
3132
|
{
|
|
2683
3133
|
internalType: "uint256",
|
|
2684
|
-
name: "",
|
|
3134
|
+
name: "epochNo",
|
|
2685
3135
|
type: "uint256"
|
|
2686
3136
|
}
|
|
2687
3137
|
],
|
|
2688
|
-
|
|
2689
|
-
type: "function"
|
|
2690
|
-
},
|
|
2691
|
-
{
|
|
2692
|
-
inputs: [],
|
|
2693
|
-
name: "getProtocolState",
|
|
3138
|
+
name: "getPendingTradesCount",
|
|
2694
3139
|
outputs: [
|
|
2695
3140
|
{
|
|
2696
3141
|
internalType: "uint256",
|
|
@@ -2705,11 +3150,11 @@ var _abi3 = [
|
|
|
2705
3150
|
inputs: [
|
|
2706
3151
|
{
|
|
2707
3152
|
internalType: "bytes32",
|
|
2708
|
-
name: "
|
|
3153
|
+
name: "referenceId",
|
|
2709
3154
|
type: "bytes32"
|
|
2710
3155
|
}
|
|
2711
3156
|
],
|
|
2712
|
-
name: "
|
|
3157
|
+
name: "getRefundPresign",
|
|
2713
3158
|
outputs: [
|
|
2714
3159
|
{
|
|
2715
3160
|
components: [
|
|
@@ -2732,11 +3177,45 @@ var _abi3 = [
|
|
|
2732
3177
|
stateMutability: "view",
|
|
2733
3178
|
type: "function"
|
|
2734
3179
|
},
|
|
3180
|
+
{
|
|
3181
|
+
inputs: [
|
|
3182
|
+
{
|
|
3183
|
+
internalType: "uint256",
|
|
3184
|
+
name: "fromIdx",
|
|
3185
|
+
type: "uint256"
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
internalType: "uint256",
|
|
3189
|
+
name: "toIdx",
|
|
3190
|
+
type: "uint256"
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
internalType: "bytes",
|
|
3194
|
+
name: "fromNetwork",
|
|
3195
|
+
type: "bytes"
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
internalType: "bytes",
|
|
3199
|
+
name: "toNetwork",
|
|
3200
|
+
type: "bytes"
|
|
3201
|
+
}
|
|
3202
|
+
],
|
|
3203
|
+
name: "getRegisteredHandlers",
|
|
3204
|
+
outputs: [
|
|
3205
|
+
{
|
|
3206
|
+
internalType: "address[]",
|
|
3207
|
+
name: "list",
|
|
3208
|
+
type: "address[]"
|
|
3209
|
+
}
|
|
3210
|
+
],
|
|
3211
|
+
stateMutability: "view",
|
|
3212
|
+
type: "function"
|
|
3213
|
+
},
|
|
2735
3214
|
{
|
|
2736
3215
|
inputs: [
|
|
2737
3216
|
{
|
|
2738
3217
|
internalType: "bytes32",
|
|
2739
|
-
name: "
|
|
3218
|
+
name: "referenceId",
|
|
2740
3219
|
type: "bytes32"
|
|
2741
3220
|
}
|
|
2742
3221
|
],
|
|
@@ -2771,34 +3250,17 @@ var _abi3 = [
|
|
|
2771
3250
|
{
|
|
2772
3251
|
inputs: [
|
|
2773
3252
|
{
|
|
2774
|
-
internalType: "
|
|
2775
|
-
name: "
|
|
2776
|
-
type: "
|
|
2777
|
-
},
|
|
2778
|
-
{
|
|
2779
|
-
internalType: "uint256",
|
|
2780
|
-
name: "toIdx",
|
|
2781
|
-
type: "uint256"
|
|
3253
|
+
internalType: "bytes32",
|
|
3254
|
+
name: "referenceId",
|
|
3255
|
+
type: "bytes32"
|
|
2782
3256
|
}
|
|
2783
3257
|
],
|
|
2784
|
-
name: "
|
|
3258
|
+
name: "getSolver",
|
|
2785
3259
|
outputs: [
|
|
2786
3260
|
{
|
|
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[]"
|
|
3261
|
+
internalType: "address",
|
|
3262
|
+
name: "",
|
|
3263
|
+
type: "address"
|
|
2802
3264
|
}
|
|
2803
3265
|
],
|
|
2804
3266
|
stateMutability: "view",
|
|
@@ -2808,7 +3270,7 @@ var _abi3 = [
|
|
|
2808
3270
|
inputs: [
|
|
2809
3271
|
{
|
|
2810
3272
|
internalType: "bytes32",
|
|
2811
|
-
name: "
|
|
3273
|
+
name: "referenceId",
|
|
2812
3274
|
type: "bytes32"
|
|
2813
3275
|
}
|
|
2814
3276
|
],
|
|
@@ -2878,215 +3340,48 @@ var _abi3 = [
|
|
|
2878
3340
|
inputs: [
|
|
2879
3341
|
{
|
|
2880
3342
|
internalType: "bytes32",
|
|
2881
|
-
name: "
|
|
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",
|
|
3343
|
+
name: "referenceId",
|
|
3028
3344
|
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
3345
|
}
|
|
3083
3346
|
],
|
|
3084
|
-
name: "
|
|
3347
|
+
name: "getTradeFinalization",
|
|
3085
3348
|
outputs: [
|
|
3086
3349
|
{
|
|
3087
|
-
|
|
3350
|
+
components: [
|
|
3351
|
+
{
|
|
3352
|
+
internalType: "bytes32",
|
|
3353
|
+
name: "bundlerHash",
|
|
3354
|
+
type: "bytes32"
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
internalType: "uint256",
|
|
3358
|
+
name: "index",
|
|
3359
|
+
type: "uint256"
|
|
3360
|
+
},
|
|
3361
|
+
{
|
|
3362
|
+
internalType: "bytes",
|
|
3363
|
+
name: "paymentTxId",
|
|
3364
|
+
type: "bytes"
|
|
3365
|
+
},
|
|
3366
|
+
{
|
|
3367
|
+
internalType: "bytes",
|
|
3368
|
+
name: "releaseTxId",
|
|
3369
|
+
type: "bytes"
|
|
3370
|
+
},
|
|
3371
|
+
{
|
|
3372
|
+
internalType: "bytes",
|
|
3373
|
+
name: "refundTxId",
|
|
3374
|
+
type: "bytes"
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
internalType: "bool",
|
|
3378
|
+
name: "isConfirmed",
|
|
3379
|
+
type: "bool"
|
|
3380
|
+
}
|
|
3381
|
+
],
|
|
3382
|
+
internalType: "struct ITypes.TradeFinalization",
|
|
3088
3383
|
name: "",
|
|
3089
|
-
type: "
|
|
3384
|
+
type: "tuple"
|
|
3090
3385
|
}
|
|
3091
3386
|
],
|
|
3092
3387
|
stateMutability: "view",
|
|
@@ -3108,40 +3403,26 @@ var _abi3 = [
|
|
|
3108
3403
|
{
|
|
3109
3404
|
inputs: [
|
|
3110
3405
|
{
|
|
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: [
|
|
3406
|
+
internalType: "bytes32[]",
|
|
3407
|
+
name: "referenceIds",
|
|
3408
|
+
type: "bytes32[]"
|
|
3409
|
+
},
|
|
3131
3410
|
{
|
|
3132
|
-
internalType: "
|
|
3133
|
-
name: "",
|
|
3134
|
-
type: "
|
|
3411
|
+
internalType: "address[]",
|
|
3412
|
+
name: "handlers",
|
|
3413
|
+
type: "address[]"
|
|
3135
3414
|
}
|
|
3136
3415
|
],
|
|
3137
|
-
|
|
3416
|
+
name: "migrate",
|
|
3417
|
+
outputs: [],
|
|
3418
|
+
stateMutability: "nonpayable",
|
|
3138
3419
|
type: "function"
|
|
3139
3420
|
},
|
|
3140
3421
|
{
|
|
3141
3422
|
inputs: [
|
|
3142
3423
|
{
|
|
3143
3424
|
internalType: "bytes32",
|
|
3144
|
-
name: "
|
|
3425
|
+
name: "referenceId",
|
|
3145
3426
|
type: "bytes32"
|
|
3146
3427
|
},
|
|
3147
3428
|
{
|
|
@@ -3164,7 +3445,7 @@ var _abi3 = [
|
|
|
3164
3445
|
inputs: [
|
|
3165
3446
|
{
|
|
3166
3447
|
internalType: "bytes32",
|
|
3167
|
-
name: "
|
|
3448
|
+
name: "referenceId",
|
|
3168
3449
|
type: "bytes32"
|
|
3169
3450
|
},
|
|
3170
3451
|
{
|
|
@@ -3172,6 +3453,11 @@ var _abi3 = [
|
|
|
3172
3453
|
name: "msgError",
|
|
3173
3454
|
type: "bytes"
|
|
3174
3455
|
},
|
|
3456
|
+
{
|
|
3457
|
+
internalType: "bytes",
|
|
3458
|
+
name: "referenceInfo",
|
|
3459
|
+
type: "bytes"
|
|
3460
|
+
},
|
|
3175
3461
|
{
|
|
3176
3462
|
internalType: "bytes",
|
|
3177
3463
|
name: "signature",
|
|
@@ -3274,12 +3560,12 @@ var _abi3 = [
|
|
|
3274
3560
|
},
|
|
3275
3561
|
{
|
|
3276
3562
|
internalType: "bytes",
|
|
3277
|
-
name: "
|
|
3563
|
+
name: "fromNetwork",
|
|
3278
3564
|
type: "bytes"
|
|
3279
3565
|
},
|
|
3280
3566
|
{
|
|
3281
3567
|
internalType: "bytes",
|
|
3282
|
-
name: "
|
|
3568
|
+
name: "toNetwork",
|
|
3283
3569
|
type: "bytes"
|
|
3284
3570
|
}
|
|
3285
3571
|
],
|
|
@@ -3288,6 +3574,92 @@ var _abi3 = [
|
|
|
3288
3574
|
stateMutability: "nonpayable",
|
|
3289
3575
|
type: "function"
|
|
3290
3576
|
},
|
|
3577
|
+
{
|
|
3578
|
+
inputs: [
|
|
3579
|
+
{
|
|
3580
|
+
internalType: "bytes32",
|
|
3581
|
+
name: "depositId",
|
|
3582
|
+
type: "bytes32"
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
components: [
|
|
3586
|
+
{
|
|
3587
|
+
internalType: "uint256",
|
|
3588
|
+
name: "sessionId",
|
|
3589
|
+
type: "uint256"
|
|
3590
|
+
},
|
|
3591
|
+
{
|
|
3592
|
+
components: [
|
|
3593
|
+
{
|
|
3594
|
+
internalType: "uint256",
|
|
3595
|
+
name: "amountIn",
|
|
3596
|
+
type: "uint256"
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
internalType: "bytes[3]",
|
|
3600
|
+
name: "fromChain",
|
|
3601
|
+
type: "bytes[3]"
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
internalType: "bytes[3]",
|
|
3605
|
+
name: "toChain",
|
|
3606
|
+
type: "bytes[3]"
|
|
3607
|
+
}
|
|
3608
|
+
],
|
|
3609
|
+
internalType: "struct ITypes.TradeInfo",
|
|
3610
|
+
name: "tradeInfo",
|
|
3611
|
+
type: "tuple"
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
components: [
|
|
3615
|
+
{
|
|
3616
|
+
internalType: "bytes[5]",
|
|
3617
|
+
name: "depositInfo",
|
|
3618
|
+
type: "bytes[5]"
|
|
3619
|
+
},
|
|
3620
|
+
{
|
|
3621
|
+
internalType: "address",
|
|
3622
|
+
name: "userEphemeralL2Address",
|
|
3623
|
+
type: "address"
|
|
3624
|
+
},
|
|
3625
|
+
{
|
|
3626
|
+
internalType: "uint64",
|
|
3627
|
+
name: "scriptTimeout",
|
|
3628
|
+
type: "uint64"
|
|
3629
|
+
}
|
|
3630
|
+
],
|
|
3631
|
+
internalType: "struct ITypes.ScriptInfo",
|
|
3632
|
+
name: "scriptInfo",
|
|
3633
|
+
type: "tuple"
|
|
3634
|
+
}
|
|
3635
|
+
],
|
|
3636
|
+
internalType: "struct ITypes.TradeData",
|
|
3637
|
+
name: "tradeData",
|
|
3638
|
+
type: "tuple"
|
|
3639
|
+
},
|
|
3640
|
+
{
|
|
3641
|
+
components: [
|
|
3642
|
+
{
|
|
3643
|
+
internalType: "bytes",
|
|
3644
|
+
name: "refundAddress",
|
|
3645
|
+
type: "bytes"
|
|
3646
|
+
},
|
|
3647
|
+
{
|
|
3648
|
+
internalType: "bytes[]",
|
|
3649
|
+
name: "presigns",
|
|
3650
|
+
type: "bytes[]"
|
|
3651
|
+
}
|
|
3652
|
+
],
|
|
3653
|
+
internalType: "struct ITypes.RefundPresign",
|
|
3654
|
+
name: "refundPresign",
|
|
3655
|
+
type: "tuple"
|
|
3656
|
+
}
|
|
3657
|
+
],
|
|
3658
|
+
name: "submitDeposit",
|
|
3659
|
+
outputs: [],
|
|
3660
|
+
stateMutability: "nonpayable",
|
|
3661
|
+
type: "function"
|
|
3662
|
+
},
|
|
3291
3663
|
{
|
|
3292
3664
|
inputs: [
|
|
3293
3665
|
{
|
|
@@ -3417,40 +3789,21 @@ var _abi3 = [
|
|
|
3417
3789
|
outputs: [],
|
|
3418
3790
|
stateMutability: "nonpayable",
|
|
3419
3791
|
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
3792
|
}
|
|
3440
3793
|
];
|
|
3441
3794
|
var Router__factory = class {
|
|
3442
3795
|
static createInterface() {
|
|
3443
|
-
return new
|
|
3796
|
+
return new Interface4(_abi4);
|
|
3444
3797
|
}
|
|
3445
3798
|
static connect(address, runner) {
|
|
3446
|
-
return new
|
|
3799
|
+
return new Contract4(address, _abi4, runner);
|
|
3447
3800
|
}
|
|
3448
3801
|
};
|
|
3449
|
-
Router__factory.abi =
|
|
3802
|
+
Router__factory.abi = _abi4;
|
|
3450
3803
|
|
|
3451
|
-
// src/contracts/
|
|
3452
|
-
import { Contract as
|
|
3453
|
-
var
|
|
3804
|
+
// src/contracts/contracts/factories/Signer__factory.ts
|
|
3805
|
+
import { Contract as Contract5, Interface as Interface5 } from "ethers";
|
|
3806
|
+
var _abi5 = [
|
|
3454
3807
|
{
|
|
3455
3808
|
inputs: [],
|
|
3456
3809
|
stateMutability: "nonpayable",
|
|
@@ -3778,16 +4131,16 @@ var _abi4 = [
|
|
|
3778
4131
|
];
|
|
3779
4132
|
var Signer__factory = class {
|
|
3780
4133
|
static createInterface() {
|
|
3781
|
-
return new
|
|
4134
|
+
return new Interface5(_abi5);
|
|
3782
4135
|
}
|
|
3783
4136
|
static connect(address, runner) {
|
|
3784
|
-
return new
|
|
4137
|
+
return new Contract5(address, _abi5, runner);
|
|
3785
4138
|
}
|
|
3786
4139
|
};
|
|
3787
|
-
Signer__factory.abi =
|
|
4140
|
+
Signer__factory.abi = _abi5;
|
|
3788
4141
|
|
|
3789
4142
|
// src/services/router.service.ts
|
|
3790
|
-
import {
|
|
4143
|
+
import { JsonRpcProvider } from "ethers";
|
|
3791
4144
|
var RouterService = class {
|
|
3792
4145
|
constructor() {
|
|
3793
4146
|
this.provider = new JsonRpcProvider(config.getRpcUrl());
|
|
@@ -3805,75 +4158,24 @@ var RouterService = class {
|
|
|
3805
4158
|
async getSigner() {
|
|
3806
4159
|
return await this.contract.SIGNER();
|
|
3807
4160
|
}
|
|
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
4161
|
async getHandler(fromChain, toChain) {
|
|
3818
4162
|
return await this.contract.getHandler(fromChain, toChain);
|
|
3819
4163
|
}
|
|
3820
|
-
async getPFeeRate() {
|
|
3821
|
-
return await this.contract.getPFeeRate();
|
|
3822
|
-
}
|
|
3823
4164
|
async getPMMSelection(tradeId) {
|
|
3824
4165
|
return await this.contract.getPMMSelection(tradeId);
|
|
3825
4166
|
}
|
|
3826
4167
|
async getSettlementPresigns(tradeId) {
|
|
3827
4168
|
return await this.contract.getSettlementPresigns(tradeId);
|
|
3828
4169
|
}
|
|
3829
|
-
async getRefundPresigns(tradeId) {
|
|
3830
|
-
return await this.contract.getRefundPresigns(tradeId);
|
|
3831
|
-
}
|
|
3832
|
-
async getProtocolState() {
|
|
3833
|
-
return await this.contract.getProtocolState();
|
|
3834
|
-
}
|
|
3835
4170
|
async getFeeDetails(tradeId) {
|
|
3836
4171
|
return await this.contract.getFeeDetails(tradeId);
|
|
3837
4172
|
}
|
|
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
4173
|
async getTradeData(tradeId) {
|
|
3845
4174
|
return await this.contract.getTradeData(tradeId);
|
|
3846
4175
|
}
|
|
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
4176
|
async getManagement() {
|
|
3869
4177
|
return await this.contract.management();
|
|
3870
4178
|
}
|
|
3871
|
-
async getNumOfSupportedTokens() {
|
|
3872
|
-
return await this.contract.numOfSupportedTokens();
|
|
3873
|
-
}
|
|
3874
|
-
async getVersion(address) {
|
|
3875
|
-
return await this.contract.version(address);
|
|
3876
|
-
}
|
|
3877
4179
|
};
|
|
3878
4180
|
var routerService = new RouterService();
|
|
3879
4181
|
|
|
@@ -4336,6 +4638,7 @@ async function getSignature(Signer2, provider, signerHelper, tradeId, infoHash,
|
|
|
4336
4638
|
export {
|
|
4337
4639
|
ERC20__factory,
|
|
4338
4640
|
Payment__factory,
|
|
4641
|
+
ProtocolFetcherProxy__factory,
|
|
4339
4642
|
RouterService,
|
|
4340
4643
|
Router__factory,
|
|
4341
4644
|
SDK,
|