@raac/rpc 1.2.0-beta.8 → 2.0.0-beta.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.
Files changed (666) hide show
  1. package/dist/RPCLibrary.js +59 -10
  2. package/dist/artifacts/core/governance/gauges/BaseGauge.sol/BaseGauge.json +113 -20
  3. package/dist/artifacts/core/governance/gauges/GaugeController.sol/GaugeController.json +259 -31
  4. package/dist/artifacts/core/governance/gauges/GaugeRewardsDistributor.sol/GaugeRewardsDistributor.json +159 -31
  5. package/dist/artifacts/core/governance/gauges/RAACGauge.sol/RAACGauge.json +115 -22
  6. package/dist/artifacts/core/governance/gauges/RWAGauge.sol/RWAGauge.json +115 -22
  7. package/dist/artifacts/core/governance/proposals/Governance.sol/Governance.json +367 -98
  8. package/dist/artifacts/core/governance/proposals/TimelockController.sol/TimelockController.json +11 -16
  9. package/dist/artifacts/core/lockers/RAACLiquidLocker.sol/RAACLiquidLocker.json +113 -19
  10. package/dist/assets/_helpers.js +31 -0
  11. package/dist/assets/getAsset.js +13 -3
  12. package/dist/assets/getAssets.js +15 -15
  13. package/dist/assets/getSupply.js +16 -5
  14. package/dist/configs/chains/1.json +31 -35
  15. package/dist/configs/chains/11155111.json +104 -118
  16. package/dist/configs/chains/17000.json +31 -35
  17. package/dist/configs/chains/18453.json +31 -35
  18. package/dist/configs/chains/8453.json +88 -41
  19. package/dist/contracts/decodeCall.js +61 -0
  20. package/dist/contracts/findContract.js +68 -0
  21. package/dist/contracts/getContractAddress.js +5 -1
  22. package/dist/contracts/governance/_helpers.js +39 -0
  23. package/dist/contracts/governance/distributor/claimAll.js +18 -11
  24. package/dist/contracts/governance/distributor/claimForGauge.js +18 -12
  25. package/dist/contracts/governance/distributor/deposit.js +17 -12
  26. package/dist/contracts/governance/distributor/getClaimableForGauge.js +12 -9
  27. package/dist/contracts/governance/distributor/getClaimedAtEpoch.js +13 -10
  28. package/dist/contracts/governance/distributor/getDepositedAtEpoch.js +10 -9
  29. package/dist/contracts/governance/distributor/getDustLastProcessedEpoch.js +28 -0
  30. package/dist/contracts/governance/distributor/getGaugeController.js +7 -7
  31. package/dist/contracts/governance/distributor/getLastClaimedEpoch.js +10 -9
  32. package/dist/contracts/governance/distributor/getMaxClaimBound.js +29 -0
  33. package/dist/contracts/governance/distributor/getPeriodDuration.js +7 -7
  34. package/dist/contracts/governance/distributor/getRewardToken.js +7 -7
  35. package/dist/contracts/governance/distributor/getRewardTokenInfo.js +18 -9
  36. package/dist/contracts/governance/distributor/getRewardTokenStats.js +13 -8
  37. package/dist/contracts/governance/distributor/index.js +5 -2
  38. package/dist/contracts/governance/distributor/setController.js +17 -12
  39. package/dist/contracts/governance/distributor/setLastClaimedEpoch.js +32 -0
  40. package/dist/contracts/governance/distributor/setMaxClaimBound.js +31 -0
  41. package/dist/contracts/governance/distributor/withdrawDust.js +31 -0
  42. package/dist/contracts/governance/distributor/withdrawRemovedGaugeRewards.js +19 -13
  43. package/dist/contracts/governance/gauge/_apy.js +126 -0
  44. package/dist/contracts/governance/gauge/_tokens.js +54 -0
  45. package/dist/contracts/governance/gauge/addRewardToken.js +2 -12
  46. package/dist/contracts/governance/gauge/approveGaugeToken.js +31 -0
  47. package/dist/contracts/governance/gauge/claimExtraReward.js +2 -12
  48. package/dist/contracts/governance/gauge/claimExtraRewards.js +2 -12
  49. package/dist/contracts/governance/gauge/claimOnBehalfOf.js +3 -13
  50. package/dist/contracts/governance/gauge/claimRewardToken.js +3 -13
  51. package/dist/contracts/governance/gauge/claimRewardsFor.js +2 -12
  52. package/dist/contracts/governance/gauge/depositRewardToken.js +3 -13
  53. package/dist/contracts/governance/gauge/getAllPendingExtraRewards.js +8 -10
  54. package/dist/contracts/governance/gauge/getApy.js +45 -0
  55. package/dist/contracts/governance/gauge/getBalanceOf.js +10 -18
  56. package/dist/contracts/governance/gauge/getControllerAddress.js +2 -9
  57. package/dist/contracts/governance/gauge/getDecimalAdjustment.js +5 -10
  58. package/dist/contracts/governance/gauge/getDepositRAACOnClaim.js +2 -9
  59. package/dist/contracts/governance/gauge/getDistributorData.js +2 -9
  60. package/dist/contracts/governance/gauge/getDistributors.js +2 -9
  61. package/dist/contracts/governance/gauge/getEarnedExtraReward.js +31 -0
  62. package/dist/contracts/governance/gauge/getEarnedReward.js +10 -15
  63. package/dist/contracts/governance/gauge/getExtraRewardTokens.js +2 -9
  64. package/dist/contracts/governance/gauge/getGaugeData.js +40 -0
  65. package/dist/contracts/governance/gauge/getGaugeRewardTokenData.js +14 -14
  66. package/dist/contracts/governance/gauge/getPauseStatus.js +31 -0
  67. package/dist/contracts/governance/gauge/getPendingExtraRewards.js +5 -10
  68. package/dist/contracts/governance/gauge/getPendingRewards.js +10 -15
  69. package/dist/contracts/governance/gauge/getPeriodBoundaries.js +2 -15
  70. package/dist/contracts/governance/gauge/getPeriodDuration.js +2 -15
  71. package/dist/contracts/governance/gauge/getRaacAutolockMin.js +5 -10
  72. package/dist/contracts/governance/gauge/getRawBalanceOf.js +10 -18
  73. package/dist/contracts/governance/gauge/getRawTotalSupply.js +10 -18
  74. package/dist/contracts/governance/gauge/getRewardTokens.js +28 -0
  75. package/dist/contracts/governance/gauge/getTotalSupply.js +10 -18
  76. package/dist/contracts/governance/gauge/getUserApy.js +73 -0
  77. package/dist/contracts/governance/gauge/getUserClaimableRewards.js +75 -0
  78. package/dist/contracts/governance/gauge/getUserGaugeState.js +52 -0
  79. package/dist/contracts/governance/gauge/getUserRewardTokenData.js +12 -11
  80. package/dist/contracts/governance/gauge/getUserWeight.js +11 -11
  81. package/dist/contracts/governance/gauge/index.js +12 -1
  82. package/dist/contracts/governance/gauge/isPaused.js +4 -11
  83. package/dist/contracts/governance/gauge/manageDistributor.js +2 -12
  84. package/dist/contracts/governance/gauge/pullRewardsFromDistributor.js +30 -0
  85. package/dist/contracts/governance/gauge/setController.js +2 -12
  86. package/dist/contracts/governance/gauge/setDepositRAACOnClaim.js +2 -12
  87. package/dist/contracts/governance/gauge/setEmergencyPaused.js +2 -12
  88. package/dist/contracts/governance/gauge/setGaugeRewardDistributor.js +2 -12
  89. package/dist/contracts/governance/gauge/setRaacAutolockMin.js +3 -13
  90. package/dist/contracts/governance/gauge/stake.js +3 -19
  91. package/dist/contracts/governance/gauge/unwrapStakingToken.js +28 -0
  92. package/dist/contracts/governance/gauge/updateUserRewards.js +2 -18
  93. package/dist/contracts/governance/gauge/withdraw.js +3 -19
  94. package/dist/contracts/governance/gauge/wrapStakingToken.js +28 -0
  95. package/dist/contracts/governance/gaugeController/addGauge.js +19 -11
  96. package/dist/contracts/governance/gaugeController/batchVote.js +20 -12
  97. package/dist/contracts/governance/gaugeController/calculateBoost.js +25 -23
  98. package/dist/contracts/governance/gaugeController/forceCompleteCheckpoint.js +19 -11
  99. package/dist/contracts/governance/gaugeController/getActiveGaugeCount.js +28 -0
  100. package/dist/contracts/governance/gaugeController/getActiveGauges.js +13 -15
  101. package/dist/contracts/governance/gaugeController/getConstants.js +10 -18
  102. package/dist/contracts/governance/gaugeController/getCurrentEpoch.js +8 -7
  103. package/dist/contracts/governance/gaugeController/getExpiredGaugeVotePower.js +30 -0
  104. package/dist/contracts/governance/gaugeController/getGauge.js +13 -10
  105. package/dist/contracts/governance/gaugeController/getGaugeDistributor.js +28 -0
  106. package/dist/contracts/governance/gaugeController/getGaugeEmissions.js +79 -70
  107. package/dist/contracts/governance/gaugeController/getGaugeRelativeWeight.js +19 -15
  108. package/dist/contracts/governance/gaugeController/getGaugeRelativeWeightView.js +14 -11
  109. package/dist/contracts/governance/gaugeController/getGaugeWeight.js +12 -9
  110. package/dist/contracts/governance/gaugeController/getLastVoteTime.js +11 -9
  111. package/dist/contracts/governance/gaugeController/getMaxVoteBuckets.js +28 -0
  112. package/dist/contracts/governance/gaugeController/getNextEpoch.js +8 -7
  113. package/dist/contracts/governance/gaugeController/getRegisteredGaugeList.js +28 -0
  114. package/dist/contracts/governance/gaugeController/getTotalWeight.js +10 -8
  115. package/dist/contracts/governance/gaugeController/getUserGaugeVotePower.js +11 -9
  116. package/dist/contracts/governance/gaugeController/getUserVotePowerRemaining.js +10 -10
  117. package/dist/contracts/governance/gaugeController/getVeToken.js +8 -7
  118. package/dist/contracts/governance/gaugeController/getVoteUserLocks.js +33 -0
  119. package/dist/contracts/governance/gaugeController/getVoteUserPower.js +8 -7
  120. package/dist/contracts/governance/gaugeController/getVoteUserSlope.js +13 -10
  121. package/dist/contracts/governance/gaugeController/index.js +10 -1
  122. package/dist/contracts/governance/gaugeController/isGaugeActive.js +11 -9
  123. package/dist/contracts/governance/gaugeController/isPaused.js +9 -8
  124. package/dist/contracts/governance/gaugeController/kick.js +17 -10
  125. package/dist/contracts/governance/gaugeController/removeGauge.js +20 -11
  126. package/dist/contracts/governance/gaugeController/removePowerFromGauge.js +19 -11
  127. package/dist/contracts/governance/gaugeController/setBoostAmplificationEnabled.js +20 -12
  128. package/dist/contracts/governance/gaugeController/setDistributor.js +31 -0
  129. package/dist/contracts/governance/gaugeController/setEmergencyGaugePause.js +20 -12
  130. package/dist/contracts/governance/gaugeController/setEmergencyGaugePauseBatch.js +33 -0
  131. package/dist/contracts/governance/gaugeController/setEmergencyPause.js +18 -11
  132. package/dist/contracts/governance/gaugeController/setMaxVoteBuckets.js +31 -0
  133. package/dist/contracts/governance/gaugeController/vote.js +15 -16
  134. package/dist/contracts/governance/gaugeSystems/_helpers.js +123 -0
  135. package/dist/contracts/governance/gaugeSystems/findGauge.js +14 -0
  136. package/dist/contracts/governance/gaugeSystems/getGaugeSystem.js +14 -0
  137. package/dist/contracts/governance/gaugeSystems/getGaugeSystems.js +13 -0
  138. package/dist/contracts/governance/gaugeSystems/getGauges.js +15 -0
  139. package/dist/contracts/governance/gaugeSystems/index.js +21 -0
  140. package/dist/contracts/governance/proposals/cancel.js +8 -7
  141. package/dist/contracts/governance/proposals/castVote.js +8 -6
  142. package/dist/contracts/governance/proposals/execute.js +6 -5
  143. package/dist/contracts/governance/proposals/getGovernances.js +22 -0
  144. package/dist/contracts/{tokens/veRAAC/getEffectiveLockEnd.js → governance/proposals/getLabel.js} +10 -11
  145. package/dist/contracts/governance/proposals/getProposal.js +14 -18
  146. package/dist/contracts/governance/proposals/getProposalCount.js +4 -3
  147. package/dist/contracts/governance/proposals/{getProposalData.js → getProposalEta.js} +12 -16
  148. package/dist/contracts/governance/proposals/getProposalInfo.js +10 -8
  149. package/dist/contracts/governance/proposals/getProposalThreshold.js +7 -5
  150. package/dist/contracts/governance/proposals/getQuorum.js +11 -8
  151. package/dist/contracts/governance/proposals/getQuorumNumerator.js +7 -8
  152. package/dist/contracts/governance/proposals/getRoles.js +34 -0
  153. package/dist/contracts/governance/proposals/getState.js +4 -3
  154. package/dist/contracts/governance/proposals/getVoteReceipt.js +54 -0
  155. package/dist/contracts/governance/proposals/getVotes.js +8 -6
  156. package/dist/contracts/governance/proposals/getVotingDelay.js +4 -3
  157. package/dist/contracts/governance/proposals/getVotingPeriod.js +4 -3
  158. package/dist/contracts/governance/proposals/hasRole.js +31 -0
  159. package/dist/contracts/governance/proposals/hasVoted.js +32 -0
  160. package/dist/contracts/governance/proposals/index.js +22 -4
  161. package/dist/contracts/governance/proposals/propose.js +9 -20
  162. package/dist/contracts/governance/proposals/setParameter.js +46 -0
  163. package/dist/contracts/governance/proposals/setTimelock.js +36 -0
  164. package/dist/contracts/governance/timelock/getConstants.js +4 -3
  165. package/dist/contracts/governance/timelock/getMinDelay.js +4 -3
  166. package/dist/contracts/governance/timelock/getRoles.js +37 -0
  167. package/dist/contracts/governance/timelock/getTimestamp.js +4 -3
  168. package/dist/contracts/governance/timelock/hasRole.js +31 -0
  169. package/dist/contracts/governance/timelock/hashOperationBatch.js +7 -6
  170. package/dist/contracts/governance/timelock/index.js +5 -1
  171. package/dist/contracts/governance/timelock/isOperationDone.js +4 -3
  172. package/dist/contracts/governance/timelock/isOperationPending.js +4 -3
  173. package/dist/contracts/governance/timelock/isOperationReady.js +4 -3
  174. package/dist/contracts/housePrices/getLatestPrice.js +12 -4
  175. package/dist/contracts/lockers/botLocker/getClaimable.js +8 -1
  176. package/dist/contracts/lockers/botLocker/getClaimables.js +10 -4
  177. package/dist/contracts/lockers/botLocker/getClaimedRewards.js +13 -4
  178. package/dist/contracts/lockers/liquidLocker/borrow.js +5 -0
  179. package/dist/contracts/lockers/liquidLocker/checkAccountHealth.js +15 -0
  180. package/dist/contracts/lockers/liquidLocker/deposit.js +4 -0
  181. package/dist/contracts/lockers/liquidLocker/donate.js +4 -0
  182. package/dist/contracts/lockers/liquidLocker/getConfig.js +14 -7
  183. package/dist/contracts/lockers/liquidLocker/getGlobalInfo.js +12 -17
  184. package/dist/contracts/lockers/liquidLocker/getUserInfo.js +12 -15
  185. package/dist/contracts/lockers/liquidLocker/getUserLocks.js +20 -8
  186. package/dist/contracts/lockers/liquidLocker/harvest.js +5 -0
  187. package/dist/contracts/lockers/liquidLocker/previewWithdraw.js +26 -0
  188. package/dist/contracts/lockers/liquidLocker/repay.js +5 -1
  189. package/dist/contracts/lockers/liquidLocker/requestUnlock.js +16 -4
  190. package/dist/contracts/lockers/liquidLocker/voteGauge.js +7 -1
  191. package/dist/contracts/lockers/maturityVault/deposit.js +4 -0
  192. package/dist/contracts/lockers/maturityVault/depositFor.js +5 -0
  193. package/dist/contracts/lockers/maturityVault/distribute.js +5 -0
  194. package/dist/contracts/lockers/maturityVault/getConfig.js +12 -2
  195. package/dist/contracts/lockers/maturityVault/getGlobalInfo.js +9 -11
  196. package/dist/contracts/lockers/maturityVault/getUserInfo.js +8 -4
  197. package/dist/contracts/lockers/maturityVault/withdraw.js +5 -0
  198. package/dist/contracts/pmBlender/_helpers.js +19 -0
  199. package/dist/contracts/pmBlender/getReserveBalance.js +13 -12
  200. package/dist/contracts/pmBlender/previewDeposit.js +15 -12
  201. package/dist/contracts/pmBlender/previewSwap.js +16 -12
  202. package/dist/contracts/pmBlender/previewWithdraw.js +15 -12
  203. package/dist/contracts/pmMarket/getMarketConfig.js +15 -13
  204. package/dist/contracts/pmTreasury/_helpers.js +51 -0
  205. package/dist/contracts/pmTreasury/getCollateralRatio.js +13 -16
  206. package/dist/contracts/pmTreasury/getCurrentNav.js +15 -22
  207. package/dist/contracts/pmTreasury/getLeverageRatio.js +13 -16
  208. package/dist/contracts/pmTreasury/getMaxMintablePMUSD.js +17 -21
  209. package/dist/contracts/pmTreasury/getMaxMintablePMUSDWithoutBaseToken.js +16 -19
  210. package/dist/contracts/pmTreasury/getMaxMintableXPM.js +18 -22
  211. package/dist/contracts/pmTreasury/getMaxRedeemablePMUSD.js +17 -21
  212. package/dist/contracts/pmTreasury/getMaxRedeemableXPM.js +17 -21
  213. package/dist/contracts/pmTreasury/getTotalBaseToken.js +13 -16
  214. package/dist/contracts/tokens/RAAC/getBalance.js +16 -5
  215. package/dist/contracts/tokens/RAAC/getTotalSupply.js +12 -7
  216. package/dist/contracts/tokens/crvUSD/getBalance.js +16 -5
  217. package/dist/contracts/tokens/crvUSD/getTotalSupply.js +12 -7
  218. package/dist/contracts/tokens/leRAAC/approve.js +9 -0
  219. package/dist/contracts/tokens/leRAAC/burn.js +5 -0
  220. package/dist/contracts/tokens/leRAAC/burnFrom.js +6 -0
  221. package/dist/contracts/tokens/leRAAC/getAllowance.js +11 -2
  222. package/dist/contracts/tokens/leRAAC/getBalance.js +10 -2
  223. package/dist/contracts/tokens/leRAAC/getMinterInfo.js +10 -1
  224. package/dist/contracts/tokens/leRAAC/getTotalSupply.js +9 -2
  225. package/dist/contracts/tokens/leRAAC/transfer.js +9 -0
  226. package/dist/contracts/tokens/leRAAC/transferFrom.js +10 -0
  227. package/dist/contracts/tokens/pmUSD/getBalance.js +16 -5
  228. package/dist/contracts/tokens/pmUSD/getTotalSupply.js +11 -6
  229. package/dist/contracts/tokens/rcrvUSD/getBalance.js +17 -6
  230. package/dist/contracts/tokens/rcrvUSD/getTotalSupply.js +13 -7
  231. package/dist/contracts/tokens/veRAAC/_helpers.js +38 -0
  232. package/dist/contracts/tokens/veRAAC/distributeRewards.js +1 -1
  233. package/dist/contracts/tokens/veRAAC/getBalance.js +10 -1
  234. package/dist/contracts/tokens/veRAAC/getBalanceAt.js +3 -2
  235. package/dist/contracts/tokens/veRAAC/getBalanceAtTime.js +3 -2
  236. package/dist/contracts/tokens/veRAAC/getCheckpoint.js +3 -2
  237. package/dist/contracts/tokens/veRAAC/getClaimable.js +3 -2
  238. package/dist/contracts/tokens/veRAAC/getClaimed.js +3 -2
  239. package/dist/contracts/tokens/veRAAC/getEarned.js +3 -2
  240. package/dist/contracts/tokens/veRAAC/getGlobalLockInfo.js +3 -2
  241. package/dist/contracts/tokens/veRAAC/getLockedBalance.js +3 -2
  242. package/dist/contracts/tokens/veRAAC/getLocks.js +5 -7
  243. package/dist/contracts/tokens/veRAAC/getMinLockAmount.js +36 -0
  244. package/dist/contracts/tokens/veRAAC/getRagequitRequest.js +6 -5
  245. package/dist/contracts/tokens/veRAAC/getRawBalanceOf.js +3 -2
  246. package/dist/contracts/tokens/veRAAC/getRawTotalSupply.js +3 -2
  247. package/dist/contracts/tokens/veRAAC/getTotalSupply.js +7 -5
  248. package/dist/contracts/tokens/veRAAC/getTotalSupplyAt.js +3 -2
  249. package/dist/contracts/tokens/veRAAC/getTotalSupplyAtTime.js +3 -2
  250. package/dist/contracts/tokens/veRAAC/getUserPointHistory.js +5 -4
  251. package/dist/contracts/tokens/veRAAC/increase.js +1 -1
  252. package/dist/contracts/tokens/veRAAC/increaseWithApproval.js +4 -17
  253. package/dist/contracts/tokens/veRAAC/index.js +3 -3
  254. package/dist/contracts/tokens/veRAAC/lock.js +1 -1
  255. package/dist/contracts/tokens/veRAAC/lockWithApproval.js +4 -19
  256. package/dist/contracts/tokens/xPM/getBalance.js +16 -5
  257. package/dist/contracts/tokens/xPM/getTotalSupply.js +11 -6
  258. package/dist/contracts/zap/aladdin/zap.js +9 -1
  259. package/dist/contracts/zap/aladdin/zapFrom.js +9 -1
  260. package/dist/contracts/zap/aladdin/zapWithRoutes.js +11 -2
  261. package/dist/contracts/zeno/createAuction.js +13 -0
  262. package/dist/contracts/zeno/getAuctions.js +25 -2
  263. package/dist/generated/errorMap.json +3945 -0
  264. package/dist/index.js +15 -0
  265. package/dist/methods/approveToken.js +10 -2
  266. package/dist/methods/commons/checkAllowance.js +11 -1
  267. package/dist/methods/getAssetBalance.js +16 -6
  268. package/dist/minter/_helpers.js +11 -0
  269. package/dist/minter/calculateScheduledMintableAmount.js +3 -1
  270. package/dist/minter/get.js +5 -10
  271. package/dist/minter/getApy.js +12 -9
  272. package/dist/minter/getDistributionPools.js +4 -3
  273. package/dist/minter/getEmissionPerSecond.js +4 -2
  274. package/dist/minter/getPoolInfo.js +5 -3
  275. package/dist/nfts/_helpers.js +17 -0
  276. package/dist/nfts/getHousePrice.js +10 -1
  277. package/dist/nfts/getMintFeePercentage.js +7 -3
  278. package/dist/nfts/getMintPrice.js +10 -7
  279. package/dist/nfts/mint.js +12 -4
  280. package/dist/pools/lendingPool/_helpers.js +37 -2
  281. package/dist/pools/lendingPool/adapters/erc20/getERC20AdapterBalance.js +15 -3
  282. package/dist/pools/lendingPool/borrowFromLendingPool.js +13 -3
  283. package/dist/pools/lendingPool/borrowFromLendingPoolWithInsurance.js +19 -9
  284. package/dist/pools/lendingPool/calculateInsuranceFee.js +12 -5
  285. package/dist/pools/lendingPool/depositToLendingPool.js +9 -6
  286. package/dist/pools/lendingPool/getEligibleUserDeposits.js +5 -7
  287. package/dist/pools/lendingPool/getHealthFactor.js +8 -7
  288. package/dist/pools/lendingPool/getHousePrice.js +10 -6
  289. package/dist/pools/lendingPool/getLendingPoolInfo.js +92 -82
  290. package/dist/pools/lendingPool/getLendingPoolTotalLiquidity.js +8 -4
  291. package/dist/pools/lendingPool/getParameters.js +22 -14
  292. package/dist/pools/lendingPool/getPositionDebt.js +7 -5
  293. package/dist/pools/lendingPool/getPositionScaledDebt.js +7 -7
  294. package/dist/pools/lendingPool/getPositionView.js +24 -19
  295. package/dist/pools/lendingPool/getPositionsScaledDebt.js +6 -8
  296. package/dist/pools/lendingPool/getRawUserDepositsInLendingPool.js +8 -4
  297. package/dist/pools/lendingPool/getUserCollateralValue.js +7 -8
  298. package/dist/pools/lendingPool/openVaultPosition.js +3 -4
  299. package/dist/pools/lendingPool/repayToLendingPool.js +9 -0
  300. package/dist/pools/lendingPool/withdrawFromLendingPool.js +15 -16
  301. package/dist/pools/liquidityPool/getLiquidityPoolInfo.js +23 -30
  302. package/dist/pools/rwaVault/_helpers.js +26 -2
  303. package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterAssetValue.js +9 -1
  304. package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterTotalValue.js +8 -1
  305. package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterAssetValue.js +9 -1
  306. package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterTotalValue.js +8 -1
  307. package/dist/pools/rwaVault/depositToRWAVault.js +15 -3
  308. package/dist/pools/rwaVault/getRWAVaultInfo.js +10 -3
  309. package/dist/pools/rwaVault/previewDeposit.js +11 -5
  310. package/dist/pools/rwaVault/previewWithdraw.js +11 -5
  311. package/dist/pools/rwaVault/redeemNFTFromRWAVault.js +11 -3
  312. package/dist/pools/stabilityPool/depositToStabilityPool.js +11 -9
  313. package/dist/pools/stabilityPool/getRawUserDepositsInStabilityPool.js +11 -9
  314. package/dist/pools/stabilityPool/getStabilityPoolInfo.js +16 -30
  315. package/dist/pools/stabilityPool/getStabilityPoolTotalDeposits.js +10 -7
  316. package/dist/pools/stabilityPool/getWithdrawRequestInfo.js +17 -7
  317. package/dist/pools/stabilityPool/requestWithdraw.js +9 -4
  318. package/dist/pools/stabilityPool/withdrawFromStabilityPool.js +11 -9
  319. package/dist/prices/getPrices.js +10 -4
  320. package/dist/scripts/index.js +2 -1
  321. package/dist/scripts/liquidation.js +11 -10
  322. package/dist/types/RPCLibrary.d.ts +46 -4
  323. package/dist/types/assets/_helpers.d.ts +16 -0
  324. package/dist/types/assets/getAsset.d.ts +12 -1
  325. package/dist/types/assets/getAssets.d.ts +10 -1
  326. package/dist/types/assets/getSupply.d.ts +10 -1
  327. package/dist/types/configs/chains/index.d.ts +54 -66
  328. package/dist/types/configs/index.d.ts +27 -33
  329. package/dist/types/contracts/decodeCall.d.ts +33 -0
  330. package/dist/types/contracts/findContract.d.ts +24 -0
  331. package/dist/types/contracts/governance/_helpers.d.ts +28 -0
  332. package/dist/types/contracts/governance/distributor/claimAll.d.ts +7 -5
  333. package/dist/types/contracts/governance/distributor/claimForGauge.d.ts +7 -6
  334. package/dist/types/contracts/governance/distributor/deposit.d.ts +7 -6
  335. package/dist/types/contracts/governance/distributor/getClaimableForGauge.d.ts +7 -4
  336. package/dist/types/contracts/governance/distributor/getClaimedAtEpoch.d.ts +8 -5
  337. package/dist/types/contracts/governance/distributor/getDepositedAtEpoch.d.ts +7 -4
  338. package/dist/types/contracts/governance/distributor/getDustLastProcessedEpoch.d.ts +12 -0
  339. package/dist/types/contracts/governance/distributor/getGaugeController.d.ts +5 -3
  340. package/dist/types/contracts/governance/distributor/getLastClaimedEpoch.d.ts +6 -4
  341. package/dist/types/contracts/governance/distributor/getMaxClaimBound.d.ts +15 -0
  342. package/dist/types/contracts/governance/distributor/getPeriodDuration.d.ts +5 -3
  343. package/dist/types/contracts/governance/distributor/getRewardToken.d.ts +5 -3
  344. package/dist/types/contracts/governance/distributor/getRewardTokenInfo.d.ts +10 -7
  345. package/dist/types/contracts/governance/distributor/getRewardTokenStats.d.ts +9 -6
  346. package/dist/types/contracts/governance/distributor/index.d.ts +5 -2
  347. package/dist/types/contracts/governance/distributor/setController.d.ts +7 -6
  348. package/dist/types/contracts/governance/distributor/setLastClaimedEpoch.d.ts +13 -0
  349. package/dist/types/contracts/governance/distributor/setMaxClaimBound.d.ts +13 -0
  350. package/dist/types/contracts/governance/distributor/withdrawDust.d.ts +13 -0
  351. package/dist/types/contracts/governance/distributor/withdrawRemovedGaugeRewards.d.ts +8 -7
  352. package/dist/types/contracts/governance/gauge/_apy.d.ts +72 -0
  353. package/dist/types/contracts/governance/gauge/_tokens.d.ts +25 -0
  354. package/dist/types/contracts/governance/gauge/approveGaugeToken.d.ts +14 -0
  355. package/dist/types/contracts/governance/gauge/claimOnBehalfOf.d.ts +2 -2
  356. package/dist/types/contracts/governance/gauge/claimRewardToken.d.ts +1 -1
  357. package/dist/types/contracts/governance/gauge/depositRewardToken.d.ts +2 -2
  358. package/dist/types/contracts/governance/gauge/getAllPendingExtraRewards.d.ts +3 -1
  359. package/dist/types/contracts/governance/gauge/getApy.d.ts +48 -0
  360. package/dist/types/contracts/governance/gauge/getBalanceOf.d.ts +3 -2
  361. package/dist/types/contracts/governance/gauge/getDecimalAdjustment.d.ts +3 -1
  362. package/dist/types/contracts/governance/gauge/getEarnedExtraReward.d.ts +14 -0
  363. package/dist/types/contracts/governance/gauge/getEarnedReward.d.ts +5 -3
  364. package/dist/types/contracts/governance/gauge/getGaugeData.d.ts +24 -0
  365. package/dist/types/contracts/governance/gauge/getGaugeRewardTokenData.d.ts +18 -10
  366. package/dist/types/contracts/governance/gauge/getPauseStatus.d.ts +19 -0
  367. package/dist/types/contracts/governance/gauge/getPendingExtraRewards.d.ts +3 -1
  368. package/dist/types/contracts/governance/gauge/getPendingRewards.d.ts +5 -3
  369. package/dist/types/contracts/governance/gauge/getRaacAutolockMin.d.ts +3 -1
  370. package/dist/types/contracts/governance/gauge/getRawBalanceOf.d.ts +3 -2
  371. package/dist/types/contracts/governance/gauge/getRawTotalSupply.d.ts +3 -2
  372. package/dist/types/contracts/governance/gauge/getRewardTokens.d.ts +11 -0
  373. package/dist/types/contracts/governance/gauge/getTotalSupply.d.ts +3 -2
  374. package/dist/types/contracts/governance/gauge/getUserApy.d.ts +46 -0
  375. package/dist/types/contracts/governance/gauge/getUserClaimableRewards.d.ts +42 -0
  376. package/dist/types/contracts/governance/gauge/getUserGaugeState.d.ts +35 -0
  377. package/dist/types/contracts/governance/gauge/getUserRewardTokenData.d.ts +15 -8
  378. package/dist/types/contracts/governance/gauge/getUserWeight.d.ts +4 -2
  379. package/dist/types/contracts/governance/gauge/index.d.ts +12 -1
  380. package/dist/types/contracts/governance/gauge/isPaused.d.ts +1 -1
  381. package/dist/types/contracts/governance/gauge/pullRewardsFromDistributor.d.ts +11 -0
  382. package/dist/types/contracts/governance/gauge/setRaacAutolockMin.d.ts +2 -2
  383. package/dist/types/contracts/governance/gauge/stake.d.ts +2 -2
  384. package/dist/types/contracts/governance/gauge/unwrapStakingToken.d.ts +12 -0
  385. package/dist/types/contracts/governance/gauge/withdraw.d.ts +2 -2
  386. package/dist/types/contracts/governance/gauge/wrapStakingToken.d.ts +13 -0
  387. package/dist/types/contracts/governance/gaugeController/addGauge.d.ts +8 -5
  388. package/dist/types/contracts/governance/gaugeController/batchVote.d.ts +9 -6
  389. package/dist/types/contracts/governance/gaugeController/calculateBoost.d.ts +12 -9
  390. package/dist/types/contracts/governance/gaugeController/forceCompleteCheckpoint.d.ts +8 -5
  391. package/dist/types/contracts/governance/gaugeController/getActiveGaugeCount.d.ts +12 -0
  392. package/dist/types/contracts/governance/gaugeController/getActiveGauges.d.ts +10 -5
  393. package/dist/types/contracts/governance/gaugeController/getConstants.d.ts +6 -4
  394. package/dist/types/contracts/governance/gaugeController/getCurrentEpoch.d.ts +6 -3
  395. package/dist/types/contracts/governance/gaugeController/getExpiredGaugeVotePower.d.ts +16 -0
  396. package/dist/types/contracts/governance/gaugeController/getGauge.d.ts +9 -5
  397. package/dist/types/contracts/governance/gaugeController/getGaugeDistributor.d.ts +12 -0
  398. package/dist/types/contracts/governance/gaugeController/getGaugeEmissions.d.ts +36 -20
  399. package/dist/types/contracts/governance/gaugeController/getGaugeRelativeWeight.d.ts +8 -9
  400. package/dist/types/contracts/governance/gaugeController/getGaugeRelativeWeightView.d.ts +11 -7
  401. package/dist/types/contracts/governance/gaugeController/getGaugeWeight.d.ts +7 -4
  402. package/dist/types/contracts/governance/gaugeController/getLastVoteTime.d.ts +7 -4
  403. package/dist/types/contracts/governance/gaugeController/getMaxVoteBuckets.d.ts +12 -0
  404. package/dist/types/contracts/governance/gaugeController/getNextEpoch.d.ts +6 -3
  405. package/dist/types/contracts/governance/gaugeController/getRegisteredGaugeList.d.ts +12 -0
  406. package/dist/types/contracts/governance/gaugeController/getTotalWeight.d.ts +6 -3
  407. package/dist/types/contracts/governance/gaugeController/getUserGaugeVotePower.d.ts +7 -4
  408. package/dist/types/contracts/governance/gaugeController/getUserVotePowerRemaining.d.ts +6 -4
  409. package/dist/types/contracts/governance/gaugeController/getVeToken.d.ts +6 -3
  410. package/dist/types/contracts/governance/gaugeController/getVoteUserLocks.d.ts +18 -0
  411. package/dist/types/contracts/governance/gaugeController/getVoteUserPower.d.ts +6 -3
  412. package/dist/types/contracts/governance/gaugeController/getVoteUserSlope.d.ts +10 -6
  413. package/dist/types/contracts/governance/gaugeController/index.d.ts +10 -1
  414. package/dist/types/contracts/governance/gaugeController/isGaugeActive.d.ts +6 -4
  415. package/dist/types/contracts/governance/gaugeController/isPaused.d.ts +6 -3
  416. package/dist/types/contracts/governance/gaugeController/kick.d.ts +7 -4
  417. package/dist/types/contracts/governance/gaugeController/removeGauge.d.ts +9 -5
  418. package/dist/types/contracts/governance/gaugeController/removePowerFromGauge.d.ts +8 -5
  419. package/dist/types/contracts/governance/gaugeController/setBoostAmplificationEnabled.d.ts +9 -6
  420. package/dist/types/contracts/governance/gaugeController/setDistributor.d.ts +13 -0
  421. package/dist/types/contracts/governance/gaugeController/setEmergencyGaugePause.d.ts +9 -6
  422. package/dist/types/contracts/governance/gaugeController/setEmergencyGaugePauseBatch.d.ts +14 -0
  423. package/dist/types/contracts/governance/gaugeController/setEmergencyPause.d.ts +8 -5
  424. package/dist/types/contracts/governance/gaugeController/setMaxVoteBuckets.d.ts +13 -0
  425. package/dist/types/contracts/governance/gaugeController/vote.d.ts +9 -7
  426. package/dist/types/contracts/governance/gaugeSystems/_helpers.d.ts +71 -0
  427. package/dist/types/contracts/governance/gaugeSystems/findGauge.d.ts +11 -0
  428. package/dist/types/contracts/governance/gaugeSystems/getGaugeSystem.d.ts +11 -0
  429. package/dist/types/contracts/governance/gaugeSystems/getGaugeSystems.d.ts +10 -0
  430. package/dist/types/contracts/governance/gaugeSystems/getGauges.d.ts +13 -0
  431. package/dist/types/contracts/governance/gaugeSystems/index.d.ts +5 -0
  432. package/dist/types/contracts/governance/proposals/cancel.d.ts +5 -4
  433. package/dist/types/contracts/governance/proposals/castVote.d.ts +5 -3
  434. package/dist/types/contracts/governance/proposals/execute.d.ts +3 -2
  435. package/dist/types/contracts/governance/proposals/getGovernances.d.ts +11 -0
  436. package/dist/types/contracts/governance/proposals/getLabel.d.ts +11 -0
  437. package/dist/types/contracts/governance/proposals/getProposal.d.ts +13 -13
  438. package/dist/types/contracts/governance/proposals/getProposalCount.d.ts +2 -1
  439. package/dist/types/contracts/governance/proposals/getProposalEta.d.ts +13 -0
  440. package/dist/types/contracts/governance/proposals/getProposalInfo.d.ts +12 -6
  441. package/dist/types/contracts/governance/proposals/getProposalThreshold.d.ts +4 -2
  442. package/dist/types/contracts/governance/proposals/getQuorum.d.ts +7 -4
  443. package/dist/types/contracts/governance/proposals/getQuorumNumerator.d.ts +7 -3
  444. package/dist/types/contracts/governance/proposals/getRoles.d.ts +16 -0
  445. package/dist/types/contracts/governance/proposals/getState.d.ts +2 -1
  446. package/dist/types/contracts/governance/proposals/getVoteReceipt.d.ts +27 -0
  447. package/dist/types/contracts/governance/proposals/getVotes.d.ts +8 -4
  448. package/dist/types/contracts/governance/proposals/getVotingDelay.d.ts +2 -1
  449. package/dist/types/contracts/governance/proposals/getVotingPeriod.d.ts +2 -1
  450. package/dist/types/contracts/governance/proposals/hasRole.d.ts +13 -0
  451. package/dist/types/contracts/governance/proposals/hasVoted.d.ts +14 -0
  452. package/dist/types/contracts/governance/proposals/index.d.ts +11 -2
  453. package/dist/types/contracts/governance/proposals/propose.d.ts +4 -14
  454. package/dist/types/contracts/governance/proposals/setParameter.d.ts +23 -0
  455. package/dist/types/contracts/governance/proposals/setTimelock.d.ts +14 -0
  456. package/dist/types/contracts/governance/timelock/getConstants.d.ts +2 -1
  457. package/dist/types/contracts/governance/timelock/getMinDelay.d.ts +2 -1
  458. package/dist/types/contracts/governance/timelock/getRoles.d.ts +19 -0
  459. package/dist/types/contracts/governance/timelock/getTimestamp.d.ts +2 -1
  460. package/dist/types/contracts/governance/timelock/hasRole.d.ts +13 -0
  461. package/dist/types/contracts/governance/timelock/hashOperationBatch.d.ts +4 -3
  462. package/dist/types/contracts/governance/timelock/index.d.ts +2 -0
  463. package/dist/types/contracts/governance/timelock/isOperationDone.d.ts +2 -1
  464. package/dist/types/contracts/governance/timelock/isOperationPending.d.ts +2 -1
  465. package/dist/types/contracts/governance/timelock/isOperationReady.d.ts +2 -1
  466. package/dist/types/contracts/housePrices/getLatestPrice.d.ts +16 -6
  467. package/dist/types/contracts/lockers/botLocker/getClaimable.d.ts +8 -1
  468. package/dist/types/contracts/lockers/botLocker/getClaimables.d.ts +8 -1
  469. package/dist/types/contracts/lockers/botLocker/getClaimedRewards.d.ts +11 -1
  470. package/dist/types/contracts/lockers/liquidLocker/borrow.d.ts +6 -1
  471. package/dist/types/contracts/lockers/liquidLocker/checkAccountHealth.d.ts +9 -0
  472. package/dist/types/contracts/lockers/liquidLocker/deposit.d.ts +5 -1
  473. package/dist/types/contracts/lockers/liquidLocker/donate.d.ts +5 -1
  474. package/dist/types/contracts/lockers/liquidLocker/getConfig.d.ts +19 -7
  475. package/dist/types/contracts/lockers/liquidLocker/getGlobalInfo.d.ts +19 -16
  476. package/dist/types/contracts/lockers/liquidLocker/getUserInfo.d.ts +17 -14
  477. package/dist/types/contracts/lockers/liquidLocker/getUserLocks.d.ts +20 -7
  478. package/dist/types/contracts/lockers/liquidLocker/harvest.d.ts +6 -1
  479. package/dist/types/contracts/lockers/liquidLocker/previewWithdraw.d.ts +22 -0
  480. package/dist/types/contracts/lockers/liquidLocker/repay.d.ts +6 -2
  481. package/dist/types/contracts/lockers/liquidLocker/requestUnlock.d.ts +15 -3
  482. package/dist/types/contracts/lockers/liquidLocker/voteGauge.d.ts +8 -2
  483. package/dist/types/contracts/lockers/maturityVault/deposit.d.ts +5 -1
  484. package/dist/types/contracts/lockers/maturityVault/depositFor.d.ts +6 -1
  485. package/dist/types/contracts/lockers/maturityVault/distribute.d.ts +6 -1
  486. package/dist/types/contracts/lockers/maturityVault/getConfig.d.ts +12 -2
  487. package/dist/types/contracts/lockers/maturityVault/getGlobalInfo.d.ts +15 -15
  488. package/dist/types/contracts/lockers/maturityVault/getUserInfo.d.ts +10 -6
  489. package/dist/types/contracts/lockers/maturityVault/withdraw.d.ts +6 -1
  490. package/dist/types/contracts/pmBlender/_helpers.d.ts +12 -0
  491. package/dist/types/contracts/pmBlender/getReserveBalance.d.ts +9 -1
  492. package/dist/types/contracts/pmBlender/previewDeposit.d.ts +11 -1
  493. package/dist/types/contracts/pmBlender/previewSwap.d.ts +12 -1
  494. package/dist/types/contracts/pmBlender/previewWithdraw.d.ts +11 -1
  495. package/dist/types/contracts/pmMarket/getMarketConfig.d.ts +20 -11
  496. package/dist/types/contracts/pmTreasury/_helpers.d.ts +27 -0
  497. package/dist/types/contracts/pmTreasury/getCollateralRatio.d.ts +9 -1
  498. package/dist/types/contracts/pmTreasury/getCurrentNav.d.ts +18 -9
  499. package/dist/types/contracts/pmTreasury/getLeverageRatio.d.ts +9 -1
  500. package/dist/types/contracts/pmTreasury/getMaxMintablePMUSD.d.ts +17 -9
  501. package/dist/types/contracts/pmTreasury/getMaxMintablePMUSDWithoutBaseToken.d.ts +15 -5
  502. package/dist/types/contracts/pmTreasury/getMaxMintableXPM.d.ts +18 -8
  503. package/dist/types/contracts/pmTreasury/getMaxRedeemablePMUSD.d.ts +17 -7
  504. package/dist/types/contracts/pmTreasury/getMaxRedeemableXPM.d.ts +17 -7
  505. package/dist/types/contracts/pmTreasury/getTotalBaseToken.d.ts +9 -1
  506. package/dist/types/contracts/tokens/RAAC/getBalance.d.ts +11 -1
  507. package/dist/types/contracts/tokens/RAAC/getTotalSupply.d.ts +7 -3
  508. package/dist/types/contracts/tokens/crvUSD/getBalance.d.ts +11 -1
  509. package/dist/types/contracts/tokens/crvUSD/getTotalSupply.d.ts +7 -3
  510. package/dist/types/contracts/tokens/leRAAC/approve.d.ts +10 -1
  511. package/dist/types/contracts/tokens/leRAAC/burn.d.ts +6 -1
  512. package/dist/types/contracts/tokens/leRAAC/burnFrom.d.ts +7 -1
  513. package/dist/types/contracts/tokens/leRAAC/getAllowance.d.ts +11 -1
  514. package/dist/types/contracts/tokens/leRAAC/getBalance.d.ts +10 -1
  515. package/dist/types/contracts/tokens/leRAAC/getMinterInfo.d.ts +14 -2
  516. package/dist/types/contracts/tokens/leRAAC/getTotalSupply.d.ts +9 -1
  517. package/dist/types/contracts/tokens/leRAAC/transfer.d.ts +10 -1
  518. package/dist/types/contracts/tokens/leRAAC/transferFrom.d.ts +11 -1
  519. package/dist/types/contracts/tokens/pmUSD/getBalance.d.ts +11 -1
  520. package/dist/types/contracts/tokens/pmUSD/getTotalSupply.d.ts +7 -3
  521. package/dist/types/contracts/tokens/rcrvUSD/getBalance.d.ts +11 -1
  522. package/dist/types/contracts/tokens/rcrvUSD/getTotalSupply.d.ts +8 -3
  523. package/dist/types/contracts/tokens/veRAAC/_helpers.d.ts +15 -0
  524. package/dist/types/contracts/tokens/veRAAC/distributeRewards.d.ts +2 -2
  525. package/dist/types/contracts/tokens/veRAAC/getBalance.d.ts +10 -1
  526. package/dist/types/contracts/tokens/veRAAC/getBalanceAt.d.ts +3 -2
  527. package/dist/types/contracts/tokens/veRAAC/getBalanceAtTime.d.ts +3 -2
  528. package/dist/types/contracts/tokens/veRAAC/getCheckpoint.d.ts +4 -2
  529. package/dist/types/contracts/tokens/veRAAC/getClaimable.d.ts +3 -2
  530. package/dist/types/contracts/tokens/veRAAC/getClaimed.d.ts +3 -2
  531. package/dist/types/contracts/tokens/veRAAC/getEarned.d.ts +3 -2
  532. package/dist/types/contracts/tokens/veRAAC/getGlobalLockInfo.d.ts +4 -2
  533. package/dist/types/contracts/tokens/veRAAC/getLockedBalance.d.ts +3 -2
  534. package/dist/types/contracts/tokens/veRAAC/getLocks.d.ts +5 -2
  535. package/dist/types/contracts/tokens/veRAAC/getMinLockAmount.d.ts +15 -0
  536. package/dist/types/contracts/tokens/veRAAC/getRagequitRequest.d.ts +10 -5
  537. package/dist/types/contracts/tokens/veRAAC/getRawBalanceOf.d.ts +3 -2
  538. package/dist/types/contracts/tokens/veRAAC/getRawTotalSupply.d.ts +3 -2
  539. package/dist/types/contracts/tokens/veRAAC/getTotalSupply.d.ts +7 -5
  540. package/dist/types/contracts/tokens/veRAAC/getTotalSupplyAt.d.ts +3 -2
  541. package/dist/types/contracts/tokens/veRAAC/getTotalSupplyAtTime.d.ts +3 -2
  542. package/dist/types/contracts/tokens/veRAAC/getUserPointHistory.d.ts +8 -4
  543. package/dist/types/contracts/tokens/veRAAC/increase.d.ts +2 -2
  544. package/dist/types/contracts/tokens/veRAAC/increaseWithApproval.d.ts +3 -3
  545. package/dist/types/contracts/tokens/veRAAC/index.d.ts +1 -1
  546. package/dist/types/contracts/tokens/veRAAC/lock.d.ts +2 -2
  547. package/dist/types/contracts/tokens/veRAAC/lockWithApproval.d.ts +3 -3
  548. package/dist/types/contracts/tokens/xPM/getBalance.d.ts +11 -1
  549. package/dist/types/contracts/tokens/xPM/getTotalSupply.d.ts +7 -3
  550. package/dist/types/contracts/zap/aladdin/zap.d.ts +9 -1
  551. package/dist/types/contracts/zap/aladdin/zapFrom.d.ts +9 -1
  552. package/dist/types/contracts/zap/aladdin/zapWithRoutes.d.ts +11 -2
  553. package/dist/types/contracts/zeno/createAuction.d.ts +13 -0
  554. package/dist/types/contracts/zeno/getAuctions.d.ts +38 -1
  555. package/dist/types/index.d.ts +1 -0
  556. package/dist/types/methods/approveToken.d.ts +10 -1
  557. package/dist/types/methods/commons/checkAllowance.d.ts +11 -1
  558. package/dist/types/methods/getAssetBalance.d.ts +10 -1
  559. package/dist/types/minter/_helpers.d.ts +8 -0
  560. package/dist/types/minter/calculateScheduledMintableAmount.d.ts +3 -1
  561. package/dist/types/minter/get.d.ts +15 -9
  562. package/dist/types/minter/getApy.d.ts +12 -3
  563. package/dist/types/minter/getDistributionPools.d.ts +10 -2
  564. package/dist/types/minter/getEmissionPerSecond.d.ts +3 -1
  565. package/dist/types/minter/getPoolInfo.d.ts +10 -2
  566. package/dist/types/nfts/_helpers.d.ts +10 -0
  567. package/dist/types/nfts/getHousePrice.d.ts +9 -1
  568. package/dist/types/nfts/getMintFeePercentage.d.ts +6 -0
  569. package/dist/types/nfts/getMintPrice.d.ts +9 -4
  570. package/dist/types/nfts/mint.d.ts +10 -1
  571. package/dist/types/pools/lendingPool/_helpers.d.ts +28 -1
  572. package/dist/types/pools/lendingPool/adapters/erc20/getERC20AdapterBalance.d.ts +11 -1
  573. package/dist/types/pools/lendingPool/borrowFromLendingPool.d.ts +10 -1
  574. package/dist/types/pools/lendingPool/borrowFromLendingPoolWithInsurance.d.ts +10 -1
  575. package/dist/types/pools/lendingPool/calculateInsuranceFee.d.ts +12 -1
  576. package/dist/types/pools/lendingPool/depositToLendingPool.d.ts +9 -2
  577. package/dist/types/pools/lendingPool/getEligibleUserDeposits.d.ts +6 -5
  578. package/dist/types/pools/lendingPool/getHealthFactor.d.ts +8 -7
  579. package/dist/types/pools/lendingPool/getHousePrice.d.ts +9 -1
  580. package/dist/types/pools/lendingPool/getLendingPoolInfo.d.ts +48 -21
  581. package/dist/types/pools/lendingPool/getLendingPoolTotalLiquidity.d.ts +9 -1
  582. package/dist/types/pools/lendingPool/getParameters.d.ts +24 -5
  583. package/dist/types/pools/lendingPool/getPositionDebt.d.ts +8 -5
  584. package/dist/types/pools/lendingPool/getPositionScaledDebt.d.ts +8 -7
  585. package/dist/types/pools/lendingPool/getPositionView.d.ts +33 -18
  586. package/dist/types/pools/lendingPool/getPositionsScaledDebt.d.ts +6 -5
  587. package/dist/types/pools/lendingPool/getRawUserDepositsInLendingPool.d.ts +9 -1
  588. package/dist/types/pools/lendingPool/getUserCollateralValue.d.ts +6 -5
  589. package/dist/types/pools/lendingPool/openVaultPosition.d.ts +2 -2
  590. package/dist/types/pools/lendingPool/repayToLendingPool.d.ts +9 -0
  591. package/dist/types/pools/lendingPool/withdrawFromLendingPool.d.ts +9 -1
  592. package/dist/types/pools/liquidityPool/getLiquidityPoolInfo.d.ts +27 -2
  593. package/dist/types/pools/rwaVault/_helpers.d.ts +21 -1
  594. package/dist/types/pools/rwaVault/adapters/erc20/getERC20VaultAdapterAssetValue.d.ts +9 -1
  595. package/dist/types/pools/rwaVault/adapters/erc20/getERC20VaultAdapterTotalValue.d.ts +8 -1
  596. package/dist/types/pools/rwaVault/adapters/erc721/getERC721VaultAdapterAssetValue.d.ts +9 -1
  597. package/dist/types/pools/rwaVault/adapters/erc721/getERC721VaultAdapterTotalValue.d.ts +8 -1
  598. package/dist/types/pools/rwaVault/depositToRWAVault.d.ts +12 -2
  599. package/dist/types/pools/rwaVault/getRWAVaultInfo.d.ts +16 -4
  600. package/dist/types/pools/rwaVault/previewDeposit.d.ts +9 -1
  601. package/dist/types/pools/rwaVault/previewWithdraw.d.ts +9 -1
  602. package/dist/types/pools/rwaVault/redeemNFTFromRWAVault.d.ts +11 -2
  603. package/dist/types/pools/stabilityPool/depositToStabilityPool.d.ts +9 -2
  604. package/dist/types/pools/stabilityPool/getRawUserDepositsInStabilityPool.d.ts +9 -1
  605. package/dist/types/pools/stabilityPool/getStabilityPoolInfo.d.ts +15 -4
  606. package/dist/types/pools/stabilityPool/getStabilityPoolTotalDeposits.d.ts +8 -1
  607. package/dist/types/pools/stabilityPool/getWithdrawRequestInfo.d.ts +19 -6
  608. package/dist/types/pools/stabilityPool/requestWithdraw.d.ts +9 -2
  609. package/dist/types/pools/stabilityPool/withdrawFromStabilityPool.d.ts +9 -2
  610. package/dist/types/prices/getPrices.d.ts +12 -5
  611. package/dist/types/typechain-types/contracts/core/governance/gauges/BaseGauge.d.ts +176 -105
  612. package/dist/types/typechain-types/contracts/core/governance/gauges/GaugeController.d.ts +260 -213
  613. package/dist/types/typechain-types/contracts/core/governance/gauges/GaugeRewardsDistributor.d.ts +173 -212
  614. package/dist/types/typechain-types/contracts/core/governance/gauges/RAACGauge.d.ts +176 -105
  615. package/dist/types/typechain-types/contracts/core/governance/gauges/RWAGauge.d.ts +176 -105
  616. package/dist/types/typechain-types/contracts/core/governance/proposals/Governance.d.ts +202 -82
  617. package/dist/types/typechain-types/contracts/core/governance/proposals/TimelockController.d.ts +8 -8
  618. package/dist/types/typechain-types/contracts/core/lockers/RAACLiquidLocker.d.ts +89 -37
  619. package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IBaseGauge.d.ts +111 -108
  620. package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGaugeController.d.ts +210 -34
  621. package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGaugeRewardsDistributor.d.ts +112 -151
  622. package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/IGovernance.d.ts +36 -51
  623. package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/ITimelockController.d.ts +8 -8
  624. package/dist/types/typechain-types/factories/contracts/core/governance/gauges/BaseGauge__factory.d.ts +174 -95
  625. package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeController__factory.d.ts +243 -227
  626. package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeRewardsDistributor__factory.d.ts +164 -232
  627. package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RAACGauge__factory.d.ts +185 -98
  628. package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RWAGauge__factory.d.ts +185 -98
  629. package/dist/types/typechain-types/factories/contracts/core/governance/proposals/Governance__factory.d.ts +288 -81
  630. package/dist/types/typechain-types/factories/contracts/core/governance/proposals/TimelockController__factory.d.ts +11 -15
  631. package/dist/types/typechain-types/factories/contracts/core/lockers/RAACLiquidLocker__factory.d.ts +101 -30
  632. package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IBaseGauge__factory.d.ts +104 -95
  633. package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGaugeController__factory.d.ts +241 -22
  634. package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGaugeRewardsDistributor__factory.d.ts +72 -158
  635. package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/IGovernance__factory.d.ts +70 -40
  636. package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/ITimelockController__factory.d.ts +8 -4
  637. package/dist/types/utils/amount.d.ts +101 -0
  638. package/dist/types/utils/artifacts.d.ts +40 -0
  639. package/dist/types/utils/contracts.d.ts +52 -64
  640. package/dist/types/wallet/assets/approveAsset.d.ts +10 -1
  641. package/dist/types/wallet/assets/burnAsset.d.ts +8 -0
  642. package/dist/types/wallet/assets/getAllowance.d.ts +12 -1
  643. package/dist/types/wallet/assets/getAsset.d.ts +13 -1
  644. package/dist/types/wallet/assets/getAssets.d.ts +11 -1
  645. package/dist/types/wallet/assets/getBalance.d.ts +11 -5
  646. package/dist/types/wallet/assets/mintAsset.d.ts +9 -0
  647. package/dist/types/wallet/assets/transferAsset.d.ts +10 -0
  648. package/dist/utils/amount.js +131 -0
  649. package/dist/utils/contracts.js +6 -1
  650. package/dist/wallet/assets/approveAsset.js +10 -4
  651. package/dist/wallet/assets/burnAsset.js +9 -2
  652. package/dist/wallet/assets/getAllowance.js +14 -5
  653. package/dist/wallet/assets/getAsset.js +16 -9
  654. package/dist/wallet/assets/getAssets.js +17 -16
  655. package/dist/wallet/assets/getBalance.js +16 -20
  656. package/dist/wallet/assets/mintAsset.js +10 -1
  657. package/dist/wallet/assets/transferAsset.js +12 -3
  658. package/package.json +2 -2
  659. package/dist/contracts/governance/distributor/getStartEpoch.js +0 -28
  660. package/dist/contracts/governance/distributor/withdrawUnallocatedRewards.js +0 -26
  661. package/dist/contracts/governance/gauge/setDistributorApproval.js +0 -35
  662. package/dist/types/contracts/governance/distributor/getStartEpoch.d.ts +0 -10
  663. package/dist/types/contracts/governance/distributor/withdrawUnallocatedRewards.d.ts +0 -12
  664. package/dist/types/contracts/governance/gauge/setDistributorApproval.d.ts +0 -11
  665. package/dist/types/contracts/governance/proposals/getProposalData.d.ts +0 -18
  666. package/dist/types/contracts/tokens/veRAAC/getEffectiveLockEnd.d.ts +0 -11
