@optimex-xyz/market-maker-sdk 0.7.0-dev-ed7b5f2 → 0.7.0-dev-3bbbb23
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 +1161 -857
- package/dist/index.mjs +978 -675
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ERC20__factory: () => ERC20__factory,
|
|
34
34
|
Payment__factory: () => Payment__factory,
|
|
35
|
+
ProtocolFetcherProxy__factory: () => ProtocolFetcherProxy__factory,
|
|
35
36
|
RouterService: () => RouterService,
|
|
36
37
|
Router__factory: () => Router__factory,
|
|
37
38
|
SDK: () => SDK,
|
|
@@ -74,7 +75,8 @@ var environments = {
|
|
|
74
75
|
dev: {
|
|
75
76
|
backendUrl: "https://api-dev.bitdex.xyz",
|
|
76
77
|
rpcUrl: "https://rpc-bitfi-p00c4t1rul.t.conduit.xyz",
|
|
77
|
-
routerAddress: "
|
|
78
|
+
routerAddress: "0x5008a47004b1cACD0Fd7CE689973F6b0CB345802",
|
|
79
|
+
protocolFetcherProxyAddress: "0x0267Fc04eE866b31907dEe123aBdCdB67d03B297",
|
|
78
80
|
paymentAddressMap: {
|
|
79
81
|
ethereum_sepolia: "0x1d8b58438D5Ccc8Fcb4b738C89078f7b4168C9c0"
|
|
80
82
|
}
|
|
@@ -83,6 +85,7 @@ var environments = {
|
|
|
83
85
|
backendUrl: "https://api-stg.bitdex.xyz",
|
|
84
86
|
rpcUrl: "https://rpc-bitfi-p00c4t1rul.t.conduit.xyz",
|
|
85
87
|
routerAddress: "0x193501E5F72a42DACCF8Eb1C4AB37561c213309D",
|
|
88
|
+
protocolFetcherProxyAddress: "0x0000000000000000000000000000000000000000",
|
|
86
89
|
paymentAddressMap: {
|
|
87
90
|
ethereum_sepolia: "0x7387DcCfE2f1D5F80b4ECDF91eF58541517e90D2"
|
|
88
91
|
}
|
|
@@ -91,6 +94,7 @@ var environments = {
|
|
|
91
94
|
backendUrl: "https://pre-api.optimex.xyz",
|
|
92
95
|
rpcUrl: "https://rpc.optimex.xyz",
|
|
93
96
|
routerAddress: "0xcceAb862dD41f6691d81Cc016216Cd45d7BD6D4A",
|
|
97
|
+
protocolFetcherProxyAddress: "0x0000000000000000000000000000000000000000",
|
|
94
98
|
paymentAddressMap: {
|
|
95
99
|
ethereum: "0x0A497AC4261E37FA4062762C23Cf3cB642C839b8"
|
|
96
100
|
}
|
|
@@ -99,6 +103,7 @@ var environments = {
|
|
|
99
103
|
backendUrl: "https://api.optimex.xyz",
|
|
100
104
|
rpcUrl: "https://rpc.optimex.xyz",
|
|
101
105
|
routerAddress: "0xcceAb862dD41f6691d81Cc016216Cd45d7BD6D4A",
|
|
106
|
+
protocolFetcherProxyAddress: "0x0000000000000000000000000000000000000000",
|
|
102
107
|
paymentAddressMap: {
|
|
103
108
|
ethereum: "0x0A497AC4261E37FA4062762C23Cf3cB642C839b8"
|
|
104
109
|
}
|
|
@@ -159,6 +164,9 @@ var Config = class {
|
|
|
159
164
|
getPaymentAddress(networkId) {
|
|
160
165
|
return this.config.paymentAddressMap[networkId];
|
|
161
166
|
}
|
|
167
|
+
getProtocolFetcherAddress() {
|
|
168
|
+
return this.config.protocolFetcherProxyAddress;
|
|
169
|
+
}
|
|
162
170
|
};
|
|
163
171
|
var config = new Config();
|
|
164
172
|
|
|
@@ -181,16 +189,17 @@ var SDK = class {
|
|
|
181
189
|
};
|
|
182
190
|
var sdk = new SDK();
|
|
183
191
|
|
|
184
|
-
// src/contracts/
|
|
192
|
+
// src/contracts/contracts/factories/index.ts
|
|
185
193
|
var factories_exports = {};
|
|
186
194
|
__export(factories_exports, {
|
|
187
195
|
ERC20__factory: () => ERC20__factory,
|
|
188
196
|
Payment__factory: () => Payment__factory,
|
|
197
|
+
ProtocolFetcherProxy__factory: () => ProtocolFetcherProxy__factory,
|
|
189
198
|
Router__factory: () => Router__factory,
|
|
190
199
|
Signer__factory: () => Signer__factory
|
|
191
200
|
});
|
|
192
201
|
|
|
193
|
-
// src/contracts/
|
|
202
|
+
// src/contracts/contracts/factories/ERC20__factory.ts
|
|
194
203
|
var import_ethers = require("ethers");
|
|
195
204
|
var _abi = [
|
|
196
205
|
{
|
|
@@ -1590,7 +1599,7 @@ var ERC20__factory = class {
|
|
|
1590
1599
|
};
|
|
1591
1600
|
ERC20__factory.abi = _abi;
|
|
1592
1601
|
|
|
1593
|
-
// src/contracts/
|
|
1602
|
+
// src/contracts/contracts/factories/Payment__factory.ts
|
|
1594
1603
|
var import_ethers2 = require("ethers");
|
|
1595
1604
|
var _abi2 = [
|
|
1596
1605
|
{
|
|
@@ -1809,7 +1818,7 @@ var Payment__factory = class {
|
|
|
1809
1818
|
};
|
|
1810
1819
|
Payment__factory.abi = _abi2;
|
|
1811
1820
|
|
|
1812
|
-
// src/contracts/
|
|
1821
|
+
// src/contracts/contracts/factories/ProtocolFetcherProxy__factory.ts
|
|
1813
1822
|
var import_ethers3 = require("ethers");
|
|
1814
1823
|
var _abi3 = [
|
|
1815
1824
|
{
|
|
@@ -1820,8 +1829,18 @@ var _abi3 = [
|
|
|
1820
1829
|
type: "address"
|
|
1821
1830
|
},
|
|
1822
1831
|
{
|
|
1823
|
-
internalType: "
|
|
1824
|
-
name: "
|
|
1832
|
+
internalType: "contract IVaultRegistry",
|
|
1833
|
+
name: "vaultRegistry_",
|
|
1834
|
+
type: "address"
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
internalType: "contract IRouter",
|
|
1838
|
+
name: "router_",
|
|
1839
|
+
type: "address"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
internalType: "contract ISignerExtension",
|
|
1843
|
+
name: "signerExtension_",
|
|
1825
1844
|
type: "address"
|
|
1826
1845
|
}
|
|
1827
1846
|
],
|
|
@@ -1835,394 +1854,349 @@ var _abi3 = [
|
|
|
1835
1854
|
},
|
|
1836
1855
|
{
|
|
1837
1856
|
inputs: [],
|
|
1838
|
-
name: "
|
|
1839
|
-
type: "error"
|
|
1840
|
-
},
|
|
1841
|
-
{
|
|
1842
|
-
inputs: [],
|
|
1843
|
-
name: "InconsistentCoreType",
|
|
1844
|
-
type: "error"
|
|
1845
|
-
},
|
|
1846
|
-
{
|
|
1847
|
-
inputs: [],
|
|
1848
|
-
name: "InconsistentPMM",
|
|
1857
|
+
name: "Unauthorized",
|
|
1849
1858
|
type: "error"
|
|
1850
1859
|
},
|
|
1851
1860
|
{
|
|
1852
|
-
inputs: [
|
|
1853
|
-
|
|
1854
|
-
|
|
1861
|
+
inputs: [
|
|
1862
|
+
{
|
|
1863
|
+
internalType: "bytes",
|
|
1864
|
+
name: "networkId",
|
|
1865
|
+
type: "bytes"
|
|
1866
|
+
}
|
|
1867
|
+
],
|
|
1868
|
+
name: "getLatestMPCInfo",
|
|
1869
|
+
outputs: [
|
|
1870
|
+
{
|
|
1871
|
+
components: [
|
|
1872
|
+
{
|
|
1873
|
+
internalType: "address",
|
|
1874
|
+
name: "mpcL2Address",
|
|
1875
|
+
type: "address"
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
internalType: "uint64",
|
|
1879
|
+
name: "expireTime",
|
|
1880
|
+
type: "uint64"
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
internalType: "bytes",
|
|
1884
|
+
name: "mpcL2Pubkey",
|
|
1885
|
+
type: "bytes"
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
internalType: "bytes",
|
|
1889
|
+
name: "mpcAssetPubkey",
|
|
1890
|
+
type: "bytes"
|
|
1891
|
+
}
|
|
1892
|
+
],
|
|
1893
|
+
internalType: "struct ITypes.MPCInfo",
|
|
1894
|
+
name: "",
|
|
1895
|
+
type: "tuple"
|
|
1896
|
+
}
|
|
1897
|
+
],
|
|
1898
|
+
stateMutability: "view",
|
|
1899
|
+
type: "function"
|
|
1855
1900
|
},
|
|
1856
1901
|
{
|
|
1857
|
-
inputs: [
|
|
1858
|
-
|
|
1859
|
-
|
|
1902
|
+
inputs: [
|
|
1903
|
+
{
|
|
1904
|
+
internalType: "bytes",
|
|
1905
|
+
name: "networkId",
|
|
1906
|
+
type: "bytes"
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
internalType: "bytes",
|
|
1910
|
+
name: "pubkey",
|
|
1911
|
+
type: "bytes"
|
|
1912
|
+
}
|
|
1913
|
+
],
|
|
1914
|
+
name: "getMPCInfo",
|
|
1915
|
+
outputs: [
|
|
1916
|
+
{
|
|
1917
|
+
components: [
|
|
1918
|
+
{
|
|
1919
|
+
internalType: "address",
|
|
1920
|
+
name: "mpcL2Address",
|
|
1921
|
+
type: "address"
|
|
1922
|
+
},
|
|
1923
|
+
{
|
|
1924
|
+
internalType: "uint64",
|
|
1925
|
+
name: "expireTime",
|
|
1926
|
+
type: "uint64"
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
internalType: "bytes",
|
|
1930
|
+
name: "mpcL2Pubkey",
|
|
1931
|
+
type: "bytes"
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
internalType: "bytes",
|
|
1935
|
+
name: "mpcAssetPubkey",
|
|
1936
|
+
type: "bytes"
|
|
1937
|
+
}
|
|
1938
|
+
],
|
|
1939
|
+
internalType: "struct ITypes.MPCInfo",
|
|
1940
|
+
name: "info",
|
|
1941
|
+
type: "tuple"
|
|
1942
|
+
}
|
|
1943
|
+
],
|
|
1944
|
+
stateMutability: "view",
|
|
1945
|
+
type: "function"
|
|
1860
1946
|
},
|
|
1861
1947
|
{
|
|
1862
1948
|
inputs: [],
|
|
1863
|
-
name: "
|
|
1864
|
-
|
|
1949
|
+
name: "getManagementOwner",
|
|
1950
|
+
outputs: [
|
|
1951
|
+
{
|
|
1952
|
+
internalType: "address",
|
|
1953
|
+
name: "",
|
|
1954
|
+
type: "address"
|
|
1955
|
+
}
|
|
1956
|
+
],
|
|
1957
|
+
stateMutability: "view",
|
|
1958
|
+
type: "function"
|
|
1865
1959
|
},
|
|
1866
1960
|
{
|
|
1867
|
-
inputs: [
|
|
1868
|
-
|
|
1869
|
-
|
|
1961
|
+
inputs: [
|
|
1962
|
+
{
|
|
1963
|
+
internalType: "bytes[4]",
|
|
1964
|
+
name: "pairInfo",
|
|
1965
|
+
type: "bytes[4]"
|
|
1966
|
+
}
|
|
1967
|
+
],
|
|
1968
|
+
name: "getPFeeRate",
|
|
1969
|
+
outputs: [
|
|
1970
|
+
{
|
|
1971
|
+
internalType: "uint256",
|
|
1972
|
+
name: "",
|
|
1973
|
+
type: "uint256"
|
|
1974
|
+
}
|
|
1975
|
+
],
|
|
1976
|
+
stateMutability: "view",
|
|
1977
|
+
type: "function"
|
|
1870
1978
|
},
|
|
1871
1979
|
{
|
|
1872
|
-
anonymous: false,
|
|
1873
1980
|
inputs: [
|
|
1874
1981
|
{
|
|
1875
|
-
indexed: true,
|
|
1876
|
-
internalType: "address",
|
|
1877
|
-
name: "mpc",
|
|
1878
|
-
type: "address"
|
|
1879
|
-
},
|
|
1880
|
-
{
|
|
1881
|
-
indexed: true,
|
|
1882
1982
|
internalType: "bytes32",
|
|
1883
|
-
name: "
|
|
1983
|
+
name: "pmmId",
|
|
1884
1984
|
type: "bytes32"
|
|
1885
1985
|
},
|
|
1886
1986
|
{
|
|
1887
|
-
indexed: false,
|
|
1888
1987
|
internalType: "uint256",
|
|
1889
|
-
name: "
|
|
1988
|
+
name: "fromIdx",
|
|
1890
1989
|
type: "uint256"
|
|
1891
1990
|
},
|
|
1892
1991
|
{
|
|
1893
|
-
indexed: false,
|
|
1894
1992
|
internalType: "uint256",
|
|
1895
|
-
name: "
|
|
1993
|
+
name: "toIdx",
|
|
1896
1994
|
type: "uint256"
|
|
1897
|
-
}
|
|
1995
|
+
}
|
|
1996
|
+
],
|
|
1997
|
+
name: "getPMMAccounts",
|
|
1998
|
+
outputs: [
|
|
1898
1999
|
{
|
|
1899
|
-
|
|
1900
|
-
internalType: "bytes[]",
|
|
2000
|
+
internalType: "address[]",
|
|
1901
2001
|
name: "list",
|
|
1902
|
-
type: "
|
|
2002
|
+
type: "address[]"
|
|
1903
2003
|
}
|
|
1904
2004
|
],
|
|
1905
|
-
|
|
1906
|
-
type: "
|
|
2005
|
+
stateMutability: "view",
|
|
2006
|
+
type: "function"
|
|
1907
2007
|
},
|
|
1908
2008
|
{
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
indexed: true,
|
|
1913
|
-
internalType: "address",
|
|
1914
|
-
name: "mpc",
|
|
1915
|
-
type: "address"
|
|
1916
|
-
},
|
|
2009
|
+
inputs: [],
|
|
2010
|
+
name: "getProtocolState",
|
|
2011
|
+
outputs: [
|
|
1917
2012
|
{
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
type: "bytes32"
|
|
2013
|
+
internalType: "uint256",
|
|
2014
|
+
name: "",
|
|
2015
|
+
type: "uint256"
|
|
1922
2016
|
}
|
|
1923
2017
|
],
|
|
1924
|
-
|
|
1925
|
-
type: "
|
|
2018
|
+
stateMutability: "view",
|
|
2019
|
+
type: "function"
|
|
1926
2020
|
},
|
|
1927
2021
|
{
|
|
1928
|
-
anonymous: false,
|
|
1929
2022
|
inputs: [
|
|
1930
2023
|
{
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
type: "address"
|
|
2024
|
+
internalType: "uint256",
|
|
2025
|
+
name: "fromIdx",
|
|
2026
|
+
type: "uint256"
|
|
1935
2027
|
},
|
|
1936
2028
|
{
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
type: "bytes32"
|
|
2029
|
+
internalType: "uint256",
|
|
2030
|
+
name: "toIdx",
|
|
2031
|
+
type: "uint256"
|
|
1941
2032
|
}
|
|
1942
2033
|
],
|
|
1943
|
-
name: "
|
|
1944
|
-
|
|
2034
|
+
name: "getTokens",
|
|
2035
|
+
outputs: [
|
|
2036
|
+
{
|
|
2037
|
+
components: [
|
|
2038
|
+
{
|
|
2039
|
+
internalType: "bytes[5]",
|
|
2040
|
+
name: "info",
|
|
2041
|
+
type: "bytes[5]"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
internalType: "uint256",
|
|
2045
|
+
name: "decimals",
|
|
2046
|
+
type: "uint256"
|
|
2047
|
+
}
|
|
2048
|
+
],
|
|
2049
|
+
internalType: "struct ITypes.TokenInfo[]",
|
|
2050
|
+
name: "list",
|
|
2051
|
+
type: "tuple[]"
|
|
2052
|
+
}
|
|
2053
|
+
],
|
|
2054
|
+
stateMutability: "view",
|
|
2055
|
+
type: "function"
|
|
1945
2056
|
},
|
|
1946
2057
|
{
|
|
1947
|
-
anonymous: false,
|
|
1948
2058
|
inputs: [
|
|
1949
2059
|
{
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
type: "address"
|
|
2060
|
+
internalType: "bytes",
|
|
2061
|
+
name: "networkId",
|
|
2062
|
+
type: "bytes"
|
|
1954
2063
|
},
|
|
1955
2064
|
{
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
type: "bytes32"
|
|
2065
|
+
internalType: "bytes",
|
|
2066
|
+
name: "tokenId",
|
|
2067
|
+
type: "bytes"
|
|
1960
2068
|
}
|
|
1961
2069
|
],
|
|
1962
|
-
name: "
|
|
1963
|
-
|
|
2070
|
+
name: "getVault",
|
|
2071
|
+
outputs: [
|
|
2072
|
+
{
|
|
2073
|
+
internalType: "address",
|
|
2074
|
+
name: "",
|
|
2075
|
+
type: "address"
|
|
2076
|
+
}
|
|
2077
|
+
],
|
|
2078
|
+
stateMutability: "view",
|
|
2079
|
+
type: "function"
|
|
1964
2080
|
},
|
|
1965
2081
|
{
|
|
1966
|
-
anonymous: false,
|
|
1967
2082
|
inputs: [
|
|
1968
2083
|
{
|
|
1969
|
-
indexed: true,
|
|
1970
2084
|
internalType: "address",
|
|
1971
|
-
name: "
|
|
2085
|
+
name: "account",
|
|
1972
2086
|
type: "address"
|
|
1973
|
-
},
|
|
1974
|
-
{
|
|
1975
|
-
indexed: true,
|
|
1976
|
-
internalType: "bytes32",
|
|
1977
|
-
name: "tradeId",
|
|
1978
|
-
type: "bytes32"
|
|
1979
2087
|
}
|
|
1980
2088
|
],
|
|
1981
|
-
name: "
|
|
1982
|
-
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
anonymous: false,
|
|
1986
|
-
inputs: [
|
|
1987
|
-
{
|
|
1988
|
-
indexed: true,
|
|
1989
|
-
internalType: "address",
|
|
1990
|
-
name: "mpc",
|
|
1991
|
-
type: "address"
|
|
1992
|
-
},
|
|
1993
|
-
{
|
|
1994
|
-
indexed: true,
|
|
1995
|
-
internalType: "bytes32",
|
|
1996
|
-
name: "tradeId",
|
|
1997
|
-
type: "bytes32"
|
|
1998
|
-
},
|
|
2089
|
+
name: "isMPCNode",
|
|
2090
|
+
outputs: [
|
|
1999
2091
|
{
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
type: "bytes"
|
|
2092
|
+
internalType: "bool",
|
|
2093
|
+
name: "",
|
|
2094
|
+
type: "bool"
|
|
2004
2095
|
}
|
|
2005
2096
|
],
|
|
2006
|
-
|
|
2007
|
-
type: "
|
|
2097
|
+
stateMutability: "view",
|
|
2098
|
+
type: "function"
|
|
2008
2099
|
},
|
|
2009
2100
|
{
|
|
2010
|
-
anonymous: false,
|
|
2011
2101
|
inputs: [
|
|
2012
2102
|
{
|
|
2013
|
-
indexed: true,
|
|
2014
2103
|
internalType: "address",
|
|
2015
|
-
name: "
|
|
2104
|
+
name: "account",
|
|
2016
2105
|
type: "address"
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
indexed: true,
|
|
2020
|
-
internalType: "bytes32",
|
|
2021
|
-
name: "tradeId",
|
|
2022
|
-
type: "bytes32"
|
|
2023
2106
|
}
|
|
2024
2107
|
],
|
|
2025
|
-
name: "
|
|
2026
|
-
|
|
2027
|
-
},
|
|
2028
|
-
{
|
|
2029
|
-
anonymous: false,
|
|
2030
|
-
inputs: [
|
|
2031
|
-
{
|
|
2032
|
-
indexed: true,
|
|
2033
|
-
internalType: "address",
|
|
2034
|
-
name: "solver",
|
|
2035
|
-
type: "address"
|
|
2036
|
-
},
|
|
2108
|
+
name: "isSolver",
|
|
2109
|
+
outputs: [
|
|
2037
2110
|
{
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
type: "bytes32"
|
|
2111
|
+
internalType: "bool",
|
|
2112
|
+
name: "",
|
|
2113
|
+
type: "bool"
|
|
2042
2114
|
}
|
|
2043
2115
|
],
|
|
2044
|
-
|
|
2045
|
-
type: "
|
|
2116
|
+
stateMutability: "view",
|
|
2117
|
+
type: "function"
|
|
2046
2118
|
},
|
|
2047
2119
|
{
|
|
2048
|
-
anonymous: false,
|
|
2049
2120
|
inputs: [
|
|
2050
2121
|
{
|
|
2051
|
-
indexed: true,
|
|
2052
|
-
internalType: "address",
|
|
2053
|
-
name: "handler",
|
|
2054
|
-
type: "address"
|
|
2055
|
-
},
|
|
2056
|
-
{
|
|
2057
|
-
indexed: true,
|
|
2058
|
-
internalType: "uint256",
|
|
2059
|
-
name: "version",
|
|
2060
|
-
type: "uint256"
|
|
2061
|
-
},
|
|
2062
|
-
{
|
|
2063
|
-
indexed: false,
|
|
2064
|
-
internalType: "bytes",
|
|
2065
|
-
name: "fromChain",
|
|
2066
|
-
type: "bytes"
|
|
2067
|
-
},
|
|
2068
|
-
{
|
|
2069
|
-
indexed: false,
|
|
2070
2122
|
internalType: "bytes",
|
|
2071
|
-
name: "
|
|
2123
|
+
name: "networkId",
|
|
2072
2124
|
type: "bytes"
|
|
2073
2125
|
}
|
|
2074
2126
|
],
|
|
2075
|
-
name: "
|
|
2076
|
-
type: "event"
|
|
2077
|
-
},
|
|
2078
|
-
{
|
|
2079
|
-
inputs: [],
|
|
2080
|
-
name: "SIGNER",
|
|
2127
|
+
name: "isValidNetwork",
|
|
2081
2128
|
outputs: [
|
|
2082
2129
|
{
|
|
2083
|
-
internalType: "
|
|
2130
|
+
internalType: "bool",
|
|
2084
2131
|
name: "",
|
|
2085
|
-
type: "
|
|
2132
|
+
type: "bool"
|
|
2086
2133
|
}
|
|
2087
2134
|
],
|
|
2088
2135
|
stateMutability: "view",
|
|
2089
2136
|
type: "function"
|
|
2090
2137
|
},
|
|
2091
|
-
{
|
|
2092
|
-
inputs: [
|
|
2093
|
-
{
|
|
2094
|
-
components: [
|
|
2095
|
-
{
|
|
2096
|
-
internalType: "bytes32[]",
|
|
2097
|
-
name: "tradeIds",
|
|
2098
|
-
type: "bytes32[]"
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
internalType: "uint64",
|
|
2102
|
-
name: "signedAt",
|
|
2103
|
-
type: "uint64"
|
|
2104
|
-
},
|
|
2105
|
-
{
|
|
2106
|
-
internalType: "uint64",
|
|
2107
|
-
name: "startIdx",
|
|
2108
|
-
type: "uint64"
|
|
2109
|
-
},
|
|
2110
|
-
{
|
|
2111
|
-
internalType: "bytes",
|
|
2112
|
-
name: "paymentTxId",
|
|
2113
|
-
type: "bytes"
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
internalType: "bytes",
|
|
2117
|
-
name: "signature",
|
|
2118
|
-
type: "bytes"
|
|
2119
|
-
}
|
|
2120
|
-
],
|
|
2121
|
-
internalType: "struct ITypes.BundlePayment",
|
|
2122
|
-
name: "bundle",
|
|
2123
|
-
type: "tuple"
|
|
2124
|
-
}
|
|
2125
|
-
],
|
|
2126
|
-
name: "bundlePayment",
|
|
2127
|
-
outputs: [],
|
|
2128
|
-
stateMutability: "nonpayable",
|
|
2129
|
-
type: "function"
|
|
2130
|
-
},
|
|
2131
2138
|
{
|
|
2132
2139
|
inputs: [
|
|
2133
2140
|
{
|
|
2134
2141
|
internalType: "bytes32",
|
|
2135
|
-
name: "
|
|
2142
|
+
name: "pmmId",
|
|
2136
2143
|
type: "bytes32"
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
type: "bytes"
|
|
2142
|
-
},
|
|
2144
|
+
}
|
|
2145
|
+
],
|
|
2146
|
+
name: "isValidPMM",
|
|
2147
|
+
outputs: [
|
|
2143
2148
|
{
|
|
2144
|
-
internalType: "
|
|
2145
|
-
name: "
|
|
2146
|
-
type: "
|
|
2149
|
+
internalType: "bool",
|
|
2150
|
+
name: "",
|
|
2151
|
+
type: "bool"
|
|
2147
2152
|
}
|
|
2148
2153
|
],
|
|
2149
|
-
|
|
2150
|
-
outputs: [],
|
|
2151
|
-
stateMutability: "nonpayable",
|
|
2154
|
+
stateMutability: "view",
|
|
2152
2155
|
type: "function"
|
|
2153
2156
|
},
|
|
2154
2157
|
{
|
|
2155
2158
|
inputs: [
|
|
2156
2159
|
{
|
|
2157
2160
|
internalType: "bytes32",
|
|
2158
|
-
name: "
|
|
2161
|
+
name: "pmmId",
|
|
2159
2162
|
type: "bytes32"
|
|
2160
2163
|
},
|
|
2161
2164
|
{
|
|
2162
|
-
internalType: "
|
|
2163
|
-
name: "
|
|
2164
|
-
type: "
|
|
2165
|
+
internalType: "address",
|
|
2166
|
+
name: "account",
|
|
2167
|
+
type: "address"
|
|
2165
2168
|
}
|
|
2166
2169
|
],
|
|
2167
|
-
name: "
|
|
2168
|
-
outputs: [
|
|
2169
|
-
|
|
2170
|
+
name: "isValidPMMAccount",
|
|
2171
|
+
outputs: [
|
|
2172
|
+
{
|
|
2173
|
+
internalType: "bool",
|
|
2174
|
+
name: "",
|
|
2175
|
+
type: "bool"
|
|
2176
|
+
}
|
|
2177
|
+
],
|
|
2178
|
+
stateMutability: "view",
|
|
2170
2179
|
type: "function"
|
|
2171
2180
|
},
|
|
2172
2181
|
{
|
|
2173
2182
|
inputs: [
|
|
2174
|
-
{
|
|
2175
|
-
internalType: "bytes32",
|
|
2176
|
-
name: "tradeId",
|
|
2177
|
-
type: "bytes32"
|
|
2178
|
-
},
|
|
2179
2183
|
{
|
|
2180
2184
|
internalType: "bytes",
|
|
2181
|
-
name: "
|
|
2185
|
+
name: "networkId",
|
|
2182
2186
|
type: "bytes"
|
|
2183
2187
|
},
|
|
2184
2188
|
{
|
|
2185
2189
|
internalType: "bytes",
|
|
2186
|
-
name: "
|
|
2190
|
+
name: "pubkey",
|
|
2187
2191
|
type: "bytes"
|
|
2188
2192
|
}
|
|
2189
2193
|
],
|
|
2190
|
-
name: "
|
|
2191
|
-
outputs: [],
|
|
2192
|
-
stateMutability: "nonpayable",
|
|
2193
|
-
type: "function"
|
|
2194
|
-
},
|
|
2195
|
-
{
|
|
2196
|
-
inputs: [
|
|
2197
|
-
{
|
|
2198
|
-
internalType: "bytes32",
|
|
2199
|
-
name: "tradeId",
|
|
2200
|
-
type: "bytes32"
|
|
2201
|
-
}
|
|
2202
|
-
],
|
|
2203
|
-
name: "getAffiliateInfo",
|
|
2194
|
+
name: "isValidPubkey",
|
|
2204
2195
|
outputs: [
|
|
2205
2196
|
{
|
|
2206
|
-
|
|
2207
|
-
{
|
|
2208
|
-
internalType: "uint256",
|
|
2209
|
-
name: "aggregatedValue",
|
|
2210
|
-
type: "uint256"
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
internalType: "string",
|
|
2214
|
-
name: "schema",
|
|
2215
|
-
type: "string"
|
|
2216
|
-
},
|
|
2217
|
-
{
|
|
2218
|
-
internalType: "bytes",
|
|
2219
|
-
name: "data",
|
|
2220
|
-
type: "bytes"
|
|
2221
|
-
}
|
|
2222
|
-
],
|
|
2223
|
-
internalType: "struct ITypes.Affiliate",
|
|
2197
|
+
internalType: "bool",
|
|
2224
2198
|
name: "",
|
|
2225
|
-
type: "
|
|
2199
|
+
type: "bool"
|
|
2226
2200
|
}
|
|
2227
2201
|
],
|
|
2228
2202
|
stateMutability: "view",
|
|
@@ -2232,31 +2206,21 @@ var _abi3 = [
|
|
|
2232
2206
|
inputs: [
|
|
2233
2207
|
{
|
|
2234
2208
|
internalType: "bytes",
|
|
2235
|
-
name: "
|
|
2209
|
+
name: "networkId",
|
|
2236
2210
|
type: "bytes"
|
|
2237
2211
|
},
|
|
2238
2212
|
{
|
|
2239
2213
|
internalType: "bytes",
|
|
2240
|
-
name: "
|
|
2214
|
+
name: "tokenId",
|
|
2241
2215
|
type: "bytes"
|
|
2242
2216
|
}
|
|
2243
2217
|
],
|
|
2244
|
-
name: "
|
|
2218
|
+
name: "isValidToken",
|
|
2245
2219
|
outputs: [
|
|
2246
2220
|
{
|
|
2247
|
-
internalType: "
|
|
2248
|
-
name: "",
|
|
2249
|
-
type: "uint64"
|
|
2250
|
-
},
|
|
2251
|
-
{
|
|
2252
|
-
internalType: "uint64",
|
|
2253
|
-
name: "",
|
|
2254
|
-
type: "uint64"
|
|
2255
|
-
},
|
|
2256
|
-
{
|
|
2257
|
-
internalType: "uint64",
|
|
2221
|
+
internalType: "bool",
|
|
2258
2222
|
name: "",
|
|
2259
|
-
type: "
|
|
2223
|
+
type: "bool"
|
|
2260
2224
|
}
|
|
2261
2225
|
],
|
|
2262
2226
|
stateMutability: "view",
|
|
@@ -2266,11 +2230,11 @@ var _abi3 = [
|
|
|
2266
2230
|
inputs: [
|
|
2267
2231
|
{
|
|
2268
2232
|
internalType: "bytes32",
|
|
2269
|
-
name: "
|
|
2233
|
+
name: "pmmId",
|
|
2270
2234
|
type: "bytes32"
|
|
2271
2235
|
}
|
|
2272
2236
|
],
|
|
2273
|
-
name: "
|
|
2237
|
+
name: "numOfPMMAccounts",
|
|
2274
2238
|
outputs: [
|
|
2275
2239
|
{
|
|
2276
2240
|
internalType: "uint256",
|
|
@@ -2282,19 +2246,52 @@ var _abi3 = [
|
|
|
2282
2246
|
type: "function"
|
|
2283
2247
|
},
|
|
2284
2248
|
{
|
|
2285
|
-
inputs: [
|
|
2249
|
+
inputs: [],
|
|
2250
|
+
name: "numOfSupportedTokens",
|
|
2251
|
+
outputs: [
|
|
2286
2252
|
{
|
|
2287
|
-
internalType: "
|
|
2288
|
-
name: "
|
|
2289
|
-
type: "
|
|
2253
|
+
internalType: "uint256",
|
|
2254
|
+
name: "",
|
|
2255
|
+
type: "uint256"
|
|
2290
2256
|
}
|
|
2291
2257
|
],
|
|
2292
|
-
|
|
2258
|
+
stateMutability: "view",
|
|
2259
|
+
type: "function"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
inputs: [],
|
|
2263
|
+
name: "pManagement",
|
|
2293
2264
|
outputs: [
|
|
2294
2265
|
{
|
|
2295
|
-
internalType: "
|
|
2266
|
+
internalType: "contract IManagement",
|
|
2296
2267
|
name: "",
|
|
2297
|
-
type: "
|
|
2268
|
+
type: "address"
|
|
2269
|
+
}
|
|
2270
|
+
],
|
|
2271
|
+
stateMutability: "view",
|
|
2272
|
+
type: "function"
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
inputs: [],
|
|
2276
|
+
name: "registry",
|
|
2277
|
+
outputs: [
|
|
2278
|
+
{
|
|
2279
|
+
internalType: "contract IVaultRegistry",
|
|
2280
|
+
name: "",
|
|
2281
|
+
type: "address"
|
|
2282
|
+
}
|
|
2283
|
+
],
|
|
2284
|
+
stateMutability: "view",
|
|
2285
|
+
type: "function"
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
inputs: [],
|
|
2289
|
+
name: "router",
|
|
2290
|
+
outputs: [
|
|
2291
|
+
{
|
|
2292
|
+
internalType: "contract IRouter",
|
|
2293
|
+
name: "",
|
|
2294
|
+
type: "address"
|
|
2298
2295
|
}
|
|
2299
2296
|
],
|
|
2300
2297
|
stateMutability: "view",
|
|
@@ -2303,147 +2300,385 @@ var _abi3 = [
|
|
|
2303
2300
|
{
|
|
2304
2301
|
inputs: [
|
|
2305
2302
|
{
|
|
2306
|
-
internalType: "
|
|
2307
|
-
name: "
|
|
2308
|
-
type: "
|
|
2303
|
+
internalType: "address",
|
|
2304
|
+
name: "newManagement",
|
|
2305
|
+
type: "address"
|
|
2309
2306
|
}
|
|
2310
2307
|
],
|
|
2311
|
-
name: "
|
|
2308
|
+
name: "setProtocolManagement",
|
|
2309
|
+
outputs: [],
|
|
2310
|
+
stateMutability: "nonpayable",
|
|
2311
|
+
type: "function"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
inputs: [
|
|
2315
|
+
{
|
|
2316
|
+
internalType: "address",
|
|
2317
|
+
name: "newRouter",
|
|
2318
|
+
type: "address"
|
|
2319
|
+
}
|
|
2320
|
+
],
|
|
2321
|
+
name: "setRouter",
|
|
2322
|
+
outputs: [],
|
|
2323
|
+
stateMutability: "nonpayable",
|
|
2324
|
+
type: "function"
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
inputs: [
|
|
2328
|
+
{
|
|
2329
|
+
internalType: "address",
|
|
2330
|
+
name: "newSignerExtension",
|
|
2331
|
+
type: "address"
|
|
2332
|
+
}
|
|
2333
|
+
],
|
|
2334
|
+
name: "setSignerExtension",
|
|
2335
|
+
outputs: [],
|
|
2336
|
+
stateMutability: "nonpayable",
|
|
2337
|
+
type: "function"
|
|
2338
|
+
},
|
|
2339
|
+
{
|
|
2340
|
+
inputs: [
|
|
2341
|
+
{
|
|
2342
|
+
internalType: "address",
|
|
2343
|
+
name: "newRegistry",
|
|
2344
|
+
type: "address"
|
|
2345
|
+
}
|
|
2346
|
+
],
|
|
2347
|
+
name: "setVaultRegistry",
|
|
2348
|
+
outputs: [],
|
|
2349
|
+
stateMutability: "nonpayable",
|
|
2350
|
+
type: "function"
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
inputs: [],
|
|
2354
|
+
name: "signerExtension",
|
|
2312
2355
|
outputs: [
|
|
2313
2356
|
{
|
|
2314
|
-
|
|
2315
|
-
{
|
|
2316
|
-
internalType: "uint256",
|
|
2317
|
-
name: "stage",
|
|
2318
|
-
type: "uint256"
|
|
2319
|
-
},
|
|
2320
|
-
{
|
|
2321
|
-
internalType: "bytes",
|
|
2322
|
-
name: "msgError",
|
|
2323
|
-
type: "bytes"
|
|
2324
|
-
}
|
|
2325
|
-
],
|
|
2326
|
-
internalType: "struct ITypes.FailureDetails",
|
|
2357
|
+
internalType: "contract ISignerExtension",
|
|
2327
2358
|
name: "",
|
|
2328
|
-
type: "
|
|
2359
|
+
type: "address"
|
|
2329
2360
|
}
|
|
2330
2361
|
],
|
|
2331
2362
|
stateMutability: "view",
|
|
2332
2363
|
type: "function"
|
|
2364
|
+
}
|
|
2365
|
+
];
|
|
2366
|
+
var ProtocolFetcherProxy__factory = class {
|
|
2367
|
+
static createInterface() {
|
|
2368
|
+
return new import_ethers3.Interface(_abi3);
|
|
2369
|
+
}
|
|
2370
|
+
static connect(address, runner) {
|
|
2371
|
+
return new import_ethers3.Contract(
|
|
2372
|
+
address,
|
|
2373
|
+
_abi3,
|
|
2374
|
+
runner
|
|
2375
|
+
);
|
|
2376
|
+
}
|
|
2377
|
+
};
|
|
2378
|
+
ProtocolFetcherProxy__factory.abi = _abi3;
|
|
2379
|
+
|
|
2380
|
+
// src/contracts/contracts/factories/Router__factory.ts
|
|
2381
|
+
var import_ethers4 = require("ethers");
|
|
2382
|
+
var _abi4 = [
|
|
2383
|
+
{
|
|
2384
|
+
inputs: [
|
|
2385
|
+
{
|
|
2386
|
+
internalType: "contract IManagement",
|
|
2387
|
+
name: "management_",
|
|
2388
|
+
type: "address"
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
internalType: "address",
|
|
2392
|
+
name: "signer",
|
|
2393
|
+
type: "address"
|
|
2394
|
+
}
|
|
2395
|
+
],
|
|
2396
|
+
stateMutability: "nonpayable",
|
|
2397
|
+
type: "constructor"
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
inputs: [],
|
|
2401
|
+
name: "AddressZero",
|
|
2402
|
+
type: "error"
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
inputs: [],
|
|
2406
|
+
name: "BundlePaymentEmpty",
|
|
2407
|
+
type: "error"
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
inputs: [],
|
|
2411
|
+
name: "DepositAlreadySubmitted",
|
|
2412
|
+
type: "error"
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
inputs: [],
|
|
2416
|
+
name: "LengthMismatch",
|
|
2417
|
+
type: "error"
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
inputs: [],
|
|
2421
|
+
name: "RegisteredAlready",
|
|
2422
|
+
type: "error"
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
inputs: [],
|
|
2426
|
+
name: "RouteNotSupported",
|
|
2427
|
+
type: "error"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
inputs: [],
|
|
2431
|
+
name: "Unauthorized",
|
|
2432
|
+
type: "error"
|
|
2333
2433
|
},
|
|
2334
2434
|
{
|
|
2435
|
+
anonymous: false,
|
|
2335
2436
|
inputs: [
|
|
2336
2437
|
{
|
|
2438
|
+
indexed: true,
|
|
2439
|
+
internalType: "address",
|
|
2440
|
+
name: "solver",
|
|
2441
|
+
type: "address"
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
indexed: true,
|
|
2337
2445
|
internalType: "bytes32",
|
|
2338
2446
|
name: "tradeId",
|
|
2339
2447
|
type: "bytes32"
|
|
2340
2448
|
}
|
|
2341
2449
|
],
|
|
2342
|
-
name: "
|
|
2343
|
-
|
|
2450
|
+
name: "Abort",
|
|
2451
|
+
type: "event"
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
anonymous: false,
|
|
2455
|
+
inputs: [
|
|
2344
2456
|
{
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2457
|
+
indexed: true,
|
|
2458
|
+
internalType: "address",
|
|
2459
|
+
name: "mpc",
|
|
2460
|
+
type: "address"
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
indexed: true,
|
|
2464
|
+
internalType: "bytes32",
|
|
2465
|
+
name: "depositId",
|
|
2466
|
+
type: "bytes32"
|
|
2467
|
+
}
|
|
2468
|
+
],
|
|
2469
|
+
name: "ConfirmDeposit",
|
|
2470
|
+
type: "event"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
anonymous: false,
|
|
2474
|
+
inputs: [
|
|
2475
|
+
{
|
|
2476
|
+
indexed: true,
|
|
2477
|
+
internalType: "address",
|
|
2478
|
+
name: "mpc",
|
|
2479
|
+
type: "address"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
indexed: true,
|
|
2483
|
+
internalType: "bytes32",
|
|
2484
|
+
name: "tradeId",
|
|
2485
|
+
type: "bytes32"
|
|
2486
|
+
}
|
|
2487
|
+
],
|
|
2488
|
+
name: "ConfirmPayment",
|
|
2489
|
+
type: "event"
|
|
2490
|
+
},
|
|
2491
|
+
{
|
|
2492
|
+
anonymous: false,
|
|
2493
|
+
inputs: [
|
|
2494
|
+
{
|
|
2495
|
+
indexed: true,
|
|
2496
|
+
internalType: "address",
|
|
2497
|
+
name: "mpc",
|
|
2498
|
+
type: "address"
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
indexed: true,
|
|
2502
|
+
internalType: "bytes32",
|
|
2503
|
+
name: "tradeId",
|
|
2504
|
+
type: "bytes32"
|
|
2505
|
+
}
|
|
2506
|
+
],
|
|
2507
|
+
name: "ConfirmPresign",
|
|
2508
|
+
type: "event"
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
anonymous: false,
|
|
2512
|
+
inputs: [
|
|
2513
|
+
{
|
|
2514
|
+
indexed: true,
|
|
2515
|
+
internalType: "address",
|
|
2516
|
+
name: "mpc",
|
|
2517
|
+
type: "address"
|
|
2518
|
+
},
|
|
2519
|
+
{
|
|
2520
|
+
indexed: true,
|
|
2521
|
+
internalType: "bytes32",
|
|
2522
|
+
name: "tradeId",
|
|
2523
|
+
type: "bytes32"
|
|
2524
|
+
}
|
|
2525
|
+
],
|
|
2526
|
+
name: "ConfirmRefund",
|
|
2527
|
+
type: "event"
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
anonymous: false,
|
|
2531
|
+
inputs: [
|
|
2532
|
+
{
|
|
2533
|
+
indexed: true,
|
|
2534
|
+
internalType: "address",
|
|
2535
|
+
name: "mpc",
|
|
2536
|
+
type: "address"
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
indexed: true,
|
|
2540
|
+
internalType: "bytes32",
|
|
2541
|
+
name: "tradeId",
|
|
2542
|
+
type: "bytes32"
|
|
2543
|
+
}
|
|
2544
|
+
],
|
|
2545
|
+
name: "ConfirmSettlement",
|
|
2546
|
+
type: "event"
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
anonymous: false,
|
|
2550
|
+
inputs: [
|
|
2551
|
+
{
|
|
2552
|
+
indexed: true,
|
|
2553
|
+
internalType: "address",
|
|
2554
|
+
name: "operator",
|
|
2555
|
+
type: "address"
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
indexed: true,
|
|
2559
|
+
internalType: "bytes32",
|
|
2560
|
+
name: "tradeId",
|
|
2561
|
+
type: "bytes32"
|
|
2375
2562
|
}
|
|
2376
2563
|
],
|
|
2377
|
-
|
|
2378
|
-
type: "
|
|
2564
|
+
name: "MakePayment",
|
|
2565
|
+
type: "event"
|
|
2379
2566
|
},
|
|
2380
2567
|
{
|
|
2568
|
+
anonymous: false,
|
|
2381
2569
|
inputs: [
|
|
2382
2570
|
{
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2571
|
+
indexed: true,
|
|
2572
|
+
internalType: "address",
|
|
2573
|
+
name: "mpc",
|
|
2574
|
+
type: "address"
|
|
2575
|
+
},
|
|
2576
|
+
{
|
|
2577
|
+
indexed: true,
|
|
2578
|
+
internalType: "bytes32",
|
|
2579
|
+
name: "tradeId",
|
|
2580
|
+
type: "bytes32"
|
|
2386
2581
|
},
|
|
2387
2582
|
{
|
|
2583
|
+
indexed: false,
|
|
2388
2584
|
internalType: "bytes",
|
|
2389
|
-
name: "
|
|
2585
|
+
name: "msgError",
|
|
2390
2586
|
type: "bytes"
|
|
2391
2587
|
}
|
|
2392
2588
|
],
|
|
2393
|
-
name: "
|
|
2394
|
-
|
|
2589
|
+
name: "ReportFailure",
|
|
2590
|
+
type: "event"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
anonymous: false,
|
|
2594
|
+
inputs: [
|
|
2395
2595
|
{
|
|
2596
|
+
indexed: true,
|
|
2396
2597
|
internalType: "address",
|
|
2397
|
-
name: "
|
|
2598
|
+
name: "solver",
|
|
2398
2599
|
type: "address"
|
|
2399
2600
|
},
|
|
2400
2601
|
{
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2602
|
+
indexed: true,
|
|
2603
|
+
internalType: "bytes32",
|
|
2604
|
+
name: "tradeId",
|
|
2605
|
+
type: "bytes32"
|
|
2404
2606
|
}
|
|
2405
2607
|
],
|
|
2406
|
-
|
|
2407
|
-
type: "
|
|
2608
|
+
name: "SelectPMM",
|
|
2609
|
+
type: "event"
|
|
2408
2610
|
},
|
|
2409
2611
|
{
|
|
2612
|
+
anonymous: false,
|
|
2410
2613
|
inputs: [
|
|
2411
2614
|
{
|
|
2615
|
+
indexed: true,
|
|
2616
|
+
internalType: "address",
|
|
2617
|
+
name: "solver",
|
|
2618
|
+
type: "address"
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
indexed: true,
|
|
2412
2622
|
internalType: "bytes32",
|
|
2413
|
-
name: "
|
|
2623
|
+
name: "depositId",
|
|
2414
2624
|
type: "bytes32"
|
|
2415
2625
|
}
|
|
2416
2626
|
],
|
|
2417
|
-
name: "
|
|
2418
|
-
|
|
2627
|
+
name: "SubmitDeposit",
|
|
2628
|
+
type: "event"
|
|
2629
|
+
},
|
|
2630
|
+
{
|
|
2631
|
+
anonymous: false,
|
|
2632
|
+
inputs: [
|
|
2419
2633
|
{
|
|
2634
|
+
indexed: true,
|
|
2420
2635
|
internalType: "address",
|
|
2421
|
-
name: "
|
|
2636
|
+
name: "solver",
|
|
2422
2637
|
type: "address"
|
|
2423
2638
|
},
|
|
2424
2639
|
{
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2640
|
+
indexed: true,
|
|
2641
|
+
internalType: "bytes32",
|
|
2642
|
+
name: "tradeId",
|
|
2643
|
+
type: "bytes32"
|
|
2428
2644
|
}
|
|
2429
2645
|
],
|
|
2430
|
-
|
|
2431
|
-
type: "
|
|
2646
|
+
name: "SubmitTradeInfo",
|
|
2647
|
+
type: "event"
|
|
2432
2648
|
},
|
|
2433
2649
|
{
|
|
2650
|
+
anonymous: false,
|
|
2434
2651
|
inputs: [
|
|
2435
2652
|
{
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2653
|
+
indexed: true,
|
|
2654
|
+
internalType: "address",
|
|
2655
|
+
name: "handler",
|
|
2656
|
+
type: "address"
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
indexed: false,
|
|
2660
|
+
internalType: "bytes",
|
|
2661
|
+
name: "fromNetwork",
|
|
2662
|
+
type: "bytes"
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
indexed: false,
|
|
2666
|
+
internalType: "bytes",
|
|
2667
|
+
name: "toNetwork",
|
|
2668
|
+
type: "bytes"
|
|
2439
2669
|
}
|
|
2440
2670
|
],
|
|
2441
|
-
name: "
|
|
2671
|
+
name: "UpdatedRoute",
|
|
2672
|
+
type: "event"
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
inputs: [],
|
|
2676
|
+
name: "SIGNER",
|
|
2442
2677
|
outputs: [
|
|
2443
2678
|
{
|
|
2444
|
-
internalType: "
|
|
2679
|
+
internalType: "address",
|
|
2445
2680
|
name: "",
|
|
2446
|
-
type: "
|
|
2681
|
+
type: "address"
|
|
2447
2682
|
}
|
|
2448
2683
|
],
|
|
2449
2684
|
stateMutability: "view",
|
|
@@ -2452,232 +2687,189 @@ var _abi3 = [
|
|
|
2452
2687
|
{
|
|
2453
2688
|
inputs: [
|
|
2454
2689
|
{
|
|
2455
|
-
internalType: "
|
|
2456
|
-
name: "
|
|
2457
|
-
type: "
|
|
2458
|
-
}
|
|
2459
|
-
],
|
|
2460
|
-
name: "getLatestMPCInfo",
|
|
2461
|
-
outputs: [
|
|
2690
|
+
internalType: "bytes32",
|
|
2691
|
+
name: "tradeId",
|
|
2692
|
+
type: "bytes32"
|
|
2693
|
+
},
|
|
2462
2694
|
{
|
|
2463
2695
|
components: [
|
|
2464
2696
|
{
|
|
2465
|
-
internalType: "
|
|
2466
|
-
name: "
|
|
2467
|
-
type: "
|
|
2697
|
+
internalType: "uint256",
|
|
2698
|
+
name: "minAmountOut",
|
|
2699
|
+
type: "uint256"
|
|
2468
2700
|
},
|
|
2469
2701
|
{
|
|
2470
2702
|
internalType: "uint64",
|
|
2471
|
-
name: "
|
|
2703
|
+
name: "tradeTimeout",
|
|
2472
2704
|
type: "uint64"
|
|
2473
2705
|
},
|
|
2474
2706
|
{
|
|
2475
2707
|
internalType: "bytes",
|
|
2476
|
-
name: "
|
|
2477
|
-
type: "bytes"
|
|
2478
|
-
},
|
|
2479
|
-
{
|
|
2480
|
-
internalType: "bytes",
|
|
2481
|
-
name: "mpcAssetPubkey",
|
|
2708
|
+
name: "rfqInfoSignature",
|
|
2482
2709
|
type: "bytes"
|
|
2483
2710
|
}
|
|
2484
2711
|
],
|
|
2485
|
-
internalType: "struct ITypes.
|
|
2486
|
-
name: "",
|
|
2712
|
+
internalType: "struct ITypes.RFQInfo",
|
|
2713
|
+
name: "rfqInfo",
|
|
2487
2714
|
type: "tuple"
|
|
2488
2715
|
}
|
|
2489
2716
|
],
|
|
2490
|
-
|
|
2717
|
+
name: "abort",
|
|
2718
|
+
outputs: [],
|
|
2719
|
+
stateMutability: "nonpayable",
|
|
2491
2720
|
type: "function"
|
|
2492
2721
|
},
|
|
2493
2722
|
{
|
|
2494
2723
|
inputs: [
|
|
2495
|
-
{
|
|
2496
|
-
internalType: "bytes",
|
|
2497
|
-
name: "networkId",
|
|
2498
|
-
type: "bytes"
|
|
2499
|
-
},
|
|
2500
|
-
{
|
|
2501
|
-
internalType: "bytes",
|
|
2502
|
-
name: "pubkey",
|
|
2503
|
-
type: "bytes"
|
|
2504
|
-
}
|
|
2505
|
-
],
|
|
2506
|
-
name: "getMPCInfo",
|
|
2507
|
-
outputs: [
|
|
2508
2724
|
{
|
|
2509
2725
|
components: [
|
|
2510
2726
|
{
|
|
2511
|
-
internalType: "
|
|
2512
|
-
name: "
|
|
2513
|
-
type: "
|
|
2727
|
+
internalType: "bytes32[]",
|
|
2728
|
+
name: "tradeIds",
|
|
2729
|
+
type: "bytes32[]"
|
|
2514
2730
|
},
|
|
2515
2731
|
{
|
|
2516
2732
|
internalType: "uint64",
|
|
2517
|
-
name: "
|
|
2733
|
+
name: "signedAt",
|
|
2734
|
+
type: "uint64"
|
|
2735
|
+
},
|
|
2736
|
+
{
|
|
2737
|
+
internalType: "uint64",
|
|
2738
|
+
name: "startIdx",
|
|
2518
2739
|
type: "uint64"
|
|
2519
2740
|
},
|
|
2520
2741
|
{
|
|
2521
2742
|
internalType: "bytes",
|
|
2522
|
-
name: "
|
|
2743
|
+
name: "paymentTxId",
|
|
2523
2744
|
type: "bytes"
|
|
2524
2745
|
},
|
|
2525
2746
|
{
|
|
2526
2747
|
internalType: "bytes",
|
|
2527
|
-
name: "
|
|
2748
|
+
name: "signature",
|
|
2528
2749
|
type: "bytes"
|
|
2529
2750
|
}
|
|
2530
2751
|
],
|
|
2531
|
-
internalType: "struct ITypes.
|
|
2532
|
-
name: "
|
|
2752
|
+
internalType: "struct ITypes.BundlePayment",
|
|
2753
|
+
name: "bundle",
|
|
2533
2754
|
type: "tuple"
|
|
2534
2755
|
}
|
|
2535
2756
|
],
|
|
2536
|
-
|
|
2757
|
+
name: "bundlePayment",
|
|
2758
|
+
outputs: [],
|
|
2759
|
+
stateMutability: "nonpayable",
|
|
2537
2760
|
type: "function"
|
|
2538
2761
|
},
|
|
2539
2762
|
{
|
|
2540
|
-
inputs: [
|
|
2541
|
-
name: "getManagementOwner",
|
|
2542
|
-
outputs: [
|
|
2763
|
+
inputs: [
|
|
2543
2764
|
{
|
|
2544
|
-
internalType: "
|
|
2545
|
-
name: "",
|
|
2546
|
-
type: "
|
|
2765
|
+
internalType: "bytes32",
|
|
2766
|
+
name: "referenceId",
|
|
2767
|
+
type: "bytes32"
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
internalType: "bytes",
|
|
2771
|
+
name: "signature",
|
|
2772
|
+
type: "bytes"
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
internalType: "bytes[]",
|
|
2776
|
+
name: "depositFromList",
|
|
2777
|
+
type: "bytes[]"
|
|
2547
2778
|
}
|
|
2548
2779
|
],
|
|
2549
|
-
|
|
2780
|
+
name: "confirmDeposit",
|
|
2781
|
+
outputs: [],
|
|
2782
|
+
stateMutability: "nonpayable",
|
|
2550
2783
|
type: "function"
|
|
2551
2784
|
},
|
|
2552
2785
|
{
|
|
2553
2786
|
inputs: [
|
|
2554
2787
|
{
|
|
2555
|
-
internalType: "
|
|
2556
|
-
name: "
|
|
2557
|
-
type: "
|
|
2788
|
+
internalType: "bytes32",
|
|
2789
|
+
name: "tradeId",
|
|
2790
|
+
type: "bytes32"
|
|
2558
2791
|
},
|
|
2559
2792
|
{
|
|
2560
2793
|
internalType: "bytes",
|
|
2561
|
-
name: "
|
|
2794
|
+
name: "signature",
|
|
2562
2795
|
type: "bytes"
|
|
2563
2796
|
}
|
|
2564
2797
|
],
|
|
2565
|
-
name: "
|
|
2566
|
-
outputs: [
|
|
2567
|
-
|
|
2568
|
-
internalType: "uint256",
|
|
2569
|
-
name: "",
|
|
2570
|
-
type: "uint256"
|
|
2571
|
-
}
|
|
2572
|
-
],
|
|
2573
|
-
stateMutability: "view",
|
|
2798
|
+
name: "confirmPayment",
|
|
2799
|
+
outputs: [],
|
|
2800
|
+
stateMutability: "nonpayable",
|
|
2574
2801
|
type: "function"
|
|
2575
2802
|
},
|
|
2576
2803
|
{
|
|
2577
|
-
inputs: [
|
|
2578
|
-
name: "getPFeeRate",
|
|
2579
|
-
outputs: [
|
|
2804
|
+
inputs: [
|
|
2580
2805
|
{
|
|
2581
|
-
internalType: "
|
|
2582
|
-
name: "",
|
|
2583
|
-
type: "
|
|
2806
|
+
internalType: "bytes32",
|
|
2807
|
+
name: "tradeId",
|
|
2808
|
+
type: "bytes32"
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
internalType: "bytes",
|
|
2812
|
+
name: "signature",
|
|
2813
|
+
type: "bytes"
|
|
2584
2814
|
}
|
|
2585
2815
|
],
|
|
2586
|
-
|
|
2816
|
+
name: "confirmPresign",
|
|
2817
|
+
outputs: [],
|
|
2818
|
+
stateMutability: "nonpayable",
|
|
2587
2819
|
type: "function"
|
|
2588
2820
|
},
|
|
2589
2821
|
{
|
|
2590
2822
|
inputs: [
|
|
2591
2823
|
{
|
|
2592
2824
|
internalType: "bytes32",
|
|
2593
|
-
name: "
|
|
2825
|
+
name: "tradeId",
|
|
2594
2826
|
type: "bytes32"
|
|
2595
2827
|
},
|
|
2596
2828
|
{
|
|
2597
|
-
internalType: "
|
|
2598
|
-
name: "
|
|
2599
|
-
type: "
|
|
2829
|
+
internalType: "bytes",
|
|
2830
|
+
name: "releaseTxId",
|
|
2831
|
+
type: "bytes"
|
|
2600
2832
|
},
|
|
2601
2833
|
{
|
|
2602
|
-
internalType: "
|
|
2603
|
-
name: "
|
|
2604
|
-
type: "
|
|
2605
|
-
}
|
|
2606
|
-
],
|
|
2607
|
-
name: "getPMMAccounts",
|
|
2608
|
-
outputs: [
|
|
2609
|
-
{
|
|
2610
|
-
internalType: "address[]",
|
|
2611
|
-
name: "list",
|
|
2612
|
-
type: "address[]"
|
|
2834
|
+
internalType: "bytes",
|
|
2835
|
+
name: "signature",
|
|
2836
|
+
type: "bytes"
|
|
2613
2837
|
}
|
|
2614
2838
|
],
|
|
2615
|
-
|
|
2839
|
+
name: "confirmSettlement",
|
|
2840
|
+
outputs: [],
|
|
2841
|
+
stateMutability: "nonpayable",
|
|
2616
2842
|
type: "function"
|
|
2617
2843
|
},
|
|
2618
2844
|
{
|
|
2619
2845
|
inputs: [
|
|
2620
2846
|
{
|
|
2621
2847
|
internalType: "bytes32",
|
|
2622
|
-
name: "
|
|
2848
|
+
name: "referenceId",
|
|
2623
2849
|
type: "bytes32"
|
|
2624
2850
|
}
|
|
2625
2851
|
],
|
|
2626
|
-
name: "
|
|
2852
|
+
name: "getAffiliateInfo",
|
|
2627
2853
|
outputs: [
|
|
2628
2854
|
{
|
|
2629
2855
|
components: [
|
|
2630
2856
|
{
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
name: "minAmountOut",
|
|
2635
|
-
type: "uint256"
|
|
2636
|
-
},
|
|
2637
|
-
{
|
|
2638
|
-
internalType: "uint64",
|
|
2639
|
-
name: "tradeTimeout",
|
|
2640
|
-
type: "uint64"
|
|
2641
|
-
},
|
|
2642
|
-
{
|
|
2643
|
-
internalType: "bytes",
|
|
2644
|
-
name: "rfqInfoSignature",
|
|
2645
|
-
type: "bytes"
|
|
2646
|
-
}
|
|
2647
|
-
],
|
|
2648
|
-
internalType: "struct ITypes.RFQInfo",
|
|
2649
|
-
name: "rfqInfo",
|
|
2650
|
-
type: "tuple"
|
|
2857
|
+
internalType: "uint256",
|
|
2858
|
+
name: "aggregatedValue",
|
|
2859
|
+
type: "uint256"
|
|
2651
2860
|
},
|
|
2652
2861
|
{
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
name: "selectedPMMId",
|
|
2662
|
-
type: "bytes32"
|
|
2663
|
-
},
|
|
2664
|
-
{
|
|
2665
|
-
internalType: "bytes[2]",
|
|
2666
|
-
name: "info",
|
|
2667
|
-
type: "bytes[2]"
|
|
2668
|
-
},
|
|
2669
|
-
{
|
|
2670
|
-
internalType: "uint64",
|
|
2671
|
-
name: "sigExpiry",
|
|
2672
|
-
type: "uint64"
|
|
2673
|
-
}
|
|
2674
|
-
],
|
|
2675
|
-
internalType: "struct ITypes.SelectedPMMInfo",
|
|
2676
|
-
name: "pmmInfo",
|
|
2677
|
-
type: "tuple"
|
|
2862
|
+
internalType: "string",
|
|
2863
|
+
name: "schema",
|
|
2864
|
+
type: "string"
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
internalType: "bytes",
|
|
2868
|
+
name: "data",
|
|
2869
|
+
type: "bytes"
|
|
2678
2870
|
}
|
|
2679
2871
|
],
|
|
2680
|
-
internalType: "struct ITypes.
|
|
2872
|
+
internalType: "struct ITypes.Affiliate",
|
|
2681
2873
|
name: "",
|
|
2682
2874
|
type: "tuple"
|
|
2683
2875
|
}
|
|
@@ -2688,37 +2880,27 @@ var _abi3 = [
|
|
|
2688
2880
|
{
|
|
2689
2881
|
inputs: [
|
|
2690
2882
|
{
|
|
2691
|
-
internalType: "
|
|
2692
|
-
name: "
|
|
2693
|
-
type: "
|
|
2694
|
-
}
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
type: "uint256"
|
|
2699
|
-
},
|
|
2883
|
+
internalType: "address",
|
|
2884
|
+
name: "handler",
|
|
2885
|
+
type: "address"
|
|
2886
|
+
}
|
|
2887
|
+
],
|
|
2888
|
+
name: "getCurrentEpoch",
|
|
2889
|
+
outputs: [
|
|
2700
2890
|
{
|
|
2701
|
-
internalType: "
|
|
2702
|
-
name: "
|
|
2703
|
-
type: "
|
|
2891
|
+
internalType: "uint64",
|
|
2892
|
+
name: "",
|
|
2893
|
+
type: "uint64"
|
|
2704
2894
|
},
|
|
2705
2895
|
{
|
|
2706
|
-
internalType: "
|
|
2707
|
-
name: "
|
|
2708
|
-
type: "
|
|
2896
|
+
internalType: "uint64",
|
|
2897
|
+
name: "",
|
|
2898
|
+
type: "uint64"
|
|
2709
2899
|
},
|
|
2710
2900
|
{
|
|
2711
|
-
internalType: "
|
|
2712
|
-
name: "toChain",
|
|
2713
|
-
type: "bytes"
|
|
2714
|
-
}
|
|
2715
|
-
],
|
|
2716
|
-
name: "getPendingTrades",
|
|
2717
|
-
outputs: [
|
|
2718
|
-
{
|
|
2719
|
-
internalType: "bytes32[]",
|
|
2901
|
+
internalType: "uint64",
|
|
2720
2902
|
name: "",
|
|
2721
|
-
type: "
|
|
2903
|
+
type: "uint64"
|
|
2722
2904
|
}
|
|
2723
2905
|
],
|
|
2724
2906
|
stateMutability: "view",
|
|
@@ -2727,40 +2909,22 @@ var _abi3 = [
|
|
|
2727
2909
|
{
|
|
2728
2910
|
inputs: [
|
|
2729
2911
|
{
|
|
2730
|
-
internalType: "
|
|
2731
|
-
name: "
|
|
2732
|
-
type: "
|
|
2733
|
-
},
|
|
2734
|
-
{
|
|
2735
|
-
internalType: "bytes",
|
|
2736
|
-
name: "fromChain",
|
|
2737
|
-
type: "bytes"
|
|
2738
|
-
},
|
|
2739
|
-
{
|
|
2740
|
-
internalType: "bytes",
|
|
2741
|
-
name: "toChain",
|
|
2742
|
-
type: "bytes"
|
|
2912
|
+
internalType: "bytes32",
|
|
2913
|
+
name: "referenceId",
|
|
2914
|
+
type: "bytes32"
|
|
2743
2915
|
}
|
|
2744
2916
|
],
|
|
2745
|
-
name: "
|
|
2917
|
+
name: "getCurrentStage",
|
|
2746
2918
|
outputs: [
|
|
2747
2919
|
{
|
|
2748
2920
|
internalType: "uint256",
|
|
2749
|
-
name: "",
|
|
2921
|
+
name: "stage",
|
|
2750
2922
|
type: "uint256"
|
|
2751
|
-
}
|
|
2752
|
-
],
|
|
2753
|
-
stateMutability: "view",
|
|
2754
|
-
type: "function"
|
|
2755
|
-
},
|
|
2756
|
-
{
|
|
2757
|
-
inputs: [],
|
|
2758
|
-
name: "getProtocolState",
|
|
2759
|
-
outputs: [
|
|
2923
|
+
},
|
|
2760
2924
|
{
|
|
2761
|
-
internalType: "
|
|
2762
|
-
name: "",
|
|
2763
|
-
type: "
|
|
2925
|
+
internalType: "string",
|
|
2926
|
+
name: "swapType",
|
|
2927
|
+
type: "string"
|
|
2764
2928
|
}
|
|
2765
2929
|
],
|
|
2766
2930
|
stateMutability: "view",
|
|
@@ -2770,26 +2934,26 @@ var _abi3 = [
|
|
|
2770
2934
|
inputs: [
|
|
2771
2935
|
{
|
|
2772
2936
|
internalType: "bytes32",
|
|
2773
|
-
name: "
|
|
2937
|
+
name: "referenceId",
|
|
2774
2938
|
type: "bytes32"
|
|
2775
2939
|
}
|
|
2776
2940
|
],
|
|
2777
|
-
name: "
|
|
2941
|
+
name: "getFailureInfo",
|
|
2778
2942
|
outputs: [
|
|
2779
2943
|
{
|
|
2780
2944
|
components: [
|
|
2781
2945
|
{
|
|
2782
|
-
internalType: "
|
|
2783
|
-
name: "
|
|
2784
|
-
type: "
|
|
2946
|
+
internalType: "uint256",
|
|
2947
|
+
name: "stage",
|
|
2948
|
+
type: "uint256"
|
|
2785
2949
|
},
|
|
2786
2950
|
{
|
|
2787
|
-
internalType: "bytes
|
|
2788
|
-
name: "
|
|
2789
|
-
type: "bytes
|
|
2951
|
+
internalType: "bytes",
|
|
2952
|
+
name: "msgError",
|
|
2953
|
+
type: "bytes"
|
|
2790
2954
|
}
|
|
2791
2955
|
],
|
|
2792
|
-
internalType: "struct ITypes.
|
|
2956
|
+
internalType: "struct ITypes.FailureDetails",
|
|
2793
2957
|
name: "",
|
|
2794
2958
|
type: "tuple"
|
|
2795
2959
|
}
|
|
@@ -2801,33 +2965,43 @@ var _abi3 = [
|
|
|
2801
2965
|
inputs: [
|
|
2802
2966
|
{
|
|
2803
2967
|
internalType: "bytes32",
|
|
2804
|
-
name: "
|
|
2968
|
+
name: "referenceId",
|
|
2805
2969
|
type: "bytes32"
|
|
2806
2970
|
}
|
|
2807
2971
|
],
|
|
2808
|
-
name: "
|
|
2972
|
+
name: "getFeeDetails",
|
|
2809
2973
|
outputs: [
|
|
2810
2974
|
{
|
|
2811
2975
|
components: [
|
|
2812
2976
|
{
|
|
2813
|
-
internalType: "
|
|
2814
|
-
name: "
|
|
2815
|
-
type: "
|
|
2977
|
+
internalType: "uint256",
|
|
2978
|
+
name: "totalAmount",
|
|
2979
|
+
type: "uint256"
|
|
2816
2980
|
},
|
|
2817
2981
|
{
|
|
2818
|
-
internalType: "
|
|
2819
|
-
name: "
|
|
2820
|
-
type: "
|
|
2982
|
+
internalType: "uint256",
|
|
2983
|
+
name: "pFeeAmount",
|
|
2984
|
+
type: "uint256"
|
|
2821
2985
|
},
|
|
2822
2986
|
{
|
|
2823
|
-
internalType: "
|
|
2824
|
-
name: "
|
|
2825
|
-
type: "
|
|
2987
|
+
internalType: "uint256",
|
|
2988
|
+
name: "aFeeAmount",
|
|
2989
|
+
type: "uint256"
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
internalType: "uint128",
|
|
2993
|
+
name: "pFeeRate",
|
|
2994
|
+
type: "uint128"
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
internalType: "uint128",
|
|
2998
|
+
name: "aFeeRate",
|
|
2999
|
+
type: "uint128"
|
|
2826
3000
|
}
|
|
2827
3001
|
],
|
|
2828
|
-
internalType: "struct ITypes.
|
|
3002
|
+
internalType: "struct ITypes.FeeDetails",
|
|
2829
3003
|
name: "",
|
|
2830
|
-
type: "tuple
|
|
3004
|
+
type: "tuple"
|
|
2831
3005
|
}
|
|
2832
3006
|
],
|
|
2833
3007
|
stateMutability: "view",
|
|
@@ -2836,34 +3010,75 @@ var _abi3 = [
|
|
|
2836
3010
|
{
|
|
2837
3011
|
inputs: [
|
|
2838
3012
|
{
|
|
2839
|
-
internalType: "
|
|
2840
|
-
name: "
|
|
2841
|
-
type: "
|
|
3013
|
+
internalType: "bytes",
|
|
3014
|
+
name: "fromNetwork",
|
|
3015
|
+
type: "bytes"
|
|
2842
3016
|
},
|
|
2843
3017
|
{
|
|
2844
|
-
internalType: "
|
|
2845
|
-
name: "
|
|
2846
|
-
type: "
|
|
3018
|
+
internalType: "bytes",
|
|
3019
|
+
name: "toNetwork",
|
|
3020
|
+
type: "bytes"
|
|
2847
3021
|
}
|
|
2848
3022
|
],
|
|
2849
|
-
name: "
|
|
3023
|
+
name: "getHandler",
|
|
2850
3024
|
outputs: [
|
|
2851
3025
|
{
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
3026
|
+
internalType: "address",
|
|
3027
|
+
name: "handler",
|
|
3028
|
+
type: "address"
|
|
3029
|
+
},
|
|
3030
|
+
{
|
|
3031
|
+
internalType: "string",
|
|
3032
|
+
name: "handlerType",
|
|
3033
|
+
type: "string"
|
|
3034
|
+
}
|
|
3035
|
+
],
|
|
3036
|
+
stateMutability: "view",
|
|
3037
|
+
type: "function"
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
inputs: [
|
|
3041
|
+
{
|
|
3042
|
+
internalType: "bytes32",
|
|
3043
|
+
name: "referenceId",
|
|
3044
|
+
type: "bytes32"
|
|
3045
|
+
}
|
|
3046
|
+
],
|
|
3047
|
+
name: "getHandlerOf",
|
|
3048
|
+
outputs: [
|
|
3049
|
+
{
|
|
3050
|
+
internalType: "address",
|
|
3051
|
+
name: "handler",
|
|
3052
|
+
type: "address"
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
internalType: "string",
|
|
3056
|
+
name: "handlerType",
|
|
3057
|
+
type: "string"
|
|
3058
|
+
}
|
|
3059
|
+
],
|
|
3060
|
+
stateMutability: "view",
|
|
3061
|
+
type: "function"
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
inputs: [
|
|
3065
|
+
{
|
|
3066
|
+
internalType: "bytes",
|
|
3067
|
+
name: "fromNetwork",
|
|
3068
|
+
type: "bytes"
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
internalType: "bytes",
|
|
3072
|
+
name: "toNetwork",
|
|
3073
|
+
type: "bytes"
|
|
3074
|
+
}
|
|
3075
|
+
],
|
|
3076
|
+
name: "getHistoryCount",
|
|
3077
|
+
outputs: [
|
|
3078
|
+
{
|
|
3079
|
+
internalType: "uint256",
|
|
3080
|
+
name: "",
|
|
3081
|
+
type: "uint256"
|
|
2867
3082
|
}
|
|
2868
3083
|
],
|
|
2869
3084
|
stateMutability: "view",
|
|
@@ -2873,116 +3088,65 @@ var _abi3 = [
|
|
|
2873
3088
|
inputs: [
|
|
2874
3089
|
{
|
|
2875
3090
|
internalType: "bytes32",
|
|
2876
|
-
name: "
|
|
3091
|
+
name: "referenceId",
|
|
2877
3092
|
type: "bytes32"
|
|
2878
3093
|
}
|
|
2879
3094
|
],
|
|
2880
|
-
name: "
|
|
3095
|
+
name: "getPMMSelection",
|
|
2881
3096
|
outputs: [
|
|
2882
3097
|
{
|
|
2883
3098
|
components: [
|
|
2884
|
-
{
|
|
2885
|
-
internalType: "uint256",
|
|
2886
|
-
name: "sessionId",
|
|
2887
|
-
type: "uint256"
|
|
2888
|
-
},
|
|
2889
3099
|
{
|
|
2890
3100
|
components: [
|
|
2891
3101
|
{
|
|
2892
3102
|
internalType: "uint256",
|
|
2893
|
-
name: "
|
|
3103
|
+
name: "minAmountOut",
|
|
2894
3104
|
type: "uint256"
|
|
2895
3105
|
},
|
|
2896
3106
|
{
|
|
2897
|
-
internalType: "
|
|
2898
|
-
name: "
|
|
2899
|
-
type: "
|
|
3107
|
+
internalType: "uint64",
|
|
3108
|
+
name: "tradeTimeout",
|
|
3109
|
+
type: "uint64"
|
|
2900
3110
|
},
|
|
2901
3111
|
{
|
|
2902
|
-
internalType: "bytes
|
|
2903
|
-
name: "
|
|
2904
|
-
type: "bytes
|
|
3112
|
+
internalType: "bytes",
|
|
3113
|
+
name: "rfqInfoSignature",
|
|
3114
|
+
type: "bytes"
|
|
2905
3115
|
}
|
|
2906
3116
|
],
|
|
2907
|
-
internalType: "struct ITypes.
|
|
2908
|
-
name: "
|
|
3117
|
+
internalType: "struct ITypes.RFQInfo",
|
|
3118
|
+
name: "rfqInfo",
|
|
2909
3119
|
type: "tuple"
|
|
2910
3120
|
},
|
|
2911
3121
|
{
|
|
2912
3122
|
components: [
|
|
2913
3123
|
{
|
|
2914
|
-
internalType: "
|
|
2915
|
-
name: "
|
|
2916
|
-
type: "
|
|
3124
|
+
internalType: "uint256",
|
|
3125
|
+
name: "amountOut",
|
|
3126
|
+
type: "uint256"
|
|
2917
3127
|
},
|
|
2918
3128
|
{
|
|
2919
|
-
internalType: "
|
|
2920
|
-
name: "
|
|
2921
|
-
type: "
|
|
3129
|
+
internalType: "bytes32",
|
|
3130
|
+
name: "selectedPMMId",
|
|
3131
|
+
type: "bytes32"
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
internalType: "bytes[2]",
|
|
3135
|
+
name: "info",
|
|
3136
|
+
type: "bytes[2]"
|
|
2922
3137
|
},
|
|
2923
3138
|
{
|
|
2924
3139
|
internalType: "uint64",
|
|
2925
|
-
name: "
|
|
3140
|
+
name: "sigExpiry",
|
|
2926
3141
|
type: "uint64"
|
|
2927
3142
|
}
|
|
2928
3143
|
],
|
|
2929
|
-
internalType: "struct ITypes.
|
|
2930
|
-
name: "
|
|
3144
|
+
internalType: "struct ITypes.SelectedPMMInfo",
|
|
3145
|
+
name: "pmmInfo",
|
|
2931
3146
|
type: "tuple"
|
|
2932
3147
|
}
|
|
2933
3148
|
],
|
|
2934
|
-
internalType: "struct ITypes.
|
|
2935
|
-
name: "",
|
|
2936
|
-
type: "tuple"
|
|
2937
|
-
}
|
|
2938
|
-
],
|
|
2939
|
-
stateMutability: "view",
|
|
2940
|
-
type: "function"
|
|
2941
|
-
},
|
|
2942
|
-
{
|
|
2943
|
-
inputs: [
|
|
2944
|
-
{
|
|
2945
|
-
internalType: "bytes32",
|
|
2946
|
-
name: "tradeId",
|
|
2947
|
-
type: "bytes32"
|
|
2948
|
-
}
|
|
2949
|
-
],
|
|
2950
|
-
name: "getTradeFinalization",
|
|
2951
|
-
outputs: [
|
|
2952
|
-
{
|
|
2953
|
-
components: [
|
|
2954
|
-
{
|
|
2955
|
-
internalType: "bytes32",
|
|
2956
|
-
name: "bundlerHash",
|
|
2957
|
-
type: "bytes32"
|
|
2958
|
-
},
|
|
2959
|
-
{
|
|
2960
|
-
internalType: "uint256",
|
|
2961
|
-
name: "index",
|
|
2962
|
-
type: "uint256"
|
|
2963
|
-
},
|
|
2964
|
-
{
|
|
2965
|
-
internalType: "bytes",
|
|
2966
|
-
name: "paymentTxId",
|
|
2967
|
-
type: "bytes"
|
|
2968
|
-
},
|
|
2969
|
-
{
|
|
2970
|
-
internalType: "bytes",
|
|
2971
|
-
name: "releaseTxId",
|
|
2972
|
-
type: "bytes"
|
|
2973
|
-
},
|
|
2974
|
-
{
|
|
2975
|
-
internalType: "bytes",
|
|
2976
|
-
name: "refundTxId",
|
|
2977
|
-
type: "bytes"
|
|
2978
|
-
},
|
|
2979
|
-
{
|
|
2980
|
-
internalType: "bool",
|
|
2981
|
-
name: "isConfirmed",
|
|
2982
|
-
type: "bool"
|
|
2983
|
-
}
|
|
2984
|
-
],
|
|
2985
|
-
internalType: "struct ITypes.TradeFinalization",
|
|
3149
|
+
internalType: "struct ITypes.PMMSelection",
|
|
2986
3150
|
name: "",
|
|
2987
3151
|
type: "tuple"
|
|
2988
3152
|
}
|
|
@@ -2994,16 +3158,31 @@ var _abi3 = [
|
|
|
2994
3158
|
inputs: [
|
|
2995
3159
|
{
|
|
2996
3160
|
internalType: "address",
|
|
2997
|
-
name: "
|
|
3161
|
+
name: "handler",
|
|
2998
3162
|
type: "address"
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
internalType: "uint256",
|
|
3166
|
+
name: "epochNo",
|
|
3167
|
+
type: "uint256"
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
internalType: "uint256",
|
|
3171
|
+
name: "fromIdx",
|
|
3172
|
+
type: "uint256"
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
internalType: "uint256",
|
|
3176
|
+
name: "toIdx",
|
|
3177
|
+
type: "uint256"
|
|
2999
3178
|
}
|
|
3000
3179
|
],
|
|
3001
|
-
name: "
|
|
3180
|
+
name: "getPendingTrades",
|
|
3002
3181
|
outputs: [
|
|
3003
3182
|
{
|
|
3004
|
-
internalType: "
|
|
3183
|
+
internalType: "bytes32[]",
|
|
3005
3184
|
name: "",
|
|
3006
|
-
type: "
|
|
3185
|
+
type: "bytes32[]"
|
|
3007
3186
|
}
|
|
3008
3187
|
],
|
|
3009
3188
|
stateMutability: "view",
|
|
@@ -3013,16 +3192,21 @@ var _abi3 = [
|
|
|
3013
3192
|
inputs: [
|
|
3014
3193
|
{
|
|
3015
3194
|
internalType: "address",
|
|
3016
|
-
name: "
|
|
3195
|
+
name: "handler",
|
|
3017
3196
|
type: "address"
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
internalType: "uint256",
|
|
3200
|
+
name: "epochNo",
|
|
3201
|
+
type: "uint256"
|
|
3018
3202
|
}
|
|
3019
3203
|
],
|
|
3020
|
-
name: "
|
|
3204
|
+
name: "getPendingTradesCount",
|
|
3021
3205
|
outputs: [
|
|
3022
3206
|
{
|
|
3023
|
-
internalType: "
|
|
3207
|
+
internalType: "uint256",
|
|
3024
3208
|
name: "",
|
|
3025
|
-
type: "
|
|
3209
|
+
type: "uint256"
|
|
3026
3210
|
}
|
|
3027
3211
|
],
|
|
3028
3212
|
stateMutability: "view",
|
|
@@ -3031,17 +3215,29 @@ var _abi3 = [
|
|
|
3031
3215
|
{
|
|
3032
3216
|
inputs: [
|
|
3033
3217
|
{
|
|
3034
|
-
internalType: "
|
|
3035
|
-
name: "
|
|
3036
|
-
type: "
|
|
3218
|
+
internalType: "bytes32",
|
|
3219
|
+
name: "referenceId",
|
|
3220
|
+
type: "bytes32"
|
|
3037
3221
|
}
|
|
3038
3222
|
],
|
|
3039
|
-
name: "
|
|
3223
|
+
name: "getRefundPresign",
|
|
3040
3224
|
outputs: [
|
|
3041
3225
|
{
|
|
3042
|
-
|
|
3226
|
+
components: [
|
|
3227
|
+
{
|
|
3228
|
+
internalType: "bytes",
|
|
3229
|
+
name: "refundAddress",
|
|
3230
|
+
type: "bytes"
|
|
3231
|
+
},
|
|
3232
|
+
{
|
|
3233
|
+
internalType: "bytes[]",
|
|
3234
|
+
name: "presigns",
|
|
3235
|
+
type: "bytes[]"
|
|
3236
|
+
}
|
|
3237
|
+
],
|
|
3238
|
+
internalType: "struct ITypes.RefundPresign",
|
|
3043
3239
|
name: "",
|
|
3044
|
-
type: "
|
|
3240
|
+
type: "tuple"
|
|
3045
3241
|
}
|
|
3046
3242
|
],
|
|
3047
3243
|
stateMutability: "view",
|
|
@@ -3049,18 +3245,33 @@ var _abi3 = [
|
|
|
3049
3245
|
},
|
|
3050
3246
|
{
|
|
3051
3247
|
inputs: [
|
|
3248
|
+
{
|
|
3249
|
+
internalType: "uint256",
|
|
3250
|
+
name: "fromIdx",
|
|
3251
|
+
type: "uint256"
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
internalType: "uint256",
|
|
3255
|
+
name: "toIdx",
|
|
3256
|
+
type: "uint256"
|
|
3257
|
+
},
|
|
3052
3258
|
{
|
|
3053
3259
|
internalType: "bytes",
|
|
3054
|
-
name: "
|
|
3260
|
+
name: "fromNetwork",
|
|
3261
|
+
type: "bytes"
|
|
3262
|
+
},
|
|
3263
|
+
{
|
|
3264
|
+
internalType: "bytes",
|
|
3265
|
+
name: "toNetwork",
|
|
3055
3266
|
type: "bytes"
|
|
3056
3267
|
}
|
|
3057
3268
|
],
|
|
3058
|
-
name: "
|
|
3269
|
+
name: "getRegisteredHandlers",
|
|
3059
3270
|
outputs: [
|
|
3060
3271
|
{
|
|
3061
|
-
internalType: "
|
|
3062
|
-
name: "",
|
|
3063
|
-
type: "
|
|
3272
|
+
internalType: "address[]",
|
|
3273
|
+
name: "list",
|
|
3274
|
+
type: "address[]"
|
|
3064
3275
|
}
|
|
3065
3276
|
],
|
|
3066
3277
|
stateMutability: "view",
|
|
@@ -3070,16 +3281,33 @@ var _abi3 = [
|
|
|
3070
3281
|
inputs: [
|
|
3071
3282
|
{
|
|
3072
3283
|
internalType: "bytes32",
|
|
3073
|
-
name: "
|
|
3284
|
+
name: "referenceId",
|
|
3074
3285
|
type: "bytes32"
|
|
3075
3286
|
}
|
|
3076
3287
|
],
|
|
3077
|
-
name: "
|
|
3288
|
+
name: "getSettlementPresigns",
|
|
3078
3289
|
outputs: [
|
|
3079
3290
|
{
|
|
3080
|
-
|
|
3291
|
+
components: [
|
|
3292
|
+
{
|
|
3293
|
+
internalType: "bytes32",
|
|
3294
|
+
name: "pmmId",
|
|
3295
|
+
type: "bytes32"
|
|
3296
|
+
},
|
|
3297
|
+
{
|
|
3298
|
+
internalType: "bytes",
|
|
3299
|
+
name: "pmmRecvAddress",
|
|
3300
|
+
type: "bytes"
|
|
3301
|
+
},
|
|
3302
|
+
{
|
|
3303
|
+
internalType: "bytes[]",
|
|
3304
|
+
name: "presigns",
|
|
3305
|
+
type: "bytes[]"
|
|
3306
|
+
}
|
|
3307
|
+
],
|
|
3308
|
+
internalType: "struct ITypes.SettlementPresign[]",
|
|
3081
3309
|
name: "",
|
|
3082
|
-
type: "
|
|
3310
|
+
type: "tuple[]"
|
|
3083
3311
|
}
|
|
3084
3312
|
],
|
|
3085
3313
|
stateMutability: "view",
|
|
@@ -3089,21 +3317,16 @@ var _abi3 = [
|
|
|
3089
3317
|
inputs: [
|
|
3090
3318
|
{
|
|
3091
3319
|
internalType: "bytes32",
|
|
3092
|
-
name: "
|
|
3320
|
+
name: "referenceId",
|
|
3093
3321
|
type: "bytes32"
|
|
3094
|
-
},
|
|
3095
|
-
{
|
|
3096
|
-
internalType: "address",
|
|
3097
|
-
name: "account",
|
|
3098
|
-
type: "address"
|
|
3099
3322
|
}
|
|
3100
3323
|
],
|
|
3101
|
-
name: "
|
|
3324
|
+
name: "getSolver",
|
|
3102
3325
|
outputs: [
|
|
3103
3326
|
{
|
|
3104
|
-
internalType: "
|
|
3327
|
+
internalType: "address",
|
|
3105
3328
|
name: "",
|
|
3106
|
-
type: "
|
|
3329
|
+
type: "address"
|
|
3107
3330
|
}
|
|
3108
3331
|
],
|
|
3109
3332
|
stateMutability: "view",
|
|
@@ -3112,22 +3335,68 @@ var _abi3 = [
|
|
|
3112
3335
|
{
|
|
3113
3336
|
inputs: [
|
|
3114
3337
|
{
|
|
3115
|
-
internalType: "
|
|
3116
|
-
name: "
|
|
3117
|
-
type: "
|
|
3118
|
-
},
|
|
3119
|
-
{
|
|
3120
|
-
internalType: "bytes",
|
|
3121
|
-
name: "pubkey",
|
|
3122
|
-
type: "bytes"
|
|
3338
|
+
internalType: "bytes32",
|
|
3339
|
+
name: "referenceId",
|
|
3340
|
+
type: "bytes32"
|
|
3123
3341
|
}
|
|
3124
3342
|
],
|
|
3125
|
-
name: "
|
|
3343
|
+
name: "getTradeData",
|
|
3126
3344
|
outputs: [
|
|
3127
3345
|
{
|
|
3128
|
-
|
|
3346
|
+
components: [
|
|
3347
|
+
{
|
|
3348
|
+
internalType: "uint256",
|
|
3349
|
+
name: "sessionId",
|
|
3350
|
+
type: "uint256"
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
components: [
|
|
3354
|
+
{
|
|
3355
|
+
internalType: "uint256",
|
|
3356
|
+
name: "amountIn",
|
|
3357
|
+
type: "uint256"
|
|
3358
|
+
},
|
|
3359
|
+
{
|
|
3360
|
+
internalType: "bytes[3]",
|
|
3361
|
+
name: "fromChain",
|
|
3362
|
+
type: "bytes[3]"
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
internalType: "bytes[3]",
|
|
3366
|
+
name: "toChain",
|
|
3367
|
+
type: "bytes[3]"
|
|
3368
|
+
}
|
|
3369
|
+
],
|
|
3370
|
+
internalType: "struct ITypes.TradeInfo",
|
|
3371
|
+
name: "tradeInfo",
|
|
3372
|
+
type: "tuple"
|
|
3373
|
+
},
|
|
3374
|
+
{
|
|
3375
|
+
components: [
|
|
3376
|
+
{
|
|
3377
|
+
internalType: "bytes[5]",
|
|
3378
|
+
name: "depositInfo",
|
|
3379
|
+
type: "bytes[5]"
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
internalType: "address",
|
|
3383
|
+
name: "userEphemeralL2Address",
|
|
3384
|
+
type: "address"
|
|
3385
|
+
},
|
|
3386
|
+
{
|
|
3387
|
+
internalType: "uint64",
|
|
3388
|
+
name: "scriptTimeout",
|
|
3389
|
+
type: "uint64"
|
|
3390
|
+
}
|
|
3391
|
+
],
|
|
3392
|
+
internalType: "struct ITypes.ScriptInfo",
|
|
3393
|
+
name: "scriptInfo",
|
|
3394
|
+
type: "tuple"
|
|
3395
|
+
}
|
|
3396
|
+
],
|
|
3397
|
+
internalType: "struct ITypes.TradeData",
|
|
3129
3398
|
name: "",
|
|
3130
|
-
type: "
|
|
3399
|
+
type: "tuple"
|
|
3131
3400
|
}
|
|
3132
3401
|
],
|
|
3133
3402
|
stateMutability: "view",
|
|
@@ -3136,22 +3405,49 @@ var _abi3 = [
|
|
|
3136
3405
|
{
|
|
3137
3406
|
inputs: [
|
|
3138
3407
|
{
|
|
3139
|
-
internalType: "
|
|
3140
|
-
name: "
|
|
3141
|
-
type: "
|
|
3142
|
-
},
|
|
3143
|
-
{
|
|
3144
|
-
internalType: "bytes",
|
|
3145
|
-
name: "tokenId",
|
|
3146
|
-
type: "bytes"
|
|
3408
|
+
internalType: "bytes32",
|
|
3409
|
+
name: "referenceId",
|
|
3410
|
+
type: "bytes32"
|
|
3147
3411
|
}
|
|
3148
3412
|
],
|
|
3149
|
-
name: "
|
|
3413
|
+
name: "getTradeFinalization",
|
|
3150
3414
|
outputs: [
|
|
3151
3415
|
{
|
|
3152
|
-
|
|
3416
|
+
components: [
|
|
3417
|
+
{
|
|
3418
|
+
internalType: "bytes32",
|
|
3419
|
+
name: "bundlerHash",
|
|
3420
|
+
type: "bytes32"
|
|
3421
|
+
},
|
|
3422
|
+
{
|
|
3423
|
+
internalType: "uint256",
|
|
3424
|
+
name: "index",
|
|
3425
|
+
type: "uint256"
|
|
3426
|
+
},
|
|
3427
|
+
{
|
|
3428
|
+
internalType: "bytes",
|
|
3429
|
+
name: "paymentTxId",
|
|
3430
|
+
type: "bytes"
|
|
3431
|
+
},
|
|
3432
|
+
{
|
|
3433
|
+
internalType: "bytes",
|
|
3434
|
+
name: "releaseTxId",
|
|
3435
|
+
type: "bytes"
|
|
3436
|
+
},
|
|
3437
|
+
{
|
|
3438
|
+
internalType: "bytes",
|
|
3439
|
+
name: "refundTxId",
|
|
3440
|
+
type: "bytes"
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
internalType: "bool",
|
|
3444
|
+
name: "isConfirmed",
|
|
3445
|
+
type: "bool"
|
|
3446
|
+
}
|
|
3447
|
+
],
|
|
3448
|
+
internalType: "struct ITypes.TradeFinalization",
|
|
3153
3449
|
name: "",
|
|
3154
|
-
type: "
|
|
3450
|
+
type: "tuple"
|
|
3155
3451
|
}
|
|
3156
3452
|
],
|
|
3157
3453
|
stateMutability: "view",
|
|
@@ -3173,40 +3469,26 @@ var _abi3 = [
|
|
|
3173
3469
|
{
|
|
3174
3470
|
inputs: [
|
|
3175
3471
|
{
|
|
3176
|
-
internalType: "bytes32",
|
|
3177
|
-
name: "
|
|
3178
|
-
type: "bytes32"
|
|
3179
|
-
}
|
|
3180
|
-
],
|
|
3181
|
-
name: "numOfPMMAccounts",
|
|
3182
|
-
outputs: [
|
|
3183
|
-
{
|
|
3184
|
-
internalType: "uint256",
|
|
3185
|
-
name: "",
|
|
3186
|
-
type: "uint256"
|
|
3187
|
-
}
|
|
3188
|
-
],
|
|
3189
|
-
stateMutability: "view",
|
|
3190
|
-
type: "function"
|
|
3191
|
-
},
|
|
3192
|
-
{
|
|
3193
|
-
inputs: [],
|
|
3194
|
-
name: "numOfSupportedTokens",
|
|
3195
|
-
outputs: [
|
|
3472
|
+
internalType: "bytes32[]",
|
|
3473
|
+
name: "referenceIds",
|
|
3474
|
+
type: "bytes32[]"
|
|
3475
|
+
},
|
|
3196
3476
|
{
|
|
3197
|
-
internalType: "
|
|
3198
|
-
name: "",
|
|
3199
|
-
type: "
|
|
3477
|
+
internalType: "address[]",
|
|
3478
|
+
name: "handlers",
|
|
3479
|
+
type: "address[]"
|
|
3200
3480
|
}
|
|
3201
3481
|
],
|
|
3202
|
-
|
|
3482
|
+
name: "migrate",
|
|
3483
|
+
outputs: [],
|
|
3484
|
+
stateMutability: "nonpayable",
|
|
3203
3485
|
type: "function"
|
|
3204
3486
|
},
|
|
3205
3487
|
{
|
|
3206
3488
|
inputs: [
|
|
3207
3489
|
{
|
|
3208
3490
|
internalType: "bytes32",
|
|
3209
|
-
name: "
|
|
3491
|
+
name: "referenceId",
|
|
3210
3492
|
type: "bytes32"
|
|
3211
3493
|
},
|
|
3212
3494
|
{
|
|
@@ -3229,7 +3511,7 @@ var _abi3 = [
|
|
|
3229
3511
|
inputs: [
|
|
3230
3512
|
{
|
|
3231
3513
|
internalType: "bytes32",
|
|
3232
|
-
name: "
|
|
3514
|
+
name: "referenceId",
|
|
3233
3515
|
type: "bytes32"
|
|
3234
3516
|
},
|
|
3235
3517
|
{
|
|
@@ -3237,6 +3519,11 @@ var _abi3 = [
|
|
|
3237
3519
|
name: "msgError",
|
|
3238
3520
|
type: "bytes"
|
|
3239
3521
|
},
|
|
3522
|
+
{
|
|
3523
|
+
internalType: "bytes",
|
|
3524
|
+
name: "referenceInfo",
|
|
3525
|
+
type: "bytes"
|
|
3526
|
+
},
|
|
3240
3527
|
{
|
|
3241
3528
|
internalType: "bytes",
|
|
3242
3529
|
name: "signature",
|
|
@@ -3339,12 +3626,12 @@ var _abi3 = [
|
|
|
3339
3626
|
},
|
|
3340
3627
|
{
|
|
3341
3628
|
internalType: "bytes",
|
|
3342
|
-
name: "
|
|
3629
|
+
name: "fromNetwork",
|
|
3343
3630
|
type: "bytes"
|
|
3344
3631
|
},
|
|
3345
3632
|
{
|
|
3346
3633
|
internalType: "bytes",
|
|
3347
|
-
name: "
|
|
3634
|
+
name: "toNetwork",
|
|
3348
3635
|
type: "bytes"
|
|
3349
3636
|
}
|
|
3350
3637
|
],
|
|
@@ -3353,6 +3640,92 @@ var _abi3 = [
|
|
|
3353
3640
|
stateMutability: "nonpayable",
|
|
3354
3641
|
type: "function"
|
|
3355
3642
|
},
|
|
3643
|
+
{
|
|
3644
|
+
inputs: [
|
|
3645
|
+
{
|
|
3646
|
+
internalType: "bytes32",
|
|
3647
|
+
name: "depositId",
|
|
3648
|
+
type: "bytes32"
|
|
3649
|
+
},
|
|
3650
|
+
{
|
|
3651
|
+
components: [
|
|
3652
|
+
{
|
|
3653
|
+
internalType: "uint256",
|
|
3654
|
+
name: "sessionId",
|
|
3655
|
+
type: "uint256"
|
|
3656
|
+
},
|
|
3657
|
+
{
|
|
3658
|
+
components: [
|
|
3659
|
+
{
|
|
3660
|
+
internalType: "uint256",
|
|
3661
|
+
name: "amountIn",
|
|
3662
|
+
type: "uint256"
|
|
3663
|
+
},
|
|
3664
|
+
{
|
|
3665
|
+
internalType: "bytes[3]",
|
|
3666
|
+
name: "fromChain",
|
|
3667
|
+
type: "bytes[3]"
|
|
3668
|
+
},
|
|
3669
|
+
{
|
|
3670
|
+
internalType: "bytes[3]",
|
|
3671
|
+
name: "toChain",
|
|
3672
|
+
type: "bytes[3]"
|
|
3673
|
+
}
|
|
3674
|
+
],
|
|
3675
|
+
internalType: "struct ITypes.TradeInfo",
|
|
3676
|
+
name: "tradeInfo",
|
|
3677
|
+
type: "tuple"
|
|
3678
|
+
},
|
|
3679
|
+
{
|
|
3680
|
+
components: [
|
|
3681
|
+
{
|
|
3682
|
+
internalType: "bytes[5]",
|
|
3683
|
+
name: "depositInfo",
|
|
3684
|
+
type: "bytes[5]"
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
internalType: "address",
|
|
3688
|
+
name: "userEphemeralL2Address",
|
|
3689
|
+
type: "address"
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
internalType: "uint64",
|
|
3693
|
+
name: "scriptTimeout",
|
|
3694
|
+
type: "uint64"
|
|
3695
|
+
}
|
|
3696
|
+
],
|
|
3697
|
+
internalType: "struct ITypes.ScriptInfo",
|
|
3698
|
+
name: "scriptInfo",
|
|
3699
|
+
type: "tuple"
|
|
3700
|
+
}
|
|
3701
|
+
],
|
|
3702
|
+
internalType: "struct ITypes.TradeData",
|
|
3703
|
+
name: "tradeData",
|
|
3704
|
+
type: "tuple"
|
|
3705
|
+
},
|
|
3706
|
+
{
|
|
3707
|
+
components: [
|
|
3708
|
+
{
|
|
3709
|
+
internalType: "bytes",
|
|
3710
|
+
name: "refundAddress",
|
|
3711
|
+
type: "bytes"
|
|
3712
|
+
},
|
|
3713
|
+
{
|
|
3714
|
+
internalType: "bytes[]",
|
|
3715
|
+
name: "presigns",
|
|
3716
|
+
type: "bytes[]"
|
|
3717
|
+
}
|
|
3718
|
+
],
|
|
3719
|
+
internalType: "struct ITypes.RefundPresign",
|
|
3720
|
+
name: "refundPresign",
|
|
3721
|
+
type: "tuple"
|
|
3722
|
+
}
|
|
3723
|
+
],
|
|
3724
|
+
name: "submitDeposit",
|
|
3725
|
+
outputs: [],
|
|
3726
|
+
stateMutability: "nonpayable",
|
|
3727
|
+
type: "function"
|
|
3728
|
+
},
|
|
3356
3729
|
{
|
|
3357
3730
|
inputs: [
|
|
3358
3731
|
{
|
|
@@ -3482,40 +3855,21 @@ var _abi3 = [
|
|
|
3482
3855
|
outputs: [],
|
|
3483
3856
|
stateMutability: "nonpayable",
|
|
3484
3857
|
type: "function"
|
|
3485
|
-
},
|
|
3486
|
-
{
|
|
3487
|
-
inputs: [
|
|
3488
|
-
{
|
|
3489
|
-
internalType: "address",
|
|
3490
|
-
name: "",
|
|
3491
|
-
type: "address"
|
|
3492
|
-
}
|
|
3493
|
-
],
|
|
3494
|
-
name: "version",
|
|
3495
|
-
outputs: [
|
|
3496
|
-
{
|
|
3497
|
-
internalType: "uint256",
|
|
3498
|
-
name: "",
|
|
3499
|
-
type: "uint256"
|
|
3500
|
-
}
|
|
3501
|
-
],
|
|
3502
|
-
stateMutability: "view",
|
|
3503
|
-
type: "function"
|
|
3504
3858
|
}
|
|
3505
3859
|
];
|
|
3506
3860
|
var Router__factory = class {
|
|
3507
3861
|
static createInterface() {
|
|
3508
|
-
return new
|
|
3862
|
+
return new import_ethers4.Interface(_abi4);
|
|
3509
3863
|
}
|
|
3510
3864
|
static connect(address, runner) {
|
|
3511
|
-
return new
|
|
3865
|
+
return new import_ethers4.Contract(address, _abi4, runner);
|
|
3512
3866
|
}
|
|
3513
3867
|
};
|
|
3514
|
-
Router__factory.abi =
|
|
3868
|
+
Router__factory.abi = _abi4;
|
|
3515
3869
|
|
|
3516
|
-
// src/contracts/
|
|
3517
|
-
var
|
|
3518
|
-
var
|
|
3870
|
+
// src/contracts/contracts/factories/Signer__factory.ts
|
|
3871
|
+
var import_ethers5 = require("ethers");
|
|
3872
|
+
var _abi5 = [
|
|
3519
3873
|
{
|
|
3520
3874
|
inputs: [],
|
|
3521
3875
|
stateMutability: "nonpayable",
|
|
@@ -3843,19 +4197,19 @@ var _abi4 = [
|
|
|
3843
4197
|
];
|
|
3844
4198
|
var Signer__factory = class {
|
|
3845
4199
|
static createInterface() {
|
|
3846
|
-
return new
|
|
4200
|
+
return new import_ethers5.Interface(_abi5);
|
|
3847
4201
|
}
|
|
3848
4202
|
static connect(address, runner) {
|
|
3849
|
-
return new
|
|
4203
|
+
return new import_ethers5.Contract(address, _abi5, runner);
|
|
3850
4204
|
}
|
|
3851
4205
|
};
|
|
3852
|
-
Signer__factory.abi =
|
|
4206
|
+
Signer__factory.abi = _abi5;
|
|
3853
4207
|
|
|
3854
4208
|
// src/services/router.service.ts
|
|
3855
|
-
var
|
|
4209
|
+
var import_ethers6 = require("ethers");
|
|
3856
4210
|
var RouterService = class {
|
|
3857
4211
|
constructor() {
|
|
3858
|
-
this.provider = new
|
|
4212
|
+
this.provider = new import_ethers6.JsonRpcProvider(config.getRpcUrl());
|
|
3859
4213
|
this.contract = Router__factory.connect(config.getRouterAddress(), this.provider);
|
|
3860
4214
|
config.registerObserver(this);
|
|
3861
4215
|
}
|
|
@@ -3864,90 +4218,39 @@ var RouterService = class {
|
|
|
3864
4218
|
* Updates service when config changes
|
|
3865
4219
|
*/
|
|
3866
4220
|
onConfigUpdate(newConfig) {
|
|
3867
|
-
this.provider = new
|
|
4221
|
+
this.provider = new import_ethers6.JsonRpcProvider(newConfig.rpcUrl);
|
|
3868
4222
|
this.contract = Router__factory.connect(newConfig.routerAddress, this.provider);
|
|
3869
4223
|
}
|
|
3870
4224
|
async getSigner() {
|
|
3871
4225
|
return await this.contract.SIGNER();
|
|
3872
4226
|
}
|
|
3873
|
-
async getCurrentPubkey(network) {
|
|
3874
|
-
return this.contract.getLatestMPCInfo(import_ethers5.ethers.toUtf8Bytes(network));
|
|
3875
|
-
}
|
|
3876
|
-
async getCurrentStage(tradeId) {
|
|
3877
|
-
return await this.contract.getCurrentStage(tradeId);
|
|
3878
|
-
}
|
|
3879
|
-
async getDepositAddressList(tradeId) {
|
|
3880
|
-
return await this.contract.getDepositAddressList(tradeId);
|
|
3881
|
-
}
|
|
3882
4227
|
async getHandler(fromChain, toChain) {
|
|
3883
4228
|
return await this.contract.getHandler(fromChain, toChain);
|
|
3884
4229
|
}
|
|
3885
|
-
async getPFeeRate() {
|
|
3886
|
-
return await this.contract.getPFeeRate();
|
|
3887
|
-
}
|
|
3888
4230
|
async getPMMSelection(tradeId) {
|
|
3889
4231
|
return await this.contract.getPMMSelection(tradeId);
|
|
3890
4232
|
}
|
|
3891
4233
|
async getSettlementPresigns(tradeId) {
|
|
3892
4234
|
return await this.contract.getSettlementPresigns(tradeId);
|
|
3893
4235
|
}
|
|
3894
|
-
async getRefundPresigns(tradeId) {
|
|
3895
|
-
return await this.contract.getRefundPresigns(tradeId);
|
|
3896
|
-
}
|
|
3897
|
-
async getProtocolState() {
|
|
3898
|
-
return await this.contract.getProtocolState();
|
|
3899
|
-
}
|
|
3900
4236
|
async getFeeDetails(tradeId) {
|
|
3901
4237
|
return await this.contract.getFeeDetails(tradeId);
|
|
3902
4238
|
}
|
|
3903
|
-
async getTradeFinalization(tradeId) {
|
|
3904
|
-
return await this.contract.getTradeFinalization(tradeId);
|
|
3905
|
-
}
|
|
3906
|
-
async getTokens(fromIdx, toIdx) {
|
|
3907
|
-
return await this.contract.getTokens(fromIdx, toIdx);
|
|
3908
|
-
}
|
|
3909
4239
|
async getTradeData(tradeId) {
|
|
3910
4240
|
return await this.contract.getTradeData(tradeId);
|
|
3911
4241
|
}
|
|
3912
|
-
async isMPCNode(account) {
|
|
3913
|
-
return await this.contract.isMPCNode(account);
|
|
3914
|
-
}
|
|
3915
|
-
async isSolver(account) {
|
|
3916
|
-
return await this.contract.isSolver(account);
|
|
3917
|
-
}
|
|
3918
|
-
async isSuspended(stage) {
|
|
3919
|
-
return await this.contract.isSuspended(stage);
|
|
3920
|
-
}
|
|
3921
|
-
async isValidNetwork(networkId) {
|
|
3922
|
-
return await this.contract.isValidNetwork(networkId);
|
|
3923
|
-
}
|
|
3924
|
-
async isValidPMM(pmmId) {
|
|
3925
|
-
return await this.contract.isValidPMM(pmmId);
|
|
3926
|
-
}
|
|
3927
|
-
async isValidPMMAccount(pmmId, account) {
|
|
3928
|
-
return await this.contract.isValidPMMAccount(pmmId, account);
|
|
3929
|
-
}
|
|
3930
|
-
async isValidToken(networkId, tokenId) {
|
|
3931
|
-
return await this.contract.isValidToken(networkId, tokenId);
|
|
3932
|
-
}
|
|
3933
4242
|
async getManagement() {
|
|
3934
4243
|
return await this.contract.management();
|
|
3935
4244
|
}
|
|
3936
|
-
async getNumOfSupportedTokens() {
|
|
3937
|
-
return await this.contract.numOfSupportedTokens();
|
|
3938
|
-
}
|
|
3939
|
-
async getVersion(address) {
|
|
3940
|
-
return await this.contract.version(address);
|
|
3941
|
-
}
|
|
3942
4245
|
};
|
|
3943
4246
|
var routerService = new RouterService();
|
|
3944
4247
|
|
|
3945
4248
|
// src/services/signer.service.ts
|
|
3946
|
-
var
|
|
4249
|
+
var import_ethers7 = require("ethers");
|
|
3947
4250
|
var SignerService = class {
|
|
3948
4251
|
constructor() {
|
|
3949
4252
|
this.routerService = routerService;
|
|
3950
|
-
this.provider = new
|
|
4253
|
+
this.provider = new import_ethers7.JsonRpcProvider(config.getRpcUrl());
|
|
3951
4254
|
config.registerObserver(this);
|
|
3952
4255
|
}
|
|
3953
4256
|
/**
|
|
@@ -3955,7 +4258,7 @@ var SignerService = class {
|
|
|
3955
4258
|
* Updates service when config changes
|
|
3956
4259
|
*/
|
|
3957
4260
|
onConfigUpdate(newConfig) {
|
|
3958
|
-
this.provider = new
|
|
4261
|
+
this.provider = new import_ethers7.JsonRpcProvider(newConfig.rpcUrl);
|
|
3959
4262
|
}
|
|
3960
4263
|
async getDomain() {
|
|
3961
4264
|
const signerAddress = await this.routerService.getSigner();
|
|
@@ -4299,20 +4602,20 @@ async function defaultDomain(signerHelper, provider) {
|
|
|
4299
4602
|
}
|
|
4300
4603
|
|
|
4301
4604
|
// src/signatures/getInfoHash.ts
|
|
4302
|
-
var
|
|
4303
|
-
var abiCoder =
|
|
4605
|
+
var import_ethers8 = require("ethers");
|
|
4606
|
+
var abiCoder = import_ethers8.AbiCoder.defaultAbiCoder();
|
|
4304
4607
|
function getTradeIdsHash(tradeIds) {
|
|
4305
|
-
return (0,
|
|
4608
|
+
return (0, import_ethers8.keccak256)(abiCoder.encode(["bytes32[]"], [tradeIds]));
|
|
4306
4609
|
}
|
|
4307
4610
|
function getMakePaymentHash(tradeIds, signedAt, startIdx, paymentTxId) {
|
|
4308
|
-
const bundlerHash = (0,
|
|
4309
|
-
const infoHash = (0,
|
|
4611
|
+
const bundlerHash = (0, import_ethers8.keccak256)(abiCoder.encode(["bytes32[]"], [tradeIds]));
|
|
4612
|
+
const infoHash = (0, import_ethers8.keccak256)(
|
|
4310
4613
|
abiCoder.encode(["uint64", "uint256", "bytes32", "bytes"], [signedAt, startIdx, bundlerHash, paymentTxId])
|
|
4311
4614
|
);
|
|
4312
4615
|
return infoHash;
|
|
4313
4616
|
}
|
|
4314
4617
|
function getCommitInfoHash(pmmId, pmmRecvAddr, toChain, toToken, amountOut, expiry) {
|
|
4315
|
-
const infoHash = (0,
|
|
4618
|
+
const infoHash = (0, import_ethers8.keccak256)(
|
|
4316
4619
|
abiCoder.encode(
|
|
4317
4620
|
["bytes32", "bytes", "bytes", "bytes", "uint256", "uint64"],
|
|
4318
4621
|
[pmmId, pmmRecvAddr, toChain, toToken, amountOut, expiry]
|
|
@@ -4322,7 +4625,7 @@ function getCommitInfoHash(pmmId, pmmRecvAddr, toChain, toToken, amountOut, expi
|
|
|
4322
4625
|
}
|
|
4323
4626
|
|
|
4324
4627
|
// src/signatures/getSignature.ts
|
|
4325
|
-
var
|
|
4628
|
+
var import_ethers9 = require("ethers");
|
|
4326
4629
|
|
|
4327
4630
|
// src/signatures/types.ts
|
|
4328
4631
|
var presignType = {
|
|
@@ -4389,7 +4692,7 @@ function getSignatureType(type) {
|
|
|
4389
4692
|
async function getSigner(provider, signerHelper, tradeId, infoHash, type, signature) {
|
|
4390
4693
|
const values = { tradeId, infoHash };
|
|
4391
4694
|
const contractDomain = await defaultDomain(signerHelper, provider);
|
|
4392
|
-
return (0,
|
|
4695
|
+
return (0, import_ethers9.verifyTypedData)(contractDomain, getSignatureType(type), values, signature);
|
|
4393
4696
|
}
|
|
4394
4697
|
async function getSignature(Signer2, provider, signerHelper, tradeId, infoHash, type, domain) {
|
|
4395
4698
|
const contractDomain = await defaultDomain(signerHelper, provider);
|
|
@@ -4402,6 +4705,7 @@ async function getSignature(Signer2, provider, signerHelper, tradeId, infoHash,
|
|
|
4402
4705
|
0 && (module.exports = {
|
|
4403
4706
|
ERC20__factory,
|
|
4404
4707
|
Payment__factory,
|
|
4708
|
+
ProtocolFetcherProxy__factory,
|
|
4405
4709
|
RouterService,
|
|
4406
4710
|
Router__factory,
|
|
4407
4711
|
SDK,
|