@underscore-finance/sdk 1.1.2 → 1.2.2
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/contracts/AaveV3.d.ts +126 -13
- package/dist/contracts/AaveV3.d.ts.map +1 -1
- package/dist/contracts/AaveV3.js +159 -13
- package/dist/contracts/AeroClassic.d.ts +85 -0
- package/dist/contracts/AeroClassic.d.ts.map +1 -1
- package/dist/contracts/AeroClassic.js +109 -1
- package/dist/contracts/AeroSlipstream.d.ts +119 -0
- package/dist/contracts/AeroSlipstream.d.ts.map +1 -1
- package/dist/contracts/AeroSlipstream.js +151 -1
- package/dist/contracts/AgentSenderGeneric.d.ts +4027 -0
- package/dist/contracts/AgentSenderGeneric.d.ts.map +1 -0
- package/dist/contracts/AgentSenderGeneric.js +5280 -0
- package/dist/contracts/AgentSenderSpecial.d.ts +1968 -0
- package/dist/contracts/AgentSenderSpecial.d.ts.map +1 -0
- package/dist/contracts/AgentSenderSpecial.js +2509 -0
- package/dist/contracts/AgentWrapper.d.ts +170 -1462
- package/dist/contracts/AgentWrapper.d.ts.map +1 -1
- package/dist/contracts/AgentWrapper.js +262 -1869
- package/dist/contracts/AgentWrapperV1.d.ts +3760 -0
- package/dist/contracts/AgentWrapperV1.d.ts.map +1 -0
- package/dist/contracts/AgentWrapperV1.js +4922 -0
- package/dist/contracts/Appraiser.d.ts +18 -459
- package/dist/contracts/Appraiser.d.ts.map +1 -1
- package/dist/contracts/Appraiser.js +75 -649
- package/dist/contracts/Avantis.d.ts +2565 -0
- package/dist/contracts/Avantis.d.ts.map +1 -0
- package/dist/contracts/Avantis.js +3256 -0
- package/dist/contracts/Billing.d.ts +4 -68
- package/dist/contracts/Billing.d.ts.map +1 -1
- package/dist/contracts/Billing.js +5 -82
- package/dist/contracts/ChequeBook.d.ts +52 -1
- package/dist/contracts/ChequeBook.d.ts.map +1 -1
- package/dist/contracts/ChequeBook.js +53 -1
- package/dist/contracts/CompoundV3.d.ts +126 -13
- package/dist/contracts/CompoundV3.d.ts.map +1 -1
- package/dist/contracts/CompoundV3.js +159 -13
- package/dist/contracts/ConvertVaultToken.d.ts +63 -0
- package/dist/contracts/ConvertVaultToken.d.ts.map +1 -0
- package/dist/contracts/ConvertVaultToken.js +75 -0
- package/dist/contracts/Curve.d.ts +14 -0
- package/dist/contracts/Curve.d.ts.map +1 -1
- package/dist/contracts/Curve.js +19 -1
- package/dist/contracts/DefaultsBase.d.ts +45 -56
- package/dist/contracts/DefaultsBase.d.ts.map +1 -1
- package/dist/contracts/DefaultsBase.js +45 -59
- package/dist/contracts/EarnVault.d.ts +1680 -0
- package/dist/contracts/EarnVault.d.ts.map +1 -0
- package/dist/contracts/EarnVault.js +2206 -0
- package/dist/contracts/EarnVaultAgent.d.ts +1004 -0
- package/dist/contracts/EarnVaultAgent.d.ts.map +1 -0
- package/dist/contracts/EarnVaultAgent.js +1273 -0
- package/dist/contracts/EarnVaultAgentSigHelper.d.ts +904 -0
- package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +1 -0
- package/dist/contracts/EarnVaultAgentSigHelper.js +1198 -0
- package/dist/contracts/Euler.d.ts +131 -14
- package/dist/contracts/Euler.d.ts.map +1 -1
- package/dist/contracts/Euler.js +164 -13
- package/dist/contracts/Fluid.d.ts +159 -14
- package/dist/contracts/Fluid.d.ts.map +1 -1
- package/dist/contracts/Fluid.js +200 -13
- package/dist/contracts/FortyAcres.d.ts +145 -14
- package/dist/contracts/FortyAcres.d.ts.map +1 -1
- package/dist/contracts/FortyAcres.js +182 -13
- package/dist/contracts/Hatchery.d.ts +6 -176
- package/dist/contracts/Hatchery.d.ts.map +1 -1
- package/dist/contracts/Hatchery.js +5 -225
- package/dist/contracts/HighCommand.d.ts +237 -1
- package/dist/contracts/HighCommand.d.ts.map +1 -1
- package/dist/contracts/HighCommand.js +259 -1
- package/dist/contracts/Kernel.d.ts +8 -0
- package/dist/contracts/Kernel.d.ts.map +1 -1
- package/dist/contracts/Kernel.js +9 -1
- package/dist/contracts/LegoBook.js +1 -1
- package/dist/contracts/LegoTools.js +1 -1
- package/dist/contracts/LevgVaultHelper.d.ts +1070 -0
- package/dist/contracts/LevgVaultHelper.d.ts.map +1 -0
- package/dist/contracts/LevgVaultHelper.js +1414 -0
- package/dist/contracts/LootDistributor.d.ts +49 -131
- package/dist/contracts/LootDistributor.d.ts.map +1 -1
- package/dist/contracts/LootDistributor.js +58 -157
- package/dist/contracts/Migrator.d.ts +4 -0
- package/dist/contracts/Migrator.d.ts.map +1 -1
- package/dist/contracts/Migrator.js +5 -1
- package/dist/contracts/MissionControl.d.ts +211 -295
- package/dist/contracts/MissionControl.d.ts.map +1 -1
- package/dist/contracts/MissionControl.js +216 -305
- package/dist/contracts/Moonwell.d.ts +131 -14
- package/dist/contracts/Moonwell.d.ts.map +1 -1
- package/dist/contracts/Moonwell.js +164 -13
- package/dist/contracts/Morpho.d.ts +131 -14
- package/dist/contracts/Morpho.d.ts.map +1 -1
- package/dist/contracts/Morpho.js +164 -13
- package/dist/contracts/Paymaster.d.ts +4 -0
- package/dist/contracts/Paymaster.d.ts.map +1 -1
- package/dist/contracts/Paymaster.js +5 -1
- package/dist/contracts/RipeLego.d.ts +267 -81
- package/dist/contracts/RipeLego.d.ts.map +1 -1
- package/dist/contracts/RipeLego.js +322 -87
- package/dist/contracts/Sentinel.d.ts +275 -7
- package/dist/contracts/Sentinel.d.ts.map +1 -1
- package/dist/contracts/Sentinel.js +331 -7
- package/dist/contracts/SkyPsm.d.ts +2622 -0
- package/dist/contracts/SkyPsm.d.ts.map +1 -0
- package/dist/contracts/SkyPsm.js +3329 -0
- package/dist/contracts/Switchboard.d.ts +7 -0
- package/dist/contracts/Switchboard.d.ts.map +1 -1
- package/dist/contracts/Switchboard.js +9 -1
- package/dist/contracts/SwitchboardAlpha.d.ts +499 -264
- package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -1
- package/dist/contracts/SwitchboardAlpha.js +566 -282
- package/dist/contracts/SwitchboardBravo.d.ts +4 -24
- package/dist/contracts/SwitchboardBravo.d.ts.map +1 -1
- package/dist/contracts/SwitchboardBravo.js +5 -32
- package/dist/contracts/SwitchboardCharlie.d.ts +1796 -343
- package/dist/contracts/SwitchboardCharlie.d.ts.map +1 -1
- package/dist/contracts/SwitchboardCharlie.js +2178 -368
- package/dist/contracts/UnderscoreLego.d.ts +129 -15
- package/dist/contracts/UnderscoreLego.d.ts.map +1 -1
- package/dist/contracts/UnderscoreLego.js +161 -14
- package/dist/contracts/UndyAero.d.ts +1680 -0
- package/dist/contracts/UndyAero.d.ts.map +1 -0
- package/dist/contracts/UndyAero.js +2206 -0
- package/dist/contracts/UndyBtc.d.ts +209 -16
- package/dist/contracts/UndyBtc.d.ts.map +1 -1
- package/dist/contracts/UndyBtc.js +267 -16
- package/dist/contracts/UndyCbeth.d.ts +1680 -0
- package/dist/contracts/UndyCbeth.d.ts.map +1 -0
- package/dist/contracts/UndyCbeth.js +2206 -0
- package/dist/contracts/UndyEth.d.ts +209 -16
- package/dist/contracts/UndyEth.d.ts.map +1 -1
- package/dist/contracts/UndyEth.js +267 -16
- package/dist/contracts/UndyEurc.d.ts +1680 -0
- package/dist/contracts/UndyEurc.d.ts.map +1 -0
- package/dist/contracts/UndyEurc.js +2206 -0
- package/dist/contracts/UndyGho.d.ts +1680 -0
- package/dist/contracts/UndyGho.d.ts.map +1 -0
- package/dist/contracts/UndyGho.js +2206 -0
- package/dist/contracts/UndyUsd.d.ts +209 -16
- package/dist/contracts/UndyUsd.d.ts.map +1 -1
- package/dist/contracts/UndyUsd.js +267 -16
- package/dist/contracts/UndyUsds.d.ts +1680 -0
- package/dist/contracts/UndyUsds.d.ts.map +1 -0
- package/dist/contracts/UndyUsds.js +2206 -0
- package/dist/contracts/UniswapV2.d.ts +85 -0
- package/dist/contracts/UniswapV2.d.ts.map +1 -1
- package/dist/contracts/UniswapV2.js +109 -1
- package/dist/contracts/UniswapV3.d.ts +119 -0
- package/dist/contracts/UniswapV3.d.ts.map +1 -1
- package/dist/contracts/UniswapV3.js +151 -1
- package/dist/contracts/UserWallet.d.ts +12 -8
- package/dist/contracts/UserWallet.d.ts.map +1 -1
- package/dist/contracts/UserWallet.js +13 -9
- package/dist/contracts/UserWalletConfig.d.ts +198 -56
- package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
- package/dist/contracts/UserWalletConfig.js +225 -72
- package/dist/contracts/UserWalletConfigV1.d.ts +3655 -0
- package/dist/contracts/UserWalletConfigV1.d.ts.map +1 -0
- package/dist/contracts/UserWalletConfigV1.js +4251 -0
- package/dist/contracts/UserWalletV1.d.ts +2633 -0
- package/dist/contracts/UserWalletV1.d.ts.map +1 -0
- package/dist/contracts/UserWalletV1.js +3500 -0
- package/dist/contracts/VaultRegistry.d.ts +848 -85
- package/dist/contracts/VaultRegistry.d.ts.map +1 -1
- package/dist/contracts/VaultRegistry.js +1078 -83
- package/dist/contracts/WalletBackpack.d.ts +4 -0
- package/dist/contracts/WalletBackpack.d.ts.map +1 -1
- package/dist/contracts/WalletBackpack.js +5 -1
- package/dist/contracts/Wasabi.d.ts +2579 -0
- package/dist/contracts/Wasabi.d.ts.map +1 -0
- package/dist/contracts/Wasabi.js +3274 -0
- package/dist/contracts/index.d.ts +18 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +18 -1
- package/dist/contracts/sdk.d.ts +36 -2
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +36 -2
- package/dist/getSwapInstructions.js +1 -1
- package/dist/index.d.ts +95 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -7
- package/package.json +3 -3
|
@@ -201,6 +201,11 @@ export const abi = [
|
|
|
201
201
|
type: 'uint256',
|
|
202
202
|
indexed: false,
|
|
203
203
|
},
|
|
204
|
+
{
|
|
205
|
+
name: 'lastAveragePricePerShare',
|
|
206
|
+
type: 'uint256',
|
|
207
|
+
indexed: false,
|
|
208
|
+
},
|
|
204
209
|
],
|
|
205
210
|
anonymous: false,
|
|
206
211
|
type: 'event',
|
|
@@ -1100,45 +1105,58 @@ export const abi = [
|
|
|
1100
1105
|
{
|
|
1101
1106
|
stateMutability: 'view',
|
|
1102
1107
|
type: 'function',
|
|
1103
|
-
name: '
|
|
1108
|
+
name: 'totalAssets',
|
|
1104
1109
|
inputs: [
|
|
1105
1110
|
{
|
|
1106
1111
|
name: '_vaultToken',
|
|
1107
1112
|
type: 'address',
|
|
1108
1113
|
},
|
|
1114
|
+
],
|
|
1115
|
+
outputs: [
|
|
1109
1116
|
{
|
|
1110
|
-
name: '
|
|
1117
|
+
name: '',
|
|
1118
|
+
type: 'uint256',
|
|
1119
|
+
},
|
|
1120
|
+
],
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
stateMutability: 'view',
|
|
1124
|
+
type: 'function',
|
|
1125
|
+
name: 'totalBorrows',
|
|
1126
|
+
inputs: [
|
|
1127
|
+
{
|
|
1128
|
+
name: '_vaultToken',
|
|
1111
1129
|
type: 'address',
|
|
1112
1130
|
},
|
|
1113
1131
|
],
|
|
1114
1132
|
outputs: [
|
|
1115
1133
|
{
|
|
1116
1134
|
name: '',
|
|
1117
|
-
type: '
|
|
1135
|
+
type: 'uint256',
|
|
1118
1136
|
},
|
|
1119
1137
|
],
|
|
1120
1138
|
},
|
|
1121
1139
|
{
|
|
1122
1140
|
stateMutability: 'view',
|
|
1123
1141
|
type: 'function',
|
|
1124
|
-
name: '
|
|
1142
|
+
name: 'getAvailLiquidity',
|
|
1125
1143
|
inputs: [
|
|
1126
1144
|
{
|
|
1127
|
-
name: '
|
|
1145
|
+
name: '_vaultToken',
|
|
1128
1146
|
type: 'address',
|
|
1129
1147
|
},
|
|
1130
1148
|
],
|
|
1131
1149
|
outputs: [
|
|
1132
1150
|
{
|
|
1133
1151
|
name: '',
|
|
1134
|
-
type: '
|
|
1152
|
+
type: 'uint256',
|
|
1135
1153
|
},
|
|
1136
1154
|
],
|
|
1137
1155
|
},
|
|
1138
1156
|
{
|
|
1139
1157
|
stateMutability: 'view',
|
|
1140
1158
|
type: 'function',
|
|
1141
|
-
name: '
|
|
1159
|
+
name: 'getUtilizationRatio',
|
|
1142
1160
|
inputs: [
|
|
1143
1161
|
{
|
|
1144
1162
|
name: '_vaultToken',
|
|
@@ -1155,12 +1173,33 @@ export const abi = [
|
|
|
1155
1173
|
{
|
|
1156
1174
|
stateMutability: 'view',
|
|
1157
1175
|
type: 'function',
|
|
1158
|
-
name: '
|
|
1176
|
+
name: 'isEligibleForYieldBonus',
|
|
1177
|
+
inputs: [
|
|
1178
|
+
{
|
|
1179
|
+
name: '_asset',
|
|
1180
|
+
type: 'address',
|
|
1181
|
+
},
|
|
1182
|
+
],
|
|
1183
|
+
outputs: [
|
|
1184
|
+
{
|
|
1185
|
+
name: '',
|
|
1186
|
+
type: 'bool',
|
|
1187
|
+
},
|
|
1188
|
+
],
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
stateMutability: 'view',
|
|
1192
|
+
type: 'function',
|
|
1193
|
+
name: 'getWithdrawalFees',
|
|
1159
1194
|
inputs: [
|
|
1160
1195
|
{
|
|
1161
1196
|
name: '_vaultToken',
|
|
1162
1197
|
type: 'address',
|
|
1163
1198
|
},
|
|
1199
|
+
{
|
|
1200
|
+
name: '_vaultTokenAmount',
|
|
1201
|
+
type: 'uint256',
|
|
1202
|
+
},
|
|
1164
1203
|
],
|
|
1165
1204
|
outputs: [
|
|
1166
1205
|
{
|
|
@@ -1474,6 +1513,94 @@ export const abi = [
|
|
|
1474
1513
|
},
|
|
1475
1514
|
],
|
|
1476
1515
|
},
|
|
1516
|
+
{
|
|
1517
|
+
stateMutability: 'nonpayable',
|
|
1518
|
+
type: 'function',
|
|
1519
|
+
name: 'claimIncentives',
|
|
1520
|
+
inputs: [
|
|
1521
|
+
{
|
|
1522
|
+
name: '_user',
|
|
1523
|
+
type: 'address',
|
|
1524
|
+
},
|
|
1525
|
+
{
|
|
1526
|
+
name: '_rewardToken',
|
|
1527
|
+
type: 'address',
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
name: '_rewardAmount',
|
|
1531
|
+
type: 'uint256',
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
name: '_proofs',
|
|
1535
|
+
type: 'bytes32[]',
|
|
1536
|
+
},
|
|
1537
|
+
],
|
|
1538
|
+
outputs: [
|
|
1539
|
+
{
|
|
1540
|
+
name: '',
|
|
1541
|
+
type: 'uint256',
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
name: '',
|
|
1545
|
+
type: 'uint256',
|
|
1546
|
+
},
|
|
1547
|
+
],
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
stateMutability: 'nonpayable',
|
|
1551
|
+
type: 'function',
|
|
1552
|
+
name: 'claimIncentives',
|
|
1553
|
+
inputs: [
|
|
1554
|
+
{
|
|
1555
|
+
name: '_user',
|
|
1556
|
+
type: 'address',
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: '_rewardToken',
|
|
1560
|
+
type: 'address',
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
name: '_rewardAmount',
|
|
1564
|
+
type: 'uint256',
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: '_proofs',
|
|
1568
|
+
type: 'bytes32[]',
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
name: '_miniAddys',
|
|
1572
|
+
type: 'tuple',
|
|
1573
|
+
components: [
|
|
1574
|
+
{
|
|
1575
|
+
name: 'ledger',
|
|
1576
|
+
type: 'address',
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
name: 'missionControl',
|
|
1580
|
+
type: 'address',
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
name: 'legoBook',
|
|
1584
|
+
type: 'address',
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
name: 'appraiser',
|
|
1588
|
+
type: 'address',
|
|
1589
|
+
},
|
|
1590
|
+
],
|
|
1591
|
+
},
|
|
1592
|
+
],
|
|
1593
|
+
outputs: [
|
|
1594
|
+
{
|
|
1595
|
+
name: '',
|
|
1596
|
+
type: 'uint256',
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
name: '',
|
|
1600
|
+
type: 'uint256',
|
|
1601
|
+
},
|
|
1602
|
+
],
|
|
1603
|
+
},
|
|
1477
1604
|
{
|
|
1478
1605
|
stateMutability: 'nonpayable',
|
|
1479
1606
|
type: 'function',
|
|
@@ -2928,6 +3055,18 @@ export const abi = [
|
|
|
2928
3055
|
},
|
|
2929
3056
|
],
|
|
2930
3057
|
},
|
|
3058
|
+
{
|
|
3059
|
+
stateMutability: 'view',
|
|
3060
|
+
type: 'function',
|
|
3061
|
+
name: 'RIPE_REGISTRY',
|
|
3062
|
+
inputs: [],
|
|
3063
|
+
outputs: [
|
|
3064
|
+
{
|
|
3065
|
+
name: '',
|
|
3066
|
+
type: 'address',
|
|
3067
|
+
},
|
|
3068
|
+
],
|
|
3069
|
+
},
|
|
2931
3070
|
{
|
|
2932
3071
|
stateMutability: 'nonpayable',
|
|
2933
3072
|
type: 'constructor',
|
|
@@ -2944,11 +3083,15 @@ export const abi = [
|
|
|
2944
3083
|
name: '_weth',
|
|
2945
3084
|
type: 'address',
|
|
2946
3085
|
},
|
|
3086
|
+
{
|
|
3087
|
+
name: '_ripeRegistry',
|
|
3088
|
+
type: 'address',
|
|
3089
|
+
},
|
|
2947
3090
|
],
|
|
2948
3091
|
outputs: [],
|
|
2949
3092
|
},
|
|
2950
3093
|
];
|
|
2951
|
-
export const deployAddress = '
|
|
3094
|
+
export const deployAddress = '0x0657CF4683870b8420bB8Da57db83e5F9A1ad804';
|
|
2952
3095
|
function getRequest(method, args, contractAddressOrOptions) {
|
|
2953
3096
|
const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
|
|
2954
3097
|
const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
|
|
@@ -3011,15 +3154,18 @@ export const call = {
|
|
|
3011
3154
|
isRebasing: (...args) => getRequest('isRebasing', args),
|
|
3012
3155
|
getPricePerShare: (...args) => getRequest('getPricePerShare', args),
|
|
3013
3156
|
getVaultTokenAmount: (...args) => getRequest('getVaultTokenAmount', args),
|
|
3014
|
-
isEligibleVaultForTrialFunds: (...args) => getRequest('isEligibleVaultForTrialFunds', args),
|
|
3015
|
-
isEligibleForYieldBonus: (...args) => getRequest('isEligibleForYieldBonus', args),
|
|
3016
3157
|
totalAssets: (...args) => getRequest('totalAssets', args),
|
|
3017
3158
|
totalBorrows: (...args) => getRequest('totalBorrows', args),
|
|
3159
|
+
getAvailLiquidity: (...args) => getRequest('getAvailLiquidity', args),
|
|
3160
|
+
getUtilizationRatio: (...args) => getRequest('getUtilizationRatio', args),
|
|
3161
|
+
isEligibleForYieldBonus: (...args) => getRequest('isEligibleForYieldBonus', args),
|
|
3162
|
+
getWithdrawalFees: (...args) => getRequest('getWithdrawalFees', args),
|
|
3018
3163
|
canRegisterVaultToken: (...args) => getRequest('canRegisterVaultToken', args),
|
|
3019
3164
|
hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
|
|
3020
3165
|
getAccessForLego: (...args) => getRequest('getAccessForLego', args),
|
|
3021
3166
|
MOONWELL_COMPTROLLER: (...args) => getRequest('MOONWELL_COMPTROLLER', args),
|
|
3022
3167
|
WETH: (...args) => getRequest('WETH', args),
|
|
3168
|
+
RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
|
|
3023
3169
|
};
|
|
3024
3170
|
function getMutation(functionName) {
|
|
3025
3171
|
return {
|
|
@@ -3040,6 +3186,7 @@ export const mutation = {
|
|
|
3040
3186
|
addPriceSnapshot: getMutation('addPriceSnapshot'),
|
|
3041
3187
|
depositForYield: getMutation('depositForYield'),
|
|
3042
3188
|
withdrawFromYield: getMutation('withdrawFromYield'),
|
|
3189
|
+
claimIncentives: getMutation('claimIncentives'),
|
|
3043
3190
|
claimRewards: getMutation('claimRewards'),
|
|
3044
3191
|
swapTokens: getMutation('swapTokens'),
|
|
3045
3192
|
mintOrRedeemAsset: getMutation('mintOrRedeemAsset'),
|
|
@@ -3092,15 +3239,18 @@ export function toSdk(publicClient, walletClient) {
|
|
|
3092
3239
|
isRebasing: (...args) => singleQuery(publicClient, call.isRebasing(...args)),
|
|
3093
3240
|
getPricePerShare: (...args) => singleQuery(publicClient, call.getPricePerShare(...args)),
|
|
3094
3241
|
getVaultTokenAmount: (...args) => singleQuery(publicClient, call.getVaultTokenAmount(...args)),
|
|
3095
|
-
isEligibleVaultForTrialFunds: (...args) => singleQuery(publicClient, call.isEligibleVaultForTrialFunds(...args)),
|
|
3096
|
-
isEligibleForYieldBonus: (...args) => singleQuery(publicClient, call.isEligibleForYieldBonus(...args)),
|
|
3097
3242
|
totalAssets: (...args) => singleQuery(publicClient, call.totalAssets(...args)),
|
|
3098
3243
|
totalBorrows: (...args) => singleQuery(publicClient, call.totalBorrows(...args)),
|
|
3244
|
+
getAvailLiquidity: (...args) => singleQuery(publicClient, call.getAvailLiquidity(...args)),
|
|
3245
|
+
getUtilizationRatio: (...args) => singleQuery(publicClient, call.getUtilizationRatio(...args)),
|
|
3246
|
+
isEligibleForYieldBonus: (...args) => singleQuery(publicClient, call.isEligibleForYieldBonus(...args)),
|
|
3247
|
+
getWithdrawalFees: (...args) => singleQuery(publicClient, call.getWithdrawalFees(...args)),
|
|
3099
3248
|
canRegisterVaultToken: (...args) => singleQuery(publicClient, call.canRegisterVaultToken(...args)),
|
|
3100
3249
|
hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args)),
|
|
3101
3250
|
getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
|
|
3102
3251
|
MOONWELL_COMPTROLLER: (...args) => singleQuery(publicClient, call.MOONWELL_COMPTROLLER(...args)),
|
|
3103
3252
|
WETH: (...args) => singleQuery(publicClient, call.WETH(...args)),
|
|
3253
|
+
RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args)),
|
|
3104
3254
|
// Mutations
|
|
3105
3255
|
pause: (...args) => mutate(walletClient, mutation.pause)(...args),
|
|
3106
3256
|
recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
|
|
@@ -3111,6 +3261,7 @@ export function toSdk(publicClient, walletClient) {
|
|
|
3111
3261
|
addPriceSnapshot: (...args) => mutate(walletClient, mutation.addPriceSnapshot)(...args),
|
|
3112
3262
|
depositForYield: (...args) => mutate(walletClient, mutation.depositForYield)(...args),
|
|
3113
3263
|
withdrawFromYield: (...args) => mutate(walletClient, mutation.withdrawFromYield)(...args),
|
|
3264
|
+
claimIncentives: (...args) => mutate(walletClient, mutation.claimIncentives)(...args),
|
|
3114
3265
|
claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),
|
|
3115
3266
|
swapTokens: (...args) => mutate(walletClient, mutation.swapTokens)(...args),
|
|
3116
3267
|
mintOrRedeemAsset: (...args) => mutate(walletClient, mutation.mintOrRedeemAsset)(...args),
|
|
@@ -163,6 +163,10 @@ export declare const abi: readonly [{
|
|
|
163
163
|
readonly name: "pricePerShare";
|
|
164
164
|
readonly type: "uint256";
|
|
165
165
|
readonly indexed: false;
|
|
166
|
+
}, {
|
|
167
|
+
readonly name: "lastAveragePricePerShare";
|
|
168
|
+
readonly type: "uint256";
|
|
169
|
+
readonly indexed: false;
|
|
166
170
|
}];
|
|
167
171
|
readonly anonymous: false;
|
|
168
172
|
readonly type: "event";
|
|
@@ -811,34 +815,43 @@ export declare const abi: readonly [{
|
|
|
811
815
|
}, {
|
|
812
816
|
readonly stateMutability: "view";
|
|
813
817
|
readonly type: "function";
|
|
814
|
-
readonly name: "
|
|
818
|
+
readonly name: "totalAssets";
|
|
815
819
|
readonly inputs: readonly [{
|
|
816
820
|
readonly name: "_vaultToken";
|
|
817
821
|
readonly type: "address";
|
|
818
|
-
}
|
|
819
|
-
|
|
822
|
+
}];
|
|
823
|
+
readonly outputs: readonly [{
|
|
824
|
+
readonly name: "";
|
|
825
|
+
readonly type: "uint256";
|
|
826
|
+
}];
|
|
827
|
+
}, {
|
|
828
|
+
readonly stateMutability: "view";
|
|
829
|
+
readonly type: "function";
|
|
830
|
+
readonly name: "totalBorrows";
|
|
831
|
+
readonly inputs: readonly [{
|
|
832
|
+
readonly name: "_vaultToken";
|
|
820
833
|
readonly type: "address";
|
|
821
834
|
}];
|
|
822
835
|
readonly outputs: readonly [{
|
|
823
836
|
readonly name: "";
|
|
824
|
-
readonly type: "
|
|
837
|
+
readonly type: "uint256";
|
|
825
838
|
}];
|
|
826
839
|
}, {
|
|
827
840
|
readonly stateMutability: "view";
|
|
828
841
|
readonly type: "function";
|
|
829
|
-
readonly name: "
|
|
842
|
+
readonly name: "getAvailLiquidity";
|
|
830
843
|
readonly inputs: readonly [{
|
|
831
|
-
readonly name: "
|
|
844
|
+
readonly name: "_vaultToken";
|
|
832
845
|
readonly type: "address";
|
|
833
846
|
}];
|
|
834
847
|
readonly outputs: readonly [{
|
|
835
848
|
readonly name: "";
|
|
836
|
-
readonly type: "
|
|
849
|
+
readonly type: "uint256";
|
|
837
850
|
}];
|
|
838
851
|
}, {
|
|
839
852
|
readonly stateMutability: "view";
|
|
840
853
|
readonly type: "function";
|
|
841
|
-
readonly name: "
|
|
854
|
+
readonly name: "getUtilizationRatio";
|
|
842
855
|
readonly inputs: readonly [{
|
|
843
856
|
readonly name: "_vaultToken";
|
|
844
857
|
readonly type: "address";
|
|
@@ -850,10 +863,25 @@ export declare const abi: readonly [{
|
|
|
850
863
|
}, {
|
|
851
864
|
readonly stateMutability: "view";
|
|
852
865
|
readonly type: "function";
|
|
853
|
-
readonly name: "
|
|
866
|
+
readonly name: "isEligibleForYieldBonus";
|
|
867
|
+
readonly inputs: readonly [{
|
|
868
|
+
readonly name: "_asset";
|
|
869
|
+
readonly type: "address";
|
|
870
|
+
}];
|
|
871
|
+
readonly outputs: readonly [{
|
|
872
|
+
readonly name: "";
|
|
873
|
+
readonly type: "bool";
|
|
874
|
+
}];
|
|
875
|
+
}, {
|
|
876
|
+
readonly stateMutability: "view";
|
|
877
|
+
readonly type: "function";
|
|
878
|
+
readonly name: "getWithdrawalFees";
|
|
854
879
|
readonly inputs: readonly [{
|
|
855
880
|
readonly name: "_vaultToken";
|
|
856
881
|
readonly type: "address";
|
|
882
|
+
}, {
|
|
883
|
+
readonly name: "_vaultTokenAmount";
|
|
884
|
+
readonly type: "uint256";
|
|
857
885
|
}];
|
|
858
886
|
readonly outputs: readonly [{
|
|
859
887
|
readonly name: "";
|
|
@@ -1081,6 +1109,70 @@ export declare const abi: readonly [{
|
|
|
1081
1109
|
readonly name: "";
|
|
1082
1110
|
readonly type: "uint256";
|
|
1083
1111
|
}];
|
|
1112
|
+
}, {
|
|
1113
|
+
readonly stateMutability: "nonpayable";
|
|
1114
|
+
readonly type: "function";
|
|
1115
|
+
readonly name: "claimIncentives";
|
|
1116
|
+
readonly inputs: readonly [{
|
|
1117
|
+
readonly name: "_user";
|
|
1118
|
+
readonly type: "address";
|
|
1119
|
+
}, {
|
|
1120
|
+
readonly name: "_rewardToken";
|
|
1121
|
+
readonly type: "address";
|
|
1122
|
+
}, {
|
|
1123
|
+
readonly name: "_rewardAmount";
|
|
1124
|
+
readonly type: "uint256";
|
|
1125
|
+
}, {
|
|
1126
|
+
readonly name: "_proofs";
|
|
1127
|
+
readonly type: "bytes32[]";
|
|
1128
|
+
}];
|
|
1129
|
+
readonly outputs: readonly [{
|
|
1130
|
+
readonly name: "";
|
|
1131
|
+
readonly type: "uint256";
|
|
1132
|
+
}, {
|
|
1133
|
+
readonly name: "";
|
|
1134
|
+
readonly type: "uint256";
|
|
1135
|
+
}];
|
|
1136
|
+
}, {
|
|
1137
|
+
readonly stateMutability: "nonpayable";
|
|
1138
|
+
readonly type: "function";
|
|
1139
|
+
readonly name: "claimIncentives";
|
|
1140
|
+
readonly inputs: readonly [{
|
|
1141
|
+
readonly name: "_user";
|
|
1142
|
+
readonly type: "address";
|
|
1143
|
+
}, {
|
|
1144
|
+
readonly name: "_rewardToken";
|
|
1145
|
+
readonly type: "address";
|
|
1146
|
+
}, {
|
|
1147
|
+
readonly name: "_rewardAmount";
|
|
1148
|
+
readonly type: "uint256";
|
|
1149
|
+
}, {
|
|
1150
|
+
readonly name: "_proofs";
|
|
1151
|
+
readonly type: "bytes32[]";
|
|
1152
|
+
}, {
|
|
1153
|
+
readonly name: "_miniAddys";
|
|
1154
|
+
readonly type: "tuple";
|
|
1155
|
+
readonly components: readonly [{
|
|
1156
|
+
readonly name: "ledger";
|
|
1157
|
+
readonly type: "address";
|
|
1158
|
+
}, {
|
|
1159
|
+
readonly name: "missionControl";
|
|
1160
|
+
readonly type: "address";
|
|
1161
|
+
}, {
|
|
1162
|
+
readonly name: "legoBook";
|
|
1163
|
+
readonly type: "address";
|
|
1164
|
+
}, {
|
|
1165
|
+
readonly name: "appraiser";
|
|
1166
|
+
readonly type: "address";
|
|
1167
|
+
}];
|
|
1168
|
+
}];
|
|
1169
|
+
readonly outputs: readonly [{
|
|
1170
|
+
readonly name: "";
|
|
1171
|
+
readonly type: "uint256";
|
|
1172
|
+
}, {
|
|
1173
|
+
readonly name: "";
|
|
1174
|
+
readonly type: "uint256";
|
|
1175
|
+
}];
|
|
1084
1176
|
}, {
|
|
1085
1177
|
readonly stateMutability: "nonpayable";
|
|
1086
1178
|
readonly type: "function";
|
|
@@ -2167,6 +2259,15 @@ export declare const abi: readonly [{
|
|
|
2167
2259
|
readonly name: "";
|
|
2168
2260
|
readonly type: "address";
|
|
2169
2261
|
}];
|
|
2262
|
+
}, {
|
|
2263
|
+
readonly stateMutability: "view";
|
|
2264
|
+
readonly type: "function";
|
|
2265
|
+
readonly name: "RIPE_REGISTRY";
|
|
2266
|
+
readonly inputs: readonly [];
|
|
2267
|
+
readonly outputs: readonly [{
|
|
2268
|
+
readonly name: "";
|
|
2269
|
+
readonly type: "address";
|
|
2270
|
+
}];
|
|
2170
2271
|
}, {
|
|
2171
2272
|
readonly stateMutability: "nonpayable";
|
|
2172
2273
|
readonly type: "constructor";
|
|
@@ -2182,6 +2283,9 @@ export declare const abi: readonly [{
|
|
|
2182
2283
|
}, {
|
|
2183
2284
|
readonly name: "_morphoRewardsAddr";
|
|
2184
2285
|
readonly type: "address";
|
|
2286
|
+
}, {
|
|
2287
|
+
readonly name: "_ripeRegistry";
|
|
2288
|
+
readonly type: "address";
|
|
2185
2289
|
}];
|
|
2186
2290
|
readonly outputs: readonly [];
|
|
2187
2291
|
}];
|
|
@@ -2264,16 +2368,19 @@ export type Contract = {
|
|
|
2264
2368
|
isRebasing: () => Promise<boolean>;
|
|
2265
2369
|
getPricePerShare: (vaultToken: `0x${string}`, decimals?: bigint) => Promise<bigint>;
|
|
2266
2370
|
getVaultTokenAmount: (asset: `0x${string}`, assetAmount: bigint, vaultToken: `0x${string}`) => Promise<bigint>;
|
|
2267
|
-
isEligibleVaultForTrialFunds: (vaultToken: `0x${string}`, underlyingAsset: `0x${string}`) => Promise<boolean>;
|
|
2268
|
-
isEligibleForYieldBonus: (asset: `0x${string}`) => Promise<boolean>;
|
|
2269
2371
|
totalAssets: (vaultToken: `0x${string}`) => Promise<bigint>;
|
|
2270
2372
|
totalBorrows: (vaultToken: `0x${string}`) => Promise<bigint>;
|
|
2373
|
+
getAvailLiquidity: (vaultToken: `0x${string}`) => Promise<bigint>;
|
|
2374
|
+
getUtilizationRatio: (vaultToken: `0x${string}`) => Promise<bigint>;
|
|
2375
|
+
isEligibleForYieldBonus: (asset: `0x${string}`) => Promise<boolean>;
|
|
2376
|
+
getWithdrawalFees: (vaultToken: `0x${string}`, vaultTokenAmount: bigint) => Promise<bigint>;
|
|
2271
2377
|
canRegisterVaultToken: (asset: `0x${string}`, vaultToken: `0x${string}`) => Promise<boolean>;
|
|
2272
2378
|
hasClaimableRewards: (user: `0x${string}`) => Promise<boolean>;
|
|
2273
2379
|
getAccessForLego: (user: `0x${string}`, action: bigint) => Promise<[`0x${string}`, string, bigint]>;
|
|
2274
2380
|
morphoRewards: () => Promise<`0x${string}`>;
|
|
2275
2381
|
MORPHO_FACTORY: () => Promise<`0x${string}`>;
|
|
2276
2382
|
MORPHO_FACTORY_LEGACY: () => Promise<`0x${string}`>;
|
|
2383
|
+
RIPE_REGISTRY: () => Promise<`0x${string}`>;
|
|
2277
2384
|
};
|
|
2278
2385
|
mutations: {
|
|
2279
2386
|
pause: (shouldPause: boolean) => Promise<void>;
|
|
@@ -2304,6 +2411,12 @@ export type Contract = {
|
|
|
2304
2411
|
legoBook: `0x${string}`;
|
|
2305
2412
|
appraiser: `0x${string}`;
|
|
2306
2413
|
}) => Promise<[bigint, `0x${string}`, bigint, bigint]>;
|
|
2414
|
+
claimIncentives: (user: `0x${string}`, rewardToken: `0x${string}`, rewardAmount: bigint, proofs: `0x${string}`[], miniAddys?: {
|
|
2415
|
+
ledger: `0x${string}`;
|
|
2416
|
+
missionControl: `0x${string}`;
|
|
2417
|
+
legoBook: `0x${string}`;
|
|
2418
|
+
appraiser: `0x${string}`;
|
|
2419
|
+
}) => Promise<[bigint, bigint]>;
|
|
2307
2420
|
claimRewards: (user: `0x${string}`, rewardToken: `0x${string}`, rewardAmount: bigint, extraData: `0x${string}`, miniAddys?: {
|
|
2308
2421
|
ledger: `0x${string}`;
|
|
2309
2422
|
missionControl: `0x${string}`;
|
|
@@ -2387,7 +2500,7 @@ export type Contract = {
|
|
|
2387
2500
|
SnapShotPriceConfigSet: (minSnapshotDelay: bigint, maxNumSnapshots: bigint, maxUpsideDeviation: bigint, staleTime: bigint) => Promise<void>;
|
|
2388
2501
|
AssetOpportunityAdded: (asset: `0x${string}`, vaultAddr: `0x${string}`) => Promise<void>;
|
|
2389
2502
|
AssetOpportunityRemoved: (asset: `0x${string}`, vaultAddr: `0x${string}`) => Promise<void>;
|
|
2390
|
-
PricePerShareSnapShotAdded: (vaultToken: `0x${string}`, totalSupply: bigint, pricePerShare: bigint) => Promise<void>;
|
|
2503
|
+
PricePerShareSnapShotAdded: (vaultToken: `0x${string}`, totalSupply: bigint, pricePerShare: bigint, lastAveragePricePerShare: bigint) => Promise<void>;
|
|
2391
2504
|
};
|
|
2392
2505
|
};
|
|
2393
2506
|
export type Calls = keyof Contract['calls'];
|
|
@@ -2462,16 +2575,19 @@ export type SDK = {
|
|
|
2462
2575
|
isRebasing: (...args: ExtractArgs<Contract['calls']['isRebasing']>) => Promise<CallReturn<'isRebasing'>>;
|
|
2463
2576
|
getPricePerShare: (...args: ExtractArgs<Contract['calls']['getPricePerShare']>) => Promise<CallReturn<'getPricePerShare'>>;
|
|
2464
2577
|
getVaultTokenAmount: (...args: ExtractArgs<Contract['calls']['getVaultTokenAmount']>) => Promise<CallReturn<'getVaultTokenAmount'>>;
|
|
2465
|
-
isEligibleVaultForTrialFunds: (...args: ExtractArgs<Contract['calls']['isEligibleVaultForTrialFunds']>) => Promise<CallReturn<'isEligibleVaultForTrialFunds'>>;
|
|
2466
|
-
isEligibleForYieldBonus: (...args: ExtractArgs<Contract['calls']['isEligibleForYieldBonus']>) => Promise<CallReturn<'isEligibleForYieldBonus'>>;
|
|
2467
2578
|
totalAssets: (...args: ExtractArgs<Contract['calls']['totalAssets']>) => Promise<CallReturn<'totalAssets'>>;
|
|
2468
2579
|
totalBorrows: (...args: ExtractArgs<Contract['calls']['totalBorrows']>) => Promise<CallReturn<'totalBorrows'>>;
|
|
2580
|
+
getAvailLiquidity: (...args: ExtractArgs<Contract['calls']['getAvailLiquidity']>) => Promise<CallReturn<'getAvailLiquidity'>>;
|
|
2581
|
+
getUtilizationRatio: (...args: ExtractArgs<Contract['calls']['getUtilizationRatio']>) => Promise<CallReturn<'getUtilizationRatio'>>;
|
|
2582
|
+
isEligibleForYieldBonus: (...args: ExtractArgs<Contract['calls']['isEligibleForYieldBonus']>) => Promise<CallReturn<'isEligibleForYieldBonus'>>;
|
|
2583
|
+
getWithdrawalFees: (...args: ExtractArgs<Contract['calls']['getWithdrawalFees']>) => Promise<CallReturn<'getWithdrawalFees'>>;
|
|
2469
2584
|
canRegisterVaultToken: (...args: ExtractArgs<Contract['calls']['canRegisterVaultToken']>) => Promise<CallReturn<'canRegisterVaultToken'>>;
|
|
2470
2585
|
hasClaimableRewards: (...args: ExtractArgs<Contract['calls']['hasClaimableRewards']>) => Promise<CallReturn<'hasClaimableRewards'>>;
|
|
2471
2586
|
getAccessForLego: (...args: ExtractArgs<Contract['calls']['getAccessForLego']>) => Promise<CallReturn<'getAccessForLego'>>;
|
|
2472
2587
|
morphoRewards: (...args: ExtractArgs<Contract['calls']['morphoRewards']>) => Promise<CallReturn<'morphoRewards'>>;
|
|
2473
2588
|
MORPHO_FACTORY: (...args: ExtractArgs<Contract['calls']['MORPHO_FACTORY']>) => Promise<CallReturn<'MORPHO_FACTORY'>>;
|
|
2474
2589
|
MORPHO_FACTORY_LEGACY: (...args: ExtractArgs<Contract['calls']['MORPHO_FACTORY_LEGACY']>) => Promise<CallReturn<'MORPHO_FACTORY_LEGACY'>>;
|
|
2590
|
+
RIPE_REGISTRY: (...args: ExtractArgs<Contract['calls']['RIPE_REGISTRY']>) => Promise<CallReturn<'RIPE_REGISTRY'>>;
|
|
2475
2591
|
pause: (...args: ExtractArgs<Contract['mutations']['pause']>) => Promise<Address>;
|
|
2476
2592
|
recoverFunds: (...args: ExtractArgs<Contract['mutations']['recoverFunds']>) => Promise<Address>;
|
|
2477
2593
|
recoverFundsMany: (...args: ExtractArgs<Contract['mutations']['recoverFundsMany']>) => Promise<Address>;
|
|
@@ -2481,6 +2597,7 @@ export type SDK = {
|
|
|
2481
2597
|
addPriceSnapshot: (...args: ExtractArgs<Contract['mutations']['addPriceSnapshot']>) => Promise<Address>;
|
|
2482
2598
|
depositForYield: (...args: ExtractArgs<Contract['mutations']['depositForYield']>) => Promise<Address>;
|
|
2483
2599
|
withdrawFromYield: (...args: ExtractArgs<Contract['mutations']['withdrawFromYield']>) => Promise<Address>;
|
|
2600
|
+
claimIncentives: (...args: ExtractArgs<Contract['mutations']['claimIncentives']>) => Promise<Address>;
|
|
2484
2601
|
claimRewards: (...args: ExtractArgs<Contract['mutations']['claimRewards']>) => Promise<Address>;
|
|
2485
2602
|
setMorphoRewardsAddr: (...args: ExtractArgs<Contract['mutations']['setMorphoRewardsAddr']>) => Promise<Address>;
|
|
2486
2603
|
swapTokens: (...args: ExtractArgs<Contract['mutations']['swapTokens']>) => Promise<Address>;
|