@raac/rpc 1.2.0-beta.9 → 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.
- package/dist/RPCLibrary.js +59 -10
- package/dist/artifacts/core/governance/gauges/BaseGauge.sol/BaseGauge.json +113 -20
- package/dist/artifacts/core/governance/gauges/GaugeController.sol/GaugeController.json +259 -31
- package/dist/artifacts/core/governance/gauges/GaugeRewardsDistributor.sol/GaugeRewardsDistributor.json +159 -31
- package/dist/artifacts/core/governance/gauges/RAACGauge.sol/RAACGauge.json +115 -22
- package/dist/artifacts/core/governance/gauges/RWAGauge.sol/RWAGauge.json +115 -22
- package/dist/artifacts/core/governance/proposals/Governance.sol/Governance.json +367 -98
- package/dist/artifacts/core/governance/proposals/TimelockController.sol/TimelockController.json +11 -16
- package/dist/artifacts/core/lockers/RAACLiquidLocker.sol/RAACLiquidLocker.json +113 -19
- package/dist/assets/_helpers.js +31 -0
- package/dist/assets/getAsset.js +13 -3
- package/dist/assets/getAssets.js +15 -15
- package/dist/assets/getSupply.js +16 -5
- package/dist/configs/chains/1.json +31 -35
- package/dist/configs/chains/11155111.json +101 -120
- package/dist/configs/chains/17000.json +31 -35
- package/dist/configs/chains/18453.json +31 -35
- package/dist/configs/chains/8453.json +88 -41
- package/dist/contracts/decodeCall.js +61 -0
- package/dist/contracts/findContract.js +68 -0
- package/dist/contracts/getContractAddress.js +5 -1
- package/dist/contracts/governance/_helpers.js +39 -0
- package/dist/contracts/governance/distributor/claimAll.js +18 -11
- package/dist/contracts/governance/distributor/claimForGauge.js +18 -12
- package/dist/contracts/governance/distributor/deposit.js +17 -12
- package/dist/contracts/governance/distributor/getClaimableForGauge.js +12 -9
- package/dist/contracts/governance/distributor/getClaimedAtEpoch.js +13 -10
- package/dist/contracts/governance/distributor/getDepositedAtEpoch.js +10 -9
- package/dist/contracts/governance/distributor/getDustLastProcessedEpoch.js +28 -0
- package/dist/contracts/governance/distributor/getGaugeController.js +7 -7
- package/dist/contracts/governance/distributor/getLastClaimedEpoch.js +10 -9
- package/dist/contracts/governance/distributor/getMaxClaimBound.js +29 -0
- package/dist/contracts/governance/distributor/getPeriodDuration.js +7 -7
- package/dist/contracts/governance/distributor/getRewardToken.js +7 -7
- package/dist/contracts/governance/distributor/getRewardTokenInfo.js +18 -9
- package/dist/contracts/governance/distributor/getRewardTokenStats.js +13 -8
- package/dist/contracts/governance/distributor/index.js +5 -2
- package/dist/contracts/governance/distributor/setController.js +17 -12
- package/dist/contracts/governance/distributor/setLastClaimedEpoch.js +32 -0
- package/dist/contracts/governance/distributor/setMaxClaimBound.js +31 -0
- package/dist/contracts/governance/distributor/withdrawDust.js +31 -0
- package/dist/contracts/governance/distributor/withdrawRemovedGaugeRewards.js +19 -13
- package/dist/contracts/governance/gauge/_apy.js +126 -0
- package/dist/contracts/governance/gauge/_tokens.js +54 -0
- package/dist/contracts/governance/gauge/addRewardToken.js +2 -12
- package/dist/contracts/governance/gauge/approveGaugeToken.js +31 -0
- package/dist/contracts/governance/gauge/claimExtraReward.js +2 -12
- package/dist/contracts/governance/gauge/claimExtraRewards.js +2 -12
- package/dist/contracts/governance/gauge/claimOnBehalfOf.js +3 -13
- package/dist/contracts/governance/gauge/claimRewardToken.js +3 -13
- package/dist/contracts/governance/gauge/claimRewardsFor.js +2 -12
- package/dist/contracts/governance/gauge/depositRewardToken.js +3 -13
- package/dist/contracts/governance/gauge/getAllPendingExtraRewards.js +8 -10
- package/dist/contracts/governance/gauge/getApy.js +45 -0
- package/dist/contracts/governance/gauge/getBalanceOf.js +10 -18
- package/dist/contracts/governance/gauge/getControllerAddress.js +2 -9
- package/dist/contracts/governance/gauge/getDecimalAdjustment.js +5 -10
- package/dist/contracts/governance/gauge/getDepositRAACOnClaim.js +2 -9
- package/dist/contracts/governance/gauge/getDistributorData.js +2 -9
- package/dist/contracts/governance/gauge/getDistributors.js +2 -9
- package/dist/contracts/governance/gauge/getEarnedExtraReward.js +31 -0
- package/dist/contracts/governance/gauge/getEarnedReward.js +10 -15
- package/dist/contracts/governance/gauge/getExtraRewardTokens.js +2 -9
- package/dist/contracts/governance/gauge/getGaugeData.js +40 -0
- package/dist/contracts/governance/gauge/getGaugeRewardTokenData.js +14 -14
- package/dist/contracts/governance/gauge/getPauseStatus.js +31 -0
- package/dist/contracts/governance/gauge/getPendingExtraRewards.js +5 -10
- package/dist/contracts/governance/gauge/getPendingRewards.js +10 -15
- package/dist/contracts/governance/gauge/getPeriodBoundaries.js +2 -15
- package/dist/contracts/governance/gauge/getPeriodDuration.js +2 -15
- package/dist/contracts/governance/gauge/getRaacAutolockMin.js +5 -10
- package/dist/contracts/governance/gauge/getRawBalanceOf.js +10 -18
- package/dist/contracts/governance/gauge/getRawTotalSupply.js +10 -18
- package/dist/contracts/governance/gauge/getRewardTokens.js +28 -0
- package/dist/contracts/governance/gauge/getTotalSupply.js +10 -18
- package/dist/contracts/governance/gauge/getUserApy.js +73 -0
- package/dist/contracts/governance/gauge/getUserClaimableRewards.js +26 -86
- package/dist/contracts/governance/gauge/getUserGaugeState.js +52 -0
- package/dist/contracts/governance/gauge/getUserRewardTokenData.js +12 -11
- package/dist/contracts/governance/gauge/getUserWeight.js +11 -11
- package/dist/contracts/governance/gauge/index.js +11 -1
- package/dist/contracts/governance/gauge/isPaused.js +4 -11
- package/dist/contracts/governance/gauge/manageDistributor.js +2 -12
- package/dist/contracts/governance/gauge/pullRewardsFromDistributor.js +30 -0
- package/dist/contracts/governance/gauge/setController.js +2 -12
- package/dist/contracts/governance/gauge/setDepositRAACOnClaim.js +2 -12
- package/dist/contracts/governance/gauge/setEmergencyPaused.js +2 -12
- package/dist/contracts/governance/gauge/setGaugeRewardDistributor.js +2 -12
- package/dist/contracts/governance/gauge/setRaacAutolockMin.js +3 -13
- package/dist/contracts/governance/gauge/stake.js +3 -19
- package/dist/contracts/governance/gauge/unwrapStakingToken.js +28 -0
- package/dist/contracts/governance/gauge/updateUserRewards.js +2 -18
- package/dist/contracts/governance/gauge/withdraw.js +3 -19
- package/dist/contracts/governance/gauge/wrapStakingToken.js +28 -0
- package/dist/contracts/governance/gaugeController/addGauge.js +19 -11
- package/dist/contracts/governance/gaugeController/batchVote.js +20 -12
- package/dist/contracts/governance/gaugeController/calculateBoost.js +25 -23
- package/dist/contracts/governance/gaugeController/forceCompleteCheckpoint.js +19 -11
- package/dist/contracts/governance/gaugeController/getActiveGaugeCount.js +28 -0
- package/dist/contracts/governance/gaugeController/getActiveGauges.js +13 -15
- package/dist/contracts/governance/gaugeController/getConstants.js +10 -18
- package/dist/contracts/governance/gaugeController/getCurrentEpoch.js +8 -7
- package/dist/contracts/governance/gaugeController/getExpiredGaugeVotePower.js +30 -0
- package/dist/contracts/governance/gaugeController/getGauge.js +13 -10
- package/dist/contracts/governance/gaugeController/getGaugeDistributor.js +28 -0
- package/dist/contracts/governance/gaugeController/getGaugeEmissions.js +52 -64
- package/dist/contracts/governance/gaugeController/getGaugeRelativeWeight.js +19 -15
- package/dist/contracts/governance/gaugeController/getGaugeRelativeWeightView.js +14 -11
- package/dist/contracts/governance/gaugeController/getGaugeWeight.js +12 -9
- package/dist/contracts/governance/gaugeController/getLastVoteTime.js +11 -9
- package/dist/contracts/governance/gaugeController/getMaxVoteBuckets.js +28 -0
- package/dist/contracts/governance/gaugeController/getNextEpoch.js +8 -7
- package/dist/contracts/governance/gaugeController/getRegisteredGaugeList.js +28 -0
- package/dist/contracts/governance/gaugeController/getTotalWeight.js +10 -8
- package/dist/contracts/governance/gaugeController/getUserGaugeVotePower.js +11 -9
- package/dist/contracts/governance/gaugeController/getUserVotePowerRemaining.js +10 -10
- package/dist/contracts/governance/gaugeController/getVeToken.js +8 -7
- package/dist/contracts/governance/gaugeController/getVoteUserLocks.js +33 -0
- package/dist/contracts/governance/gaugeController/getVoteUserPower.js +8 -7
- package/dist/contracts/governance/gaugeController/getVoteUserSlope.js +13 -10
- package/dist/contracts/governance/gaugeController/index.js +10 -1
- package/dist/contracts/governance/gaugeController/isGaugeActive.js +11 -9
- package/dist/contracts/governance/gaugeController/isPaused.js +9 -8
- package/dist/contracts/governance/gaugeController/kick.js +17 -10
- package/dist/contracts/governance/gaugeController/removeGauge.js +20 -11
- package/dist/contracts/governance/gaugeController/removePowerFromGauge.js +19 -11
- package/dist/contracts/governance/gaugeController/setBoostAmplificationEnabled.js +20 -12
- package/dist/contracts/governance/gaugeController/setDistributor.js +31 -0
- package/dist/contracts/governance/gaugeController/setEmergencyGaugePause.js +20 -12
- package/dist/contracts/governance/gaugeController/setEmergencyGaugePauseBatch.js +33 -0
- package/dist/contracts/governance/gaugeController/setEmergencyPause.js +18 -11
- package/dist/contracts/governance/gaugeController/setMaxVoteBuckets.js +31 -0
- package/dist/contracts/governance/gaugeController/vote.js +15 -16
- package/dist/contracts/governance/gaugeSystems/_helpers.js +123 -0
- package/dist/contracts/governance/gaugeSystems/findGauge.js +14 -0
- package/dist/contracts/governance/gaugeSystems/getGaugeSystem.js +14 -0
- package/dist/contracts/governance/gaugeSystems/getGaugeSystems.js +13 -0
- package/dist/contracts/governance/gaugeSystems/getGauges.js +15 -0
- package/dist/contracts/governance/gaugeSystems/index.js +21 -0
- package/dist/contracts/governance/proposals/cancel.js +8 -7
- package/dist/contracts/governance/proposals/castVote.js +8 -6
- package/dist/contracts/governance/proposals/execute.js +6 -5
- package/dist/contracts/governance/proposals/getGovernances.js +22 -0
- package/dist/contracts/{tokens/veRAAC/getEffectiveLockEnd.js → governance/proposals/getLabel.js} +10 -11
- package/dist/contracts/governance/proposals/getProposal.js +14 -18
- package/dist/contracts/governance/proposals/getProposalCount.js +4 -3
- package/dist/contracts/governance/proposals/{getProposalData.js → getProposalEta.js} +12 -16
- package/dist/contracts/governance/proposals/getProposalInfo.js +10 -8
- package/dist/contracts/governance/proposals/getProposalThreshold.js +7 -5
- package/dist/contracts/governance/proposals/getQuorum.js +11 -8
- package/dist/contracts/governance/proposals/getQuorumNumerator.js +7 -8
- package/dist/contracts/governance/proposals/getRoles.js +34 -0
- package/dist/contracts/governance/proposals/getState.js +4 -3
- package/dist/contracts/governance/proposals/getVoteReceipt.js +54 -0
- package/dist/contracts/governance/proposals/getVotes.js +8 -6
- package/dist/contracts/governance/proposals/getVotingDelay.js +4 -3
- package/dist/contracts/governance/proposals/getVotingPeriod.js +4 -3
- package/dist/contracts/governance/proposals/hasRole.js +31 -0
- package/dist/contracts/governance/proposals/hasVoted.js +32 -0
- package/dist/contracts/governance/proposals/index.js +22 -4
- package/dist/contracts/governance/proposals/propose.js +9 -20
- package/dist/contracts/governance/proposals/setParameter.js +46 -0
- package/dist/contracts/governance/proposals/setTimelock.js +36 -0
- package/dist/contracts/governance/timelock/getConstants.js +4 -3
- package/dist/contracts/governance/timelock/getMinDelay.js +4 -3
- package/dist/contracts/governance/timelock/getRoles.js +37 -0
- package/dist/contracts/governance/timelock/getTimestamp.js +4 -3
- package/dist/contracts/governance/timelock/hasRole.js +31 -0
- package/dist/contracts/governance/timelock/hashOperationBatch.js +7 -6
- package/dist/contracts/governance/timelock/index.js +5 -1
- package/dist/contracts/governance/timelock/isOperationDone.js +4 -3
- package/dist/contracts/governance/timelock/isOperationPending.js +4 -3
- package/dist/contracts/governance/timelock/isOperationReady.js +4 -3
- package/dist/contracts/housePrices/getLatestPrice.js +12 -4
- package/dist/contracts/lockers/botLocker/getClaimable.js +8 -1
- package/dist/contracts/lockers/botLocker/getClaimables.js +10 -4
- package/dist/contracts/lockers/botLocker/getClaimedRewards.js +13 -4
- package/dist/contracts/lockers/liquidLocker/borrow.js +5 -0
- package/dist/contracts/lockers/liquidLocker/checkAccountHealth.js +15 -0
- package/dist/contracts/lockers/liquidLocker/deposit.js +4 -0
- package/dist/contracts/lockers/liquidLocker/donate.js +4 -0
- package/dist/contracts/lockers/liquidLocker/getConfig.js +14 -7
- package/dist/contracts/lockers/liquidLocker/getGlobalInfo.js +12 -17
- package/dist/contracts/lockers/liquidLocker/getUserInfo.js +12 -15
- package/dist/contracts/lockers/liquidLocker/getUserLocks.js +20 -8
- package/dist/contracts/lockers/liquidLocker/harvest.js +5 -0
- package/dist/contracts/lockers/liquidLocker/previewWithdraw.js +26 -0
- package/dist/contracts/lockers/liquidLocker/repay.js +5 -1
- package/dist/contracts/lockers/liquidLocker/requestUnlock.js +16 -4
- package/dist/contracts/lockers/liquidLocker/voteGauge.js +7 -1
- package/dist/contracts/lockers/maturityVault/deposit.js +4 -0
- package/dist/contracts/lockers/maturityVault/depositFor.js +5 -0
- package/dist/contracts/lockers/maturityVault/distribute.js +5 -0
- package/dist/contracts/lockers/maturityVault/getConfig.js +12 -2
- package/dist/contracts/lockers/maturityVault/getGlobalInfo.js +9 -11
- package/dist/contracts/lockers/maturityVault/getUserInfo.js +8 -4
- package/dist/contracts/lockers/maturityVault/withdraw.js +5 -0
- package/dist/contracts/pmBlender/_helpers.js +19 -0
- package/dist/contracts/pmBlender/getReserveBalance.js +13 -12
- package/dist/contracts/pmBlender/previewDeposit.js +15 -12
- package/dist/contracts/pmBlender/previewSwap.js +16 -12
- package/dist/contracts/pmBlender/previewWithdraw.js +15 -12
- package/dist/contracts/pmMarket/getMarketConfig.js +15 -13
- package/dist/contracts/pmTreasury/_helpers.js +51 -0
- package/dist/contracts/pmTreasury/getCollateralRatio.js +13 -16
- package/dist/contracts/pmTreasury/getCurrentNav.js +15 -22
- package/dist/contracts/pmTreasury/getLeverageRatio.js +13 -16
- package/dist/contracts/pmTreasury/getMaxMintablePMUSD.js +17 -21
- package/dist/contracts/pmTreasury/getMaxMintablePMUSDWithoutBaseToken.js +16 -19
- package/dist/contracts/pmTreasury/getMaxMintableXPM.js +18 -22
- package/dist/contracts/pmTreasury/getMaxRedeemablePMUSD.js +17 -21
- package/dist/contracts/pmTreasury/getMaxRedeemableXPM.js +17 -21
- package/dist/contracts/pmTreasury/getTotalBaseToken.js +13 -16
- package/dist/contracts/tokens/RAAC/getBalance.js +16 -5
- package/dist/contracts/tokens/RAAC/getTotalSupply.js +12 -7
- package/dist/contracts/tokens/crvUSD/getBalance.js +16 -5
- package/dist/contracts/tokens/crvUSD/getTotalSupply.js +12 -7
- package/dist/contracts/tokens/leRAAC/approve.js +9 -0
- package/dist/contracts/tokens/leRAAC/burn.js +5 -0
- package/dist/contracts/tokens/leRAAC/burnFrom.js +6 -0
- package/dist/contracts/tokens/leRAAC/getAllowance.js +11 -2
- package/dist/contracts/tokens/leRAAC/getBalance.js +10 -2
- package/dist/contracts/tokens/leRAAC/getMinterInfo.js +10 -1
- package/dist/contracts/tokens/leRAAC/getTotalSupply.js +9 -2
- package/dist/contracts/tokens/leRAAC/transfer.js +9 -0
- package/dist/contracts/tokens/leRAAC/transferFrom.js +10 -0
- package/dist/contracts/tokens/pmUSD/getBalance.js +16 -5
- package/dist/contracts/tokens/pmUSD/getTotalSupply.js +11 -6
- package/dist/contracts/tokens/rcrvUSD/getBalance.js +17 -6
- package/dist/contracts/tokens/rcrvUSD/getTotalSupply.js +13 -7
- package/dist/contracts/tokens/veRAAC/_helpers.js +38 -0
- package/dist/contracts/tokens/veRAAC/distributeRewards.js +1 -1
- package/dist/contracts/tokens/veRAAC/getBalance.js +10 -1
- package/dist/contracts/tokens/veRAAC/getBalanceAt.js +3 -2
- package/dist/contracts/tokens/veRAAC/getBalanceAtTime.js +3 -2
- package/dist/contracts/tokens/veRAAC/getCheckpoint.js +3 -2
- package/dist/contracts/tokens/veRAAC/getClaimable.js +3 -2
- package/dist/contracts/tokens/veRAAC/getClaimed.js +3 -2
- package/dist/contracts/tokens/veRAAC/getEarned.js +3 -2
- package/dist/contracts/tokens/veRAAC/getGlobalLockInfo.js +3 -2
- package/dist/contracts/tokens/veRAAC/getLockedBalance.js +3 -2
- package/dist/contracts/tokens/veRAAC/getLocks.js +5 -7
- package/dist/contracts/tokens/veRAAC/getMinLockAmount.js +36 -0
- package/dist/contracts/tokens/veRAAC/getRagequitRequest.js +6 -5
- package/dist/contracts/tokens/veRAAC/getRawBalanceOf.js +3 -2
- package/dist/contracts/tokens/veRAAC/getRawTotalSupply.js +3 -2
- package/dist/contracts/tokens/veRAAC/getTotalSupply.js +7 -5
- package/dist/contracts/tokens/veRAAC/getTotalSupplyAt.js +3 -2
- package/dist/contracts/tokens/veRAAC/getTotalSupplyAtTime.js +3 -2
- package/dist/contracts/tokens/veRAAC/getUserPointHistory.js +5 -4
- package/dist/contracts/tokens/veRAAC/increase.js +1 -1
- package/dist/contracts/tokens/veRAAC/increaseWithApproval.js +4 -17
- package/dist/contracts/tokens/veRAAC/index.js +3 -3
- package/dist/contracts/tokens/veRAAC/lock.js +1 -1
- package/dist/contracts/tokens/veRAAC/lockWithApproval.js +4 -19
- package/dist/contracts/tokens/xPM/getBalance.js +16 -5
- package/dist/contracts/tokens/xPM/getTotalSupply.js +11 -6
- package/dist/contracts/zap/aladdin/zap.js +9 -1
- package/dist/contracts/zap/aladdin/zapFrom.js +9 -1
- package/dist/contracts/zap/aladdin/zapWithRoutes.js +11 -2
- package/dist/contracts/zeno/createAuction.js +13 -0
- package/dist/contracts/zeno/getAuctions.js +25 -2
- package/dist/generated/errorMap.json +3945 -0
- package/dist/index.js +15 -0
- package/dist/methods/approveToken.js +10 -2
- package/dist/methods/commons/checkAllowance.js +11 -1
- package/dist/methods/getAssetBalance.js +16 -6
- package/dist/minter/_helpers.js +11 -0
- package/dist/minter/calculateScheduledMintableAmount.js +3 -1
- package/dist/minter/get.js +5 -10
- package/dist/minter/getApy.js +12 -9
- package/dist/minter/getDistributionPools.js +4 -3
- package/dist/minter/getEmissionPerSecond.js +4 -2
- package/dist/minter/getPoolInfo.js +5 -3
- package/dist/nfts/_helpers.js +17 -0
- package/dist/nfts/getHousePrice.js +10 -1
- package/dist/nfts/getMintFeePercentage.js +7 -3
- package/dist/nfts/getMintPrice.js +10 -7
- package/dist/nfts/mint.js +12 -4
- package/dist/pools/lendingPool/_helpers.js +37 -2
- package/dist/pools/lendingPool/adapters/erc20/getERC20AdapterBalance.js +15 -3
- package/dist/pools/lendingPool/borrowFromLendingPool.js +13 -3
- package/dist/pools/lendingPool/borrowFromLendingPoolWithInsurance.js +19 -9
- package/dist/pools/lendingPool/calculateInsuranceFee.js +12 -5
- package/dist/pools/lendingPool/depositToLendingPool.js +9 -6
- package/dist/pools/lendingPool/getEligibleUserDeposits.js +5 -7
- package/dist/pools/lendingPool/getHealthFactor.js +8 -7
- package/dist/pools/lendingPool/getHousePrice.js +10 -6
- package/dist/pools/lendingPool/getLendingPoolInfo.js +92 -82
- package/dist/pools/lendingPool/getLendingPoolTotalLiquidity.js +8 -4
- package/dist/pools/lendingPool/getParameters.js +22 -14
- package/dist/pools/lendingPool/getPositionDebt.js +7 -5
- package/dist/pools/lendingPool/getPositionScaledDebt.js +7 -7
- package/dist/pools/lendingPool/getPositionView.js +24 -19
- package/dist/pools/lendingPool/getPositionsScaledDebt.js +6 -8
- package/dist/pools/lendingPool/getRawUserDepositsInLendingPool.js +8 -4
- package/dist/pools/lendingPool/getUserCollateralValue.js +7 -8
- package/dist/pools/lendingPool/openVaultPosition.js +3 -4
- package/dist/pools/lendingPool/repayToLendingPool.js +9 -0
- package/dist/pools/lendingPool/withdrawFromLendingPool.js +15 -16
- package/dist/pools/liquidityPool/getLiquidityPoolInfo.js +23 -30
- package/dist/pools/rwaVault/_helpers.js +26 -2
- package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterAssetValue.js +9 -1
- package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterTotalValue.js +8 -1
- package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterAssetValue.js +9 -1
- package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterTotalValue.js +8 -1
- package/dist/pools/rwaVault/depositToRWAVault.js +15 -3
- package/dist/pools/rwaVault/getRWAVaultInfo.js +10 -3
- package/dist/pools/rwaVault/previewDeposit.js +11 -5
- package/dist/pools/rwaVault/previewWithdraw.js +11 -5
- package/dist/pools/rwaVault/redeemNFTFromRWAVault.js +11 -3
- package/dist/pools/stabilityPool/depositToStabilityPool.js +11 -9
- package/dist/pools/stabilityPool/getRawUserDepositsInStabilityPool.js +11 -9
- package/dist/pools/stabilityPool/getStabilityPoolInfo.js +16 -30
- package/dist/pools/stabilityPool/getStabilityPoolTotalDeposits.js +10 -7
- package/dist/pools/stabilityPool/getWithdrawRequestInfo.js +17 -7
- package/dist/pools/stabilityPool/requestWithdraw.js +9 -4
- package/dist/pools/stabilityPool/withdrawFromStabilityPool.js +11 -9
- package/dist/prices/getPrices.js +10 -4
- package/dist/scripts/index.js +2 -1
- package/dist/scripts/liquidation.js +11 -10
- package/dist/types/RPCLibrary.d.ts +46 -4
- package/dist/types/assets/_helpers.d.ts +16 -0
- package/dist/types/assets/getAsset.d.ts +12 -1
- package/dist/types/assets/getAssets.d.ts +10 -1
- package/dist/types/assets/getSupply.d.ts +10 -1
- package/dist/types/configs/chains/index.d.ts +54 -66
- package/dist/types/configs/index.d.ts +27 -33
- package/dist/types/contracts/decodeCall.d.ts +33 -0
- package/dist/types/contracts/findContract.d.ts +24 -0
- package/dist/types/contracts/governance/_helpers.d.ts +28 -0
- package/dist/types/contracts/governance/distributor/claimAll.d.ts +7 -5
- package/dist/types/contracts/governance/distributor/claimForGauge.d.ts +7 -6
- package/dist/types/contracts/governance/distributor/deposit.d.ts +7 -6
- package/dist/types/contracts/governance/distributor/getClaimableForGauge.d.ts +7 -4
- package/dist/types/contracts/governance/distributor/getClaimedAtEpoch.d.ts +8 -5
- package/dist/types/contracts/governance/distributor/getDepositedAtEpoch.d.ts +7 -4
- package/dist/types/contracts/governance/distributor/getDustLastProcessedEpoch.d.ts +12 -0
- package/dist/types/contracts/governance/distributor/getGaugeController.d.ts +5 -3
- package/dist/types/contracts/governance/distributor/getLastClaimedEpoch.d.ts +6 -4
- package/dist/types/contracts/governance/distributor/getMaxClaimBound.d.ts +15 -0
- package/dist/types/contracts/governance/distributor/getPeriodDuration.d.ts +5 -3
- package/dist/types/contracts/governance/distributor/getRewardToken.d.ts +5 -3
- package/dist/types/contracts/governance/distributor/getRewardTokenInfo.d.ts +10 -7
- package/dist/types/contracts/governance/distributor/getRewardTokenStats.d.ts +9 -6
- package/dist/types/contracts/governance/distributor/index.d.ts +5 -2
- package/dist/types/contracts/governance/distributor/setController.d.ts +7 -6
- package/dist/types/contracts/governance/distributor/setLastClaimedEpoch.d.ts +13 -0
- package/dist/types/contracts/governance/distributor/setMaxClaimBound.d.ts +13 -0
- package/dist/types/contracts/governance/distributor/withdrawDust.d.ts +13 -0
- package/dist/types/contracts/governance/distributor/withdrawRemovedGaugeRewards.d.ts +8 -7
- package/dist/types/contracts/governance/gauge/_apy.d.ts +72 -0
- package/dist/types/contracts/governance/gauge/_tokens.d.ts +25 -0
- package/dist/types/contracts/governance/gauge/approveGaugeToken.d.ts +14 -0
- package/dist/types/contracts/governance/gauge/claimOnBehalfOf.d.ts +2 -2
- package/dist/types/contracts/governance/gauge/claimRewardToken.d.ts +1 -1
- package/dist/types/contracts/governance/gauge/depositRewardToken.d.ts +2 -2
- package/dist/types/contracts/governance/gauge/getAllPendingExtraRewards.d.ts +3 -1
- package/dist/types/contracts/governance/gauge/getApy.d.ts +48 -0
- package/dist/types/contracts/governance/gauge/getBalanceOf.d.ts +3 -2
- package/dist/types/contracts/governance/gauge/getDecimalAdjustment.d.ts +3 -1
- package/dist/types/contracts/governance/gauge/getEarnedExtraReward.d.ts +14 -0
- package/dist/types/contracts/governance/gauge/getEarnedReward.d.ts +5 -3
- package/dist/types/contracts/governance/gauge/getGaugeData.d.ts +24 -0
- package/dist/types/contracts/governance/gauge/getGaugeRewardTokenData.d.ts +18 -10
- package/dist/types/contracts/governance/gauge/getPauseStatus.d.ts +19 -0
- package/dist/types/contracts/governance/gauge/getPendingExtraRewards.d.ts +3 -1
- package/dist/types/contracts/governance/gauge/getPendingRewards.d.ts +5 -3
- package/dist/types/contracts/governance/gauge/getRaacAutolockMin.d.ts +3 -1
- package/dist/types/contracts/governance/gauge/getRawBalanceOf.d.ts +3 -2
- package/dist/types/contracts/governance/gauge/getRawTotalSupply.d.ts +3 -2
- package/dist/types/contracts/governance/gauge/getRewardTokens.d.ts +11 -0
- package/dist/types/contracts/governance/gauge/getTotalSupply.d.ts +3 -2
- package/dist/types/contracts/governance/gauge/getUserApy.d.ts +46 -0
- package/dist/types/contracts/governance/gauge/getUserClaimableRewards.d.ts +22 -20
- package/dist/types/contracts/governance/gauge/getUserGaugeState.d.ts +35 -0
- package/dist/types/contracts/governance/gauge/getUserRewardTokenData.d.ts +15 -8
- package/dist/types/contracts/governance/gauge/getUserWeight.d.ts +4 -2
- package/dist/types/contracts/governance/gauge/index.d.ts +11 -1
- package/dist/types/contracts/governance/gauge/isPaused.d.ts +1 -1
- package/dist/types/contracts/governance/gauge/pullRewardsFromDistributor.d.ts +11 -0
- package/dist/types/contracts/governance/gauge/setRaacAutolockMin.d.ts +2 -2
- package/dist/types/contracts/governance/gauge/stake.d.ts +2 -2
- package/dist/types/contracts/governance/gauge/unwrapStakingToken.d.ts +12 -0
- package/dist/types/contracts/governance/gauge/withdraw.d.ts +2 -2
- package/dist/types/contracts/governance/gauge/wrapStakingToken.d.ts +13 -0
- package/dist/types/contracts/governance/gaugeController/addGauge.d.ts +8 -5
- package/dist/types/contracts/governance/gaugeController/batchVote.d.ts +9 -6
- package/dist/types/contracts/governance/gaugeController/calculateBoost.d.ts +12 -9
- package/dist/types/contracts/governance/gaugeController/forceCompleteCheckpoint.d.ts +8 -5
- package/dist/types/contracts/governance/gaugeController/getActiveGaugeCount.d.ts +12 -0
- package/dist/types/contracts/governance/gaugeController/getActiveGauges.d.ts +10 -5
- package/dist/types/contracts/governance/gaugeController/getConstants.d.ts +6 -4
- package/dist/types/contracts/governance/gaugeController/getCurrentEpoch.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getExpiredGaugeVotePower.d.ts +16 -0
- package/dist/types/contracts/governance/gaugeController/getGauge.d.ts +9 -5
- package/dist/types/contracts/governance/gaugeController/getGaugeDistributor.d.ts +12 -0
- package/dist/types/contracts/governance/gaugeController/getGaugeEmissions.d.ts +23 -20
- package/dist/types/contracts/governance/gaugeController/getGaugeRelativeWeight.d.ts +8 -9
- package/dist/types/contracts/governance/gaugeController/getGaugeRelativeWeightView.d.ts +11 -7
- package/dist/types/contracts/governance/gaugeController/getGaugeWeight.d.ts +7 -4
- package/dist/types/contracts/governance/gaugeController/getLastVoteTime.d.ts +7 -4
- package/dist/types/contracts/governance/gaugeController/getMaxVoteBuckets.d.ts +12 -0
- package/dist/types/contracts/governance/gaugeController/getNextEpoch.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getRegisteredGaugeList.d.ts +12 -0
- package/dist/types/contracts/governance/gaugeController/getTotalWeight.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getUserGaugeVotePower.d.ts +7 -4
- package/dist/types/contracts/governance/gaugeController/getUserVotePowerRemaining.d.ts +6 -4
- package/dist/types/contracts/governance/gaugeController/getVeToken.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getVoteUserLocks.d.ts +18 -0
- package/dist/types/contracts/governance/gaugeController/getVoteUserPower.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getVoteUserSlope.d.ts +10 -6
- package/dist/types/contracts/governance/gaugeController/index.d.ts +10 -1
- package/dist/types/contracts/governance/gaugeController/isGaugeActive.d.ts +6 -4
- package/dist/types/contracts/governance/gaugeController/isPaused.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/kick.d.ts +7 -4
- package/dist/types/contracts/governance/gaugeController/removeGauge.d.ts +9 -5
- package/dist/types/contracts/governance/gaugeController/removePowerFromGauge.d.ts +8 -5
- package/dist/types/contracts/governance/gaugeController/setBoostAmplificationEnabled.d.ts +9 -6
- package/dist/types/contracts/governance/gaugeController/setDistributor.d.ts +13 -0
- package/dist/types/contracts/governance/gaugeController/setEmergencyGaugePause.d.ts +9 -6
- package/dist/types/contracts/governance/gaugeController/setEmergencyGaugePauseBatch.d.ts +14 -0
- package/dist/types/contracts/governance/gaugeController/setEmergencyPause.d.ts +8 -5
- package/dist/types/contracts/governance/gaugeController/setMaxVoteBuckets.d.ts +13 -0
- package/dist/types/contracts/governance/gaugeController/vote.d.ts +9 -7
- package/dist/types/contracts/governance/gaugeSystems/_helpers.d.ts +71 -0
- package/dist/types/contracts/governance/gaugeSystems/findGauge.d.ts +11 -0
- package/dist/types/contracts/governance/gaugeSystems/getGaugeSystem.d.ts +11 -0
- package/dist/types/contracts/governance/gaugeSystems/getGaugeSystems.d.ts +10 -0
- package/dist/types/contracts/governance/gaugeSystems/getGauges.d.ts +13 -0
- package/dist/types/contracts/governance/gaugeSystems/index.d.ts +5 -0
- package/dist/types/contracts/governance/proposals/cancel.d.ts +5 -4
- package/dist/types/contracts/governance/proposals/castVote.d.ts +5 -3
- package/dist/types/contracts/governance/proposals/execute.d.ts +3 -2
- package/dist/types/contracts/governance/proposals/getGovernances.d.ts +11 -0
- package/dist/types/contracts/governance/proposals/getLabel.d.ts +11 -0
- package/dist/types/contracts/governance/proposals/getProposal.d.ts +13 -13
- package/dist/types/contracts/governance/proposals/getProposalCount.d.ts +2 -1
- package/dist/types/contracts/governance/proposals/getProposalEta.d.ts +13 -0
- package/dist/types/contracts/governance/proposals/getProposalInfo.d.ts +12 -6
- package/dist/types/contracts/governance/proposals/getProposalThreshold.d.ts +4 -2
- package/dist/types/contracts/governance/proposals/getQuorum.d.ts +7 -4
- package/dist/types/contracts/governance/proposals/getQuorumNumerator.d.ts +7 -3
- package/dist/types/contracts/governance/proposals/getRoles.d.ts +16 -0
- package/dist/types/contracts/governance/proposals/getState.d.ts +2 -1
- package/dist/types/contracts/governance/proposals/getVoteReceipt.d.ts +27 -0
- package/dist/types/contracts/governance/proposals/getVotes.d.ts +8 -4
- package/dist/types/contracts/governance/proposals/getVotingDelay.d.ts +2 -1
- package/dist/types/contracts/governance/proposals/getVotingPeriod.d.ts +2 -1
- package/dist/types/contracts/governance/proposals/hasRole.d.ts +13 -0
- package/dist/types/contracts/governance/proposals/hasVoted.d.ts +14 -0
- package/dist/types/contracts/governance/proposals/index.d.ts +11 -2
- package/dist/types/contracts/governance/proposals/propose.d.ts +4 -14
- package/dist/types/contracts/governance/proposals/setParameter.d.ts +23 -0
- package/dist/types/contracts/governance/proposals/setTimelock.d.ts +14 -0
- package/dist/types/contracts/governance/timelock/getConstants.d.ts +2 -1
- package/dist/types/contracts/governance/timelock/getMinDelay.d.ts +2 -1
- package/dist/types/contracts/governance/timelock/getRoles.d.ts +19 -0
- package/dist/types/contracts/governance/timelock/getTimestamp.d.ts +2 -1
- package/dist/types/contracts/governance/timelock/hasRole.d.ts +13 -0
- package/dist/types/contracts/governance/timelock/hashOperationBatch.d.ts +4 -3
- package/dist/types/contracts/governance/timelock/index.d.ts +2 -0
- package/dist/types/contracts/governance/timelock/isOperationDone.d.ts +2 -1
- package/dist/types/contracts/governance/timelock/isOperationPending.d.ts +2 -1
- package/dist/types/contracts/governance/timelock/isOperationReady.d.ts +2 -1
- package/dist/types/contracts/housePrices/getLatestPrice.d.ts +16 -6
- package/dist/types/contracts/lockers/botLocker/getClaimable.d.ts +8 -1
- package/dist/types/contracts/lockers/botLocker/getClaimables.d.ts +8 -1
- package/dist/types/contracts/lockers/botLocker/getClaimedRewards.d.ts +11 -1
- package/dist/types/contracts/lockers/liquidLocker/borrow.d.ts +6 -1
- package/dist/types/contracts/lockers/liquidLocker/checkAccountHealth.d.ts +9 -0
- package/dist/types/contracts/lockers/liquidLocker/deposit.d.ts +5 -1
- package/dist/types/contracts/lockers/liquidLocker/donate.d.ts +5 -1
- package/dist/types/contracts/lockers/liquidLocker/getConfig.d.ts +19 -7
- package/dist/types/contracts/lockers/liquidLocker/getGlobalInfo.d.ts +19 -16
- package/dist/types/contracts/lockers/liquidLocker/getUserInfo.d.ts +17 -14
- package/dist/types/contracts/lockers/liquidLocker/getUserLocks.d.ts +20 -7
- package/dist/types/contracts/lockers/liquidLocker/harvest.d.ts +6 -1
- package/dist/types/contracts/lockers/liquidLocker/previewWithdraw.d.ts +22 -0
- package/dist/types/contracts/lockers/liquidLocker/repay.d.ts +6 -2
- package/dist/types/contracts/lockers/liquidLocker/requestUnlock.d.ts +15 -3
- package/dist/types/contracts/lockers/liquidLocker/voteGauge.d.ts +8 -2
- package/dist/types/contracts/lockers/maturityVault/deposit.d.ts +5 -1
- package/dist/types/contracts/lockers/maturityVault/depositFor.d.ts +6 -1
- package/dist/types/contracts/lockers/maturityVault/distribute.d.ts +6 -1
- package/dist/types/contracts/lockers/maturityVault/getConfig.d.ts +12 -2
- package/dist/types/contracts/lockers/maturityVault/getGlobalInfo.d.ts +15 -15
- package/dist/types/contracts/lockers/maturityVault/getUserInfo.d.ts +10 -6
- package/dist/types/contracts/lockers/maturityVault/withdraw.d.ts +6 -1
- package/dist/types/contracts/pmBlender/_helpers.d.ts +12 -0
- package/dist/types/contracts/pmBlender/getReserveBalance.d.ts +9 -1
- package/dist/types/contracts/pmBlender/previewDeposit.d.ts +11 -1
- package/dist/types/contracts/pmBlender/previewSwap.d.ts +12 -1
- package/dist/types/contracts/pmBlender/previewWithdraw.d.ts +11 -1
- package/dist/types/contracts/pmMarket/getMarketConfig.d.ts +20 -11
- package/dist/types/contracts/pmTreasury/_helpers.d.ts +27 -0
- package/dist/types/contracts/pmTreasury/getCollateralRatio.d.ts +9 -1
- package/dist/types/contracts/pmTreasury/getCurrentNav.d.ts +18 -9
- package/dist/types/contracts/pmTreasury/getLeverageRatio.d.ts +9 -1
- package/dist/types/contracts/pmTreasury/getMaxMintablePMUSD.d.ts +17 -9
- package/dist/types/contracts/pmTreasury/getMaxMintablePMUSDWithoutBaseToken.d.ts +15 -5
- package/dist/types/contracts/pmTreasury/getMaxMintableXPM.d.ts +18 -8
- package/dist/types/contracts/pmTreasury/getMaxRedeemablePMUSD.d.ts +17 -7
- package/dist/types/contracts/pmTreasury/getMaxRedeemableXPM.d.ts +17 -7
- package/dist/types/contracts/pmTreasury/getTotalBaseToken.d.ts +9 -1
- package/dist/types/contracts/tokens/RAAC/getBalance.d.ts +11 -1
- package/dist/types/contracts/tokens/RAAC/getTotalSupply.d.ts +7 -3
- package/dist/types/contracts/tokens/crvUSD/getBalance.d.ts +11 -1
- package/dist/types/contracts/tokens/crvUSD/getTotalSupply.d.ts +7 -3
- package/dist/types/contracts/tokens/leRAAC/approve.d.ts +10 -1
- package/dist/types/contracts/tokens/leRAAC/burn.d.ts +6 -1
- package/dist/types/contracts/tokens/leRAAC/burnFrom.d.ts +7 -1
- package/dist/types/contracts/tokens/leRAAC/getAllowance.d.ts +11 -1
- package/dist/types/contracts/tokens/leRAAC/getBalance.d.ts +10 -1
- package/dist/types/contracts/tokens/leRAAC/getMinterInfo.d.ts +14 -2
- package/dist/types/contracts/tokens/leRAAC/getTotalSupply.d.ts +9 -1
- package/dist/types/contracts/tokens/leRAAC/transfer.d.ts +10 -1
- package/dist/types/contracts/tokens/leRAAC/transferFrom.d.ts +11 -1
- package/dist/types/contracts/tokens/pmUSD/getBalance.d.ts +11 -1
- package/dist/types/contracts/tokens/pmUSD/getTotalSupply.d.ts +7 -3
- package/dist/types/contracts/tokens/rcrvUSD/getBalance.d.ts +11 -1
- package/dist/types/contracts/tokens/rcrvUSD/getTotalSupply.d.ts +8 -3
- package/dist/types/contracts/tokens/veRAAC/_helpers.d.ts +15 -0
- package/dist/types/contracts/tokens/veRAAC/distributeRewards.d.ts +2 -2
- package/dist/types/contracts/tokens/veRAAC/getBalance.d.ts +10 -1
- package/dist/types/contracts/tokens/veRAAC/getBalanceAt.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getBalanceAtTime.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getCheckpoint.d.ts +4 -2
- package/dist/types/contracts/tokens/veRAAC/getClaimable.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getClaimed.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getEarned.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getGlobalLockInfo.d.ts +4 -2
- package/dist/types/contracts/tokens/veRAAC/getLockedBalance.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getLocks.d.ts +5 -2
- package/dist/types/contracts/tokens/veRAAC/getMinLockAmount.d.ts +15 -0
- package/dist/types/contracts/tokens/veRAAC/getRagequitRequest.d.ts +10 -5
- package/dist/types/contracts/tokens/veRAAC/getRawBalanceOf.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getRawTotalSupply.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getTotalSupply.d.ts +7 -5
- package/dist/types/contracts/tokens/veRAAC/getTotalSupplyAt.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getTotalSupplyAtTime.d.ts +3 -2
- package/dist/types/contracts/tokens/veRAAC/getUserPointHistory.d.ts +8 -4
- package/dist/types/contracts/tokens/veRAAC/increase.d.ts +2 -2
- package/dist/types/contracts/tokens/veRAAC/increaseWithApproval.d.ts +3 -3
- package/dist/types/contracts/tokens/veRAAC/index.d.ts +1 -1
- package/dist/types/contracts/tokens/veRAAC/lock.d.ts +2 -2
- package/dist/types/contracts/tokens/veRAAC/lockWithApproval.d.ts +3 -3
- package/dist/types/contracts/tokens/xPM/getBalance.d.ts +11 -1
- package/dist/types/contracts/tokens/xPM/getTotalSupply.d.ts +7 -3
- package/dist/types/contracts/zap/aladdin/zap.d.ts +9 -1
- package/dist/types/contracts/zap/aladdin/zapFrom.d.ts +9 -1
- package/dist/types/contracts/zap/aladdin/zapWithRoutes.d.ts +11 -2
- package/dist/types/contracts/zeno/createAuction.d.ts +13 -0
- package/dist/types/contracts/zeno/getAuctions.d.ts +38 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/methods/approveToken.d.ts +10 -1
- package/dist/types/methods/commons/checkAllowance.d.ts +11 -1
- package/dist/types/methods/getAssetBalance.d.ts +10 -1
- package/dist/types/minter/_helpers.d.ts +8 -0
- package/dist/types/minter/calculateScheduledMintableAmount.d.ts +3 -1
- package/dist/types/minter/get.d.ts +15 -9
- package/dist/types/minter/getApy.d.ts +12 -3
- package/dist/types/minter/getDistributionPools.d.ts +10 -2
- package/dist/types/minter/getEmissionPerSecond.d.ts +3 -1
- package/dist/types/minter/getPoolInfo.d.ts +10 -2
- package/dist/types/nfts/_helpers.d.ts +10 -0
- package/dist/types/nfts/getHousePrice.d.ts +9 -1
- package/dist/types/nfts/getMintFeePercentage.d.ts +6 -0
- package/dist/types/nfts/getMintPrice.d.ts +9 -4
- package/dist/types/nfts/mint.d.ts +10 -1
- package/dist/types/pools/lendingPool/_helpers.d.ts +28 -1
- package/dist/types/pools/lendingPool/adapters/erc20/getERC20AdapterBalance.d.ts +11 -1
- package/dist/types/pools/lendingPool/borrowFromLendingPool.d.ts +10 -1
- package/dist/types/pools/lendingPool/borrowFromLendingPoolWithInsurance.d.ts +10 -1
- package/dist/types/pools/lendingPool/calculateInsuranceFee.d.ts +12 -1
- package/dist/types/pools/lendingPool/depositToLendingPool.d.ts +9 -2
- package/dist/types/pools/lendingPool/getEligibleUserDeposits.d.ts +6 -5
- package/dist/types/pools/lendingPool/getHealthFactor.d.ts +8 -7
- package/dist/types/pools/lendingPool/getHousePrice.d.ts +9 -1
- package/dist/types/pools/lendingPool/getLendingPoolInfo.d.ts +48 -21
- package/dist/types/pools/lendingPool/getLendingPoolTotalLiquidity.d.ts +9 -1
- package/dist/types/pools/lendingPool/getParameters.d.ts +24 -5
- package/dist/types/pools/lendingPool/getPositionDebt.d.ts +8 -5
- package/dist/types/pools/lendingPool/getPositionScaledDebt.d.ts +8 -7
- package/dist/types/pools/lendingPool/getPositionView.d.ts +33 -18
- package/dist/types/pools/lendingPool/getPositionsScaledDebt.d.ts +6 -5
- package/dist/types/pools/lendingPool/getRawUserDepositsInLendingPool.d.ts +9 -1
- package/dist/types/pools/lendingPool/getUserCollateralValue.d.ts +6 -5
- package/dist/types/pools/lendingPool/openVaultPosition.d.ts +2 -2
- package/dist/types/pools/lendingPool/repayToLendingPool.d.ts +9 -0
- package/dist/types/pools/lendingPool/withdrawFromLendingPool.d.ts +9 -1
- package/dist/types/pools/liquidityPool/getLiquidityPoolInfo.d.ts +27 -2
- package/dist/types/pools/rwaVault/_helpers.d.ts +21 -1
- package/dist/types/pools/rwaVault/adapters/erc20/getERC20VaultAdapterAssetValue.d.ts +9 -1
- package/dist/types/pools/rwaVault/adapters/erc20/getERC20VaultAdapterTotalValue.d.ts +8 -1
- package/dist/types/pools/rwaVault/adapters/erc721/getERC721VaultAdapterAssetValue.d.ts +9 -1
- package/dist/types/pools/rwaVault/adapters/erc721/getERC721VaultAdapterTotalValue.d.ts +8 -1
- package/dist/types/pools/rwaVault/depositToRWAVault.d.ts +12 -2
- package/dist/types/pools/rwaVault/getRWAVaultInfo.d.ts +16 -4
- package/dist/types/pools/rwaVault/previewDeposit.d.ts +9 -1
- package/dist/types/pools/rwaVault/previewWithdraw.d.ts +9 -1
- package/dist/types/pools/rwaVault/redeemNFTFromRWAVault.d.ts +11 -2
- package/dist/types/pools/stabilityPool/depositToStabilityPool.d.ts +9 -2
- package/dist/types/pools/stabilityPool/getRawUserDepositsInStabilityPool.d.ts +9 -1
- package/dist/types/pools/stabilityPool/getStabilityPoolInfo.d.ts +15 -4
- package/dist/types/pools/stabilityPool/getStabilityPoolTotalDeposits.d.ts +8 -1
- package/dist/types/pools/stabilityPool/getWithdrawRequestInfo.d.ts +19 -6
- package/dist/types/pools/stabilityPool/requestWithdraw.d.ts +9 -2
- package/dist/types/pools/stabilityPool/withdrawFromStabilityPool.d.ts +9 -2
- package/dist/types/prices/getPrices.d.ts +12 -5
- package/dist/types/typechain-types/contracts/core/governance/gauges/BaseGauge.d.ts +176 -105
- package/dist/types/typechain-types/contracts/core/governance/gauges/GaugeController.d.ts +260 -213
- package/dist/types/typechain-types/contracts/core/governance/gauges/GaugeRewardsDistributor.d.ts +173 -212
- package/dist/types/typechain-types/contracts/core/governance/gauges/RAACGauge.d.ts +176 -105
- package/dist/types/typechain-types/contracts/core/governance/gauges/RWAGauge.d.ts +176 -105
- package/dist/types/typechain-types/contracts/core/governance/proposals/Governance.d.ts +202 -82
- package/dist/types/typechain-types/contracts/core/governance/proposals/TimelockController.d.ts +8 -8
- package/dist/types/typechain-types/contracts/core/lockers/RAACLiquidLocker.d.ts +89 -37
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IBaseGauge.d.ts +111 -108
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGaugeController.d.ts +210 -34
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGaugeRewardsDistributor.d.ts +112 -151
- package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/IGovernance.d.ts +36 -51
- package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/ITimelockController.d.ts +8 -8
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/BaseGauge__factory.d.ts +174 -95
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeController__factory.d.ts +243 -227
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeRewardsDistributor__factory.d.ts +164 -232
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RAACGauge__factory.d.ts +185 -98
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RWAGauge__factory.d.ts +185 -98
- package/dist/types/typechain-types/factories/contracts/core/governance/proposals/Governance__factory.d.ts +288 -81
- package/dist/types/typechain-types/factories/contracts/core/governance/proposals/TimelockController__factory.d.ts +11 -15
- package/dist/types/typechain-types/factories/contracts/core/lockers/RAACLiquidLocker__factory.d.ts +101 -30
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IBaseGauge__factory.d.ts +104 -95
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGaugeController__factory.d.ts +241 -22
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGaugeRewardsDistributor__factory.d.ts +72 -158
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/IGovernance__factory.d.ts +70 -40
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/ITimelockController__factory.d.ts +8 -4
- package/dist/types/utils/amount.d.ts +101 -0
- package/dist/types/utils/artifacts.d.ts +40 -0
- package/dist/types/utils/contracts.d.ts +52 -64
- package/dist/types/wallet/assets/approveAsset.d.ts +10 -1
- package/dist/types/wallet/assets/burnAsset.d.ts +8 -0
- package/dist/types/wallet/assets/getAllowance.d.ts +12 -1
- package/dist/types/wallet/assets/getAsset.d.ts +13 -1
- package/dist/types/wallet/assets/getAssets.d.ts +11 -1
- package/dist/types/wallet/assets/getBalance.d.ts +11 -5
- package/dist/types/wallet/assets/mintAsset.d.ts +9 -0
- package/dist/types/wallet/assets/transferAsset.d.ts +10 -0
- package/dist/utils/amount.js +131 -0
- package/dist/utils/contracts.js +6 -1
- package/dist/wallet/assets/approveAsset.js +10 -4
- package/dist/wallet/assets/burnAsset.js +9 -2
- package/dist/wallet/assets/getAllowance.js +14 -5
- package/dist/wallet/assets/getAsset.js +16 -9
- package/dist/wallet/assets/getAssets.js +17 -16
- package/dist/wallet/assets/getBalance.js +16 -20
- package/dist/wallet/assets/mintAsset.js +10 -1
- package/dist/wallet/assets/transferAsset.js +12 -3
- package/package.json +2 -2
- package/dist/contracts/governance/distributor/getStartEpoch.js +0 -28
- package/dist/contracts/governance/distributor/withdrawUnallocatedRewards.js +0 -26
- package/dist/contracts/governance/gauge/setDistributorApproval.js +0 -35
- package/dist/types/contracts/governance/distributor/getStartEpoch.d.ts +0 -10
- package/dist/types/contracts/governance/distributor/withdrawUnallocatedRewards.d.ts +0 -12
- package/dist/types/contracts/governance/gauge/setDistributorApproval.d.ts +0 -11
- package/dist/types/contracts/governance/proposals/getProposalData.d.ts +0 -18
- package/dist/types/contracts/tokens/veRAAC/getEffectiveLockEnd.d.ts +0 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ethers, Signer } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { TokenAmount } from "../../../utils/amount";
|
|
3
4
|
/**
|
|
4
5
|
* Casts a vote on a governance proposal.
|
|
5
6
|
* Allows veToken holders to vote on active proposals.
|
|
@@ -8,12 +9,13 @@ import { ChainId } from "../../../configs/chains";
|
|
|
8
9
|
* - Voting window between start and end times
|
|
9
10
|
*
|
|
10
11
|
* @param chainId - The chain/network to use.
|
|
12
|
+
* @param governance - Address of the Governance contract.
|
|
11
13
|
* @param proposalId - The ID of the proposal to vote on.
|
|
12
14
|
* @param support - True to vote in favor, false to vote against.
|
|
13
15
|
* @param signer - An ethers.js Signer instance (must be connected to wallet).
|
|
14
|
-
* @returns
|
|
16
|
+
* @returns The mined transaction and the voting power the vote carried, in veRAAC base units (undefined when the VoteCast event could not be read).
|
|
15
17
|
*/
|
|
16
|
-
export declare const castVote: (chainId: ChainId, proposalId: number | bigint, support: boolean, signer: Signer) => Promise<{
|
|
18
|
+
export declare const castVote: (chainId: ChainId, governance: string, proposalId: number | bigint, support: boolean, signer: Signer) => Promise<{
|
|
17
19
|
tx: ethers.ContractTransactionResponse;
|
|
18
|
-
weight:
|
|
20
|
+
weight: TokenAmount;
|
|
19
21
|
}>;
|
|
@@ -7,9 +7,10 @@ import { ChainId } from "../../../configs/chains";
|
|
|
7
7
|
* 2. Execute - Execute proposal after timelock delay
|
|
8
8
|
*
|
|
9
9
|
* @param chainId - The chain/network to use.
|
|
10
|
+
* @param governance - Address of the Governance contract.
|
|
10
11
|
* @param proposalId - The ID of the proposal to execute.
|
|
11
|
-
* @param value - Optional ETH value to send with the execution (for payable actions).
|
|
12
|
+
* @param value - Optional ETH value to send with the execution, in wei (for payable actions).
|
|
12
13
|
* @param signer - An ethers.js Signer instance (must be connected to wallet).
|
|
13
14
|
* @returns Transaction receipt after the proposal is queued or executed.
|
|
14
15
|
*/
|
|
15
|
-
export declare const execute: (chainId: ChainId, proposalId: number | bigint, value:
|
|
16
|
+
export declare const execute: (chainId: ChainId, governance: string, proposalId: number | bigint, value: bigint, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainId } from "../../../configs/chains";
|
|
2
|
+
import { GovernanceInstance } from "../../../configs/chains/chain";
|
|
3
|
+
export type LabelledGovernance = GovernanceInstance;
|
|
4
|
+
/**
|
|
5
|
+
* Lists the Governance instances configured for a chain.
|
|
6
|
+
* Reads the chain config only; no RPC call is made.
|
|
7
|
+
*
|
|
8
|
+
* @param chainId - The chain/network to use.
|
|
9
|
+
* @returns Each configured instance with its id, label, governance and timelock addresses.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getGovernances: (chainId: ChainId) => LabelledGovernance[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the category label this Governance instance was deployed for.
|
|
5
|
+
*
|
|
6
|
+
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param governance - Address of the Governance contract.
|
|
8
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
9
|
+
* @returns The instance label.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getLabel: (chainId: ChainId, governance: string, provider?: Provider) => Promise<string>;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
-
|
|
4
|
-
* Proposal types enum matching the contract
|
|
5
|
-
*/
|
|
6
|
-
export declare enum ProposalType {
|
|
7
|
-
ParameterChange = 0,
|
|
8
|
-
SmartContractUpgrade = 1,
|
|
9
|
-
TreasuryAction = 2,
|
|
10
|
-
EmissionChange = 3,
|
|
11
|
-
GaugeManagement = 4
|
|
12
|
-
}
|
|
3
|
+
import { TokenAmount } from "../../../utils/amount";
|
|
13
4
|
export interface ProposalCore {
|
|
14
5
|
id: number;
|
|
15
6
|
proposer: string;
|
|
16
|
-
proposalType: ProposalType;
|
|
17
7
|
startTime: number;
|
|
18
8
|
endTime: number;
|
|
19
9
|
executed: boolean;
|
|
20
10
|
canceled: boolean;
|
|
11
|
+
timelock: string;
|
|
21
12
|
descriptionHash: string;
|
|
22
13
|
targets: string[];
|
|
23
|
-
|
|
14
|
+
/** ETH value per action, in wei. */
|
|
15
|
+
values: TokenAmount[];
|
|
24
16
|
calldatas: string[];
|
|
17
|
+
snapshotBlock: number;
|
|
18
|
+
/** Quorum numerator snapshotted at creation, percent of total voting power (denominator 100). */
|
|
19
|
+
quorumNumerator: bigint;
|
|
20
|
+
/** Total veRAAC voting power at the snapshot block, in base units. */
|
|
21
|
+
totalVotingPowerAtSnapshot: TokenAmount;
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
24
|
* Gets full proposal details.
|
|
25
|
+
* `timelock` is the zero address until the proposal is queued, after which it is pinned to the timelock it was queued in.
|
|
26
|
+
* `snapshotBlock`, `quorumNumerator` and `totalVotingPowerAtSnapshot` are captured at creation and never change.
|
|
28
27
|
*
|
|
29
28
|
* @param chainId - The chain/network to use.
|
|
29
|
+
* @param governance - Address of the Governance contract.
|
|
30
30
|
* @param proposalId - The ID of the proposal to query.
|
|
31
31
|
* @param provider - Optional ethers.js Provider instance.
|
|
32
32
|
* @returns Full ProposalCore data.
|
|
33
33
|
*/
|
|
34
|
-
export declare const getProposal: (chainId: ChainId, proposalId: number | bigint, provider?: Provider) => Promise<ProposalCore>;
|
|
34
|
+
export declare const getProposal: (chainId: ChainId, governance: string, proposalId: number | bigint, provider?: Provider) => Promise<ProposalCore>;
|
|
@@ -4,7 +4,8 @@ import { ChainId } from "../../../configs/chains";
|
|
|
4
4
|
* Gets the total number of proposals.
|
|
5
5
|
*
|
|
6
6
|
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param governance - Address of the Governance contract.
|
|
7
8
|
* @param provider - Optional ethers.js Provider instance.
|
|
8
9
|
* @returns The total number of proposals.
|
|
9
10
|
*/
|
|
10
|
-
export declare const getProposalCount: (chainId: ChainId, provider?: Provider) => Promise<number>;
|
|
11
|
+
export declare const getProposalCount: (chainId: ChainId, governance: string, provider?: Provider) => Promise<number>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the timestamp at which a queued proposal becomes executable.
|
|
5
|
+
* Read from the timelock the proposal was queued in.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param governance - Address of the Governance contract.
|
|
9
|
+
* @param proposalId - The ID of the proposal to query.
|
|
10
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
11
|
+
* @returns Execution timestamp in seconds, or 0 if the proposal has not been queued.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getProposalEta: (chainId: ChainId, governance: string, proposalId: number | bigint, provider?: Provider) => Promise<number>;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { TokenAmount } from "../../../utils/amount";
|
|
3
4
|
import { ProposalState } from "./getState";
|
|
4
5
|
export interface ProposalInfo {
|
|
5
6
|
currentState: ProposalState;
|
|
6
7
|
startTime: number;
|
|
7
8
|
endTime: number;
|
|
8
9
|
currentTime: number;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/** Votes for, in veRAAC base units. */
|
|
11
|
+
forVotes: TokenAmount;
|
|
12
|
+
/** Votes against, in veRAAC base units. */
|
|
13
|
+
againstVotes: TokenAmount;
|
|
14
|
+
/** Votes cast so far (for + against), in veRAAC base units. */
|
|
15
|
+
currentQuorum: TokenAmount;
|
|
16
|
+
/** Votes needed to reach quorum, in veRAAC base units. */
|
|
17
|
+
requiredQuorum: TokenAmount;
|
|
13
18
|
isExecuted: boolean;
|
|
14
19
|
isCanceled: boolean;
|
|
15
20
|
}
|
|
@@ -17,8 +22,9 @@ export interface ProposalInfo {
|
|
|
17
22
|
* Gets detailed proposal status info.
|
|
18
23
|
*
|
|
19
24
|
* @param chainId - The chain/network to use.
|
|
25
|
+
* @param governance - Address of the Governance contract.
|
|
20
26
|
* @param proposalId - The ID of the proposal.
|
|
21
27
|
* @param provider - Optional ethers.js Provider instance.
|
|
22
|
-
* @returns Detailed proposal info
|
|
28
|
+
* @returns Detailed proposal info: state, timing, and votes and quorum in veRAAC base units.
|
|
23
29
|
*/
|
|
24
|
-
export declare const getProposalInfo: (chainId: ChainId, proposalId: number | bigint, provider?: Provider) => Promise<ProposalInfo>;
|
|
30
|
+
export declare const getProposalInfo: (chainId: ChainId, governance: string, proposalId: number | bigint, provider?: Provider) => Promise<ProposalInfo>;
|
|
@@ -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
5
|
* Gets the minimum voting power required to create proposals.
|
|
5
6
|
*
|
|
6
7
|
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param governance - Address of the Governance contract.
|
|
7
9
|
* @param provider - Optional ethers.js Provider instance.
|
|
8
|
-
* @returns The
|
|
10
|
+
* @returns The threshold, veRAAC voting power in base units.
|
|
9
11
|
*/
|
|
10
|
-
export declare const getProposalThreshold: (chainId: ChainId, provider?: Provider) => Promise<
|
|
12
|
+
export declare const getProposalThreshold: (chainId: ChainId, governance: string, provider?: Provider) => Promise<TokenAmount>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { TokenAmount } from "../../../utils/amount";
|
|
3
4
|
/**
|
|
4
|
-
* Gets the
|
|
5
|
-
*
|
|
5
|
+
* Gets the quorum requirement for a proposal.
|
|
6
|
+
* Derived from the total voting power and quorum numerator snapshotted when the proposal was created, so it never moves afterwards.
|
|
6
7
|
*
|
|
7
8
|
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param governance - Address of the Governance contract.
|
|
10
|
+
* @param proposalId - The ID of the proposal to query.
|
|
8
11
|
* @param provider - Optional ethers.js Provider instance.
|
|
9
|
-
* @returns The
|
|
12
|
+
* @returns The required votes, veRAAC voting power in base units; zero for an unknown proposal.
|
|
10
13
|
*/
|
|
11
|
-
export declare const getQuorum: (chainId: ChainId, provider?: Provider) => Promise<
|
|
14
|
+
export declare const getQuorum: (chainId: ChainId, governance: string, proposalId: number | bigint, provider?: Provider) => Promise<TokenAmount>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
3
|
export interface QuorumSettings {
|
|
4
|
-
numerator
|
|
5
|
-
|
|
4
|
+
/** Quorum numerator, percent of total voting power. */
|
|
5
|
+
numerator: bigint;
|
|
6
|
+
/** Quorum denominator, 100. */
|
|
7
|
+
denominator: bigint;
|
|
8
|
+
/** numerator / denominator as a percentage, a computed float. */
|
|
6
9
|
percentage: number;
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
@@ -10,7 +13,8 @@ export interface QuorumSettings {
|
|
|
10
13
|
* The percentage of total voting power required for quorum.
|
|
11
14
|
*
|
|
12
15
|
* @param chainId - The chain/network to use.
|
|
16
|
+
* @param governance - Address of the Governance contract.
|
|
13
17
|
* @param provider - Optional ethers.js Provider instance.
|
|
14
18
|
* @returns The quorum settings including numerator, denominator, and percentage.
|
|
15
19
|
*/
|
|
16
|
-
export declare const getQuorumNumerator: (chainId: ChainId, provider?: Provider) => Promise<QuorumSettings>;
|
|
20
|
+
export declare const getQuorumNumerator: (chainId: ChainId, governance: string, provider?: Provider) => Promise<QuorumSettings>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
export interface GovernanceRoles {
|
|
4
|
+
defaultAdminRole: string;
|
|
5
|
+
parameterUpdateRole: string;
|
|
6
|
+
cancellationRole: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Gets the access-control role identifiers used by Governance.
|
|
10
|
+
*
|
|
11
|
+
* @param chainId - The chain/network to use.
|
|
12
|
+
* @param governance - Address of the Governance contract.
|
|
13
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
14
|
+
* @returns The bytes32 role identifiers.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getRoles: (chainId: ChainId, governance: string, provider?: Provider) => Promise<GovernanceRoles>;
|
|
@@ -16,8 +16,9 @@ export declare enum ProposalState {
|
|
|
16
16
|
* Returns the current state of a proposal.
|
|
17
17
|
*
|
|
18
18
|
* @param chainId - The chain/network to use.
|
|
19
|
+
* @param governance - Address of the Governance contract.
|
|
19
20
|
* @param proposalId - The ID of the proposal to check.
|
|
20
21
|
* @param provider - Optional ethers.js Provider instance.
|
|
21
22
|
* @returns The current ProposalState.
|
|
22
23
|
*/
|
|
23
|
-
export declare const getState: (chainId: ChainId, proposalId: number | bigint, provider?: Provider) => Promise<ProposalState>;
|
|
24
|
+
export declare const getState: (chainId: ChainId, governance: string, proposalId: number | bigint, provider?: Provider) => Promise<ProposalState>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { TokenAmount } from "../../../utils/amount";
|
|
4
|
+
export interface VoteReceipt {
|
|
5
|
+
hasVoted: boolean;
|
|
6
|
+
/** True for, false against. Null when the account has not voted, or its VoteCast event could not be read. */
|
|
7
|
+
support: boolean | null;
|
|
8
|
+
/** veRAAC the vote carried, in base units. Null when unknown. */
|
|
9
|
+
weight: TokenAmount | null;
|
|
10
|
+
transactionHash: string | null;
|
|
11
|
+
blockNumber: number | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets an account's vote on a proposal: whether it voted, from `hasVoted`,
|
|
15
|
+
* and which side and weight, from its `VoteCast` event. Both event fields
|
|
16
|
+
* (`voter`, `proposalId`) are indexed, so the lookup is a filtered log query
|
|
17
|
+
* starting at the proposal's snapshot block, before which no vote can exist.
|
|
18
|
+
*
|
|
19
|
+
* @param chainId - The chain/network to use.
|
|
20
|
+
* @param governance - Address of the Governance contract.
|
|
21
|
+
* @param proposalId - The proposal ID.
|
|
22
|
+
* @param account - The voter address.
|
|
23
|
+
* @param fromBlock - First block to search for the event; pass the proposal's snapshot block.
|
|
24
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
25
|
+
* @returns The receipt. `hasVoted` is authoritative; the event fields are null if the log query fails.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getVoteReceipt: (chainId: ChainId, governance: string, proposalId: number | bigint, account: string, fromBlock?: number | bigint, provider?: Provider) => Promise<VoteReceipt>;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { TokenAmount } from "../../../utils/amount";
|
|
3
4
|
export interface ProposalVotes {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/** Votes for, in veRAAC base units. */
|
|
6
|
+
forVotes: TokenAmount;
|
|
7
|
+
/** Votes against, in veRAAC base units. */
|
|
8
|
+
againstVotes: TokenAmount;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
8
11
|
* Gets vote counts for a proposal.
|
|
9
12
|
*
|
|
10
13
|
* @param chainId - The chain/network to use.
|
|
14
|
+
* @param governance - Address of the Governance contract.
|
|
11
15
|
* @param proposalId - The ID of the proposal to query.
|
|
12
16
|
* @param provider - Optional ethers.js Provider instance.
|
|
13
|
-
* @returns The for and against vote totals
|
|
17
|
+
* @returns The for and against vote totals, veRAAC voting power in base units.
|
|
14
18
|
*/
|
|
15
|
-
export declare const getVotes: (chainId: ChainId, proposalId: number | bigint, provider?: Provider) => Promise<ProposalVotes>;
|
|
19
|
+
export declare const getVotes: (chainId: ChainId, governance: string, proposalId: number | bigint, provider?: Provider) => Promise<ProposalVotes>;
|
|
@@ -4,7 +4,8 @@ import { ChainId } from "../../../configs/chains";
|
|
|
4
4
|
* Gets the voting delay (time before voting starts after proposal creation).
|
|
5
5
|
*
|
|
6
6
|
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param governance - Address of the Governance contract.
|
|
7
8
|
* @param provider - Optional ethers.js Provider instance.
|
|
8
9
|
* @returns The voting delay in seconds.
|
|
9
10
|
*/
|
|
10
|
-
export declare const getVotingDelay: (chainId: ChainId, provider?: Provider) => Promise<number>;
|
|
11
|
+
export declare const getVotingDelay: (chainId: ChainId, governance: string, provider?: Provider) => Promise<number>;
|
|
@@ -4,7 +4,8 @@ import { ChainId } from "../../../configs/chains";
|
|
|
4
4
|
* Gets the voting period duration.
|
|
5
5
|
*
|
|
6
6
|
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param governance - Address of the Governance contract.
|
|
7
8
|
* @param provider - Optional ethers.js Provider instance.
|
|
8
9
|
* @returns The voting period in seconds.
|
|
9
10
|
*/
|
|
10
|
-
export declare const getVotingPeriod: (chainId: ChainId, provider?: Provider) => Promise<number>;
|
|
11
|
+
export declare const getVotingPeriod: (chainId: ChainId, governance: string, provider?: Provider) => Promise<number>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Checks whether an account holds a Governance role.
|
|
5
|
+
*
|
|
6
|
+
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param governance - Address of the Governance contract.
|
|
8
|
+
* @param role - The bytes32 role identifier (see `getRoles`).
|
|
9
|
+
* @param account - The address to check.
|
|
10
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
11
|
+
* @returns True if the account holds the role.
|
|
12
|
+
*/
|
|
13
|
+
export declare const hasRole: (chainId: ChainId, governance: string, role: string, account: string, provider?: Provider) => Promise<boolean>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Checks whether an account has already voted on a proposal.
|
|
5
|
+
* Votes cannot be changed or withdrawn, so a `true` result is final.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param governance - Address of the Governance contract.
|
|
9
|
+
* @param proposalId - The ID of the proposal to query.
|
|
10
|
+
* @param account - The address to check.
|
|
11
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
12
|
+
* @returns True if the account has voted on the proposal.
|
|
13
|
+
*/
|
|
14
|
+
export declare const hasVoted: (chainId: ChainId, governance: string, proposalId: number | bigint, account: string, provider?: Provider) => Promise<boolean>;
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
export { getGovernances, type LabelledGovernance } from "./getGovernances";
|
|
1
2
|
export { getState, ProposalState } from "./getState";
|
|
2
3
|
export { getVotes, type ProposalVotes } from "./getVotes";
|
|
4
|
+
export { hasVoted } from "./hasVoted";
|
|
5
|
+
export { getVoteReceipt, type VoteReceipt } from "./getVoteReceipt";
|
|
3
6
|
export { getQuorum } from "./getQuorum";
|
|
4
|
-
export { getProposal,
|
|
5
|
-
export { getProposalData, type ProposalData } from "./getProposalData";
|
|
7
|
+
export { getProposal, type ProposalCore } from "./getProposal";
|
|
6
8
|
export { getProposalInfo, type ProposalInfo } from "./getProposalInfo";
|
|
9
|
+
export { getProposalEta } from "./getProposalEta";
|
|
10
|
+
export { getProposalCount } from "./getProposalCount";
|
|
7
11
|
export { getVotingDelay } from "./getVotingDelay";
|
|
8
12
|
export { getVotingPeriod } from "./getVotingPeriod";
|
|
9
13
|
export { getProposalThreshold } from "./getProposalThreshold";
|
|
10
14
|
export { getQuorumNumerator, type QuorumSettings } from "./getQuorumNumerator";
|
|
15
|
+
export { getLabel } from "./getLabel";
|
|
16
|
+
export { getRoles, type GovernanceRoles } from "./getRoles";
|
|
17
|
+
export { hasRole } from "./hasRole";
|
|
11
18
|
export { propose } from "./propose";
|
|
12
19
|
export { castVote } from "./castVote";
|
|
13
20
|
export { execute } from "./execute";
|
|
14
21
|
export { cancel } from "./cancel";
|
|
22
|
+
export { setParameter, GovernanceParameter } from "./setParameter";
|
|
23
|
+
export { setTimelock } from "./setTimelock";
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import { ethers, Signer } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
-
/**
|
|
4
|
-
* Proposal types enum matching the contract
|
|
5
|
-
*/
|
|
6
|
-
export declare enum ProposalType {
|
|
7
|
-
ParameterChange = 0,
|
|
8
|
-
SmartContractUpgrade = 1,
|
|
9
|
-
TreasuryAction = 2,
|
|
10
|
-
EmissionChange = 3,
|
|
11
|
-
GaugeManagement = 4
|
|
12
|
-
}
|
|
13
3
|
/**
|
|
14
4
|
* Creates a new governance proposal.
|
|
15
|
-
* Requires the caller to have at least proposalThreshold veRAAC voting power.
|
|
5
|
+
* Requires the caller to have at least proposalThreshold veRAAC voting power at the previous block, which becomes the proposal's snapshot block.
|
|
16
6
|
*
|
|
17
7
|
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param governance - Address of the Governance contract.
|
|
18
9
|
* @param targets - Array of target addresses for proposal actions.
|
|
19
|
-
* @param values - Array of ETH values for proposal actions.
|
|
10
|
+
* @param values - Array of ETH values for the proposal actions, in wei.
|
|
20
11
|
* @param calldatas - Array of calldata for proposal actions.
|
|
21
12
|
* @param description - Description of the proposal.
|
|
22
|
-
* @param proposalType - Type of the proposal (ParameterChange, SmartContractUpgrade, TreasuryAction, EmissionChange, or GaugeManagement).
|
|
23
13
|
* @param signer - An ethers.js Signer instance (must be connected to wallet).
|
|
24
14
|
* @returns Transaction receipt and the proposal ID.
|
|
25
15
|
*/
|
|
26
|
-
export declare const propose: (chainId: ChainId, targets: string[], values:
|
|
16
|
+
export declare const propose: (chainId: ChainId, governance: string, targets: string[], values: bigint[], calldatas: string[], description: string, signer: Signer) => Promise<{
|
|
27
17
|
tx: ethers.ContractTransactionResponse;
|
|
28
18
|
proposalId: number;
|
|
29
19
|
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ethers, Signer } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Governance parameters enum matching the contract
|
|
5
|
+
*/
|
|
6
|
+
export declare enum GovernanceParameter {
|
|
7
|
+
VotingDelay = 0,
|
|
8
|
+
VotingPeriod = 1,
|
|
9
|
+
ProposalThreshold = 2,
|
|
10
|
+
QuorumNumerator = 3
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Updates a governance parameter. Requires `PARAMETER_UPDATE_ROLE`; takes effect immediately.
|
|
14
|
+
* Only affects proposals created afterwards, since quorum inputs are snapshotted at creation.
|
|
15
|
+
*
|
|
16
|
+
* @param chainId - The chain/network to use.
|
|
17
|
+
* @param governance - Address of the Governance contract.
|
|
18
|
+
* @param param - The parameter to update.
|
|
19
|
+
* @param newValue - The new raw value: seconds for the voting delay and period, veRAAC base units for the proposal threshold, percent (denominator 100) for the quorum numerator.
|
|
20
|
+
* @param signer - An ethers.js Signer instance (must be connected to wallet).
|
|
21
|
+
* @returns The transaction response.
|
|
22
|
+
*/
|
|
23
|
+
export declare const setParameter: (chainId: ChainId, governance: string, param: GovernanceParameter, newValue: bigint, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ethers, Signer } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Updates the timelock controller used to queue new proposals. Requires `DEFAULT_ADMIN_ROLE`.
|
|
5
|
+
* Proposals already queued stay bound to the timelock they were queued in.
|
|
6
|
+
* Update the instance's `timelock` in the chain config afterwards so it stays in sync.
|
|
7
|
+
*
|
|
8
|
+
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param governance - Address of the Governance contract.
|
|
10
|
+
* @param newTimelock - Address of the new timelock controller.
|
|
11
|
+
* @param signer - An ethers.js Signer instance (must be connected to wallet).
|
|
12
|
+
* @returns The transaction response.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setTimelock: (chainId: ChainId, governance: string, newTimelock: string, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -10,7 +10,8 @@ export interface TimelockConstants {
|
|
|
10
10
|
* Gets the timelock constants.
|
|
11
11
|
*
|
|
12
12
|
* @param chainId - The chain/network to use.
|
|
13
|
+
* @param timelock - Address of the TimelockController contract.
|
|
13
14
|
* @param provider - Optional ethers.js Provider instance.
|
|
14
15
|
* @returns Timelock constants including MIN_DELAY, MAX_DELAY, GRACE_PERIOD, EMERGENCY_DELAY.
|
|
15
16
|
*/
|
|
16
|
-
export declare const getConstants: (chainId: ChainId, provider?: Provider) => Promise<TimelockConstants>;
|
|
17
|
+
export declare const getConstants: (chainId: ChainId, timelock: string, provider?: Provider) => Promise<TimelockConstants>;
|
|
@@ -4,7 +4,8 @@ import { ChainId } from "../../../configs/chains";
|
|
|
4
4
|
* Returns the minimum delay for operations.
|
|
5
5
|
*
|
|
6
6
|
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param timelock - Address of the TimelockController contract.
|
|
7
8
|
* @param provider - Optional ethers.js Provider instance.
|
|
8
9
|
* @returns Current minimum delay in seconds.
|
|
9
10
|
*/
|
|
10
|
-
export declare const getMinDelay: (chainId: ChainId, provider?: Provider) => Promise<number>;
|
|
11
|
+
export declare const getMinDelay: (chainId: ChainId, timelock: string, provider?: Provider) => Promise<number>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
export interface TimelockRoles {
|
|
4
|
+
defaultAdminRole: string;
|
|
5
|
+
proposerRole: string;
|
|
6
|
+
executorRole: string;
|
|
7
|
+
cancellerRole: string;
|
|
8
|
+
emergencyRole: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Gets the access-control role identifiers used by the TimelockController.
|
|
12
|
+
* Governance must hold PROPOSER_ROLE, EXECUTOR_ROLE and CANCELLER_ROLE to queue, execute and cancel proposals.
|
|
13
|
+
*
|
|
14
|
+
* @param chainId - The chain/network to use.
|
|
15
|
+
* @param timelock - Address of the TimelockController contract.
|
|
16
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
17
|
+
* @returns The bytes32 role identifiers.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getRoles: (chainId: ChainId, timelock: string, provider?: Provider) => Promise<TimelockRoles>;
|
|
@@ -5,8 +5,9 @@ import { ChainId } from "../../../configs/chains";
|
|
|
5
5
|
* This is when the operation will be ready for execution.
|
|
6
6
|
*
|
|
7
7
|
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param timelock - Address of the TimelockController contract.
|
|
8
9
|
* @param operationId - Operation ID to check (bytes32 hash).
|
|
9
10
|
* @param provider - Optional ethers.js Provider instance.
|
|
10
11
|
* @returns Timestamp when operation will be ready (0 if not scheduled).
|
|
11
12
|
*/
|
|
12
|
-
export declare const getTimestamp: (chainId: ChainId, operationId: string, provider?: Provider) => Promise<number>;
|
|
13
|
+
export declare const getTimestamp: (chainId: ChainId, timelock: string, operationId: string, provider?: Provider) => Promise<number>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
/**
|
|
4
|
+
* Checks whether an account holds a TimelockController role.
|
|
5
|
+
*
|
|
6
|
+
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param timelock - Address of the TimelockController contract.
|
|
8
|
+
* @param role - The bytes32 role identifier (see `getRoles`).
|
|
9
|
+
* @param account - The address to check.
|
|
10
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
11
|
+
* @returns True if the account holds the role.
|
|
12
|
+
*/
|
|
13
|
+
export declare const hasRole: (chainId: ChainId, timelock: string, role: string, account: string, provider?: Provider) => Promise<boolean>;
|
|
@@ -5,13 +5,14 @@ import { ChainId } from "../../../configs/chains";
|
|
|
5
5
|
* Use this to compute the operation ID before scheduling or checking status.
|
|
6
6
|
*
|
|
7
7
|
* @param chainId - The chain/network to use.
|
|
8
|
-
* @param
|
|
8
|
+
* @param timelock - Address of the TimelockController contract.
|
|
9
|
+
* @param nonce - Caller-supplied discriminator. Governance passes the proposal ID.
|
|
9
10
|
* @param targets - Target addresses for calls.
|
|
10
|
-
* @param values - ETH values for calls.
|
|
11
|
+
* @param values - ETH values for the calls, in wei.
|
|
11
12
|
* @param calldatas - Calldata for calls.
|
|
12
13
|
* @param predecessor - ID of operation that must be executed before (or zero bytes32).
|
|
13
14
|
* @param salt - Random value for operation ID.
|
|
14
15
|
* @param provider - Optional ethers.js Provider instance.
|
|
15
16
|
* @returns Operation hash (bytes32).
|
|
16
17
|
*/
|
|
17
|
-
export declare const hashOperationBatch: (chainId: ChainId,
|
|
18
|
+
export declare const hashOperationBatch: (chainId: ChainId, timelock: string, nonce: number | bigint, targets: string[], values: bigint[], calldatas: string[], predecessor: string, salt: string, provider?: Provider) => Promise<string>;
|
|
@@ -5,3 +5,5 @@ export { getTimestamp } from "./getTimestamp";
|
|
|
5
5
|
export { getMinDelay } from "./getMinDelay";
|
|
6
6
|
export { hashOperationBatch } from "./hashOperationBatch";
|
|
7
7
|
export { getConstants, type TimelockConstants } from "./getConstants";
|
|
8
|
+
export { getRoles, type TimelockRoles } from "./getRoles";
|
|
9
|
+
export { hasRole } from "./hasRole";
|
|
@@ -4,8 +4,9 @@ import { ChainId } from "../../../configs/chains";
|
|
|
4
4
|
* Returns whether an operation is done (executed).
|
|
5
5
|
*
|
|
6
6
|
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param timelock - Address of the TimelockController contract.
|
|
7
8
|
* @param operationId - Operation ID to check (bytes32 hash).
|
|
8
9
|
* @param provider - Optional ethers.js Provider instance.
|
|
9
10
|
* @returns True if operation is done.
|
|
10
11
|
*/
|
|
11
|
-
export declare const isOperationDone: (chainId: ChainId, operationId: string, provider?: Provider) => Promise<boolean>;
|
|
12
|
+
export declare const isOperationDone: (chainId: ChainId, timelock: string, operationId: string, provider?: Provider) => Promise<boolean>;
|
|
@@ -4,8 +4,9 @@ import { ChainId } from "../../../configs/chains";
|
|
|
4
4
|
* Returns whether an operation is pending (scheduled but not executed).
|
|
5
5
|
*
|
|
6
6
|
* @param chainId - The chain/network to use.
|
|
7
|
+
* @param timelock - Address of the TimelockController contract.
|
|
7
8
|
* @param operationId - Operation ID to check (bytes32 hash).
|
|
8
9
|
* @param provider - Optional ethers.js Provider instance.
|
|
9
10
|
* @returns True if operation is pending.
|
|
10
11
|
*/
|
|
11
|
-
export declare const isOperationPending: (chainId: ChainId, operationId: string, provider?: Provider) => Promise<boolean>;
|
|
12
|
+
export declare const isOperationPending: (chainId: ChainId, timelock: string, operationId: string, provider?: Provider) => Promise<boolean>;
|
|
@@ -6,8 +6,9 @@ import { ChainId } from "../../../configs/chains";
|
|
|
6
6
|
* it's still within the grace period.
|
|
7
7
|
*
|
|
8
8
|
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param timelock - Address of the TimelockController contract.
|
|
9
10
|
* @param operationId - Operation ID to check (bytes32 hash).
|
|
10
11
|
* @param provider - Optional ethers.js Provider instance.
|
|
11
12
|
* @returns True if operation can be executed.
|
|
12
13
|
*/
|
|
13
|
-
export declare const isOperationReady: (chainId: ChainId, operationId: string, provider?: Provider) => Promise<boolean>;
|
|
14
|
+
export declare const isOperationReady: (chainId: ChainId, timelock: string, operationId: string, provider?: Provider) => Promise<boolean>;
|