@raac/rpc 1.2.0-beta.10 → 1.2.0-beta.11
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 +2 -0
- 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/configs/chains/1.json +22 -25
- package/dist/configs/chains/11155111.json +56 -71
- package/dist/configs/chains/17000.json +22 -25
- package/dist/configs/chains/18453.json +22 -25
- package/dist/configs/chains/8453.json +61 -31
- package/dist/contracts/findContract.js +11 -4
- package/dist/contracts/getContractAddress.js +0 -1
- 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 +10 -9
- package/dist/contracts/governance/distributor/getClaimedAtEpoch.js +11 -10
- package/dist/contracts/governance/distributor/getDepositedAtEpoch.js +8 -8
- 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 +7 -7
- package/dist/contracts/governance/distributor/getRewardTokenStats.js +7 -7
- 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 +122 -0
- package/dist/contracts/governance/gauge/_tokens.js +36 -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 +2 -12
- 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 +2 -12
- package/dist/contracts/governance/gauge/getAllPendingExtraRewards.js +2 -9
- package/dist/contracts/governance/gauge/getApy.js +44 -0
- package/dist/contracts/governance/gauge/getBalanceOf.js +2 -15
- package/dist/contracts/governance/gauge/getControllerAddress.js +2 -9
- package/dist/contracts/governance/gauge/getDecimalAdjustment.js +2 -9
- 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 +30 -0
- package/dist/contracts/governance/gauge/getEarnedReward.js +8 -14
- package/dist/contracts/governance/gauge/getExtraRewardTokens.js +2 -9
- package/dist/contracts/governance/gauge/getGaugeData.js +39 -0
- package/dist/contracts/governance/gauge/getGaugeRewardTokenData.js +2 -9
- package/dist/contracts/governance/gauge/getPauseStatus.js +31 -0
- package/dist/contracts/governance/gauge/getPendingExtraRewards.js +2 -9
- package/dist/contracts/governance/gauge/getPendingRewards.js +8 -14
- 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 +2 -9
- package/dist/contracts/governance/gauge/getRawBalanceOf.js +2 -15
- package/dist/contracts/governance/gauge/getRawTotalSupply.js +2 -15
- package/dist/contracts/governance/gauge/getRewardTokens.js +28 -0
- package/dist/contracts/governance/gauge/getTotalSupply.js +2 -15
- package/dist/contracts/governance/gauge/getUserApy.js +71 -0
- package/dist/contracts/governance/gauge/getUserClaimableRewards.js +21 -73
- package/dist/contracts/governance/gauge/getUserGaugeState.js +44 -0
- package/dist/contracts/governance/gauge/getUserRewardTokenData.js +2 -9
- package/dist/contracts/governance/gauge/getUserWeight.js +2 -9
- 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 +2 -12
- package/dist/contracts/governance/gauge/stake.js +2 -18
- 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 +2 -18
- 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 +20 -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 +10 -13
- 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 +11 -9
- package/dist/contracts/governance/gaugeController/getGaugeDistributor.js +28 -0
- package/dist/contracts/governance/gaugeController/getGaugeEmissions.js +15 -9
- package/dist/contracts/governance/gaugeController/getGaugeRelativeWeight.js +19 -15
- package/dist/contracts/governance/gaugeController/getGaugeRelativeWeightView.js +12 -10
- package/dist/contracts/governance/gaugeController/getGaugeWeight.js +10 -8
- 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 +8 -7
- package/dist/contracts/governance/gaugeController/getUserGaugeVotePower.js +11 -9
- package/dist/contracts/governance/gaugeController/getUserVotePowerRemaining.js +10 -9
- package/dist/contracts/governance/gaugeController/getVeToken.js +8 -7
- package/dist/contracts/governance/gaugeController/getVoteUserLocks.js +32 -0
- package/dist/contracts/governance/gaugeController/getVoteUserPower.js +8 -7
- package/dist/contracts/governance/gaugeController/getVoteUserSlope.js +12 -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/types/RPCLibrary.d.ts +2 -0
- package/dist/types/configs/chains/index.d.ts +36 -46
- package/dist/types/configs/index.d.ts +18 -23
- 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 +6 -4
- package/dist/types/contracts/governance/distributor/getClaimedAtEpoch.d.ts +7 -5
- package/dist/types/contracts/governance/distributor/getDepositedAtEpoch.d.ts +6 -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 +5 -3
- package/dist/types/contracts/governance/distributor/getRewardTokenStats.d.ts +5 -3
- 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 +61 -0
- package/dist/types/contracts/governance/gauge/_tokens.d.ts +14 -0
- package/dist/types/contracts/governance/gauge/approveGaugeToken.d.ts +14 -0
- package/dist/types/contracts/governance/gauge/claimRewardToken.d.ts +1 -1
- package/dist/types/contracts/governance/gauge/getApy.d.ts +41 -0
- package/dist/types/contracts/governance/gauge/getEarnedExtraReward.d.ts +13 -0
- package/dist/types/contracts/governance/gauge/getEarnedReward.d.ts +3 -2
- package/dist/types/contracts/governance/gauge/getGaugeData.d.ts +23 -0
- package/dist/types/contracts/governance/gauge/getPauseStatus.d.ts +19 -0
- package/dist/types/contracts/governance/gauge/getPendingRewards.d.ts +3 -2
- package/dist/types/contracts/governance/gauge/getRewardTokens.d.ts +11 -0
- package/dist/types/contracts/governance/gauge/getUserApy.d.ts +44 -0
- package/dist/types/contracts/governance/gauge/getUserClaimableRewards.d.ts +14 -12
- package/dist/types/contracts/governance/gauge/getUserGaugeState.d.ts +31 -0
- 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/unwrapStakingToken.d.ts +12 -0
- 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 +10 -8
- 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 +7 -3
- 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 +7 -4
- package/dist/types/contracts/governance/gaugeController/getGaugeDistributor.d.ts +12 -0
- package/dist/types/contracts/governance/gaugeController/getGaugeEmissions.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getGaugeRelativeWeight.d.ts +8 -9
- package/dist/types/contracts/governance/gaugeController/getGaugeRelativeWeightView.d.ts +8 -5
- package/dist/types/contracts/governance/gaugeController/getGaugeWeight.d.ts +6 -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 +5 -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 +17 -0
- package/dist/types/contracts/governance/gaugeController/getVoteUserPower.d.ts +6 -3
- package/dist/types/contracts/governance/gaugeController/getVoteUserSlope.d.ts +8 -5
- 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/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/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/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/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/utils/artifacts.d.ts +40 -0
- package/dist/types/utils/contracts.d.ts +34 -44
- package/dist/utils/contracts.js +1 -1
- package/package.json +1 -1
- 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
|
@@ -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
|
-
*
|
|
5
|
+
* Returns the voting escrow token the controller reads vote power from.
|
|
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 The veToken
|
|
10
|
+
* @returns The veToken address.
|
|
8
11
|
*/
|
|
9
|
-
export declare const getVeToken: (chainId: ChainId, provider?: Provider) => Promise<string>;
|
|
12
|
+
export declare const getVeToken: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the per-lock entries backing a user's vote on a gauge.
|
|
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 user.
|
|
10
|
+
* @param gaugeAddressOrId - Address or config id of the gauge.
|
|
11
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
12
|
+
* @returns Each entry's locked amount and unlock time.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getVoteUserLocks: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, gaugeAddressOrId: string, provider?: Provider) => Promise<{
|
|
15
|
+
locked: bigint;
|
|
16
|
+
unlockTime: bigint;
|
|
17
|
+
}[]>;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Returns the total vote weight a user has allocated across gauges, in basis points.
|
|
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
10
|
* @param provider - Optional ethers.js Provider instance.
|
|
8
|
-
* @returns The
|
|
11
|
+
* @returns The allocated vote weight.
|
|
9
12
|
*/
|
|
10
|
-
export declare const getVoteUserPower: (chainId: ChainId, user: string, provider?: Provider) => Promise<bigint>;
|
|
13
|
+
export declare const getVoteUserPower: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, provider?: Provider) => Promise<bigint>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
3
4
|
/**
|
|
4
|
-
* Reads a user's vote
|
|
5
|
+
* Reads a user's vote on a gauge from the public `voteUserSlopes` mapping.
|
|
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
|
|
10
|
+
* @param gaugeAddressOrId - Address or config id of the gauge.
|
|
8
11
|
* @param provider - Optional ethers.js Provider instance.
|
|
9
|
-
* @returns
|
|
12
|
+
* @returns locked amount, vote power and the vote timestamp.
|
|
10
13
|
*/
|
|
11
|
-
export declare const getVoteUserSlope: (chainId: ChainId, user: string,
|
|
14
|
+
export declare const getVoteUserSlope: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, gaugeAddressOrId: string, provider?: Provider) => Promise<{
|
|
12
15
|
locked: bigint;
|
|
13
16
|
power: bigint;
|
|
14
|
-
|
|
17
|
+
voteTs: bigint;
|
|
15
18
|
}>;
|
|
@@ -2,20 +2,26 @@ export * from "./addGauge";
|
|
|
2
2
|
export * from "./batchVote";
|
|
3
3
|
export * from "./calculateBoost";
|
|
4
4
|
export * from "./forceCompleteCheckpoint";
|
|
5
|
+
export * from "./getActiveGaugeCount";
|
|
5
6
|
export * from "./getActiveGauges";
|
|
6
7
|
export * from "./getConstants";
|
|
7
8
|
export * from "./getCurrentEpoch";
|
|
9
|
+
export * from "./getExpiredGaugeVotePower";
|
|
8
10
|
export * from "./getGauge";
|
|
11
|
+
export * from "./getGaugeDistributor";
|
|
12
|
+
export * from "./getGaugeEmissions";
|
|
9
13
|
export * from "./getGaugeRelativeWeight";
|
|
10
14
|
export * from "./getGaugeRelativeWeightView";
|
|
11
|
-
export * from "./getGaugeEmissions";
|
|
12
15
|
export * from "./getGaugeWeight";
|
|
13
16
|
export * from "./getLastVoteTime";
|
|
17
|
+
export * from "./getMaxVoteBuckets";
|
|
14
18
|
export * from "./getNextEpoch";
|
|
19
|
+
export * from "./getRegisteredGaugeList";
|
|
15
20
|
export * from "./getTotalWeight";
|
|
16
21
|
export * from "./getUserGaugeVotePower";
|
|
17
22
|
export * from "./getUserVotePowerRemaining";
|
|
18
23
|
export * from "./getVeToken";
|
|
24
|
+
export * from "./getVoteUserLocks";
|
|
19
25
|
export * from "./getVoteUserPower";
|
|
20
26
|
export * from "./getVoteUserSlope";
|
|
21
27
|
export * from "./isGaugeActive";
|
|
@@ -24,6 +30,9 @@ export * from "./kick";
|
|
|
24
30
|
export * from "./removeGauge";
|
|
25
31
|
export * from "./removePowerFromGauge";
|
|
26
32
|
export * from "./setBoostAmplificationEnabled";
|
|
33
|
+
export * from "./setDistributor";
|
|
27
34
|
export * from "./setEmergencyGaugePause";
|
|
35
|
+
export * from "./setEmergencyGaugePauseBatch";
|
|
28
36
|
export * from "./setEmergencyPause";
|
|
37
|
+
export * from "./setMaxVoteBuckets";
|
|
29
38
|
export * from "./vote";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Provider } from "ethers";
|
|
2
2
|
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
3
4
|
/**
|
|
4
|
-
* Checks
|
|
5
|
+
* Checks whether a gauge is registered and active on the controller. An emergency-paused gauge is still active.
|
|
5
6
|
*
|
|
6
7
|
* @param chainId - The chain/network to use.
|
|
7
|
-
* @param
|
|
8
|
+
* @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
|
|
9
|
+
* @param gaugeAddressOrId - Address or config id of the gauge.
|
|
8
10
|
* @param provider - Optional ethers.js Provider instance.
|
|
9
|
-
* @returns True if gauge is active.
|
|
11
|
+
* @returns True if the gauge is active.
|
|
10
12
|
*/
|
|
11
|
-
export declare const isGaugeActive: (chainId: ChainId,
|
|
13
|
+
export declare const isGaugeActive: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, provider?: Provider) => Promise<boolean>;
|
|
@@ -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
|
-
*
|
|
5
|
+
* Reports the controller's global emergency pause. While it is on, voting and kicks stop and every gauge's stake and claim functions revert; withdrawals stay open. Says nothing about a gauge's own pause switch (see `governance.gauge.isPaused`).
|
|
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 True if the
|
|
10
|
+
* @returns True if the controller is globally paused.
|
|
8
11
|
*/
|
|
9
|
-
export declare const isPaused: (chainId: ChainId, provider?: Provider) => Promise<boolean>;
|
|
12
|
+
export declare const isPaused: (chainId: ChainId, gaugeSystem: GaugeSystemRef, provider?: Provider) => Promise<boolean>;
|
|
@@ -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
|
-
*
|
|
5
|
+
* Writes down the vote weight of a user whose locks have expired. Reverts during a global pause.
|
|
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 to kick.
|
|
7
10
|
* @param signer - An ethers.js Signer instance (required).
|
|
8
|
-
* @returns The transaction
|
|
11
|
+
* @returns The transaction after it has been mined.
|
|
9
12
|
*/
|
|
10
|
-
export declare const kick: (chainId: ChainId, user: string, signer: Signer) => Promise<
|
|
13
|
+
export declare const kick: (chainId: ChainId, gaugeSystem: GaugeSystemRef, user: string, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -1,10 +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
|
-
* Removes a gauge from the
|
|
5
|
+
* Removes a gauge from the controller permanently. Requires GAUGE_ADMIN. Kicks the gauge's weight, unregisters it and redirects its unclaimed distributor entitlement to `recipient` in the same transaction. Not pause-gated.
|
|
6
|
+
*
|
|
5
7
|
* @param chainId - The chain/network to use.
|
|
6
|
-
* @param
|
|
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 recipient - Address that receives the gauge's unclaimed rewards.
|
|
7
11
|
* @param signer - An ethers.js Signer instance (required).
|
|
8
|
-
* @returns The transaction
|
|
12
|
+
* @returns The transaction after it has been mined.
|
|
9
13
|
*/
|
|
10
|
-
export declare const removeGauge: (chainId: ChainId,
|
|
14
|
+
export declare const removeGauge: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, recipient: string, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -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
|
-
*
|
|
5
|
+
* Releases the vote power a user still has on a removed gauge. For a paused (still active) gauge, vote 0 instead.
|
|
6
|
+
*
|
|
5
7
|
* @param chainId - The chain/network to use.
|
|
6
|
-
* @param
|
|
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
|
|
11
|
+
* @returns The transaction after it has been mined.
|
|
9
12
|
*/
|
|
10
|
-
export declare const removePowerFromGauge: (chainId: ChainId,
|
|
13
|
+
export declare const removePowerFromGauge: (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
|
-
* Enables or disables boost amplification for a gauge. Requires
|
|
5
|
+
* Enables or disables boost amplification for a gauge. Requires GAUGE_ADMIN.
|
|
6
|
+
*
|
|
5
7
|
* @param chainId - The chain/network to use.
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
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 enabled - True to enable amplification.
|
|
8
11
|
* @param signer - An ethers.js Signer instance (required).
|
|
9
|
-
* @returns The transaction
|
|
12
|
+
* @returns The transaction after it has been mined.
|
|
10
13
|
*/
|
|
11
|
-
export declare const setBoostAmplificationEnabled: (chainId: ChainId,
|
|
14
|
+
export declare const setBoostAmplificationEnabled: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, enabled: boolean, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ethers, Signer } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
4
|
+
/**
|
|
5
|
+
* Sets the GaugeRewardsDistributor wired to the controller. Requires GAUGE_ADMIN.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
|
|
9
|
+
* @param distributor - Address of the new distributor.
|
|
10
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
11
|
+
* @returns The transaction after it has been mined.
|
|
12
|
+
*/
|
|
13
|
+
export declare const setDistributor: (chainId: ChainId, gaugeSystem: GaugeSystemRef, distributor: 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
|
-
*
|
|
5
|
+
* Pauses or unpauses a single gauge. Requires EMERGENCY_ADMIN. Flips only the gauge's own switch: votes and weight are kept and its share stays in the distributor until it is unpaused. Pausing requires a registered gauge; unpausing also works for a removed one.
|
|
6
|
+
*
|
|
5
7
|
* @param chainId - The chain/network to use.
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
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 paused - True to pause, false to unpause.
|
|
8
11
|
* @param signer - An ethers.js Signer instance (required).
|
|
9
|
-
* @returns The transaction
|
|
12
|
+
* @returns The transaction after it has been mined.
|
|
10
13
|
*/
|
|
11
|
-
export declare const setEmergencyGaugePause: (chainId: ChainId,
|
|
14
|
+
export declare const setEmergencyGaugePause: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, paused: boolean, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ethers, Signer } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
4
|
+
/**
|
|
5
|
+
* Pauses or unpauses several gauges in one transaction. Requires EMERGENCY_ADMIN. All-or-nothing: a zero address, pausing an unregistered gauge, or a gauge already in its requested state reverts the whole batch.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
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 statuses - Requested pause state per gauge, index-aligned with the gauges.
|
|
11
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
12
|
+
* @returns The transaction after it has been mined.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setEmergencyGaugePauseBatch: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressesOrIds: string[], statuses: boolean[], signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -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
|
-
*
|
|
5
|
+
* Sets the controller's global emergency pause. Requires EMERGENCY_ADMIN. Does not touch any gauge's own switch, so individually paused gauges stay paused after a global unpause.
|
|
6
|
+
*
|
|
5
7
|
* @param chainId - The chain/network to use.
|
|
6
|
-
* @param
|
|
8
|
+
* @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
|
|
9
|
+
* @param paused - True to pause, false to unpause.
|
|
7
10
|
* @param signer - An ethers.js Signer instance (required).
|
|
8
|
-
* @returns The transaction
|
|
11
|
+
* @returns The transaction after it has been mined.
|
|
9
12
|
*/
|
|
10
|
-
export declare const setEmergencyPause: (chainId: ChainId, paused: boolean, signer: Signer) => Promise<
|
|
13
|
+
export declare const setEmergencyPause: (chainId: ChainId, gaugeSystem: GaugeSystemRef, paused: boolean, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ethers, Signer } from "ethers";
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
4
|
+
/**
|
|
5
|
+
* Sets the per-vote decay-bucket cap. Requires GAUGE_ADMIN. 0 is exact; 2 to 64 caps heavy multi-lock voters; 1 is rejected.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param gaugeSystem - Gauge system id ("raacgauges" or "rwagauges") or a GaugeController address.
|
|
9
|
+
* @param maxBuckets - 0, or 2 to 64.
|
|
10
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
11
|
+
* @returns The transaction after it has been mined.
|
|
12
|
+
*/
|
|
13
|
+
export declare const setMaxVoteBuckets: (chainId: ChainId, gaugeSystem: GaugeSystemRef, maxBuckets: string | number | bigint, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ethers, Signer } from "ethers";
|
|
2
|
-
import
|
|
2
|
+
import { ChainId } from "../../../configs/chains";
|
|
3
|
+
import { GaugeSystemRef } from "../gaugeSystems/_helpers";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Allocates vote weight to a gauge. Reverts with GaugePaused for a non-zero vote on a paused gauge, and with EnforcedPause during a global pause.
|
|
5
6
|
*
|
|
6
7
|
* @param chainId - The chain/network to use.
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @
|
|
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 voteWeight - Vote weight in basis points.
|
|
11
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
12
|
+
* @returns The transaction after it has been mined.
|
|
11
13
|
*/
|
|
12
|
-
export declare const vote: (chainId:
|
|
14
|
+
export declare const vote: (chainId: ChainId, gaugeSystem: GaugeSystemRef, gaugeAddressOrId: string, voteWeight: string | number | bigint, signer: Signer) => Promise<ethers.ContractTransactionResponse>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ChainId } from "../../../configs/chains";
|
|
2
|
+
import { GaugeEntry, GaugeSystem, GaugeSystemId } from "../../../configs/chains/chain";
|
|
3
|
+
export declare const GAUGE_SYSTEM_IDS: GaugeSystemId[];
|
|
4
|
+
/**
|
|
5
|
+
* Selects a gauge system: its config key ("raacgauges" or "rwagauges"), or the address of the
|
|
6
|
+
* contract the method targets (a GaugeController for controller methods, a
|
|
7
|
+
* GaugeRewardsDistributor for distributor methods).
|
|
8
|
+
*/
|
|
9
|
+
export type GaugeSystemRef = GaugeSystemId | string;
|
|
10
|
+
/** A gauge entry tagged with the system it belongs to. */
|
|
11
|
+
export interface GaugeInfo extends GaugeEntry {
|
|
12
|
+
system: GaugeSystemId;
|
|
13
|
+
gaugeType: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Reads the `gauges` section of a chain config.
|
|
17
|
+
*
|
|
18
|
+
* @param chainId - The chain/network to use.
|
|
19
|
+
* @returns The configured gauge systems keyed by id; systems missing from the config are absent.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getGaugeSystemsConfig: (chainId: ChainId) => Partial<Record<GaugeSystemId, GaugeSystem>>;
|
|
22
|
+
/**
|
|
23
|
+
* Looks up one gauge system in the chain config.
|
|
24
|
+
*
|
|
25
|
+
* @param chainId - The chain/network to use.
|
|
26
|
+
* @param system - Gauge system id, any case.
|
|
27
|
+
* @returns The system config.
|
|
28
|
+
* @throws If the id is unknown or the chain does not configure it.
|
|
29
|
+
*/
|
|
30
|
+
export declare const requireGaugeSystem: (chainId: ChainId, system: string) => GaugeSystem;
|
|
31
|
+
/**
|
|
32
|
+
* Resolves the GaugeController a controller method targets.
|
|
33
|
+
*
|
|
34
|
+
* @param chainId - The chain/network to use.
|
|
35
|
+
* @param ref - Gauge system id or a GaugeController address.
|
|
36
|
+
* @returns The checksummed GaugeController address.
|
|
37
|
+
*/
|
|
38
|
+
export declare const resolveGaugeController: (chainId: ChainId, ref: GaugeSystemRef) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Resolves the GaugeRewardsDistributor a distributor method targets.
|
|
41
|
+
*
|
|
42
|
+
* @param chainId - The chain/network to use.
|
|
43
|
+
* @param ref - Gauge system id or a GaugeRewardsDistributor address.
|
|
44
|
+
* @returns The checksummed GaugeRewardsDistributor address.
|
|
45
|
+
*/
|
|
46
|
+
export declare const resolveGaugeDistributor: (chainId: ChainId, ref: GaugeSystemRef) => string;
|
|
47
|
+
/**
|
|
48
|
+
* Lists gauges from the chain config, tagged with their system.
|
|
49
|
+
*
|
|
50
|
+
* @param chainId - The chain/network to use.
|
|
51
|
+
* @param system - Optional gauge system id; all systems when omitted.
|
|
52
|
+
* @returns The configured gauges.
|
|
53
|
+
*/
|
|
54
|
+
export declare const listGauges: (chainId: ChainId, system?: string) => GaugeInfo[];
|
|
55
|
+
/**
|
|
56
|
+
* Finds a gauge in the chain config by address or id.
|
|
57
|
+
*
|
|
58
|
+
* @param chainId - The chain/network to use.
|
|
59
|
+
* @param gaugeAddressOrId - Gauge address or config id, any case.
|
|
60
|
+
* @returns The gauge tagged with its system, or null if the config does not list it.
|
|
61
|
+
*/
|
|
62
|
+
export declare const lookupGauge: (chainId: ChainId, gaugeAddressOrId: string) => GaugeInfo | null;
|
|
63
|
+
/**
|
|
64
|
+
* Resolves a gauge argument to an address. Addresses pass through, so gauges missing from the
|
|
65
|
+
* config still work; ids are looked up across every gauge system.
|
|
66
|
+
*
|
|
67
|
+
* @param chainId - The chain/network to use.
|
|
68
|
+
* @param gaugeAddressOrId - Gauge address or config id.
|
|
69
|
+
* @returns The checksummed gauge address.
|
|
70
|
+
*/
|
|
71
|
+
export declare const resolveGauge: (chainId: ChainId, gaugeAddressOrId: string) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainId } from "../../../configs/chains";
|
|
2
|
+
import { GaugeInfo } from "./_helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Finds a gauge in the chain config by address or id and reports which system it belongs to.
|
|
5
|
+
* Reads the chain config only; no RPC call is made.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param gaugeAddressOrId - Gauge address or config id, any case.
|
|
9
|
+
* @returns The gauge tagged with its system and gauge type, or null if the config does not list it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const findGauge: (chainId: ChainId, gaugeAddressOrId: string) => GaugeInfo | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainId } from "../../../configs/chains";
|
|
2
|
+
import { GaugeSystem, GaugeSystemId } from "../../../configs/chains/chain";
|
|
3
|
+
/**
|
|
4
|
+
* Returns one gauge system from the chain config.
|
|
5
|
+
* Reads the chain config only; no RPC call is made.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @param system - Gauge system id: "raacgauges" or "rwagauges".
|
|
9
|
+
* @returns The system's label, gauge type, controller and distributor addresses and gauge list.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getGaugeSystem: (chainId: ChainId, system: GaugeSystemId) => GaugeSystem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChainId } from "../../../configs/chains";
|
|
2
|
+
import { GaugeSystem } from "../../../configs/chains/chain";
|
|
3
|
+
/**
|
|
4
|
+
* Lists the gauge systems configured for a chain (RAAC gauges, RWA gauges).
|
|
5
|
+
* Reads the chain config only; no RPC call is made.
|
|
6
|
+
*
|
|
7
|
+
* @param chainId - The chain/network to use.
|
|
8
|
+
* @returns Each system with its id, label, gauge type, controller and distributor addresses and gauge list.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getGaugeSystems: (chainId: ChainId) => GaugeSystem[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChainId } from "../../../configs/chains";
|
|
2
|
+
import { GaugeSystemId } from "../../../configs/chains/chain";
|
|
3
|
+
import { GaugeInfo } from "./_helpers";
|
|
4
|
+
/**
|
|
5
|
+
* Lists the gauges in the chain config, each tagged with the system it belongs to.
|
|
6
|
+
* Reads the chain config only; no RPC call is made. For the controller's on-chain list use
|
|
7
|
+
* `governance.controller.getRegisteredGaugeList`.
|
|
8
|
+
*
|
|
9
|
+
* @param chainId - The chain/network to use.
|
|
10
|
+
* @param system - Optional gauge system id; gauges of every system when omitted.
|
|
11
|
+
* @returns The configured gauges with their addresses.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getGauges: (chainId: ChainId, system?: GaugeSystemId) => GaugeInfo[];
|