@@ -1,17 +1,24 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { TokenAmount } from "../../../utils/amount";
4
+ export interface UserRewardTokenData {
5
+ /** Cumulative reward accrued to the user, normalized to 18 decimals by the gauge. */
6
+ integral: TokenAmount;
7
+ /** The gauge's internal reward accumulator at the user's last checkpoint (ray-scaled over the working supply), raw. */
8
+ lastGaugeIntegral: bigint;
9
+ /** Reward accrued and not yet claimed as of the last checkpoint, normalized to 18 decimals by the gauge. */
10
+ claimable: TokenAmount;
11
+ /** Total reward claimed, in the reward token's base units, with its registry decimals and symbol. */
12
+ claimed: TokenAmount;
13
+ lastUpdate: bigint;
14
+ }
3
15
  /**
4
- * Gets a user's reward accounting data for a specific token.
16
+ * Gets a user's reward accounting data for the gauge's main reward token.
5
17
  * @param chainId - The chain/network to use.
6
18
  * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
7
19
  * @param token - Address of the reward token.
8
20
  * @param user - Address of the user.
9
21
  * @param provider - Optional ethers.js Provider instance.
22
+ * @returns The user's reward data; see `UserRewardTokenData` for the unit of each field.
10
23
  */
11
- export declare const getUserRewardTokenData: (chainId: ChainId, gaugeAddressOrId: string, token: string, user: string, provider?: Provider) => Promise<{
12
- integral: bigint;
13
- lastGaugeIntegral: bigint;
14
- claimable: bigint;
15
- claimed: bigint;
16
- lastUpdate: bigint;
17
- }>;
24
+ export declare const getUserRewardTokenData: (chainId: ChainId, gaugeAddressOrId: string, token: string, user: string, provider?: Provider) => Promise<UserRewardTokenData>;
@@ -1,10 +1,12 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { TokenAmount } from "../../../utils/amount";
3
4
  /**
4
- * Gets the gauge vote weight for a given account.
5
+ * Gets the working balance an account would have if checkpointed now: its staked balance with its current veRAAC boost applied, capped at the staked balance.
5
6
  * @param chainId - The chain/network to use.
6
7
  * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
7
8
  * @param account - Address of the user.
8
9
  * @param provider - Optional ethers.js Provider instance.
10
+ * @returns The boosted working balance in staking token base units, with the staking token's registry decimals and symbol.
9
11
  */
