@underscore-finance/sdk 1.2.19 → 1.2.20-next.0
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/AGENTS.md +3 -2
- package/abis.json +2449 -0
- package/addresses.json +5 -4
- package/dist/contracts/ChequeBook.d.ts +294 -0
- package/dist/contracts/ChequeBook.d.ts.map +1 -1
- package/dist/contracts/ChequeBook.js +341 -0
- package/dist/contracts/LootDistributor.js +1 -1
- package/dist/contracts/RipeLego.js +1 -1
- package/dist/contracts/SwitchboardCharlie.js +1 -1
- package/dist/contracts/UndyUsdV2.d.ts +1762 -0
- package/dist/contracts/UndyUsdV2.d.ts.map +1 -0
- package/dist/contracts/UndyUsdV2.js +2267 -0
- package/dist/contracts/UserWalletConfig.d.ts +67 -0
- package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
- package/dist/contracts/UserWalletConfig.js +78 -0
- package/dist/contracts/Wasabi.js +1 -1
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/sdk.d.ts +2 -0
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +2 -0
- package/package.json +1 -1
|
@@ -1480,6 +1480,334 @@ export const abi = [
|
|
|
1480
1480
|
}
|
|
1481
1481
|
],
|
|
1482
1482
|
"outputs": []
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"name": "ChequeSettingsPending",
|
|
1486
|
+
"inputs": [
|
|
1487
|
+
{
|
|
1488
|
+
"name": "user",
|
|
1489
|
+
"type": "address",
|
|
1490
|
+
"indexed": true
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"name": "initiatedBy",
|
|
1494
|
+
"type": "address",
|
|
1495
|
+
"indexed": true
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"name": "confirmBlock",
|
|
1499
|
+
"type": "uint256",
|
|
1500
|
+
"indexed": false
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"name": "maxNumActiveCheques",
|
|
1504
|
+
"type": "uint256",
|
|
1505
|
+
"indexed": false
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
"name": "maxChequeUsdValue",
|
|
1509
|
+
"type": "uint256",
|
|
1510
|
+
"indexed": false
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"name": "instantUsdThreshold",
|
|
1514
|
+
"type": "uint256",
|
|
1515
|
+
"indexed": false
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
"name": "perPeriodPaidUsdCap",
|
|
1519
|
+
"type": "uint256",
|
|
1520
|
+
"indexed": false
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"name": "maxNumChequesPaidPerPeriod",
|
|
1524
|
+
"type": "uint256",
|
|
1525
|
+
"indexed": false
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"name": "payCooldownBlocks",
|
|
1529
|
+
"type": "uint256",
|
|
1530
|
+
"indexed": false
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "perPeriodCreatedUsdCap",
|
|
1534
|
+
"type": "uint256",
|
|
1535
|
+
"indexed": false
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
"name": "maxNumChequesCreatedPerPeriod",
|
|
1539
|
+
"type": "uint256",
|
|
1540
|
+
"indexed": false
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
"name": "createCooldownBlocks",
|
|
1544
|
+
"type": "uint256",
|
|
1545
|
+
"indexed": false
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"name": "periodLength",
|
|
1549
|
+
"type": "uint256",
|
|
1550
|
+
"indexed": false
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
"name": "expensiveDelayBlocks",
|
|
1554
|
+
"type": "uint256",
|
|
1555
|
+
"indexed": false
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"name": "defaultExpiryBlocks",
|
|
1559
|
+
"type": "uint256",
|
|
1560
|
+
"indexed": false
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"name": "canManagersCreateCheques",
|
|
1564
|
+
"type": "bool",
|
|
1565
|
+
"indexed": false
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"name": "canManagerPay",
|
|
1569
|
+
"type": "bool",
|
|
1570
|
+
"indexed": false
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
"name": "canBePulled",
|
|
1574
|
+
"type": "bool",
|
|
1575
|
+
"indexed": false
|
|
1576
|
+
}
|
|
1577
|
+
],
|
|
1578
|
+
"anonymous": false,
|
|
1579
|
+
"type": "event"
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"name": "ChequeSettingsPendingConfirmed",
|
|
1583
|
+
"inputs": [
|
|
1584
|
+
{
|
|
1585
|
+
"name": "user",
|
|
1586
|
+
"type": "address",
|
|
1587
|
+
"indexed": true
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
"name": "initiatedBlock",
|
|
1591
|
+
"type": "uint256",
|
|
1592
|
+
"indexed": false
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
"name": "confirmBlock",
|
|
1596
|
+
"type": "uint256",
|
|
1597
|
+
"indexed": false
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
"name": "confirmedBy",
|
|
1601
|
+
"type": "address",
|
|
1602
|
+
"indexed": true
|
|
1603
|
+
}
|
|
1604
|
+
],
|
|
1605
|
+
"anonymous": false,
|
|
1606
|
+
"type": "event"
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
"name": "ChequeSettingsPendingCancelled",
|
|
1610
|
+
"inputs": [
|
|
1611
|
+
{
|
|
1612
|
+
"name": "user",
|
|
1613
|
+
"type": "address",
|
|
1614
|
+
"indexed": true
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"name": "initiatedBlock",
|
|
1618
|
+
"type": "uint256",
|
|
1619
|
+
"indexed": false
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
"name": "confirmBlock",
|
|
1623
|
+
"type": "uint256",
|
|
1624
|
+
"indexed": false
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
"name": "cancelledBy",
|
|
1628
|
+
"type": "address",
|
|
1629
|
+
"indexed": true
|
|
1630
|
+
}
|
|
1631
|
+
],
|
|
1632
|
+
"anonymous": false,
|
|
1633
|
+
"type": "event"
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"stateMutability": "view",
|
|
1637
|
+
"type": "function",
|
|
1638
|
+
"name": "hasPendingChequeSettings",
|
|
1639
|
+
"inputs": [
|
|
1640
|
+
{
|
|
1641
|
+
"name": "_userWallet",
|
|
1642
|
+
"type": "address"
|
|
1643
|
+
}
|
|
1644
|
+
],
|
|
1645
|
+
"outputs": [
|
|
1646
|
+
{
|
|
1647
|
+
"name": "",
|
|
1648
|
+
"type": "bool"
|
|
1649
|
+
}
|
|
1650
|
+
]
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
"stateMutability": "view",
|
|
1654
|
+
"type": "function",
|
|
1655
|
+
"name": "pendingChequeSettingsMeta",
|
|
1656
|
+
"inputs": [
|
|
1657
|
+
{
|
|
1658
|
+
"name": "_userWallet",
|
|
1659
|
+
"type": "address"
|
|
1660
|
+
}
|
|
1661
|
+
],
|
|
1662
|
+
"outputs": [
|
|
1663
|
+
{
|
|
1664
|
+
"name": "",
|
|
1665
|
+
"type": "uint256"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"name": "",
|
|
1669
|
+
"type": "uint256"
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
"name": "",
|
|
1673
|
+
"type": "address"
|
|
1674
|
+
}
|
|
1675
|
+
]
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
"stateMutability": "nonpayable",
|
|
1679
|
+
"type": "function",
|
|
1680
|
+
"name": "confirmPendingChequeSettings",
|
|
1681
|
+
"inputs": [
|
|
1682
|
+
{
|
|
1683
|
+
"name": "_userWallet",
|
|
1684
|
+
"type": "address"
|
|
1685
|
+
}
|
|
1686
|
+
],
|
|
1687
|
+
"outputs": [
|
|
1688
|
+
{
|
|
1689
|
+
"name": "",
|
|
1690
|
+
"type": "bool"
|
|
1691
|
+
}
|
|
1692
|
+
]
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
"stateMutability": "nonpayable",
|
|
1696
|
+
"type": "function",
|
|
1697
|
+
"name": "cancelPendingChequeSettings",
|
|
1698
|
+
"inputs": [
|
|
1699
|
+
{
|
|
1700
|
+
"name": "_userWallet",
|
|
1701
|
+
"type": "address"
|
|
1702
|
+
}
|
|
1703
|
+
],
|
|
1704
|
+
"outputs": [
|
|
1705
|
+
{
|
|
1706
|
+
"name": "",
|
|
1707
|
+
"type": "bool"
|
|
1708
|
+
}
|
|
1709
|
+
]
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
"stateMutability": "view",
|
|
1713
|
+
"type": "function",
|
|
1714
|
+
"name": "pendingChequeSettings",
|
|
1715
|
+
"inputs": [
|
|
1716
|
+
{
|
|
1717
|
+
"name": "arg0",
|
|
1718
|
+
"type": "address"
|
|
1719
|
+
}
|
|
1720
|
+
],
|
|
1721
|
+
"outputs": [
|
|
1722
|
+
{
|
|
1723
|
+
"name": "",
|
|
1724
|
+
"type": "tuple",
|
|
1725
|
+
"components": [
|
|
1726
|
+
{
|
|
1727
|
+
"name": "settings",
|
|
1728
|
+
"type": "tuple",
|
|
1729
|
+
"components": [
|
|
1730
|
+
{
|
|
1731
|
+
"name": "maxNumActiveCheques",
|
|
1732
|
+
"type": "uint256"
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
"name": "maxChequeUsdValue",
|
|
1736
|
+
"type": "uint256"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"name": "instantUsdThreshold",
|
|
1740
|
+
"type": "uint256"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"name": "perPeriodPaidUsdCap",
|
|
1744
|
+
"type": "uint256"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"name": "maxNumChequesPaidPerPeriod",
|
|
1748
|
+
"type": "uint256"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "payCooldownBlocks",
|
|
1752
|
+
"type": "uint256"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"name": "perPeriodCreatedUsdCap",
|
|
1756
|
+
"type": "uint256"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"name": "maxNumChequesCreatedPerPeriod",
|
|
1760
|
+
"type": "uint256"
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"name": "createCooldownBlocks",
|
|
1764
|
+
"type": "uint256"
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"name": "periodLength",
|
|
1768
|
+
"type": "uint256"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
"name": "expensiveDelayBlocks",
|
|
1772
|
+
"type": "uint256"
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
"name": "defaultExpiryBlocks",
|
|
1776
|
+
"type": "uint256"
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
"name": "allowedAssets",
|
|
1780
|
+
"type": "address[]"
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
"name": "canManagersCreateCheques",
|
|
1784
|
+
"type": "bool"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"name": "canManagerPay",
|
|
1788
|
+
"type": "bool"
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"name": "canBePulled",
|
|
1792
|
+
"type": "bool"
|
|
1793
|
+
}
|
|
1794
|
+
]
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
"name": "initiatedBlock",
|
|
1798
|
+
"type": "uint256"
|
|
1799
|
+
},
|
|
1800
|
+
{
|
|
1801
|
+
"name": "confirmBlock",
|
|
1802
|
+
"type": "uint256"
|
|
1803
|
+
},
|
|
1804
|
+
{
|
|
1805
|
+
"name": "currentOwner",
|
|
1806
|
+
"type": "address"
|
|
1807
|
+
}
|
|
1808
|
+
]
|
|
1809
|
+
}
|
|
1810
|
+
]
|
|
1483
1811
|
}
|
|
1484
1812
|
];
|
|
1485
1813
|
export const deployAddress = '0x68ad259f7Fd1C734779EB4e8b94b826d7D11a61e';
|
|
@@ -1522,6 +1850,9 @@ export const call = {
|
|
|
1522
1850
|
MIN_EXPENSIVE_CHEQUE_DELAY: (...args) => getRequest('MIN_EXPENSIVE_CHEQUE_DELAY', args),
|
|
1523
1851
|
MAX_UNLOCK_BLOCKS: (...args) => getRequest('MAX_UNLOCK_BLOCKS', args),
|
|
1524
1852
|
MAX_EXPIRY_BLOCKS: (...args) => getRequest('MAX_EXPIRY_BLOCKS', args),
|
|
1853
|
+
hasPendingChequeSettings: (...args) => getRequest('hasPendingChequeSettings', args),
|
|
1854
|
+
pendingChequeSettingsMeta: (...args) => getRequest('pendingChequeSettingsMeta', args),
|
|
1855
|
+
pendingChequeSettings: (...args) => getRequest('pendingChequeSettings', args),
|
|
1525
1856
|
};
|
|
1526
1857
|
function getMutation(functionName) {
|
|
1527
1858
|
return {
|
|
@@ -1536,6 +1867,8 @@ export const mutation = {
|
|
|
1536
1867
|
createCheque: getMutation('createCheque'),
|
|
1537
1868
|
cancelCheque: getMutation('cancelCheque'),
|
|
1538
1869
|
setChequeSettings: getMutation('setChequeSettings'),
|
|
1870
|
+
confirmPendingChequeSettings: getMutation('confirmPendingChequeSettings'),
|
|
1871
|
+
cancelPendingChequeSettings: getMutation('cancelPendingChequeSettings'),
|
|
1539
1872
|
};
|
|
1540
1873
|
export function parseEvents(eventName, events) {
|
|
1541
1874
|
return events.map((event) => {
|
|
@@ -1560,6 +1893,9 @@ export function toSdk(publicClient, walletClient, addressResolver) {
|
|
|
1560
1893
|
ChequeCreated: { topic: getEventTopic('ChequeCreated'), parse: (events) => parseEvents('ChequeCreated', events) },
|
|
1561
1894
|
ChequeCancelled: { topic: getEventTopic('ChequeCancelled'), parse: (events) => parseEvents('ChequeCancelled', events) },
|
|
1562
1895
|
ChequeSettingsModified: { topic: getEventTopic('ChequeSettingsModified'), parse: (events) => parseEvents('ChequeSettingsModified', events) },
|
|
1896
|
+
ChequeSettingsPending: { topic: getEventTopic('ChequeSettingsPending'), parse: (events) => parseEvents('ChequeSettingsPending', events) },
|
|
1897
|
+
ChequeSettingsPendingConfirmed: { topic: getEventTopic('ChequeSettingsPendingConfirmed'), parse: (events) => parseEvents('ChequeSettingsPendingConfirmed', events) },
|
|
1898
|
+
ChequeSettingsPendingCancelled: { topic: getEventTopic('ChequeSettingsPendingCancelled'), parse: (events) => parseEvents('ChequeSettingsPendingCancelled', events) },
|
|
1563
1899
|
},
|
|
1564
1900
|
// Queries
|
|
1565
1901
|
canCreateCheque: (...args) => singleQuery(publicClient, call.canCreateCheque(...args), {}, addressResolver),
|
|
@@ -1573,9 +1909,14 @@ export function toSdk(publicClient, walletClient, addressResolver) {
|
|
|
1573
1909
|
MIN_EXPENSIVE_CHEQUE_DELAY: (...args) => singleQuery(publicClient, call.MIN_EXPENSIVE_CHEQUE_DELAY(...args), {}, addressResolver),
|
|
1574
1910
|
MAX_UNLOCK_BLOCKS: (...args) => singleQuery(publicClient, call.MAX_UNLOCK_BLOCKS(...args), {}, addressResolver),
|
|
1575
1911
|
MAX_EXPIRY_BLOCKS: (...args) => singleQuery(publicClient, call.MAX_EXPIRY_BLOCKS(...args), {}, addressResolver),
|
|
1912
|
+
hasPendingChequeSettings: (...args) => singleQuery(publicClient, call.hasPendingChequeSettings(...args), {}, addressResolver),
|
|
1913
|
+
pendingChequeSettingsMeta: (...args) => singleQuery(publicClient, call.pendingChequeSettingsMeta(...args), {}, addressResolver),
|
|
1914
|
+
pendingChequeSettings: (...args) => singleQuery(publicClient, call.pendingChequeSettings(...args), {}, addressResolver),
|
|
1576
1915
|
// Mutations
|
|
1577
1916
|
createCheque: (...args) => mutate(walletClient, mutation.createCheque, { addressResolver })(...args),
|
|
1578
1917
|
cancelCheque: (...args) => mutate(walletClient, mutation.cancelCheque, { addressResolver })(...args),
|
|
1579
1918
|
setChequeSettings: (...args) => mutate(walletClient, mutation.setChequeSettings, { addressResolver })(...args),
|
|
1919
|
+
confirmPendingChequeSettings: (...args) => mutate(walletClient, mutation.confirmPendingChequeSettings, { addressResolver })(...args),
|
|
1920
|
+
cancelPendingChequeSettings: (...args) => mutate(walletClient, mutation.cancelPendingChequeSettings, { addressResolver })(...args),
|
|
1580
1921
|
};
|
|
1581
1922
|
}
|
|
@@ -1141,7 +1141,7 @@ export const abi = [
|
|
|
1141
1141
|
"outputs": []
|
|
1142
1142
|
}
|
|
1143
1143
|
];
|
|
1144
|
-
export const deployAddress = '
|
|
1144
|
+
export const deployAddress = '0x18Deb1FdAcD88222859b2809d5b6966bE5bc5C5D';
|
|
1145
1145
|
function getRequest(method, args, contractAddressOrOptions) {
|
|
1146
1146
|
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
1147
1147
|
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
@@ -3415,7 +3415,7 @@ export const abi = [
|
|
|
3415
3415
|
"outputs": []
|
|
3416
3416
|
}
|
|
3417
3417
|
];
|
|
3418
|
-
export const deployAddress = '
|
|
3418
|
+
export const deployAddress = '0x9F3962973370998f25e985A3a8a6A5ef3D42361B';
|
|
3419
3419
|
function getRequest(method, args, contractAddressOrOptions) {
|
|
3420
3420
|
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
3421
3421
|
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
@@ -3409,7 +3409,7 @@ export const abi = [
|
|
|
3409
3409
|
"outputs": []
|
|
3410
3410
|
}
|
|
3411
3411
|
];
|
|
3412
|
-
export const deployAddress = '
|
|
3412
|
+
export const deployAddress = '0x4280EE81161c5C76524A8953108BfD7cba2E6E43';
|
|
3413
3413
|
function getRequest(method, args, contractAddressOrOptions) {
|
|
3414
3414
|
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
3415
3415
|
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|