@optimex-xyz/market-maker-sdk 0.9.0-dev-df6089b → 0.9.0-dev-6069ee6
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 +276 -118
- package/dist/index.d.ts +276 -118
- package/dist/index.js +165 -72
- package/dist/index.mjs +164 -71
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ERC20__factory: () => ERC20__factory,
|
|
34
|
-
|
|
34
|
+
MorphoLiquidator__factory: () => MorphoLiquidator__factory,
|
|
35
35
|
Payment__factory: () => Payment__factory,
|
|
36
36
|
ProtocolFetcherProxy__factory: () => ProtocolFetcherProxy__factory,
|
|
37
37
|
ProtocolService: () => ProtocolService,
|
|
@@ -83,7 +83,7 @@ var environments = {
|
|
|
83
83
|
ethereum_sepolia: "0x1d8b58438D5Ccc8Fcb4b738C89078f7b4168C9c0"
|
|
84
84
|
},
|
|
85
85
|
liquidationAddressMap: {
|
|
86
|
-
ethereum_sepolia: "
|
|
86
|
+
ethereum_sepolia: "0xeEeD356dCa26e6F0957c55FCa46451814cCF134f"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
staging: {
|
|
@@ -198,7 +198,7 @@ var sdk = new SDK();
|
|
|
198
198
|
var factories_exports = {};
|
|
199
199
|
__export(factories_exports, {
|
|
200
200
|
ERC20__factory: () => ERC20__factory,
|
|
201
|
-
|
|
201
|
+
MorphoLiquidator__factory: () => MorphoLiquidator__factory,
|
|
202
202
|
Payment__factory: () => Payment__factory,
|
|
203
203
|
ProtocolFetcherProxy__factory: () => ProtocolFetcherProxy__factory,
|
|
204
204
|
Router__factory: () => Router__factory,
|
|
@@ -1605,24 +1605,14 @@ var ERC20__factory = class {
|
|
|
1605
1605
|
};
|
|
1606
1606
|
ERC20__factory.abi = _abi;
|
|
1607
1607
|
|
|
1608
|
-
// src/contracts/contracts/factories/
|
|
1608
|
+
// src/contracts/contracts/factories/MorphoLiquidator__factory.ts
|
|
1609
1609
|
var import_ethers2 = require("ethers");
|
|
1610
1610
|
var _abi2 = [
|
|
1611
1611
|
{
|
|
1612
1612
|
inputs: [
|
|
1613
1613
|
{
|
|
1614
1614
|
internalType: "address",
|
|
1615
|
-
name: "
|
|
1616
|
-
type: "address"
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
internalType: "address",
|
|
1620
|
-
name: "_morpho",
|
|
1621
|
-
type: "address"
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
internalType: "address",
|
|
1625
|
-
name: "_lendingManagement",
|
|
1615
|
+
name: "morphoManagement",
|
|
1626
1616
|
type: "address"
|
|
1627
1617
|
},
|
|
1628
1618
|
{
|
|
@@ -1687,6 +1677,17 @@ var _abi2 = [
|
|
|
1687
1677
|
name: "InvalidMorpho",
|
|
1688
1678
|
type: "error"
|
|
1689
1679
|
},
|
|
1680
|
+
{
|
|
1681
|
+
inputs: [
|
|
1682
|
+
{
|
|
1683
|
+
internalType: "bytes32",
|
|
1684
|
+
name: "positionId",
|
|
1685
|
+
type: "bytes32"
|
|
1686
|
+
}
|
|
1687
|
+
],
|
|
1688
|
+
name: "InvalidPositionId",
|
|
1689
|
+
type: "error"
|
|
1690
|
+
},
|
|
1690
1691
|
{
|
|
1691
1692
|
inputs: [],
|
|
1692
1693
|
name: "InvalidShortString",
|
|
@@ -1713,6 +1714,27 @@ var _abi2 = [
|
|
|
1713
1714
|
name: "ReentrancyGuardReentrantCall",
|
|
1714
1715
|
type: "error"
|
|
1715
1716
|
},
|
|
1717
|
+
{
|
|
1718
|
+
inputs: [
|
|
1719
|
+
{
|
|
1720
|
+
internalType: "address",
|
|
1721
|
+
name: "spender",
|
|
1722
|
+
type: "address"
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
internalType: "uint256",
|
|
1726
|
+
name: "currentAllowance",
|
|
1727
|
+
type: "uint256"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
internalType: "uint256",
|
|
1731
|
+
name: "requestedDecrease",
|
|
1732
|
+
type: "uint256"
|
|
1733
|
+
}
|
|
1734
|
+
],
|
|
1735
|
+
name: "SafeERC20FailedDecreaseAllowance",
|
|
1736
|
+
type: "error"
|
|
1737
|
+
},
|
|
1716
1738
|
{
|
|
1717
1739
|
inputs: [
|
|
1718
1740
|
{
|
|
@@ -1735,6 +1757,16 @@ var _abi2 = [
|
|
|
1735
1757
|
name: "StringTooLong",
|
|
1736
1758
|
type: "error"
|
|
1737
1759
|
},
|
|
1760
|
+
{
|
|
1761
|
+
inputs: [],
|
|
1762
|
+
name: "ZeroAddress",
|
|
1763
|
+
type: "error"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
inputs: [],
|
|
1767
|
+
name: "ZeroAmount",
|
|
1768
|
+
type: "error"
|
|
1769
|
+
},
|
|
1738
1770
|
{
|
|
1739
1771
|
anonymous: false,
|
|
1740
1772
|
inputs: [],
|
|
@@ -1757,27 +1789,27 @@ var _abi2 = [
|
|
|
1757
1789
|
type: "bytes32"
|
|
1758
1790
|
},
|
|
1759
1791
|
{
|
|
1760
|
-
indexed:
|
|
1792
|
+
indexed: false,
|
|
1761
1793
|
internalType: "bytes32",
|
|
1762
|
-
name: "
|
|
1794
|
+
name: "marketId",
|
|
1763
1795
|
type: "bytes32"
|
|
1764
1796
|
},
|
|
1765
1797
|
{
|
|
1766
1798
|
indexed: false,
|
|
1767
|
-
internalType: "
|
|
1768
|
-
name: "
|
|
1769
|
-
type: "
|
|
1799
|
+
internalType: "uint256",
|
|
1800
|
+
name: "totalCollateral",
|
|
1801
|
+
type: "uint256"
|
|
1770
1802
|
},
|
|
1771
1803
|
{
|
|
1772
1804
|
indexed: false,
|
|
1773
1805
|
internalType: "uint256",
|
|
1774
|
-
name: "
|
|
1806
|
+
name: "totalPayment",
|
|
1775
1807
|
type: "uint256"
|
|
1776
1808
|
},
|
|
1777
1809
|
{
|
|
1778
1810
|
indexed: false,
|
|
1779
1811
|
internalType: "uint256",
|
|
1780
|
-
name: "
|
|
1812
|
+
name: "repaidDebt",
|
|
1781
1813
|
type: "uint256"
|
|
1782
1814
|
}
|
|
1783
1815
|
],
|
|
@@ -1800,22 +1832,16 @@ var _abi2 = [
|
|
|
1800
1832
|
type: "bytes32"
|
|
1801
1833
|
},
|
|
1802
1834
|
{
|
|
1803
|
-
indexed:
|
|
1835
|
+
indexed: false,
|
|
1804
1836
|
internalType: "bytes32",
|
|
1805
|
-
name: "
|
|
1837
|
+
name: "marketId",
|
|
1806
1838
|
type: "bytes32"
|
|
1807
1839
|
},
|
|
1808
1840
|
{
|
|
1809
1841
|
indexed: false,
|
|
1810
|
-
internalType: "
|
|
1811
|
-
name: "
|
|
1812
|
-
type: "
|
|
1813
|
-
},
|
|
1814
|
-
{
|
|
1815
|
-
indexed: false,
|
|
1816
|
-
internalType: "bytes32",
|
|
1817
|
-
name: "marketId",
|
|
1818
|
-
type: "bytes32"
|
|
1842
|
+
internalType: "uint256",
|
|
1843
|
+
name: "totalCollateral",
|
|
1844
|
+
type: "uint256"
|
|
1819
1845
|
},
|
|
1820
1846
|
{
|
|
1821
1847
|
indexed: false,
|
|
@@ -1826,23 +1852,42 @@ var _abi2 = [
|
|
|
1826
1852
|
{
|
|
1827
1853
|
indexed: false,
|
|
1828
1854
|
internalType: "uint256",
|
|
1829
|
-
name: "
|
|
1855
|
+
name: "totalPayment",
|
|
1830
1856
|
type: "uint256"
|
|
1831
1857
|
},
|
|
1832
1858
|
{
|
|
1833
1859
|
indexed: false,
|
|
1834
1860
|
internalType: "uint256",
|
|
1835
|
-
name: "
|
|
1861
|
+
name: "repaidDebt",
|
|
1836
1862
|
type: "uint256"
|
|
1863
|
+
}
|
|
1864
|
+
],
|
|
1865
|
+
name: "Liquidate",
|
|
1866
|
+
type: "event"
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
anonymous: false,
|
|
1870
|
+
inputs: [
|
|
1871
|
+
{
|
|
1872
|
+
indexed: true,
|
|
1873
|
+
internalType: "address",
|
|
1874
|
+
name: "positionManager",
|
|
1875
|
+
type: "address"
|
|
1837
1876
|
},
|
|
1838
1877
|
{
|
|
1839
1878
|
indexed: false,
|
|
1840
1879
|
internalType: "uint256",
|
|
1841
|
-
name: "
|
|
1880
|
+
name: "repaidAssets",
|
|
1842
1881
|
type: "uint256"
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
indexed: false,
|
|
1885
|
+
internalType: "bytes",
|
|
1886
|
+
name: "data",
|
|
1887
|
+
type: "bytes"
|
|
1843
1888
|
}
|
|
1844
1889
|
],
|
|
1845
|
-
name: "
|
|
1890
|
+
name: "OnMorphoLiquidate",
|
|
1846
1891
|
type: "event"
|
|
1847
1892
|
},
|
|
1848
1893
|
{
|
|
@@ -1854,16 +1899,41 @@ var _abi2 = [
|
|
|
1854
1899
|
name: "positionManager",
|
|
1855
1900
|
type: "address"
|
|
1856
1901
|
},
|
|
1902
|
+
{
|
|
1903
|
+
indexed: false,
|
|
1904
|
+
internalType: "uint256",
|
|
1905
|
+
name: "repaidAssets",
|
|
1906
|
+
type: "uint256"
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
indexed: false,
|
|
1910
|
+
internalType: "bytes",
|
|
1911
|
+
name: "data",
|
|
1912
|
+
type: "bytes"
|
|
1913
|
+
}
|
|
1914
|
+
],
|
|
1915
|
+
name: "OnMorphoRepay",
|
|
1916
|
+
type: "event"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
anonymous: false,
|
|
1920
|
+
inputs: [
|
|
1857
1921
|
{
|
|
1858
1922
|
indexed: true,
|
|
1859
1923
|
internalType: "bytes32",
|
|
1860
|
-
name: "
|
|
1924
|
+
name: "tradeId",
|
|
1861
1925
|
type: "bytes32"
|
|
1862
1926
|
},
|
|
1927
|
+
{
|
|
1928
|
+
indexed: true,
|
|
1929
|
+
internalType: "address",
|
|
1930
|
+
name: "positionManager",
|
|
1931
|
+
type: "address"
|
|
1932
|
+
},
|
|
1863
1933
|
{
|
|
1864
1934
|
indexed: true,
|
|
1865
1935
|
internalType: "bytes32",
|
|
1866
|
-
name: "
|
|
1936
|
+
name: "positionId",
|
|
1867
1937
|
type: "bytes32"
|
|
1868
1938
|
},
|
|
1869
1939
|
{
|
|
@@ -1895,39 +1965,75 @@ var _abi2 = [
|
|
|
1895
1965
|
type: "event"
|
|
1896
1966
|
},
|
|
1897
1967
|
{
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
outputs: [
|
|
1968
|
+
anonymous: false,
|
|
1969
|
+
inputs: [
|
|
1901
1970
|
{
|
|
1902
|
-
|
|
1903
|
-
|
|
1971
|
+
indexed: true,
|
|
1972
|
+
internalType: "bytes32",
|
|
1973
|
+
name: "positionId",
|
|
1974
|
+
type: "bytes32"
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
indexed: true,
|
|
1978
|
+
internalType: "address",
|
|
1979
|
+
name: "token",
|
|
1904
1980
|
type: "address"
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
indexed: true,
|
|
1984
|
+
internalType: "address",
|
|
1985
|
+
name: "pFeeReceiver",
|
|
1986
|
+
type: "address"
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
indexed: false,
|
|
1990
|
+
internalType: "uint256",
|
|
1991
|
+
name: "amount",
|
|
1992
|
+
type: "uint256"
|
|
1905
1993
|
}
|
|
1906
1994
|
],
|
|
1907
|
-
|
|
1908
|
-
type: "
|
|
1995
|
+
name: "ProfitTaken",
|
|
1996
|
+
type: "event"
|
|
1909
1997
|
},
|
|
1910
1998
|
{
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
outputs: [
|
|
1999
|
+
anonymous: false,
|
|
2000
|
+
inputs: [
|
|
1914
2001
|
{
|
|
1915
|
-
|
|
1916
|
-
|
|
2002
|
+
indexed: true,
|
|
2003
|
+
internalType: "bytes32",
|
|
2004
|
+
name: "positionId",
|
|
2005
|
+
type: "bytes32"
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
indexed: true,
|
|
2009
|
+
internalType: "address",
|
|
2010
|
+
name: "token",
|
|
2011
|
+
type: "address"
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
indexed: true,
|
|
2015
|
+
internalType: "address",
|
|
2016
|
+
name: "recipient",
|
|
1917
2017
|
type: "address"
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
indexed: false,
|
|
2021
|
+
internalType: "uint256",
|
|
2022
|
+
name: "refundedAmount",
|
|
2023
|
+
type: "uint256"
|
|
1918
2024
|
}
|
|
1919
2025
|
],
|
|
1920
|
-
|
|
1921
|
-
type: "
|
|
2026
|
+
name: "Refunded",
|
|
2027
|
+
type: "event"
|
|
1922
2028
|
},
|
|
1923
2029
|
{
|
|
1924
2030
|
inputs: [],
|
|
1925
|
-
name: "
|
|
2031
|
+
name: "MORPHO_MANAGEMENT",
|
|
1926
2032
|
outputs: [
|
|
1927
2033
|
{
|
|
1928
|
-
internalType: "
|
|
2034
|
+
internalType: "contract IMorphoManagement",
|
|
1929
2035
|
name: "",
|
|
1930
|
-
type: "
|
|
2036
|
+
type: "address"
|
|
1931
2037
|
}
|
|
1932
2038
|
],
|
|
1933
2039
|
stateMutability: "view",
|
|
@@ -2030,19 +2136,6 @@ var _abi2 = [
|
|
|
2030
2136
|
stateMutability: "view",
|
|
2031
2137
|
type: "function"
|
|
2032
2138
|
},
|
|
2033
|
-
{
|
|
2034
|
-
inputs: [],
|
|
2035
|
-
name: "owBtc",
|
|
2036
|
-
outputs: [
|
|
2037
|
-
{
|
|
2038
|
-
internalType: "contract OW_BTC",
|
|
2039
|
-
name: "",
|
|
2040
|
-
type: "address"
|
|
2041
|
-
}
|
|
2042
|
-
],
|
|
2043
|
-
stateMutability: "view",
|
|
2044
|
-
type: "function"
|
|
2045
|
-
},
|
|
2046
2139
|
{
|
|
2047
2140
|
inputs: [
|
|
2048
2141
|
{
|
|
@@ -2082,7 +2175,7 @@ var _abi2 = [
|
|
|
2082
2175
|
type: "function"
|
|
2083
2176
|
}
|
|
2084
2177
|
];
|
|
2085
|
-
var
|
|
2178
|
+
var MorphoLiquidator__factory = class {
|
|
2086
2179
|
static createInterface() {
|
|
2087
2180
|
return new import_ethers2.Interface(_abi2);
|
|
2088
2181
|
}
|
|
@@ -2090,7 +2183,7 @@ var LendingLiquidation__factory = class {
|
|
|
2090
2183
|
return new import_ethers2.Contract(address, _abi2, runner);
|
|
2091
2184
|
}
|
|
2092
2185
|
};
|
|
2093
|
-
|
|
2186
|
+
MorphoLiquidator__factory.abi = _abi2;
|
|
2094
2187
|
|
|
2095
2188
|
// src/contracts/contracts/factories/Payment__factory.ts
|
|
2096
2189
|
var import_ethers3 = require("ethers");
|
|
@@ -5276,7 +5369,7 @@ async function getSignature(Signer2, provider, signerHelper, tradeId, infoHash,
|
|
|
5276
5369
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5277
5370
|
0 && (module.exports = {
|
|
5278
5371
|
ERC20__factory,
|
|
5279
|
-
|
|
5372
|
+
MorphoLiquidator__factory,
|
|
5280
5373
|
Payment__factory,
|
|
5281
5374
|
ProtocolFetcherProxy__factory,
|
|
5282
5375
|
ProtocolService,
|