10
- export declare const getUserWeight: (chainId: ChainId, gaugeAddressOrId: string, account: string, provider?: Provider) => Promise<bigint>;
12
+ export declare const getUserWeight: (chainId: ChainId, gaugeAddressOrId: string, account: string, provider?: Provider) => Promise<TokenAmount>;
@@ -1,4 +1,5 @@
1
1
  export * from "./addRewardToken";
2
+ export * from "./approveGaugeToken";
2
3
  export * from "./claimExtraReward";
3
4
  export * from "./claimExtraRewards";
4
5
  export * from "./claimOnBehalfOf";
@@ -6,15 +7,19 @@ export * from "./claimRewardsFor";
6
7
  export * from "./claimRewardToken";
7
8
  export * from "./depositRewardToken";
8
9
  export * from "./getAllPendingExtraRewards";
10
+ export * from "./getApy";
9
11
  export * from "./getBalanceOf";
10
12
  export * from "./getControllerAddress";
11
13
  export * from "./getDecimalAdjustment";
12
14
  export * from "./getDepositRAACOnClaim";
13
15
  export * from "./getDistributorData";
14
16
  export * from "./getDistributors";
17
+ export * from "./getEarnedExtraReward";
15
18
  export * from "./getEarnedReward";
16
19
  export * from "./getExtraRewardTokens";
