@spicenet-io/spiceflow-core 0.3.13 → 0.3.15

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.js CHANGED
@@ -37,7 +37,7 @@ function getIntentHash(signatureType, nbf, exp, chainBatches) {
37
37
  );
38
38
  }
39
39
  async function getAccountNonce(address, publicClient) {
40
- return await publicClient.getTransactionCount({ address });
40
+ return await publicClient.getTransactionCount({ address, blockTag: "pending" });
41
41
  }
42
42
  async function getRecentBlock(publicClient) {
43
43
  return await publicClient.getBlockNumber();
@@ -673,7 +673,6 @@ var CHAINS = {
673
673
  network: "mainnet",
674
674
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
675
675
  delegateContract: "0x5884Bff4876C979271E65D2feA8D0CF3bF6E6CcC",
676
- escrowContract: "0xd3F8f177BB3d7dfD883d7c232f3093EdD61C3De9",
677
676
  blockExplorer: "https://basescan.org",
678
677
  rpcUrl: "https://mainnet.base.org",
679
678
  logo: logo_base,
@@ -686,7 +685,6 @@ var CHAINS = {
686
685
  network: "mainnet",
687
686
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
688
687
  delegateContract: "0x262E1A689555dA5209113A056d0d164EF8355395",
689
- escrowContract: "0x47d6DB10d99b1E0A074B1467407C7A53B68e1147",
690
688
  blockExplorer: "https://arbiscan.io",
691
689
  rpcUrl: "https://arb1.arbitrum.io/rpc",
692
690
  logo: logo_arb,
@@ -699,7 +697,6 @@ var CHAINS = {
699
697
  network: "mainnet",
700
698
  nativeCurrency: { name: "Citrea Bitcoin", symbol: "cBTC", decimals: 18 },
701
699
  delegateContract: "0x5884Bff4876C979271E65D2feA8D0CF3bF6E6CcC",
702
- escrowContract: "0x3677113f10d82acFEeDd22dF5c7cFD58736111ee",
703
700
  blockExplorer: "https://explorer.mainnet.citrea.xyz",
704
701
  rpcUrl: "https://rpc.mainnet.citrea.xyz",
705
702
  logo: logo_citrea,
@@ -747,7 +744,6 @@ var CHAINS = {
747
744
  network: "testnet",
748
745
  nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
749
746
  delegateContract: "0x347056dd1CB95ae850192e3fC6FA995537A3A091",
750
- escrowContract: "0xDf5616Fe65f103972c25EF596C6386904E5CbC8f",
751
747
  blockExplorer: "https://explorer.testnet.citrea.xyz",
752
748
  rpcUrl: "https://rpc.testnet.citrea.xyz",
753
749
  logo: logo_citrea,
@@ -880,9 +876,6 @@ function getAllChainsByNetwork(network) {
880
876
  function getDelegateContract(chainId) {
881
877
  return CHAINS[chainId]?.delegateContract;
882
878
  }
883
- function getEscrowContract(chainId) {
884
- return CHAINS[chainId]?.escrowContract;
885
- }
886
879
  function toViemChain(meta) {
887
880
  if (meta.chainType === "starknet") return void 0;
888
881
  return defineChain({
@@ -926,13 +919,7 @@ var STARKNET_MAINNET_CHAIN_ID = 23448594291968336;
926
919
  // src/utils.ts
927
920
  var NATIVE_TOKEN_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
928
921
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
929
- function getEscrowContractAddress(chainId) {
930
- const escrow = getEscrowContract(chainId);
931
- if (!escrow) {
932
- throw new Error(`Escrow contract not configured for chain ${chainId}`);
933
- }
934
- return escrow;
935
- }
922
+ var ESCROW_ADDRESS = "0xeee2b52e7CFe6e2168341a34cEB783b68FEdf1A2";
936
923
  function isNativeToken(address) {
937
924
  const lower = address.toLowerCase();
938
925
  return lower === "0x0" || lower === "0x0000000000000000000000000000000000000000" || lower === "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
@@ -1343,1159 +1330,6 @@ var uniV3SwapRouterAbi = [
1343
1330
  }
1344
1331
  ];
1345
1332
 
1346
- // src/abis/spicenet.ts
1347
- var spicenetAbi = [
1348
- {
1349
- type: "function",
1350
- name: "closeRebalancingRequest",
1351
- inputs: [
1352
- {
1353
- name: "args",
1354
- type: "tuple",
1355
- internalType: "struct Spicenet.CloseRebalancingRequestArgs",
1356
- components: [
1357
- {
1358
- name: "idempotenceKey",
1359
- type: "bytes32",
1360
- internalType: "bytes32"
1361
- },
1362
- {
1363
- name: "repaymentChainTokenAmount",
1364
- type: "uint256",
1365
- internalType: "uint256"
1366
- }
1367
- ]
1368
- }
1369
- ],
1370
- outputs: [],
1371
- stateMutability: "nonpayable"
1372
- },
1373
- {
1374
- type: "function",
1375
- name: "createWithdrawalRequest",
1376
- inputs: [
1377
- {
1378
- name: "request",
1379
- type: "tuple",
1380
- internalType: "struct Spicenet.CreateWithdrawalRequestArgs",
1381
- components: [
1382
- {
1383
- name: "chainId",
1384
- type: "string",
1385
- internalType: "string"
1386
- },
1387
- {
1388
- name: "idempotenceKey",
1389
- type: "bytes32",
1390
- internalType: "bytes32"
1391
- },
1392
- {
1393
- name: "nbf",
1394
- type: "uint256",
1395
- internalType: "uint256"
1396
- },
1397
- {
1398
- name: "exp",
1399
- type: "uint256",
1400
- internalType: "uint256"
1401
- },
1402
- {
1403
- name: "metadata",
1404
- type: "string",
1405
- internalType: "string"
1406
- },
1407
- {
1408
- name: "transfers",
1409
- type: "tuple[]",
1410
- internalType: "struct Spicenet.CreateTokenTransfer[]",
1411
- components: [
1412
- {
1413
- name: "token",
1414
- type: "string",
1415
- internalType: "string"
1416
- },
1417
- {
1418
- name: "to",
1419
- type: "string",
1420
- internalType: "string"
1421
- },
1422
- {
1423
- name: "amount",
1424
- type: "uint256",
1425
- internalType: "uint256"
1426
- }
1427
- ]
1428
- }
1429
- ]
1430
- }
1431
- ],
1432
- outputs: [],
1433
- stateMutability: "nonpayable"
1434
- },
1435
- {
1436
- type: "function",
1437
- name: "createRebalancingRequest",
1438
- inputs: [
1439
- {
1440
- name: "request",
1441
- type: "tuple",
1442
- internalType: "struct Spicenet.CreateRebalancingRequestArgs",
1443
- components: [
1444
- {
1445
- name: "idempotenceKey",
1446
- type: "bytes32",
1447
- internalType: "bytes32"
1448
- },
1449
- {
1450
- name: "nbf",
1451
- type: "uint256",
1452
- internalType: "uint256"
1453
- },
1454
- {
1455
- name: "exp",
1456
- type: "uint256",
1457
- internalType: "uint256"
1458
- },
1459
- {
1460
- name: "metadata",
1461
- type: "string",
1462
- internalType: "string"
1463
- },
1464
- {
1465
- name: "recipient",
1466
- type: "string",
1467
- internalType: "string"
1468
- },
1469
- {
1470
- name: "fromChainToken",
1471
- type: "string",
1472
- internalType: "string"
1473
- },
1474
- {
1475
- name: "fromChainTokenAmount",
1476
- type: "uint256",
1477
- internalType: "uint256"
1478
- },
1479
- {
1480
- name: "toChainToken",
1481
- type: "string",
1482
- internalType: "string"
1483
- },
1484
- {
1485
- name: "toChainTokenAmountMin",
1486
- type: "uint256",
1487
- internalType: "uint256"
1488
- }
1489
- ]
1490
- }
1491
- ],
1492
- outputs: [],
1493
- stateMutability: "nonpayable"
1494
- }
1495
- ];
1496
-
1497
- // src/abis/spicenetEscrow.ts
1498
- var spicenetEscrowAbi = [
1499
- {
1500
- type: "constructor",
1501
- inputs: [],
1502
- stateMutability: "nonpayable"
1503
- },
1504
- {
1505
- type: "receive",
1506
- stateMutability: "payable"
1507
- },
1508
- {
1509
- type: "function",
1510
- name: "DEFAULT_ADMIN_ROLE",
1511
- inputs: [],
1512
- outputs: [
1513
- {
1514
- name: "",
1515
- type: "bytes32",
1516
- internalType: "bytes32"
1517
- }
1518
- ],
1519
- stateMutability: "view"
1520
- },
1521
- {
1522
- type: "function",
1523
- name: "PAUSER_ROLE",
1524
- inputs: [],
1525
- outputs: [
1526
- {
1527
- name: "",
1528
- type: "bytes32",
1529
- internalType: "bytes32"
1530
- }
1531
- ],
1532
- stateMutability: "view"
1533
- },
1534
- {
1535
- type: "function",
1536
- name: "RELAYER_ROLE",
1537
- inputs: [],
1538
- outputs: [
1539
- {
1540
- name: "",
1541
- type: "bytes32",
1542
- internalType: "bytes32"
1543
- }
1544
- ],
1545
- stateMutability: "view"
1546
- },
1547
- {
1548
- type: "function",
1549
- name: "UNPAUSER_ROLE",
1550
- inputs: [],
1551
- outputs: [
1552
- {
1553
- name: "",
1554
- type: "bytes32",
1555
- internalType: "bytes32"
1556
- }
1557
- ],
1558
- stateMutability: "view"
1559
- },
1560
- {
1561
- type: "function",
1562
- name: "UPGRADER_ROLE",
1563
- inputs: [],
1564
- outputs: [
1565
- {
1566
- name: "",
1567
- type: "bytes32",
1568
- internalType: "bytes32"
1569
- }
1570
- ],
1571
- stateMutability: "view"
1572
- },
1573
- {
1574
- type: "function",
1575
- name: "UPGRADE_INTERFACE_VERSION",
1576
- inputs: [],
1577
- outputs: [
1578
- {
1579
- name: "",
1580
- type: "string",
1581
- internalType: "string"
1582
- }
1583
- ],
1584
- stateMutability: "view"
1585
- },
1586
- {
1587
- type: "function",
1588
- name: "adminProcessWithdrawalRequestEvents",
1589
- inputs: [
1590
- {
1591
- name: "requests",
1592
- type: "tuple[]",
1593
- internalType: "struct ISpicenetEscrow.WithdrawalRequest[]",
1594
- components: [
1595
- {
1596
- name: "idempotenceKey",
1597
- type: "bytes32",
1598
- internalType: "bytes32"
1599
- },
1600
- {
1601
- name: "forUser",
1602
- type: "string",
1603
- internalType: "string"
1604
- },
1605
- {
1606
- name: "nbf",
1607
- type: "uint256",
1608
- internalType: "uint256"
1609
- },
1610
- {
1611
- name: "exp",
1612
- type: "uint256",
1613
- internalType: "uint256"
1614
- },
1615
- {
1616
- name: "metadata",
1617
- type: "string",
1618
- internalType: "string"
1619
- },
1620
- {
1621
- name: "transfers",
1622
- type: "tuple[]",
1623
- internalType: "struct ISpicenetEscrow.TokenTransfer[]",
1624
- components: [
1625
- {
1626
- name: "token",
1627
- type: "address",
1628
- internalType: "address"
1629
- },
1630
- {
1631
- name: "to",
1632
- type: "address",
1633
- internalType: "address"
1634
- },
1635
- {
1636
- name: "amount",
1637
- type: "uint256",
1638
- internalType: "uint256"
1639
- }
1640
- ]
1641
- }
1642
- ]
1643
- }
1644
- ],
1645
- outputs: [],
1646
- stateMutability: "nonpayable"
1647
- },
1648
- {
1649
- type: "function",
1650
- name: "adminSetWithdrawalInfos",
1651
- inputs: [
1652
- {
1653
- name: "idempotenceKeys",
1654
- type: "bytes32[]",
1655
- internalType: "bytes32[]"
1656
- },
1657
- {
1658
- name: "withdrawalInfos",
1659
- type: "tuple[]",
1660
- internalType: "struct ISpicenetEscrow.WithdrawalInfo[]",
1661
- components: [
1662
- {
1663
- name: "forUser",
1664
- type: "string",
1665
- internalType: "string"
1666
- },
1667
- {
1668
- name: "blockNumber",
1669
- type: "uint256",
1670
- internalType: "uint256"
1671
- },
1672
- {
1673
- name: "nbf",
1674
- type: "uint256",
1675
- internalType: "uint256"
1676
- },
1677
- {
1678
- name: "exp",
1679
- type: "uint256",
1680
- internalType: "uint256"
1681
- },
1682
- {
1683
- name: "metadata",
1684
- type: "string",
1685
- internalType: "string"
1686
- }
1687
- ]
1688
- }
1689
- ],
1690
- outputs: [],
1691
- stateMutability: "nonpayable"
1692
- },
1693
- {
1694
- type: "function",
1695
- name: "adminWithdraw",
1696
- inputs: [
1697
- {
1698
- name: "transfers",
1699
- type: "tuple[]",
1700
- internalType: "struct ISpicenetEscrow.TokenTransfer[]",
1701
- components: [
1702
- {
1703
- name: "token",
1704
- type: "address",
1705
- internalType: "address"
1706
- },
1707
- {
1708
- name: "to",
1709
- type: "address",
1710
- internalType: "address"
1711
- },
1712
- {
1713
- name: "amount",
1714
- type: "uint256",
1715
- internalType: "uint256"
1716
- }
1717
- ]
1718
- }
1719
- ],
1720
- outputs: [],
1721
- stateMutability: "nonpayable"
1722
- },
1723
- {
1724
- type: "function",
1725
- name: "getRoleAdmin",
1726
- inputs: [
1727
- {
1728
- name: "role",
1729
- type: "bytes32",
1730
- internalType: "bytes32"
1731
- }
1732
- ],
1733
- outputs: [
1734
- {
1735
- name: "",
1736
- type: "bytes32",
1737
- internalType: "bytes32"
1738
- }
1739
- ],
1740
- stateMutability: "view"
1741
- },
1742
- {
1743
- type: "function",
1744
- name: "getRoleMember",
1745
- inputs: [
1746
- {
1747
- name: "role",
1748
- type: "bytes32",
1749
- internalType: "bytes32"
1750
- },
1751
- {
1752
- name: "index",
1753
- type: "uint256",
1754
- internalType: "uint256"
1755
- }
1756
- ],
1757
- outputs: [
1758
- {
1759
- name: "",
1760
- type: "address",
1761
- internalType: "address"
1762
- }
1763
- ],
1764
- stateMutability: "view"
1765
- },
1766
- {
1767
- type: "function",
1768
- name: "getRoleMemberCount",
1769
- inputs: [
1770
- {
1771
- name: "role",
1772
- type: "bytes32",
1773
- internalType: "bytes32"
1774
- }
1775
- ],
1776
- outputs: [
1777
- {
1778
- name: "",
1779
- type: "uint256",
1780
- internalType: "uint256"
1781
- }
1782
- ],
1783
- stateMutability: "view"
1784
- },
1785
- {
1786
- type: "function",
1787
- name: "getRoleMembers",
1788
- inputs: [
1789
- {
1790
- name: "role",
1791
- type: "bytes32",
1792
- internalType: "bytes32"
1793
- }
1794
- ],
1795
- outputs: [
1796
- {
1797
- name: "",
1798
- type: "address[]",
1799
- internalType: "address[]"
1800
- }
1801
- ],
1802
- stateMutability: "view"
1803
- },
1804
- {
1805
- type: "function",
1806
- name: "getWithdrawalInfo",
1807
- inputs: [
1808
- {
1809
- name: "idempotenceKey",
1810
- type: "bytes32",
1811
- internalType: "bytes32"
1812
- }
1813
- ],
1814
- outputs: [
1815
- {
1816
- name: "",
1817
- type: "tuple",
1818
- internalType: "struct ISpicenetEscrow.WithdrawalInfo",
1819
- components: [
1820
- {
1821
- name: "forUser",
1822
- type: "string",
1823
- internalType: "string"
1824
- },
1825
- {
1826
- name: "blockNumber",
1827
- type: "uint256",
1828
- internalType: "uint256"
1829
- },
1830
- {
1831
- name: "nbf",
1832
- type: "uint256",
1833
- internalType: "uint256"
1834
- },
1835
- {
1836
- name: "exp",
1837
- type: "uint256",
1838
- internalType: "uint256"
1839
- },
1840
- {
1841
- name: "metadata",
1842
- type: "string",
1843
- internalType: "string"
1844
- }
1845
- ]
1846
- }
1847
- ],
1848
- stateMutability: "view"
1849
- },
1850
- {
1851
- type: "function",
1852
- name: "grantRole",
1853
- inputs: [
1854
- {
1855
- name: "role",
1856
- type: "bytes32",
1857
- internalType: "bytes32"
1858
- },
1859
- {
1860
- name: "account",
1861
- type: "address",
1862
- internalType: "address"
1863
- }
1864
- ],
1865
- outputs: [],
1866
- stateMutability: "nonpayable"
1867
- },
1868
- {
1869
- type: "function",
1870
- name: "hasRole",
1871
- inputs: [
1872
- {
1873
- name: "role",
1874
- type: "bytes32",
1875
- internalType: "bytes32"
1876
- },
1877
- {
1878
- name: "account",
1879
- type: "address",
1880
- internalType: "address"
1881
- }
1882
- ],
1883
- outputs: [
1884
- {
1885
- name: "",
1886
- type: "bool",
1887
- internalType: "bool"
1888
- }
1889
- ],
1890
- stateMutability: "view"
1891
- },
1892
- {
1893
- type: "function",
1894
- name: "initialize",
1895
- inputs: [
1896
- {
1897
- name: "defaultAdmin",
1898
- type: "address",
1899
- internalType: "address"
1900
- }
1901
- ],
1902
- outputs: [],
1903
- stateMutability: "nonpayable"
1904
- },
1905
- {
1906
- type: "function",
1907
- name: "pause",
1908
- inputs: [],
1909
- outputs: [],
1910
- stateMutability: "nonpayable"
1911
- },
1912
- {
1913
- type: "function",
1914
- name: "paused",
1915
- inputs: [],
1916
- outputs: [
1917
- {
1918
- name: "",
1919
- type: "bool",
1920
- internalType: "bool"
1921
- }
1922
- ],
1923
- stateMutability: "view"
1924
- },
1925
- {
1926
- type: "function",
1927
- name: "processWithdrawal",
1928
- inputs: [
1929
- {
1930
- name: "request",
1931
- type: "tuple",
1932
- internalType: "struct ISpicenetEscrow.WithdrawalRequest",
1933
- components: [
1934
- {
1935
- name: "idempotenceKey",
1936
- type: "bytes32",
1937
- internalType: "bytes32"
1938
- },
1939
- {
1940
- name: "forUser",
1941
- type: "string",
1942
- internalType: "string"
1943
- },
1944
- {
1945
- name: "nbf",
1946
- type: "uint256",
1947
- internalType: "uint256"
1948
- },
1949
- {
1950
- name: "exp",
1951
- type: "uint256",
1952
- internalType: "uint256"
1953
- },
1954
- {
1955
- name: "metadata",
1956
- type: "string",
1957
- internalType: "string"
1958
- },
1959
- {
1960
- name: "transfers",
1961
- type: "tuple[]",
1962
- internalType: "struct ISpicenetEscrow.TokenTransfer[]",
1963
- components: [
1964
- {
1965
- name: "token",
1966
- type: "address",
1967
- internalType: "address"
1968
- },
1969
- {
1970
- name: "to",
1971
- type: "address",
1972
- internalType: "address"
1973
- },
1974
- {
1975
- name: "amount",
1976
- type: "uint256",
1977
- internalType: "uint256"
1978
- }
1979
- ]
1980
- }
1981
- ]
1982
- }
1983
- ],
1984
- outputs: [],
1985
- stateMutability: "nonpayable"
1986
- },
1987
- {
1988
- type: "function",
1989
- name: "proxiableUUID",
1990
- inputs: [],
1991
- outputs: [
1992
- {
1993
- name: "",
1994
- type: "bytes32",
1995
- internalType: "bytes32"
1996
- }
1997
- ],
1998
- stateMutability: "view"
1999
- },
2000
- {
2001
- type: "function",
2002
- name: "renounceRole",
2003
- inputs: [
2004
- {
2005
- name: "role",
2006
- type: "bytes32",
2007
- internalType: "bytes32"
2008
- },
2009
- {
2010
- name: "callerConfirmation",
2011
- type: "address",
2012
- internalType: "address"
2013
- }
2014
- ],
2015
- outputs: [],
2016
- stateMutability: "nonpayable"
2017
- },
2018
- {
2019
- type: "function",
2020
- name: "revokeRole",
2021
- inputs: [
2022
- {
2023
- name: "role",
2024
- type: "bytes32",
2025
- internalType: "bytes32"
2026
- },
2027
- {
2028
- name: "account",
2029
- type: "address",
2030
- internalType: "address"
2031
- }
2032
- ],
2033
- outputs: [],
2034
- stateMutability: "nonpayable"
2035
- },
2036
- {
2037
- type: "function",
2038
- name: "supportsInterface",
2039
- inputs: [
2040
- {
2041
- name: "interfaceId",
2042
- type: "bytes4",
2043
- internalType: "bytes4"
2044
- }
2045
- ],
2046
- outputs: [
2047
- {
2048
- name: "",
2049
- type: "bool",
2050
- internalType: "bool"
2051
- }
2052
- ],
2053
- stateMutability: "view"
2054
- },
2055
- {
2056
- type: "function",
2057
- name: "unpause",
2058
- inputs: [],
2059
- outputs: [],
2060
- stateMutability: "nonpayable"
2061
- },
2062
- {
2063
- type: "function",
2064
- name: "upgradeToAndCall",
2065
- inputs: [
2066
- {
2067
- name: "newImplementation",
2068
- type: "address",
2069
- internalType: "address"
2070
- },
2071
- {
2072
- name: "data",
2073
- type: "bytes",
2074
- internalType: "bytes"
2075
- }
2076
- ],
2077
- outputs: [],
2078
- stateMutability: "payable"
2079
- },
2080
- {
2081
- type: "event",
2082
- name: "Initialized",
2083
- inputs: [
2084
- {
2085
- name: "version",
2086
- type: "uint64",
2087
- indexed: false,
2088
- internalType: "uint64"
2089
- }
2090
- ],
2091
- anonymous: false
2092
- },
2093
- {
2094
- type: "event",
2095
- name: "NativeTransfer",
2096
- inputs: [
2097
- {
2098
- name: "from",
2099
- type: "address",
2100
- indexed: true,
2101
- internalType: "address"
2102
- },
2103
- {
2104
- name: "to",
2105
- type: "address",
2106
- indexed: true,
2107
- internalType: "address"
2108
- },
2109
- {
2110
- name: "value",
2111
- type: "uint256",
2112
- indexed: false,
2113
- internalType: "uint256"
2114
- }
2115
- ],
2116
- anonymous: false
2117
- },
2118
- {
2119
- type: "event",
2120
- name: "Paused",
2121
- inputs: [
2122
- {
2123
- name: "account",
2124
- type: "address",
2125
- indexed: false,
2126
- internalType: "address"
2127
- }
2128
- ],
2129
- anonymous: false
2130
- },
2131
- {
2132
- type: "event",
2133
- name: "RoleAdminChanged",
2134
- inputs: [
2135
- {
2136
- name: "role",
2137
- type: "bytes32",
2138
- indexed: true,
2139
- internalType: "bytes32"
2140
- },
2141
- {
2142
- name: "previousAdminRole",
2143
- type: "bytes32",
2144
- indexed: true,
2145
- internalType: "bytes32"
2146
- },
2147
- {
2148
- name: "newAdminRole",
2149
- type: "bytes32",
2150
- indexed: true,
2151
- internalType: "bytes32"
2152
- }
2153
- ],
2154
- anonymous: false
2155
- },
2156
- {
2157
- type: "event",
2158
- name: "RoleGranted",
2159
- inputs: [
2160
- {
2161
- name: "role",
2162
- type: "bytes32",
2163
- indexed: true,
2164
- internalType: "bytes32"
2165
- },
2166
- {
2167
- name: "account",
2168
- type: "address",
2169
- indexed: true,
2170
- internalType: "address"
2171
- },
2172
- {
2173
- name: "sender",
2174
- type: "address",
2175
- indexed: true,
2176
- internalType: "address"
2177
- }
2178
- ],
2179
- anonymous: false
2180
- },
2181
- {
2182
- type: "event",
2183
- name: "RoleRevoked",
2184
- inputs: [
2185
- {
2186
- name: "role",
2187
- type: "bytes32",
2188
- indexed: true,
2189
- internalType: "bytes32"
2190
- },
2191
- {
2192
- name: "account",
2193
- type: "address",
2194
- indexed: true,
2195
- internalType: "address"
2196
- },
2197
- {
2198
- name: "sender",
2199
- type: "address",
2200
- indexed: true,
2201
- internalType: "address"
2202
- }
2203
- ],
2204
- anonymous: false
2205
- },
2206
- {
2207
- type: "event",
2208
- name: "Unpaused",
2209
- inputs: [
2210
- {
2211
- name: "account",
2212
- type: "address",
2213
- indexed: false,
2214
- internalType: "address"
2215
- }
2216
- ],
2217
- anonymous: false
2218
- },
2219
- {
2220
- type: "event",
2221
- name: "Upgraded",
2222
- inputs: [
2223
- {
2224
- name: "implementation",
2225
- type: "address",
2226
- indexed: true,
2227
- internalType: "address"
2228
- }
2229
- ],
2230
- anonymous: false
2231
- },
2232
- {
2233
- type: "event",
2234
- name: "WithdrawalProcessed",
2235
- inputs: [
2236
- {
2237
- name: "idempotenceKey",
2238
- type: "bytes32",
2239
- indexed: true,
2240
- internalType: "bytes32"
2241
- },
2242
- {
2243
- name: "forUser",
2244
- type: "string",
2245
- indexed: true,
2246
- internalType: "string"
2247
- },
2248
- {
2249
- name: "request",
2250
- type: "tuple",
2251
- indexed: false,
2252
- internalType: "struct ISpicenetEscrow.WithdrawalRequest",
2253
- components: [
2254
- {
2255
- name: "idempotenceKey",
2256
- type: "bytes32",
2257
- internalType: "bytes32"
2258
- },
2259
- {
2260
- name: "forUser",
2261
- type: "string",
2262
- internalType: "string"
2263
- },
2264
- {
2265
- name: "nbf",
2266
- type: "uint256",
2267
- internalType: "uint256"
2268
- },
2269
- {
2270
- name: "exp",
2271
- type: "uint256",
2272
- internalType: "uint256"
2273
- },
2274
- {
2275
- name: "metadata",
2276
- type: "string",
2277
- internalType: "string"
2278
- },
2279
- {
2280
- name: "transfers",
2281
- type: "tuple[]",
2282
- internalType: "struct ISpicenetEscrow.TokenTransfer[]",
2283
- components: [
2284
- {
2285
- name: "token",
2286
- type: "address",
2287
- internalType: "address"
2288
- },
2289
- {
2290
- name: "to",
2291
- type: "address",
2292
- internalType: "address"
2293
- },
2294
- {
2295
- name: "amount",
2296
- type: "uint256",
2297
- internalType: "uint256"
2298
- }
2299
- ]
2300
- }
2301
- ]
2302
- }
2303
- ],
2304
- anonymous: false
2305
- },
2306
- {
2307
- type: "error",
2308
- name: "AccessControlBadConfirmation",
2309
- inputs: []
2310
- },
2311
- {
2312
- type: "error",
2313
- name: "AccessControlUnauthorizedAccount",
2314
- inputs: [
2315
- {
2316
- name: "account",
2317
- type: "address",
2318
- internalType: "address"
2319
- },
2320
- {
2321
- name: "neededRole",
2322
- type: "bytes32",
2323
- internalType: "bytes32"
2324
- }
2325
- ]
2326
- },
2327
- {
2328
- type: "error",
2329
- name: "AddressEmptyCode",
2330
- inputs: [
2331
- {
2332
- name: "target",
2333
- type: "address",
2334
- internalType: "address"
2335
- }
2336
- ]
2337
- },
2338
- {
2339
- type: "error",
2340
- name: "ERC1967InvalidImplementation",
2341
- inputs: [
2342
- {
2343
- name: "implementation",
2344
- type: "address",
2345
- internalType: "address"
2346
- }
2347
- ]
2348
- },
2349
- {
2350
- type: "error",
2351
- name: "ERC1967NonPayable",
2352
- inputs: []
2353
- },
2354
- {
2355
- type: "error",
2356
- name: "EnforcedPause",
2357
- inputs: []
2358
- },
2359
- {
2360
- type: "error",
2361
- name: "ExpectedPause",
2362
- inputs: []
2363
- },
2364
- {
2365
- type: "error",
2366
- name: "FailedCall",
2367
- inputs: []
2368
- },
2369
- {
2370
- type: "error",
2371
- name: "InsufficientBalance",
2372
- inputs: [
2373
- {
2374
- name: "balance",
2375
- type: "uint256",
2376
- internalType: "uint256"
2377
- },
2378
- {
2379
- name: "needed",
2380
- type: "uint256",
2381
- internalType: "uint256"
2382
- }
2383
- ]
2384
- },
2385
- {
2386
- type: "error",
2387
- name: "InvalidInitialization",
2388
- inputs: []
2389
- },
2390
- {
2391
- type: "error",
2392
- name: "NotInitializing",
2393
- inputs: []
2394
- },
2395
- {
2396
- type: "error",
2397
- name: "SafeERC20FailedOperation",
2398
- inputs: [
2399
- {
2400
- name: "token",
2401
- type: "address",
2402
- internalType: "address"
2403
- }
2404
- ]
2405
- },
2406
- {
2407
- type: "error",
2408
- name: "UUPSUnauthorizedCallContext",
2409
- inputs: []
2410
- },
2411
- {
2412
- type: "error",
2413
- name: "UUPSUnsupportedProxiableUUID",
2414
- inputs: [
2415
- {
2416
- name: "slot",
2417
- type: "bytes32",
2418
- internalType: "bytes32"
2419
- }
2420
- ]
2421
- },
2422
- {
2423
- type: "error",
2424
- name: "WithdrawalAlreadyProcessed",
2425
- inputs: [
2426
- {
2427
- name: "idempotenceKey",
2428
- type: "bytes32",
2429
- internalType: "bytes32"
2430
- },
2431
- {
2432
- name: "withdrawalInfo",
2433
- type: "tuple",
2434
- internalType: "struct ISpicenetEscrow.WithdrawalInfo",
2435
- components: [
2436
- {
2437
- name: "forUser",
2438
- type: "string",
2439
- internalType: "string"
2440
- },
2441
- {
2442
- name: "blockNumber",
2443
- type: "uint256",
2444
- internalType: "uint256"
2445
- },
2446
- {
2447
- name: "nbf",
2448
- type: "uint256",
2449
- internalType: "uint256"
2450
- },
2451
- {
2452
- name: "exp",
2453
- type: "uint256",
2454
- internalType: "uint256"
2455
- },
2456
- {
2457
- name: "metadata",
2458
- type: "string",
2459
- internalType: "string"
2460
- }
2461
- ]
2462
- }
2463
- ]
2464
- },
2465
- {
2466
- type: "error",
2467
- name: "WithdrawalRequestExpired",
2468
- inputs: [
2469
- {
2470
- name: "currentTime",
2471
- type: "uint256",
2472
- internalType: "uint256"
2473
- },
2474
- {
2475
- name: "exp",
2476
- type: "uint256",
2477
- internalType: "uint256"
2478
- }
2479
- ]
2480
- },
2481
- {
2482
- type: "error",
2483
- name: "WithdrawalRequestTooEarly",
2484
- inputs: [
2485
- {
2486
- name: "currentTime",
2487
- type: "uint256",
2488
- internalType: "uint256"
2489
- },
2490
- {
2491
- name: "nbf",
2492
- type: "uint256",
2493
- internalType: "uint256"
2494
- }
2495
- ]
2496
- }
2497
- ];
2498
-
2499
1333
  // src/swap.ts
2500
1334
  import { encodeFunctionData, erc20Abi } from "viem";
2501
1335
  function applySlippage(amount, slippage = 0.03) {
@@ -2548,6 +1382,7 @@ export {
2548
1382
  ChainBatchHashAbi,
2549
1383
  DELEGATE_ABI,
2550
1384
  ERC20_ABI,
1385
+ ESCROW_ADDRESS,
2551
1386
  HttpError,
2552
1387
  IntentHashAbi,
2553
1388
  NATIVE_TOKEN_ADDRESS,
@@ -2573,8 +1408,6 @@ export {
2573
1408
  getDeployment,
2574
1409
  getEquivalenceGroup,
2575
1410
  getEquivalentAddresses,
2576
- getEscrowContract,
2577
- getEscrowContractAddress,
2578
1411
  getIntentHash,
2579
1412
  getIntentStepStatus,
2580
1413
  getMainnetChains,
@@ -2596,9 +1429,6 @@ export {
2596
1429
  requireTokenBySymbol,
2597
1430
  requireViemChain,
2598
1431
  resolveTokenRef,
2599
- spicenetAbi,
2600
- spicenetEscrowAbi,
2601
- spicenetEscrowAbi as spicenetWalletManagerAbi,
2602
1432
  submitTransaction,
2603
1433
  truncateAddress,
2604
1434
  uniV3QuoterV2Abi,