@spicenet-io/spiceflow-core 0.3.10 → 0.3.12

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.cjs CHANGED
@@ -70,6 +70,8 @@ __export(index_exports, {
70
70
  requireTokenBySymbol: () => requireTokenBySymbol,
71
71
  requireViemChain: () => requireViemChain,
72
72
  resolveTokenRef: () => resolveTokenRef,
73
+ spicenetAbi: () => spicenetAbi,
74
+ spicenetWalletManagerAbi: () => spicenetWalletManagerAbi,
73
75
  submitTransaction: () => submitTransaction,
74
76
  truncateAddress: () => truncateAddress,
75
77
  uniV3QuoterV2Abi: () => uniV3QuoterV2Abi,
@@ -1410,6 +1412,1159 @@ var uniV3SwapRouterAbi = [
1410
1412
  }
1411
1413
  ];
1412
1414
 
1415
+ // src/abis/spicenet.ts
1416
+ var spicenetAbi = [
1417
+ {
1418
+ type: "function",
1419
+ name: "closeRebalancingRequest",
1420
+ inputs: [
1421
+ {
1422
+ name: "args",
1423
+ type: "tuple",
1424
+ internalType: "struct Spicenet.CloseRebalancingRequestArgs",
1425
+ components: [
1426
+ {
1427
+ name: "idempotenceKey",
1428
+ type: "bytes32",
1429
+ internalType: "bytes32"
1430
+ },
1431
+ {
1432
+ name: "repaymentChainTokenAmount",
1433
+ type: "uint256",
1434
+ internalType: "uint256"
1435
+ }
1436
+ ]
1437
+ }
1438
+ ],
1439
+ outputs: [],
1440
+ stateMutability: "nonpayable"
1441
+ },
1442
+ {
1443
+ type: "function",
1444
+ name: "createWithdrawalRequest",
1445
+ inputs: [
1446
+ {
1447
+ name: "request",
1448
+ type: "tuple",
1449
+ internalType: "struct Spicenet.CreateWithdrawalRequestArgs",
1450
+ components: [
1451
+ {
1452
+ name: "chainId",
1453
+ type: "string",
1454
+ internalType: "string"
1455
+ },
1456
+ {
1457
+ name: "idempotenceKey",
1458
+ type: "bytes32",
1459
+ internalType: "bytes32"
1460
+ },
1461
+ {
1462
+ name: "nbf",
1463
+ type: "uint256",
1464
+ internalType: "uint256"
1465
+ },
1466
+ {
1467
+ name: "exp",
1468
+ type: "uint256",
1469
+ internalType: "uint256"
1470
+ },
1471
+ {
1472
+ name: "metadata",
1473
+ type: "string",
1474
+ internalType: "string"
1475
+ },
1476
+ {
1477
+ name: "transfers",
1478
+ type: "tuple[]",
1479
+ internalType: "struct Spicenet.CreateTokenTransfer[]",
1480
+ components: [
1481
+ {
1482
+ name: "token",
1483
+ type: "string",
1484
+ internalType: "string"
1485
+ },
1486
+ {
1487
+ name: "to",
1488
+ type: "string",
1489
+ internalType: "string"
1490
+ },
1491
+ {
1492
+ name: "amount",
1493
+ type: "uint256",
1494
+ internalType: "uint256"
1495
+ }
1496
+ ]
1497
+ }
1498
+ ]
1499
+ }
1500
+ ],
1501
+ outputs: [],
1502
+ stateMutability: "nonpayable"
1503
+ },
1504
+ {
1505
+ type: "function",
1506
+ name: "createRebalancingRequest",
1507
+ inputs: [
1508
+ {
1509
+ name: "request",
1510
+ type: "tuple",
1511
+ internalType: "struct Spicenet.CreateRebalancingRequestArgs",
1512
+ components: [
1513
+ {
1514
+ name: "idempotenceKey",
1515
+ type: "bytes32",
1516
+ internalType: "bytes32"
1517
+ },
1518
+ {
1519
+ name: "nbf",
1520
+ type: "uint256",
1521
+ internalType: "uint256"
1522
+ },
1523
+ {
1524
+ name: "exp",
1525
+ type: "uint256",
1526
+ internalType: "uint256"
1527
+ },
1528
+ {
1529
+ name: "metadata",
1530
+ type: "string",
1531
+ internalType: "string"
1532
+ },
1533
+ {
1534
+ name: "recipient",
1535
+ type: "string",
1536
+ internalType: "string"
1537
+ },
1538
+ {
1539
+ name: "fromChainToken",
1540
+ type: "string",
1541
+ internalType: "string"
1542
+ },
1543
+ {
1544
+ name: "fromChainTokenAmount",
1545
+ type: "uint256",
1546
+ internalType: "uint256"
1547
+ },
1548
+ {
1549
+ name: "toChainToken",
1550
+ type: "string",
1551
+ internalType: "string"
1552
+ },
1553
+ {
1554
+ name: "toChainTokenAmountMin",
1555
+ type: "uint256",
1556
+ internalType: "uint256"
1557
+ }
1558
+ ]
1559
+ }
1560
+ ],
1561
+ outputs: [],
1562
+ stateMutability: "nonpayable"
1563
+ }
1564
+ ];
1565
+
1566
+ // src/abis/spicenetWalletManager.ts
1567
+ var spicenetWalletManagerAbi = [
1568
+ {
1569
+ type: "constructor",
1570
+ inputs: [],
1571
+ stateMutability: "nonpayable"
1572
+ },
1573
+ {
1574
+ type: "receive",
1575
+ stateMutability: "payable"
1576
+ },
1577
+ {
1578
+ type: "function",
1579
+ name: "DEFAULT_ADMIN_ROLE",
1580
+ inputs: [],
1581
+ outputs: [
1582
+ {
1583
+ name: "",
1584
+ type: "bytes32",
1585
+ internalType: "bytes32"
1586
+ }
1587
+ ],
1588
+ stateMutability: "view"
1589
+ },
1590
+ {
1591
+ type: "function",
1592
+ name: "PAUSER_ROLE",
1593
+ inputs: [],
1594
+ outputs: [
1595
+ {
1596
+ name: "",
1597
+ type: "bytes32",
1598
+ internalType: "bytes32"
1599
+ }
1600
+ ],
1601
+ stateMutability: "view"
1602
+ },
1603
+ {
1604
+ type: "function",
1605
+ name: "RELAYER_ROLE",
1606
+ inputs: [],
1607
+ outputs: [
1608
+ {
1609
+ name: "",
1610
+ type: "bytes32",
1611
+ internalType: "bytes32"
1612
+ }
1613
+ ],
1614
+ stateMutability: "view"
1615
+ },
1616
+ {
1617
+ type: "function",
1618
+ name: "UNPAUSER_ROLE",
1619
+ inputs: [],
1620
+ outputs: [
1621
+ {
1622
+ name: "",
1623
+ type: "bytes32",
1624
+ internalType: "bytes32"
1625
+ }
1626
+ ],
1627
+ stateMutability: "view"
1628
+ },
1629
+ {
1630
+ type: "function",
1631
+ name: "UPGRADER_ROLE",
1632
+ inputs: [],
1633
+ outputs: [
1634
+ {
1635
+ name: "",
1636
+ type: "bytes32",
1637
+ internalType: "bytes32"
1638
+ }
1639
+ ],
1640
+ stateMutability: "view"
1641
+ },
1642
+ {
1643
+ type: "function",
1644
+ name: "UPGRADE_INTERFACE_VERSION",
1645
+ inputs: [],
1646
+ outputs: [
1647
+ {
1648
+ name: "",
1649
+ type: "string",
1650
+ internalType: "string"
1651
+ }
1652
+ ],
1653
+ stateMutability: "view"
1654
+ },
1655
+ {
1656
+ type: "function",
1657
+ name: "adminProcessWithdrawalRequestEvents",
1658
+ inputs: [
1659
+ {
1660
+ name: "requests",
1661
+ type: "tuple[]",
1662
+ internalType: "struct ISpicenetEscrow.WithdrawalRequest[]",
1663
+ components: [
1664
+ {
1665
+ name: "idempotenceKey",
1666
+ type: "bytes32",
1667
+ internalType: "bytes32"
1668
+ },
1669
+ {
1670
+ name: "forUser",
1671
+ type: "string",
1672
+ internalType: "string"
1673
+ },
1674
+ {
1675
+ name: "nbf",
1676
+ type: "uint256",
1677
+ internalType: "uint256"
1678
+ },
1679
+ {
1680
+ name: "exp",
1681
+ type: "uint256",
1682
+ internalType: "uint256"
1683
+ },
1684
+ {
1685
+ name: "metadata",
1686
+ type: "string",
1687
+ internalType: "string"
1688
+ },
1689
+ {
1690
+ name: "transfers",
1691
+ type: "tuple[]",
1692
+ internalType: "struct ISpicenetEscrow.TokenTransfer[]",
1693
+ components: [
1694
+ {
1695
+ name: "token",
1696
+ type: "address",
1697
+ internalType: "address"
1698
+ },
1699
+ {
1700
+ name: "to",
1701
+ type: "address",
1702
+ internalType: "address"
1703
+ },
1704
+ {
1705
+ name: "amount",
1706
+ type: "uint256",
1707
+ internalType: "uint256"
1708
+ }
1709
+ ]
1710
+ }
1711
+ ]
1712
+ }
1713
+ ],
1714
+ outputs: [],
1715
+ stateMutability: "nonpayable"
1716
+ },
1717
+ {
1718
+ type: "function",
1719
+ name: "adminSetWithdrawalInfos",
1720
+ inputs: [
1721
+ {
1722
+ name: "idempotenceKeys",
1723
+ type: "bytes32[]",
1724
+ internalType: "bytes32[]"
1725
+ },
1726
+ {
1727
+ name: "withdrawalInfos",
1728
+ type: "tuple[]",
1729
+ internalType: "struct ISpicenetEscrow.WithdrawalInfo[]",
1730
+ components: [
1731
+ {
1732
+ name: "forUser",
1733
+ type: "string",
1734
+ internalType: "string"
1735
+ },
1736
+ {
1737
+ name: "blockNumber",
1738
+ type: "uint256",
1739
+ internalType: "uint256"
1740
+ },
1741
+ {
1742
+ name: "nbf",
1743
+ type: "uint256",
1744
+ internalType: "uint256"
1745
+ },
1746
+ {
1747
+ name: "exp",
1748
+ type: "uint256",
1749
+ internalType: "uint256"
1750
+ },
1751
+ {
1752
+ name: "metadata",
1753
+ type: "string",
1754
+ internalType: "string"
1755
+ }
1756
+ ]
1757
+ }
1758
+ ],
1759
+ outputs: [],
1760
+ stateMutability: "nonpayable"
1761
+ },
1762
+ {
1763
+ type: "function",
1764
+ name: "adminWithdraw",
1765
+ inputs: [
1766
+ {
1767
+ name: "transfers",
1768
+ type: "tuple[]",
1769
+ internalType: "struct ISpicenetEscrow.TokenTransfer[]",
1770
+ components: [
1771
+ {
1772
+ name: "token",
1773
+ type: "address",
1774
+ internalType: "address"
1775
+ },
1776
+ {
1777
+ name: "to",
1778
+ type: "address",
1779
+ internalType: "address"
1780
+ },
1781
+ {
1782
+ name: "amount",
1783
+ type: "uint256",
1784
+ internalType: "uint256"
1785
+ }
1786
+ ]
1787
+ }
1788
+ ],
1789
+ outputs: [],
1790
+ stateMutability: "nonpayable"
1791
+ },
1792
+ {
1793
+ type: "function",
1794
+ name: "getRoleAdmin",
1795
+ inputs: [
1796
+ {
1797
+ name: "role",
1798
+ type: "bytes32",
1799
+ internalType: "bytes32"
1800
+ }
1801
+ ],
1802
+ outputs: [
1803
+ {
1804
+ name: "",
1805
+ type: "bytes32",
1806
+ internalType: "bytes32"
1807
+ }
1808
+ ],
1809
+ stateMutability: "view"
1810
+ },
1811
+ {
1812
+ type: "function",
1813
+ name: "getRoleMember",
1814
+ inputs: [
1815
+ {
1816
+ name: "role",
1817
+ type: "bytes32",
1818
+ internalType: "bytes32"
1819
+ },
1820
+ {
1821
+ name: "index",
1822
+ type: "uint256",
1823
+ internalType: "uint256"
1824
+ }
1825
+ ],
1826
+ outputs: [
1827
+ {
1828
+ name: "",
1829
+ type: "address",
1830
+ internalType: "address"
1831
+ }
1832
+ ],
1833
+ stateMutability: "view"
1834
+ },
1835
+ {
1836
+ type: "function",
1837
+ name: "getRoleMemberCount",
1838
+ inputs: [
1839
+ {
1840
+ name: "role",
1841
+ type: "bytes32",
1842
+ internalType: "bytes32"
1843
+ }
1844
+ ],
1845
+ outputs: [
1846
+ {
1847
+ name: "",
1848
+ type: "uint256",
1849
+ internalType: "uint256"
1850
+ }
1851
+ ],
1852
+ stateMutability: "view"
1853
+ },
1854
+ {
1855
+ type: "function",
1856
+ name: "getRoleMembers",
1857
+ inputs: [
1858
+ {
1859
+ name: "role",
1860
+ type: "bytes32",
1861
+ internalType: "bytes32"
1862
+ }
1863
+ ],
1864
+ outputs: [
1865
+ {
1866
+ name: "",
1867
+ type: "address[]",
1868
+ internalType: "address[]"
1869
+ }
1870
+ ],
1871
+ stateMutability: "view"
1872
+ },
1873
+ {
1874
+ type: "function",
1875
+ name: "getWithdrawalInfo",
1876
+ inputs: [
1877
+ {
1878
+ name: "idempotenceKey",
1879
+ type: "bytes32",
1880
+ internalType: "bytes32"
1881
+ }
1882
+ ],
1883
+ outputs: [
1884
+ {
1885
+ name: "",
1886
+ type: "tuple",
1887
+ internalType: "struct ISpicenetEscrow.WithdrawalInfo",
1888
+ components: [
1889
+ {
1890
+ name: "forUser",
1891
+ type: "string",
1892
+ internalType: "string"
1893
+ },
1894
+ {
1895
+ name: "blockNumber",
1896
+ type: "uint256",
1897
+ internalType: "uint256"
1898
+ },
1899
+ {
1900
+ name: "nbf",
1901
+ type: "uint256",
1902
+ internalType: "uint256"
1903
+ },
1904
+ {
1905
+ name: "exp",
1906
+ type: "uint256",
1907
+ internalType: "uint256"
1908
+ },
1909
+ {
1910
+ name: "metadata",
1911
+ type: "string",
1912
+ internalType: "string"
1913
+ }
1914
+ ]
1915
+ }
1916
+ ],
1917
+ stateMutability: "view"
1918
+ },
1919
+ {
1920
+ type: "function",
1921
+ name: "grantRole",
1922
+ inputs: [
1923
+ {
1924
+ name: "role",
1925
+ type: "bytes32",
1926
+ internalType: "bytes32"
1927
+ },
1928
+ {
1929
+ name: "account",
1930
+ type: "address",
1931
+ internalType: "address"
1932
+ }
1933
+ ],
1934
+ outputs: [],
1935
+ stateMutability: "nonpayable"
1936
+ },
1937
+ {
1938
+ type: "function",
1939
+ name: "hasRole",
1940
+ inputs: [
1941
+ {
1942
+ name: "role",
1943
+ type: "bytes32",
1944
+ internalType: "bytes32"
1945
+ },
1946
+ {
1947
+ name: "account",
1948
+ type: "address",
1949
+ internalType: "address"
1950
+ }
1951
+ ],
1952
+ outputs: [
1953
+ {
1954
+ name: "",
1955
+ type: "bool",
1956
+ internalType: "bool"
1957
+ }
1958
+ ],
1959
+ stateMutability: "view"
1960
+ },
1961
+ {
1962
+ type: "function",
1963
+ name: "initialize",
1964
+ inputs: [
1965
+ {
1966
+ name: "defaultAdmin",
1967
+ type: "address",
1968
+ internalType: "address"
1969
+ }
1970
+ ],
1971
+ outputs: [],
1972
+ stateMutability: "nonpayable"
1973
+ },
1974
+ {
1975
+ type: "function",
1976
+ name: "pause",
1977
+ inputs: [],
1978
+ outputs: [],
1979
+ stateMutability: "nonpayable"
1980
+ },
1981
+ {
1982
+ type: "function",
1983
+ name: "paused",
1984
+ inputs: [],
1985
+ outputs: [
1986
+ {
1987
+ name: "",
1988
+ type: "bool",
1989
+ internalType: "bool"
1990
+ }
1991
+ ],
1992
+ stateMutability: "view"
1993
+ },
1994
+ {
1995
+ type: "function",
1996
+ name: "processWithdrawal",
1997
+ inputs: [
1998
+ {
1999
+ name: "request",
2000
+ type: "tuple",
2001
+ internalType: "struct ISpicenetEscrow.WithdrawalRequest",
2002
+ components: [
2003
+ {
2004
+ name: "idempotenceKey",
2005
+ type: "bytes32",
2006
+ internalType: "bytes32"
2007
+ },
2008
+ {
2009
+ name: "forUser",
2010
+ type: "string",
2011
+ internalType: "string"
2012
+ },
2013
+ {
2014
+ name: "nbf",
2015
+ type: "uint256",
2016
+ internalType: "uint256"
2017
+ },
2018
+ {
2019
+ name: "exp",
2020
+ type: "uint256",
2021
+ internalType: "uint256"
2022
+ },
2023
+ {
2024
+ name: "metadata",
2025
+ type: "string",
2026
+ internalType: "string"
2027
+ },
2028
+ {
2029
+ name: "transfers",
2030
+ type: "tuple[]",
2031
+ internalType: "struct ISpicenetEscrow.TokenTransfer[]",
2032
+ components: [
2033
+ {
2034
+ name: "token",
2035
+ type: "address",
2036
+ internalType: "address"
2037
+ },
2038
+ {
2039
+ name: "to",
2040
+ type: "address",
2041
+ internalType: "address"
2042
+ },
2043
+ {
2044
+ name: "amount",
2045
+ type: "uint256",
2046
+ internalType: "uint256"
2047
+ }
2048
+ ]
2049
+ }
2050
+ ]
2051
+ }
2052
+ ],
2053
+ outputs: [],
2054
+ stateMutability: "nonpayable"
2055
+ },
2056
+ {
2057
+ type: "function",
2058
+ name: "proxiableUUID",
2059
+ inputs: [],
2060
+ outputs: [
2061
+ {
2062
+ name: "",
2063
+ type: "bytes32",
2064
+ internalType: "bytes32"
2065
+ }
2066
+ ],
2067
+ stateMutability: "view"
2068
+ },
2069
+ {
2070
+ type: "function",
2071
+ name: "renounceRole",
2072
+ inputs: [
2073
+ {
2074
+ name: "role",
2075
+ type: "bytes32",
2076
+ internalType: "bytes32"
2077
+ },
2078
+ {
2079
+ name: "callerConfirmation",
2080
+ type: "address",
2081
+ internalType: "address"
2082
+ }
2083
+ ],
2084
+ outputs: [],
2085
+ stateMutability: "nonpayable"
2086
+ },
2087
+ {
2088
+ type: "function",
2089
+ name: "revokeRole",
2090
+ inputs: [
2091
+ {
2092
+ name: "role",
2093
+ type: "bytes32",
2094
+ internalType: "bytes32"
2095
+ },
2096
+ {
2097
+ name: "account",
2098
+ type: "address",
2099
+ internalType: "address"
2100
+ }
2101
+ ],
2102
+ outputs: [],
2103
+ stateMutability: "nonpayable"
2104
+ },
2105
+ {
2106
+ type: "function",
2107
+ name: "supportsInterface",
2108
+ inputs: [
2109
+ {
2110
+ name: "interfaceId",
2111
+ type: "bytes4",
2112
+ internalType: "bytes4"
2113
+ }
2114
+ ],
2115
+ outputs: [
2116
+ {
2117
+ name: "",
2118
+ type: "bool",
2119
+ internalType: "bool"
2120
+ }
2121
+ ],
2122
+ stateMutability: "view"
2123
+ },
2124
+ {
2125
+ type: "function",
2126
+ name: "unpause",
2127
+ inputs: [],
2128
+ outputs: [],
2129
+ stateMutability: "nonpayable"
2130
+ },
2131
+ {
2132
+ type: "function",
2133
+ name: "upgradeToAndCall",
2134
+ inputs: [
2135
+ {
2136
+ name: "newImplementation",
2137
+ type: "address",
2138
+ internalType: "address"
2139
+ },
2140
+ {
2141
+ name: "data",
2142
+ type: "bytes",
2143
+ internalType: "bytes"
2144
+ }
2145
+ ],
2146
+ outputs: [],
2147
+ stateMutability: "payable"
2148
+ },
2149
+ {
2150
+ type: "event",
2151
+ name: "Initialized",
2152
+ inputs: [
2153
+ {
2154
+ name: "version",
2155
+ type: "uint64",
2156
+ indexed: false,
2157
+ internalType: "uint64"
2158
+ }
2159
+ ],
2160
+ anonymous: false
2161
+ },
2162
+ {
2163
+ type: "event",
2164
+ name: "NativeTransfer",
2165
+ inputs: [
2166
+ {
2167
+ name: "from",
2168
+ type: "address",
2169
+ indexed: true,
2170
+ internalType: "address"
2171
+ },
2172
+ {
2173
+ name: "to",
2174
+ type: "address",
2175
+ indexed: true,
2176
+ internalType: "address"
2177
+ },
2178
+ {
2179
+ name: "value",
2180
+ type: "uint256",
2181
+ indexed: false,
2182
+ internalType: "uint256"
2183
+ }
2184
+ ],
2185
+ anonymous: false
2186
+ },
2187
+ {
2188
+ type: "event",
2189
+ name: "Paused",
2190
+ inputs: [
2191
+ {
2192
+ name: "account",
2193
+ type: "address",
2194
+ indexed: false,
2195
+ internalType: "address"
2196
+ }
2197
+ ],
2198
+ anonymous: false
2199
+ },
2200
+ {
2201
+ type: "event",
2202
+ name: "RoleAdminChanged",
2203
+ inputs: [
2204
+ {
2205
+ name: "role",
2206
+ type: "bytes32",
2207
+ indexed: true,
2208
+ internalType: "bytes32"
2209
+ },
2210
+ {
2211
+ name: "previousAdminRole",
2212
+ type: "bytes32",
2213
+ indexed: true,
2214
+ internalType: "bytes32"
2215
+ },
2216
+ {
2217
+ name: "newAdminRole",
2218
+ type: "bytes32",
2219
+ indexed: true,
2220
+ internalType: "bytes32"
2221
+ }
2222
+ ],
2223
+ anonymous: false
2224
+ },
2225
+ {
2226
+ type: "event",
2227
+ name: "RoleGranted",
2228
+ inputs: [
2229
+ {
2230
+ name: "role",
2231
+ type: "bytes32",
2232
+ indexed: true,
2233
+ internalType: "bytes32"
2234
+ },
2235
+ {
2236
+ name: "account",
2237
+ type: "address",
2238
+ indexed: true,
2239
+ internalType: "address"
2240
+ },
2241
+ {
2242
+ name: "sender",
2243
+ type: "address",
2244
+ indexed: true,
2245
+ internalType: "address"
2246
+ }
2247
+ ],
2248
+ anonymous: false
2249
+ },
2250
+ {
2251
+ type: "event",
2252
+ name: "RoleRevoked",
2253
+ inputs: [
2254
+ {
2255
+ name: "role",
2256
+ type: "bytes32",
2257
+ indexed: true,
2258
+ internalType: "bytes32"
2259
+ },
2260
+ {
2261
+ name: "account",
2262
+ type: "address",
2263
+ indexed: true,
2264
+ internalType: "address"
2265
+ },
2266
+ {
2267
+ name: "sender",
2268
+ type: "address",
2269
+ indexed: true,
2270
+ internalType: "address"
2271
+ }
2272
+ ],
2273
+ anonymous: false
2274
+ },
2275
+ {
2276
+ type: "event",
2277
+ name: "Unpaused",
2278
+ inputs: [
2279
+ {
2280
+ name: "account",
2281
+ type: "address",
2282
+ indexed: false,
2283
+ internalType: "address"
2284
+ }
2285
+ ],
2286
+ anonymous: false
2287
+ },
2288
+ {
2289
+ type: "event",
2290
+ name: "Upgraded",
2291
+ inputs: [
2292
+ {
2293
+ name: "implementation",
2294
+ type: "address",
2295
+ indexed: true,
2296
+ internalType: "address"
2297
+ }
2298
+ ],
2299
+ anonymous: false
2300
+ },
2301
+ {
2302
+ type: "event",
2303
+ name: "WithdrawalProcessed",
2304
+ inputs: [
2305
+ {
2306
+ name: "idempotenceKey",
2307
+ type: "bytes32",
2308
+ indexed: true,
2309
+ internalType: "bytes32"
2310
+ },
2311
+ {
2312
+ name: "forUser",
2313
+ type: "string",
2314
+ indexed: true,
2315
+ internalType: "string"
2316
+ },
2317
+ {
2318
+ name: "request",
2319
+ type: "tuple",
2320
+ indexed: false,
2321
+ internalType: "struct ISpicenetEscrow.WithdrawalRequest",
2322
+ components: [
2323
+ {
2324
+ name: "idempotenceKey",
2325
+ type: "bytes32",
2326
+ internalType: "bytes32"
2327
+ },
2328
+ {
2329
+ name: "forUser",
2330
+ type: "string",
2331
+ internalType: "string"
2332
+ },
2333
+ {
2334
+ name: "nbf",
2335
+ type: "uint256",
2336
+ internalType: "uint256"
2337
+ },
2338
+ {
2339
+ name: "exp",
2340
+ type: "uint256",
2341
+ internalType: "uint256"
2342
+ },
2343
+ {
2344
+ name: "metadata",
2345
+ type: "string",
2346
+ internalType: "string"
2347
+ },
2348
+ {
2349
+ name: "transfers",
2350
+ type: "tuple[]",
2351
+ internalType: "struct ISpicenetEscrow.TokenTransfer[]",
2352
+ components: [
2353
+ {
2354
+ name: "token",
2355
+ type: "address",
2356
+ internalType: "address"
2357
+ },
2358
+ {
2359
+ name: "to",
2360
+ type: "address",
2361
+ internalType: "address"
2362
+ },
2363
+ {
2364
+ name: "amount",
2365
+ type: "uint256",
2366
+ internalType: "uint256"
2367
+ }
2368
+ ]
2369
+ }
2370
+ ]
2371
+ }
2372
+ ],
2373
+ anonymous: false
2374
+ },
2375
+ {
2376
+ type: "error",
2377
+ name: "AccessControlBadConfirmation",
2378
+ inputs: []
2379
+ },
2380
+ {
2381
+ type: "error",
2382
+ name: "AccessControlUnauthorizedAccount",
2383
+ inputs: [
2384
+ {
2385
+ name: "account",
2386
+ type: "address",
2387
+ internalType: "address"
2388
+ },
2389
+ {
2390
+ name: "neededRole",
2391
+ type: "bytes32",
2392
+ internalType: "bytes32"
2393
+ }
2394
+ ]
2395
+ },
2396
+ {
2397
+ type: "error",
2398
+ name: "AddressEmptyCode",
2399
+ inputs: [
2400
+ {
2401
+ name: "target",
2402
+ type: "address",
2403
+ internalType: "address"
2404
+ }
2405
+ ]
2406
+ },
2407
+ {
2408
+ type: "error",
2409
+ name: "ERC1967InvalidImplementation",
2410
+ inputs: [
2411
+ {
2412
+ name: "implementation",
2413
+ type: "address",
2414
+ internalType: "address"
2415
+ }
2416
+ ]
2417
+ },
2418
+ {
2419
+ type: "error",
2420
+ name: "ERC1967NonPayable",
2421
+ inputs: []
2422
+ },
2423
+ {
2424
+ type: "error",
2425
+ name: "EnforcedPause",
2426
+ inputs: []
2427
+ },
2428
+ {
2429
+ type: "error",
2430
+ name: "ExpectedPause",
2431
+ inputs: []
2432
+ },
2433
+ {
2434
+ type: "error",
2435
+ name: "FailedCall",
2436
+ inputs: []
2437
+ },
2438
+ {
2439
+ type: "error",
2440
+ name: "InsufficientBalance",
2441
+ inputs: [
2442
+ {
2443
+ name: "balance",
2444
+ type: "uint256",
2445
+ internalType: "uint256"
2446
+ },
2447
+ {
2448
+ name: "needed",
2449
+ type: "uint256",
2450
+ internalType: "uint256"
2451
+ }
2452
+ ]
2453
+ },
2454
+ {
2455
+ type: "error",
2456
+ name: "InvalidInitialization",
2457
+ inputs: []
2458
+ },
2459
+ {
2460
+ type: "error",
2461
+ name: "NotInitializing",
2462
+ inputs: []
2463
+ },
2464
+ {
2465
+ type: "error",
2466
+ name: "SafeERC20FailedOperation",
2467
+ inputs: [
2468
+ {
2469
+ name: "token",
2470
+ type: "address",
2471
+ internalType: "address"
2472
+ }
2473
+ ]
2474
+ },
2475
+ {
2476
+ type: "error",
2477
+ name: "UUPSUnauthorizedCallContext",
2478
+ inputs: []
2479
+ },
2480
+ {
2481
+ type: "error",
2482
+ name: "UUPSUnsupportedProxiableUUID",
2483
+ inputs: [
2484
+ {
2485
+ name: "slot",
2486
+ type: "bytes32",
2487
+ internalType: "bytes32"
2488
+ }
2489
+ ]
2490
+ },
2491
+ {
2492
+ type: "error",
2493
+ name: "WithdrawalAlreadyProcessed",
2494
+ inputs: [
2495
+ {
2496
+ name: "idempotenceKey",
2497
+ type: "bytes32",
2498
+ internalType: "bytes32"
2499
+ },
2500
+ {
2501
+ name: "withdrawalInfo",
2502
+ type: "tuple",
2503
+ internalType: "struct ISpicenetEscrow.WithdrawalInfo",
2504
+ components: [
2505
+ {
2506
+ name: "forUser",
2507
+ type: "string",
2508
+ internalType: "string"
2509
+ },
2510
+ {
2511
+ name: "blockNumber",
2512
+ type: "uint256",
2513
+ internalType: "uint256"
2514
+ },
2515
+ {
2516
+ name: "nbf",
2517
+ type: "uint256",
2518
+ internalType: "uint256"
2519
+ },
2520
+ {
2521
+ name: "exp",
2522
+ type: "uint256",
2523
+ internalType: "uint256"
2524
+ },
2525
+ {
2526
+ name: "metadata",
2527
+ type: "string",
2528
+ internalType: "string"
2529
+ }
2530
+ ]
2531
+ }
2532
+ ]
2533
+ },
2534
+ {
2535
+ type: "error",
2536
+ name: "WithdrawalRequestExpired",
2537
+ inputs: [
2538
+ {
2539
+ name: "currentTime",
2540
+ type: "uint256",
2541
+ internalType: "uint256"
2542
+ },
2543
+ {
2544
+ name: "exp",
2545
+ type: "uint256",
2546
+ internalType: "uint256"
2547
+ }
2548
+ ]
2549
+ },
2550
+ {
2551
+ type: "error",
2552
+ name: "WithdrawalRequestTooEarly",
2553
+ inputs: [
2554
+ {
2555
+ name: "currentTime",
2556
+ type: "uint256",
2557
+ internalType: "uint256"
2558
+ },
2559
+ {
2560
+ name: "nbf",
2561
+ type: "uint256",
2562
+ internalType: "uint256"
2563
+ }
2564
+ ]
2565
+ }
2566
+ ];
2567
+
1413
2568
  // src/swap.ts
1414
2569
  var import_viem3 = require("viem");
1415
2570
  function applySlippage(amount, slippage = 0.03) {
@@ -1510,6 +2665,8 @@ function buildUniV3SwapCalls(params) {
1510
2665
  requireTokenBySymbol,
1511
2666
  requireViemChain,
1512
2667
  resolveTokenRef,
2668
+ spicenetAbi,
2669
+ spicenetWalletManagerAbi,
1513
2670
  submitTransaction,
1514
2671
  truncateAddress,
1515
2672
  uniV3QuoterV2Abi,