20
+ export * from "./getGaugeData";
17
21
  export * from "./getGaugeRewardTokenData";
22
+ export * from "./getPauseStatus";
18
23
  export * from "./getPendingExtraRewards";
19
24
  export * from "./getPendingRewards";
20
25
  export * from "./getPeriodBoundaries";
@@ -22,17 +27,23 @@ export * from "./getPeriodDuration";
22
27
  export * from "./getRaacAutolockMin";
23
28
  export * from "./getRawBalanceOf";
24
29
  export * from "./getRawTotalSupply";
30
+ export * from "./getRewardTokens";
25
31
  export * from "./getTotalSupply";
32
+ export * from "./getUserApy";
33
+ export * from "./getUserClaimableRewards";
34
+ export * from "./getUserGaugeState";
26
35
  export * from "./getUserRewardTokenData";
27
36
  export * from "./getUserWeight";
28
37
  export * from "./isPaused";
29
38
  export * from "./manageDistributor";
39
+ export * from "./pullRewardsFromDistributor";
30
40
  export * from "./setController";
31
41
  export * from "./setDepositRAACOnClaim";
32
- export * from "./setDistributorApproval";
33
42
  export * from "./setEmergencyPaused";
34
43
  export * from "./setGaugeRewardDistributor";
35
44
  export * from "./setRaacAutolockMin";
36
45
  export * from "./stake";
46
+ export * from "./unwrapStakingToken";
37
47
  export * from "./updateUserRewards";
38
48
  export * from "./withdraw";
49
+ export * from "./wrapStakingToken";
@@ -1,7 +1,7 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
3
  /**
4
- * Returns whether the gauge is currently paused.
4
+ * Returns the gauge's own emergency pause switch. Does not reflect the controller's global pause; use `getPauseStatus` for both.
5
5
  * @param chainId - The chain/network to use.
6
6
  * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
7
7
  * @param provider - Optional ethers.js Provider instance.
@@ -0,0 +1,11 @@
1
+ import { ethers, Signer } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ /**
4
+ * Pulls a gauge's accrued share from its rewards distributor into the gauge's reward rate. Callable by anyone. Reverts while the gauge or its controller is paused; the share stays in the distributor and the first pull after the pause walks every missed epoch.
5
+ *
6
+ * @param chainId - The chain/network to use.
7
+ * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
8
+ * @param signer - An ethers.js Signer instance (required).
9
+ * @returns The transaction after it has been mined.
10
+ */
11
+ export declare const pullRewardsFromDistributor: (chainId: ChainId, gaugeAddressOrId: string, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
@@ -4,7 +4,7 @@ import { ChainId } from "../../../configs/chains";
4
4
  * Sets the minimum RAAC amount required to trigger an autolock on claim (requires DEFAULT_ADMIN_ROLE).
5
5
  * @param chainId - The chain/network to use.
6
6
  * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
7
- * @param amount - The new minimum autolock amount.
7
+ * @param amount - The new minimum autolock amount, in RAAC base units.
8
8
  * @param signer - An ethers.js Signer instance (required).
9
9
  */
10
- export declare const setRaacAutolockMin: (chainId: ChainId, gaugeAddressOrId: string, amount: string | number | bigint, signer: Signer) => Promise<any>;
10
+ export declare const setRaacAutolockMin: (chainId: ChainId, gaugeAddressOrId: string, amount: bigint, signer: Signer) => Promise<any>;
@@ -6,8 +6,8 @@ import configs from "../../../configs/chains";
6
6
  *
7
7
  * @param chainId - The chain/network to use.
8
8
  * @param gaugeAddressOrId - Address of the gauge contract or ID of the gauge.
9
- * @param amount - The amount of tokens to stake.
9
+ * @param amount - The amount to stake, in staking token base units.
10
10
  * @param signer - An ethers.js Signer instance (must be connected to wallet).
11
11
  * @returns Transaction receipt after the stake is made.
12
12
  */
13
- export declare const stake: (chainId: keyof typeof configs, gaugeAddressOrId: string, amount: string | number | bigint, signer: Signer) => Promise<any>;
13
+ export declare const stake: (chainId: keyof typeof configs, gaugeAddressOrId: string, amount: bigint, signer: Signer) => Promise<any>;
@@ -0,0 +1,12 @@
1
+ import { Signer } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ /**
4
+ * Unwraps a wrapped gauge's staking token back into its underlying (ERC4626 `redeem`), sending it to the signer.
5
+ *
6
+ * @param chainId - The chain/network to use.
7
+ * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
8
+ * @param shares - Staking token to unwrap, base units.
9
+ * @param signer - An ethers.js Signer instance (required).
10
+ * @returns The mined transaction.
11
+ */
12
+ export declare const unwrapStakingToken: (chainId: ChainId, gaugeAddressOrId: string, shares: bigint, signer: Signer) => Promise<any>;
@@ -6,8 +6,8 @@ import configs from "../../../configs/chains";
6
6
  *
7
7
  * @param chainId - The chain/network to use.
8
8
  * @param gaugeAddressOrId - Address of the gauge contract or ID of the gauge.
9
- * @param amount - The amount of tokens to withdraw.
9
+ * @param amount - The amount to withdraw, in staking token base units.
10
10
  * @param signer - An ethers.js Signer instance (must be connected to wallet).
11
11
  * @returns Transaction receipt after the withdrawal is made.
12
12
  */
13
- export declare const withdraw: (chainId: keyof typeof configs, gaugeAddressOrId: string, amount: string | number | bigint, signer: Signer) => Promise<any>;
13
+ export declare const withdraw: (chainId: keyof typeof configs, gaugeAddressOrId: string, amount: bigint, signer: Signer) => Promise<any>;
@@ -0,0 +1,13 @@
1
+ import { Signer } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ /**
4
+ * Wraps the underlying of a wrapped gauge into its staking token (ERC4626 `deposit`), minting the shares to the signer.
5
+ * The underlying must be approved to the wrapper first, see `approveGaugeToken`.
6
+ *
7
+ * @param chainId - The chain/network to use.
8
+ * @param gaugeAddressOrId - Address of the gauge contract or its config ID.
9
+ * @param assets - Underlying to wrap, base units.
10
+ * @param signer - An ethers.js Signer instance (required).
11
+ * @returns The mined transaction.
12
+ */
13
+ export declare const wrapStakingToken: (chainId: ChainId, gaugeAddressOrId: string, assets: bigint, signer: Signer) => Promise<any>;
@@ -1,10 +1,13 @@
1
- import { Signer } from "ethers";
1
+ import { ethers, Signer } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Adds a new gauge to the GaugeController. Requires the GAUGE_ADMIN role.
5
+ * Registers a gauge on the controller. Requires GAUGE_ADMIN. The gauge must belong to this system (RAACGauge on the RAAC controller, RWAGauge on the RWA controller).
6
+ *
5
7
  * @param chainId - The chain/network to use.
6
- * @param gauge - Address of the gauge to add.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param gaugeAddressOrId - Address or config id of the gauge.
7
10
  * @param signer - An ethers.js Signer instance (required).
8
- * @returns The transaction response.
11
+ * @returns The transaction after it has been mined.
9
12
  */
10
- export declare const addGauge: (chainId: ChainId, gauge: string, signer: Signer) => Promise<any>;
13
+ export declare const addGauge: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
@@ -1,11 +1,14 @@
1
- import { Signer } from "ethers";
1
+ import { ethers, Signer } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Casts votes on multiple gauges in a single transaction.
5
+ * Votes on several gauges in one transaction.
6
+ *
5
7
  * @param chainId - The chain/network to use.
6
- * @param gaugeAddresses - Array of gauge addresses to vote on.
7
- * @param voteWeights - Array of vote weights (basis points) aligned with gaugeAddresses.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param gaugeAddressesOrIds - Addresses or config ids of the gauges.
10
+ * @param voteWeights - Vote weight per gauge in basis points (10000 = 100% of the caller's voting power), index-aligned with the gauges.
8
11
  * @param signer - An ethers.js Signer instance (required).
9
- * @returns The transaction response.
12
+ * @returns The transaction after it has been mined.
10
13
  */
11
- export declare const batchVote: (chainId: ChainId, gaugeAddresses: string[], voteWeights: (string | number | bigint)[], signer: Signer) => Promise<any>;
14
+ export declare const batchVote: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressesOrIds: string[], voteWeights: bigint[], signer: Signer) => Promise<ethers.ContractTransactionResponse>;
@@ -1,16 +1,19 @@
1
1
  import { Provider } from "ethers";
2
- import configs from "../../../configs/chains";
2
+ import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ import { TokenAmount } from "../../../utils/amount";
3
5
  /**
4
- * Reads the calculateBoost result from the GaugeController contract (read-only).
6
+ * Calculates the reward boost a user would get on a gauge for a staked amount.
5
7
  *
6
8
  * @param chainId - The chain/network to use.
7
- * @param userAddress - The user for which to calculate boost.
8
- * @param gaugeAddress - The gauge address to calculate the boost for.
9
- * @param amount - The amount to calculate the boost for.
10
- * @param provider - An ethers.js Provider instance for read-only RPC.
11
- * @returns {Promise<{ boostBasisPoints: bigint, boostedAmount: bigint }>}
9
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
10
+ * @param user - Address of the user.
11
+ * @param gaugeAddressOrId - Address or config id of the gauge.
12
+ * @param amount - Staked amount, in the gauge's staking token base units.
13
+ * @param provider - Optional ethers.js Provider instance.
14
+ * @returns The boost in basis points (10000 = 1x) and the boosted amount in staking token base units.
12
15
  */
13
- export declare const calculateBoost: (chainId: keyof typeof configs, userAddress: string, gaugeAddress: string, amount: string | number | bigint, provider: Provider) => Promise<{
16
+ export declare const calculateBoost: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, gaugeAddressOrId: string, amount: bigint, provider?: Provider) => Promise<{
14
17
  boostBasisPoints: bigint;
15
- boostedAmount: bigint;
18
+ boostedAmount: TokenAmount;
16
19
  }>;
@@ -1,10 +1,13 @@
1
- import { Signer } from "ethers";
1
+ import { ethers, Signer } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Forces completion of a pending checkpoint for a gauge.
5
+ * Completes a gauge's pending weight checkpoint.
6
+ *
5
7
  * @param chainId - The chain/network to use.
6
- * @param gauge - Address of the gauge to checkpoint.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param gaugeAddressOrId - Address or config id of the gauge.
7
10
  * @param signer - An ethers.js Signer instance (required).
8
- * @returns The transaction response.
11
+ * @returns The transaction after it has been mined.
9
12
  */
10
- export declare const forceCompleteCheckpoint: (chainId: ChainId, gauge: string, signer: Signer) => Promise<any>;
13
+ export declare const forceCompleteCheckpoint: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
@@ -0,0 +1,12 @@
1
+ import { Provider } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ /**
5
+ * Returns the number of registered gauges on the controller. Emergency-paused gauges are counted.
6
+ *
7
+ * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param provider - Optional ethers.js Provider instance.
10
+ * @returns The registered gauge count.
11
+ */
12
+ export declare const getActiveGaugeCount: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<bigint>;
@@ -1,15 +1,20 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ import { TokenAmount } from "../../../utils/amount";
3
5
  export interface ActiveGaugesInfo {
4
6
  gauges: string[];
5
- weights: string[];
6
- totalWeight: string;
7
+ /** Weight per gauge projected to the next epoch, veRAAC voting power in base units, index-aligned with `gauges`. */
8
+ weights: TokenAmount[];
9
+ /** Sum of all gauge weights projected to the next epoch, veRAAC voting power in base units. */
10
+ totalWeight: TokenAmount;
7
11
  }
8
12
  /**
9
- * Gets the active gauges and their weights.
13
+ * Gets the registered gauges on a controller (paused ones included) and their weights projected to the next epoch.
10
14
  *
11
15
  * @param chainId - The chain/network to use.
16
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
12
17
  * @param provider - Optional ethers.js Provider instance.
13
- * @returns Active gauges, their weights, and total weight. (address[] memory, uint256[] memory, uint256} {activeGauges, weights, totalWeight} Tuple of active gauges, weights and total weight)
18
+ * @returns Active gauges, their weights and the total weight.
14
19
  */
15
- export declare const getActiveGauges: (chainId: ChainId, provider?: Provider) => Promise<ActiveGaugesInfo>;
20
+ export declare const getActiveGauges: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<ActiveGaugesInfo>;
@@ -1,13 +1,15 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Reads the immutable/constant configuration values from the GaugeController.
5
+ * Reads the constant configuration values from a GaugeController.
6
+ *
5
7
  * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
6
9
  * @param provider - Optional ethers.js Provider instance.
7
- * @returns An object with maxBoost, minBoost, weightPrecision, week, weightVoteDelay,
8
- * minVoteWeight and maxVoteWeight, all bigint.
10
+ * @returns maxBoost and minBoost in basis points (10000 = 1x), weightPrecision (10000), week and weightVoteDelay in seconds, and minVoteWeight and maxVoteWeight in basis points (10000 = 100%).
9
11
  */
10
- export declare const getConstants: (chainId: ChainId, provider?: Provider) => Promise<{
12
+ export declare const getConstants: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<{
11
13
  maxBoost: bigint;
12
14
  minBoost: bigint;
13
15
  weightPrecision: bigint;
@@ -1,9 +1,12 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Gets the current epoch boundary (rounded down to the week) from the GaugeController.
5
+ * Returns the start timestamp of the controller's current epoch.
6
+ *
5
7
  * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
6
9
  * @param provider - Optional ethers.js Provider instance.
7
- * @returns Current epoch timestamp as a bigint.
10
+ * @returns The current epoch timestamp, seconds.
8
11
  */
9
- export declare const getCurrentEpoch: (chainId: ChainId, provider?: Provider) => Promise<bigint>;
12
+ export declare const getCurrentEpoch: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<bigint>;
@@ -0,0 +1,16 @@
1
+ import { Provider } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ /**
5
+ * Returns the vote power a user still has assigned to gauges whose votes no longer count, because every lock backing the vote has decayed out by the next epoch. Free it by re-voting those gauges.
6
+ *
7
+ * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param user - Address of the voter.
10
+ * @param provider - Optional ethers.js Provider instance.
11
+ * @returns The stale vote weight in basis points (10000 = 100%) and the gauges it sits on.
12
+ */
13
+ export declare const getExpiredGaugeVotePower: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, provider?: Provider) => Promise<{
14
+ expiredGaugePower: bigint;
15
+ gauges: string[];
16
+ }>;
@@ -1,15 +1,19 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ import { TokenAmount } from "../../../utils/amount";
3
5
  /**
4
- * Reads the gauge config struct from the public `gauges` mapping on the GaugeController.
6
+ * Reads a gauge's entry from the controller's public `gauges` mapping.
7
+ *
5
8
  * @param chainId - The chain/network to use.
6
- * @param gauge - Address of the gauge.
9
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
10
+ * @param gaugeAddressOrId - Address or config id of the gauge.
7
11
  * @param provider - Optional ethers.js Provider instance.
8
- * @returns An object with isActive, isBoostAmplificationEnabled (booleans), weight and lastUpdateTime (bigint).
12
+ * @returns isActive and isBoostAmplificationEnabled flags, the stored weight (veRAAC voting power, base units) and lastUpdateTime.
9
13
  */
10
- export declare const getGauge: (chainId: ChainId, gauge: string, provider?: Provider) => Promise<{
14
+ export declare const getGauge: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, provider?: Provider) => Promise<{
11
15
  isActive: boolean;
12
16
  isBoostAmplificationEnabled: boolean;
13
- weight: bigint;
17
+ weight: TokenAmount;
14
18
  lastUpdateTime: bigint;
15
19
  }>;
@@ -0,0 +1,12 @@
1
+ import { Provider } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ /**
5
+ * Returns the GaugeRewardsDistributor wired to the controller.
6
+ *
7
+ * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param provider - Optional ethers.js Provider instance.
10
+ * @returns The distributor address.
11
+ */
12
+ export declare const getGaugeDistributor: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<string>;
@@ -1,18 +1,26 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemId } from "../../../configs/chains/chain";
4
+ import { ScaledValue, TokenAmount } from "../../../utils/amount";
3
5
  export interface GaugeEpochEmission {
4
6
  /** Epoch (Unix-week) start timestamp, seconds. */
5
7
  epoch: number;
6
- /** Reward token deposited into the distributor for this epoch (formatted). */
7
- deposited: string;
8
- /** Gauge relative weight at this epoch, 1e18-scaled (1e18 = 100%). */
9
- relativeWeight: bigint;
10
- /** Gauge relative weight as a percentage 0..100. */
8
+ /** System reward emission attributed to this epoch, in reward token base units. For past
9
+ * epochs this is the actual deposited amount; for the in-progress epoch it is the FULL
10
+ * scheduled week emission (not the partial tick deposit). */
11
+ deposited: TokenAmount;
12
+ /** Reward token actually deposited into the distributor so far for this epoch, in base units.
13
+ * For the current epoch this grows via tick() during the week; for past epochs it
14
+ * equals `deposited`. */
15
+ depositedSoFar: TokenAmount;
16
+ /** Gauge relative weight at this epoch, an 18-decimal fraction (1.0 = 100%). */
17
+ relativeWeight: ScaledValue;
18
+ /** Gauge relative weight as a percentage 0..100, a computed float. */
11
19
  relativeWeightPct: number;
12
- /** RAAC this gauge received/was allocated for this epoch = deposited × relativeWeight. */
13
- gaugeEmission: string;
14
- gaugeEmissionRaw: bigint;
15
- /** True for the in-progress (current) epoch — `deposited` may still grow via tick(). */
20
+ /** Reward token this gauge received/was allocated for this epoch = deposited × relativeWeight, base units. */
21
+ gaugeEmission: TokenAmount;
22
+ /** True for the in-progress (current) epoch — `deposited` is the scheduled full-week
23
+ * total, while `depositedSoFar` is what has been ticked in so far. */
16
24
  isCurrent: boolean;
17
25
  /**
18
26
  * True for the upcoming (next) epoch preview. Nothing is deposited yet, so `deposited`
@@ -27,25 +35,33 @@ export interface GaugeEmissionsResult {
27
35
  rewardToken: string;
28
36
  currentEpoch: number;
29
37
  weekSeconds: number;
30
- /** Current-epoch gauge relative weight as a percentage 0..100. */
38
+ /** Current-epoch gauge relative weight as a percentage 0..100, a computed float. */
31
39
  relativeWeightPct: number;
32
- /** RAAC allocated to this gauge for the current (in-progress) epoch. */
33
- currentWeekEmission: string;
40
+ /** Reward token allocated to this gauge for the current (in-progress) epoch, base units — the scheduled
41
+ * full-week total, deterministic from the emission schedule (not the tick deposit). */
42
+ currentWeekEmission: TokenAmount;
43
+ /** Reward token deposited into the distributor so far for the current epoch (tick-based), base units. */
44
+ currentWeekDepositedSoFar: TokenAmount;
34
45
  /** Per-epoch series, oldest → newest, ending at the current epoch. */
35
46
  epochs: GaugeEpochEmission[];
36
47
  }
37
48
  /**
38
- * Per-epoch emissions actually received by a gauge: the GaugeController snapshots
39
- * gauge weights per epoch, and the GaugeRewardsDistributor records the RAAC deposited
40
- * per epoch. A gauge's emission for an epoch is therefore
49
+ * Per-epoch emissions for a gauge. The GaugeController snapshots gauge weights per epoch
50
+ * and the GaugeRewardsDistributor records the RAAC deposited per epoch, so for a COMPLETED
51
+ * epoch a gauge's emission is:
41
52
  * depositedAtEpoch(epoch) × gaugeRelativeWeight(gauge, epoch).
42
53
  *
43
- * Returns a series ending at the current (in-progress) epoch so callers can chart
44
- * "week of X → this gauge received Y RAAC".
54
+ * For the in-progress epoch, `depositedAtEpoch` only reflects what has been ticked in so
55
+ * far and keeps growing through the week — which is misleading. Since the emission schedule
56
+ * already determines the full week's emission, the current (and upcoming) epoch instead use
57
+ * scheduledWeekEmission(epoch) × gaugeRelativeWeight(gauge, epoch)
58
+ * where scheduledWeekEmission = minter.calculateScheduledMintableAmount(week) × distributorShare.
45
59
  *
46
60
  * @param chainId - The chain/network to use.
47
- * @param gauge - Gauge address (or config key).
48
- * @param numEpochs - How many epochs to include, ending at the current one (default 8).
61
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges").
62
+ * @param gaugeAddressOrId - Address or config id of the gauge.
63
+ * @param numEpochs - How many epochs to include, ending at the current one (default 8), clamped to the gauge's start.
64
+ * @param includeUpcoming - Whether to append a projection for the next epoch (default true).
49
65
  * @param provider - Optional ethers.js Provider instance.
50
66
  */
51
- export declare const getGaugeEmissions: (chainId: ChainId, gauge: string, numEpochs?: number, includeUpcoming?: boolean, provider?: Provider) => Promise<GaugeEmissionsResult>;
67
+ export declare const getGaugeEmissions: (chainId: ChainId, gaugeSystem: GaugeSystemId, gaugeAddressOrId: string, numEpochs?: number, includeUpcoming?: boolean, provider?: Provider) => Promise<GaugeEmissionsResult>;
@@ -1,15 +1,14 @@
1
- import { Signer } from "ethers";
1
+ import { ethers, Signer } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Computes and checkpoints a gauge's relative weight at a given epoch.
5
- *
6
- * This is a state-modifying call (it writes checkpoints), so it requires a Signer.
7
- * For a pure read with no state changes, use getGaugeRelativeWeightView instead.
5
+ * Checkpoints a gauge and computes its relative weight at an epoch. State-changing; use `getGaugeRelativeWeightView` to read without a transaction. Reverts during a global pause.
8
6
  *
9
7
  * @param chainId - The chain/network to use.
10
- * @param gauge - Address of the gauge.
11
- * @param epoch - Epoch timestamp to checkpoint.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param gaugeAddressOrId - Address or config id of the gauge.
10
+ * @param epoch - Epoch start timestamp, seconds.
12
11
  * @param signer - An ethers.js Signer instance (required).
13
- * @returns The transaction response.
12
+ * @returns The transaction after it has been mined.
14
13
  */
15
- export declare const getGaugeRelativeWeight: (chainId: ChainId, gauge: string, epoch: string | number | bigint, signer: Signer) => Promise<any>;
14
+ export declare const getGaugeRelativeWeight: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, epoch: string | number | bigint, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
@@ -1,14 +1,18 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ import { ScaledValue, TokenAmount } from "../../../utils/amount";
3
5
  /**
4
- * Reads a gauge's relative weight at a given epoch without modifying state.
6
+ * Returns a gauge's relative weight at an epoch without checkpointing.
7
+ *
5
8
  * @param chainId - The chain/network to use.
6
- * @param gauge - Address of the gauge.
7
- * @param epoch - Epoch timestamp to query.
9
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
10
+ * @param gaugeAddressOrId - Address or config id of the gauge.
11
+ * @param epoch - Epoch start timestamp, seconds.
8
12
  * @param provider - Optional ethers.js Provider instance.
9
- * @returns An object with relativeWeight (1e18-scaled, where 1e18 = 100%) and totalWeight, both bigint.
13
+ * @returns relativeWeight as an 18-decimal fraction (1.0 = 100%) and the total weight at that epoch (veRAAC voting power, base units). Both are zero when no weight is voted.
10
14
  */
11
- export declare const getGaugeRelativeWeightView: (chainId: ChainId, gauge: string, epoch: string | number | bigint, provider?: Provider) => Promise<{
12
- relativeWeight: bigint;
13
- totalWeight: bigint;
15
+ export declare const getGaugeRelativeWeightView: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, epoch: string | number | bigint, provider?: Provider) => Promise<{
16
+ relativeWeight: ScaledValue;
17
+ totalWeight: TokenAmount;
14
18
  }>;
@@ -1,11 +1,14 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ import { TokenAmount } from "../../../utils/amount";
3
5
  /**
4
- * Gets the weight of a gauge.
6
+ * Returns a gauge's weight projected to the next epoch.
5
7
  *
6
8
  * @param chainId - The chain/network to use.
7
- * @param gaugeAddress - Address of the gauge.
9
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
10
+ * @param gaugeAddressOrId - Address or config id of the gauge.
8
11
  * @param provider - Optional ethers.js Provider instance.
9
- * @returns Weight of the gauge formatted in ether units.
12
+ * @returns The weight, veRAAC voting power in base units.
10
13
  */
11
- export declare const getGaugeWeight: (chainId: ChainId, gaugeAddress: string, provider?: Provider) => Promise<string>;
14
+ export declare const getGaugeWeight: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, provider?: Provider) => Promise<TokenAmount>;
@@ -1,11 +1,14 @@
1
1
  import { Provider } from "ethers";
2
2
  import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
3
4
  /**
4
- * Gets the timestamp of a user's last vote on a given gauge.
5
+ * Returns when a user last voted on a gauge.
6
+ *
5
7
  * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
6
9
  * @param user - Address of the user.
7
- * @param gauge - Address of the gauge.
10
+ * @param gaugeAddressOrId - Address or config id of the gauge.
8
11
  * @param provider - Optional ethers.js Provider instance.
9
- * @returns The last vote timestamp as a bigint.
12
+ * @returns The last vote timestamp, seconds.
10
13
  */
11
- export declare const getLastVoteTime: (chainId: ChainId, user: string, gauge: string, provider?: Provider) => Promise<bigint>;
14
+ export declare const getLastVoteTime: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, gaugeAddressOrId: string, provider?: Provider) => Promise<bigint>;
@@ -0,0 +1,12 @@
1
+ import { Provider } from "ethers";
2
+ import { ChainId } from "../../../configs/chains";
3
+ import { GaugeSystemRef } from "../gaugeSystems/_helpers";
4
+ /**
5
+ * Returns the per-vote decay-bucket cap. 0 means exact (one entry per lock).
6
+ *
7
+ * @param chainId - The chain/network to use.
8
+ * @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
9
+ * @param provider - Optional ethers.js Provider instance.
10
+ * @returns The bucket cap.
11
+ */
12
+ export declare const getMaxVoteBuckets: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<bigint>;