@raac/rpc 1.2.0-beta.10 → 1.2.0-beta.12
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 +76 -112
- 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
|
@@ -3,19 +3,11 @@ import type { IGaugeRewardsDistributor, IGaugeRewardsDistributorInterface } from
|
|
|
3
3
|
export declare class IGaugeRewardsDistributor__factory {
|
|
4
4
|
static readonly abi: readonly [{
|
|
5
5
|
readonly inputs: readonly [];
|
|
6
|
-
readonly name: "
|
|
6
|
+
readonly name: "GaugeNotActive";
|
|
7
7
|
readonly type: "error";
|
|
8
8
|
}, {
|
|
9
9
|
readonly inputs: readonly [];
|
|
10
|
-
readonly name: "
|
|
11
|
-
readonly type: "error";
|
|
12
|
-
}, {
|
|
13
|
-
readonly inputs: readonly [];
|
|
14
|
-
readonly name: "InsufficientBalance";
|
|
15
|
-
readonly type: "error";
|
|
16
|
-
}, {
|
|
17
|
-
readonly inputs: readonly [];
|
|
18
|
-
readonly name: "InsufficientClaimableBalance";
|
|
10
|
+
readonly name: "GaugeStillActive";
|
|
19
11
|
readonly type: "error";
|
|
20
12
|
}, {
|
|
21
13
|
readonly inputs: readonly [];
|
|
@@ -25,14 +17,6 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
25
17
|
readonly inputs: readonly [];
|
|
26
18
|
readonly name: "InvalidAmount";
|
|
27
19
|
readonly type: "error";
|
|
28
|
-
}, {
|
|
29
|
-
readonly inputs: readonly [];
|
|
30
|
-
readonly name: "NoGaugesWeight";
|
|
31
|
-
readonly type: "error";
|
|
32
|
-
}, {
|
|
33
|
-
readonly inputs: readonly [];
|
|
34
|
-
readonly name: "TokenAlreadyApproved";
|
|
35
|
-
readonly type: "error";
|
|
36
20
|
}, {
|
|
37
21
|
readonly inputs: readonly [];
|
|
38
22
|
readonly name: "TokenNotApproved";
|
|
@@ -46,115 +30,131 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
46
30
|
readonly inputs: readonly [{
|
|
47
31
|
readonly indexed: true;
|
|
48
32
|
readonly internalType: "address";
|
|
49
|
-
readonly name: "
|
|
33
|
+
readonly name: "oldController";
|
|
50
34
|
readonly type: "address";
|
|
51
35
|
}, {
|
|
52
36
|
readonly indexed: true;
|
|
53
37
|
readonly internalType: "address";
|
|
54
|
-
readonly name: "
|
|
38
|
+
readonly name: "newController";
|
|
55
39
|
readonly type: "address";
|
|
56
40
|
}];
|
|
57
|
-
readonly name: "
|
|
41
|
+
readonly name: "ControllerUpdated";
|
|
58
42
|
readonly type: "event";
|
|
59
43
|
}, {
|
|
60
44
|
readonly anonymous: false;
|
|
61
45
|
readonly inputs: readonly [{
|
|
62
46
|
readonly indexed: true;
|
|
63
47
|
readonly internalType: "address";
|
|
64
|
-
readonly name: "
|
|
48
|
+
readonly name: "recipient";
|
|
65
49
|
readonly type: "address";
|
|
66
50
|
}, {
|
|
67
51
|
readonly indexed: true;
|
|
68
52
|
readonly internalType: "address";
|
|
69
53
|
readonly name: "token";
|
|
70
54
|
readonly type: "address";
|
|
55
|
+
}, {
|
|
56
|
+
readonly indexed: false;
|
|
57
|
+
readonly internalType: "uint256";
|
|
58
|
+
readonly name: "amount";
|
|
59
|
+
readonly type: "uint256";
|
|
71
60
|
}];
|
|
72
|
-
readonly name: "
|
|
61
|
+
readonly name: "DustWithdrawn";
|
|
73
62
|
readonly type: "event";
|
|
74
63
|
}, {
|
|
75
64
|
readonly anonymous: false;
|
|
76
65
|
readonly inputs: readonly [{
|
|
77
|
-
readonly indexed:
|
|
78
|
-
readonly internalType: "address";
|
|
79
|
-
readonly name: "token";
|
|
80
|
-
readonly type: "address";
|
|
81
|
-
}, {
|
|
82
|
-
readonly indexed: true;
|
|
66
|
+
readonly indexed: false;
|
|
83
67
|
readonly internalType: "address";
|
|
84
|
-
readonly name: "
|
|
68
|
+
readonly name: "gauge";
|
|
85
69
|
readonly type: "address";
|
|
86
70
|
}, {
|
|
87
71
|
readonly indexed: false;
|
|
88
72
|
readonly internalType: "uint256";
|
|
89
|
-
readonly name: "
|
|
73
|
+
readonly name: "currentEpoch";
|
|
90
74
|
readonly type: "uint256";
|
|
91
75
|
}];
|
|
92
|
-
readonly name: "
|
|
76
|
+
readonly name: "GaugeLastClaimedEpochUpdated";
|
|
93
77
|
readonly type: "event";
|
|
94
78
|
}, {
|
|
95
79
|
readonly anonymous: false;
|
|
96
80
|
readonly inputs: readonly [{
|
|
97
|
-
readonly indexed:
|
|
98
|
-
readonly internalType: "
|
|
99
|
-
readonly name: "
|
|
100
|
-
readonly type: "
|
|
81
|
+
readonly indexed: false;
|
|
82
|
+
readonly internalType: "bool";
|
|
83
|
+
readonly name: "enabled";
|
|
84
|
+
readonly type: "bool";
|
|
101
85
|
}];
|
|
102
|
-
readonly name: "
|
|
86
|
+
readonly name: "MaxClaimBoundUpdated";
|
|
103
87
|
readonly type: "event";
|
|
104
88
|
}, {
|
|
105
89
|
readonly anonymous: false;
|
|
106
90
|
readonly inputs: readonly [{
|
|
91
|
+
readonly indexed: true;
|
|
92
|
+
readonly internalType: "address";
|
|
93
|
+
readonly name: "gauge";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}, {
|
|
96
|
+
readonly indexed: true;
|
|
97
|
+
readonly internalType: "address";
|
|
98
|
+
readonly name: "recipient";
|
|
99
|
+
readonly type: "address";
|
|
100
|
+
}, {
|
|
107
101
|
readonly indexed: true;
|
|
108
102
|
readonly internalType: "address";
|
|
109
103
|
readonly name: "token";
|
|
110
104
|
readonly type: "address";
|
|
105
|
+
}, {
|
|
106
|
+
readonly indexed: false;
|
|
107
|
+
readonly internalType: "uint256";
|
|
108
|
+
readonly name: "amount";
|
|
109
|
+
readonly type: "uint256";
|
|
111
110
|
}];
|
|
112
|
-
readonly name: "
|
|
111
|
+
readonly name: "RemovedGaugeRewardsWithdrawn";
|
|
113
112
|
readonly type: "event";
|
|
114
113
|
}, {
|
|
115
114
|
readonly anonymous: false;
|
|
116
115
|
readonly inputs: readonly [{
|
|
117
116
|
readonly indexed: true;
|
|
118
117
|
readonly internalType: "address";
|
|
119
|
-
readonly name: "
|
|
118
|
+
readonly name: "token";
|
|
120
119
|
readonly type: "address";
|
|
121
120
|
}, {
|
|
122
121
|
readonly indexed: true;
|
|
123
122
|
readonly internalType: "address";
|
|
124
|
-
readonly name: "
|
|
123
|
+
readonly name: "depositor";
|
|
125
124
|
readonly type: "address";
|
|
126
125
|
}, {
|
|
127
126
|
readonly indexed: false;
|
|
128
127
|
readonly internalType: "uint256";
|
|
129
128
|
readonly name: "amount";
|
|
130
129
|
readonly type: "uint256";
|
|
130
|
+
}, {
|
|
131
|
+
readonly indexed: false;
|
|
132
|
+
readonly internalType: "uint256";
|
|
133
|
+
readonly name: "depositedEpoch";
|
|
134
|
+
readonly type: "uint256";
|
|
131
135
|
}];
|
|
132
|
-
readonly name: "
|
|
136
|
+
readonly name: "RewardDeposited";
|
|
133
137
|
readonly type: "event";
|
|
134
138
|
}, {
|
|
139
|
+
readonly anonymous: false;
|
|
135
140
|
readonly inputs: readonly [{
|
|
141
|
+
readonly indexed: true;
|
|
136
142
|
readonly internalType: "address";
|
|
137
143
|
readonly name: "gauge";
|
|
138
144
|
readonly type: "address";
|
|
139
145
|
}, {
|
|
146
|
+
readonly indexed: true;
|
|
140
147
|
readonly internalType: "address";
|
|
141
148
|
readonly name: "token";
|
|
142
149
|
readonly type: "address";
|
|
150
|
+
}, {
|
|
151
|
+
readonly indexed: false;
|
|
152
|
+
readonly internalType: "uint256";
|
|
153
|
+
readonly name: "amount";
|
|
154
|
+
readonly type: "uint256";
|
|
143
155
|
}];
|
|
144
|
-
readonly name: "
|
|
145
|
-
readonly
|
|
146
|
-
readonly stateMutability: "nonpayable";
|
|
147
|
-
readonly type: "function";
|
|
148
|
-
}, {
|
|
149
|
-
readonly inputs: readonly [{
|
|
150
|
-
readonly internalType: "address";
|
|
151
|
-
readonly name: "token";
|
|
152
|
-
readonly type: "address";
|
|
153
|
-
}];
|
|
154
|
-
readonly name: "addRewardToken";
|
|
155
|
-
readonly outputs: readonly [];
|
|
156
|
-
readonly stateMutability: "nonpayable";
|
|
157
|
-
readonly type: "function";
|
|
156
|
+
readonly name: "RewardTransferred";
|
|
157
|
+
readonly type: "event";
|
|
158
158
|
}, {
|
|
159
159
|
readonly inputs: readonly [{
|
|
160
160
|
readonly internalType: "address[]";
|
|
@@ -170,10 +170,6 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
170
170
|
readonly internalType: "address";
|
|
171
171
|
readonly name: "gauge";
|
|
172
172
|
readonly type: "address";
|
|
173
|
-
}, {
|
|
174
|
-
readonly internalType: "address";
|
|
175
|
-
readonly name: "token";
|
|
176
|
-
readonly type: "address";
|
|
177
173
|
}];
|
|
178
174
|
readonly name: "claimForGauge";
|
|
179
175
|
readonly outputs: readonly [{
|
|
@@ -197,47 +193,11 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
197
193
|
readonly outputs: readonly [];
|
|
198
194
|
readonly stateMutability: "nonpayable";
|
|
199
195
|
readonly type: "function";
|
|
200
|
-
}, {
|
|
201
|
-
readonly inputs: readonly [{
|
|
202
|
-
readonly internalType: "address";
|
|
203
|
-
readonly name: "token";
|
|
204
|
-
readonly type: "address";
|
|
205
|
-
}, {
|
|
206
|
-
readonly internalType: "uint256";
|
|
207
|
-
readonly name: "amount";
|
|
208
|
-
readonly type: "uint256";
|
|
209
|
-
}, {
|
|
210
|
-
readonly internalType: "address";
|
|
211
|
-
readonly name: "recipient";
|
|
212
|
-
readonly type: "address";
|
|
213
|
-
}];
|
|
214
|
-
readonly name: "emergencyWithdraw";
|
|
215
|
-
readonly outputs: readonly [];
|
|
216
|
-
readonly stateMutability: "nonpayable";
|
|
217
|
-
readonly type: "function";
|
|
218
|
-
}, {
|
|
219
|
-
readonly inputs: readonly [{
|
|
220
|
-
readonly internalType: "address";
|
|
221
|
-
readonly name: "token";
|
|
222
|
-
readonly type: "address";
|
|
223
|
-
}];
|
|
224
|
-
readonly name: "getAvailableBalance";
|
|
225
|
-
readonly outputs: readonly [{
|
|
226
|
-
readonly internalType: "uint256";
|
|
227
|
-
readonly name: "";
|
|
228
|
-
readonly type: "uint256";
|
|
229
|
-
}];
|
|
230
|
-
readonly stateMutability: "view";
|
|
231
|
-
readonly type: "function";
|
|
232
196
|
}, {
|
|
233
197
|
readonly inputs: readonly [{
|
|
234
198
|
readonly internalType: "address";
|
|
235
199
|
readonly name: "gauge";
|
|
236
200
|
readonly type: "address";
|
|
237
|
-
}, {
|
|
238
|
-
readonly internalType: "address";
|
|
239
|
-
readonly name: "token";
|
|
240
|
-
readonly type: "address";
|
|
241
201
|
}];
|
|
242
202
|
readonly name: "getClaimableForGauge";
|
|
243
203
|
readonly outputs: readonly [{
|
|
@@ -247,36 +207,8 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
247
207
|
}];
|
|
248
208
|
readonly stateMutability: "view";
|
|
249
209
|
readonly type: "function";
|
|
250
|
-
}, {
|
|
251
|
-
readonly inputs: readonly [{
|
|
252
|
-
readonly internalType: "address";
|
|
253
|
-
readonly name: "gauge";
|
|
254
|
-
readonly type: "address";
|
|
255
|
-
}];
|
|
256
|
-
readonly name: "getGaugeRewardTokens";
|
|
257
|
-
readonly outputs: readonly [{
|
|
258
|
-
readonly internalType: "address[]";
|
|
259
|
-
readonly name: "";
|
|
260
|
-
readonly type: "address[]";
|
|
261
|
-
}];
|
|
262
|
-
readonly stateMutability: "view";
|
|
263
|
-
readonly type: "function";
|
|
264
210
|
}, {
|
|
265
211
|
readonly inputs: readonly [];
|
|
266
|
-
readonly name: "getRewardTokenCount";
|
|
267
|
-
readonly outputs: readonly [{
|
|
268
|
-
readonly internalType: "uint256";
|
|
269
|
-
readonly name: "";
|
|
270
|
-
readonly type: "uint256";
|
|
271
|
-
}];
|
|
272
|
-
readonly stateMutability: "view";
|
|
273
|
-
readonly type: "function";
|
|
274
|
-
}, {
|
|
275
|
-
readonly inputs: readonly [{
|
|
276
|
-
readonly internalType: "address";
|
|
277
|
-
readonly name: "token";
|
|
278
|
-
readonly type: "address";
|
|
279
|
-
}];
|
|
280
212
|
readonly name: "getRewardTokenInfo";
|
|
281
213
|
readonly outputs: readonly [{
|
|
282
214
|
readonly internalType: "uint256";
|
|
@@ -299,45 +231,33 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
299
231
|
readonly type: "function";
|
|
300
232
|
}, {
|
|
301
233
|
readonly inputs: readonly [];
|
|
302
|
-
readonly name: "
|
|
234
|
+
readonly name: "rewardToken";
|
|
303
235
|
readonly outputs: readonly [{
|
|
304
|
-
readonly internalType: "address
|
|
236
|
+
readonly internalType: "address";
|
|
305
237
|
readonly name: "";
|
|
306
|
-
readonly type: "address
|
|
238
|
+
readonly type: "address";
|
|
307
239
|
}];
|
|
308
240
|
readonly stateMutability: "view";
|
|
309
241
|
readonly type: "function";
|
|
310
242
|
}, {
|
|
311
243
|
readonly inputs: readonly [{
|
|
312
244
|
readonly internalType: "address";
|
|
313
|
-
readonly name: "
|
|
314
|
-
readonly type: "address";
|
|
315
|
-
}, {
|
|
316
|
-
readonly internalType: "address";
|
|
317
|
-
readonly name: "token";
|
|
245
|
+
readonly name: "_controller";
|
|
318
246
|
readonly type: "address";
|
|
319
247
|
}];
|
|
320
|
-
readonly name: "
|
|
321
|
-
readonly outputs: readonly [
|
|
322
|
-
|
|
323
|
-
readonly name: "";
|
|
324
|
-
readonly type: "bool";
|
|
325
|
-
}];
|
|
326
|
-
readonly stateMutability: "view";
|
|
248
|
+
readonly name: "setController";
|
|
249
|
+
readonly outputs: readonly [];
|
|
250
|
+
readonly stateMutability: "nonpayable";
|
|
327
251
|
readonly type: "function";
|
|
328
252
|
}, {
|
|
329
253
|
readonly inputs: readonly [{
|
|
330
254
|
readonly internalType: "address";
|
|
331
|
-
readonly name: "
|
|
255
|
+
readonly name: "gauge";
|
|
332
256
|
readonly type: "address";
|
|
333
257
|
}];
|
|
334
|
-
readonly name: "
|
|
335
|
-
readonly outputs: readonly [
|
|
336
|
-
|
|
337
|
-
readonly name: "";
|
|
338
|
-
readonly type: "bool";
|
|
339
|
-
}];
|
|
340
|
-
readonly stateMutability: "view";
|
|
258
|
+
readonly name: "setLastClaimedEpoch";
|
|
259
|
+
readonly outputs: readonly [];
|
|
260
|
+
readonly stateMutability: "nonpayable";
|
|
341
261
|
readonly type: "function";
|
|
342
262
|
}, {
|
|
343
263
|
readonly inputs: readonly [{
|
|
@@ -346,21 +266,15 @@ export declare class IGaugeRewardsDistributor__factory {
|
|
|
346
266
|
readonly type: "address";
|
|
347
267
|
}, {
|
|
348
268
|
readonly internalType: "address";
|
|
349
|
-
readonly name: "
|
|
269
|
+
readonly name: "recipient";
|
|
350
270
|
readonly type: "address";
|
|
351
271
|
}];
|
|
352
|
-
readonly name: "
|
|
353
|
-
readonly outputs: readonly [
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
readonly inputs: readonly [{
|
|
358
|
-
readonly internalType: "address";
|
|
359
|
-
readonly name: "token";
|
|
360
|
-
readonly type: "address";
|
|
272
|
+
readonly name: "withdrawRemovedGaugeRewards";
|
|
273
|
+
readonly outputs: readonly [{
|
|
274
|
+
readonly internalType: "uint256";
|
|
275
|
+
readonly name: "totalWithdrawn";
|
|
276
|
+
readonly type: "uint256";
|
|
361
277
|
}];
|
|
362
|
-
readonly name: "removeRewardToken";
|
|
363
|
-
readonly outputs: readonly [];
|
|
364
278
|
readonly stateMutability: "nonpayable";
|
|
365
279
|
readonly type: "function";
|
|
366
280
|
}];
|
|
@@ -1883,6 +1883,26 @@ declare const ABIS: {
|
|
|
1883
1883
|
stateMutability: string;
|
|
1884
1884
|
type: string;
|
|
1885
1885
|
anonymous?: undefined;
|
|
1886
|
+
} | {
|
|
1887
|
+
inputs: {
|
|
1888
|
+
internalType: string;
|
|
1889
|
+
name: string;
|
|
1890
|
+
type: string;
|
|
1891
|
+
}[];
|
|
1892
|
+
name: string;
|
|
1893
|
+
outputs: {
|
|
1894
|
+
components: {
|
|
1895
|
+
internalType: string;
|
|
1896
|
+
name: string;
|
|
1897
|
+
type: string;
|
|
1898
|
+
}[];
|
|
1899
|
+
internalType: string;
|
|
1900
|
+
name: string;
|
|
1901
|
+
type: string;
|
|
1902
|
+
}[];
|
|
1903
|
+
stateMutability: string;
|
|
1904
|
+
type: string;
|
|
1905
|
+
anonymous?: undefined;
|
|
1886
1906
|
})[];
|
|
1887
1907
|
basegauge: ({
|
|
1888
1908
|
inputs: {
|
|
@@ -4323,6 +4343,26 @@ declare const getABI: (name: keyof typeof ABIS) => any[] | ({
|
|
|
4323
4343
|
stateMutability: string;
|
|
4324
4344
|
type: string;
|
|
4325
4345
|
anonymous?: undefined;
|
|
4346
|
+
} | {
|
|
4347
|
+
inputs: {
|
|
4348
|
+
internalType: string;
|
|
4349
|
+
name: string;
|
|
4350
|
+
type: string;
|
|
4351
|
+
}[];
|
|
4352
|
+
name: string;
|
|
4353
|
+
outputs: {
|
|
4354
|
+
components: {
|
|
4355
|
+
internalType: string;
|
|
4356
|
+
name: string;
|
|
4357
|
+
type: string;
|
|
4358
|
+
}[];
|
|
4359
|
+
internalType: string;
|
|
4360
|
+
name: string;
|
|
4361
|
+
type: string;
|
|
4362
|
+
}[];
|
|
4363
|
+
stateMutability: string;
|
|
4364
|
+
type: string;
|
|
4365
|
+
anonymous?: undefined;
|
|
4326
4366
|
})[] | ({
|
|
4327
4367
|
inputs: {
|
|
4328
4368
|
internalType: string;
|
|
@@ -107,31 +107,26 @@ export declare const getConfigs: () => {
|
|
|
107
107
|
contract: string;
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
gauges: {
|
|
111
|
+
raacgauges: {
|
|
112
112
|
id: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
id: string;
|
|
123
|
-
name: string;
|
|
124
|
-
contract: string;
|
|
125
|
-
};
|
|
126
|
-
raacgauge: {
|
|
127
|
-
id: string;
|
|
128
|
-
name: string;
|
|
129
|
-
contract: string;
|
|
113
|
+
label: string;
|
|
114
|
+
gaugeType: string;
|
|
115
|
+
controller: string;
|
|
116
|
+
distributor: string;
|
|
117
|
+
gauges: {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
contract: string;
|
|
121
|
+
}[];
|
|
130
122
|
};
|
|
131
|
-
|
|
123
|
+
rwagauges: {
|
|
132
124
|
id: string;
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
label: string;
|
|
126
|
+
gaugeType: string;
|
|
127
|
+
controller: string;
|
|
128
|
+
distributor: string;
|
|
129
|
+
gauges: any[];
|
|
135
130
|
};
|
|
136
131
|
};
|
|
137
132
|
proposals: any[];
|
|
@@ -361,31 +356,26 @@ declare const _default: {
|
|
|
361
356
|
contract: string;
|
|
362
357
|
};
|
|
363
358
|
};
|
|
364
|
-
|
|
365
|
-
|
|
359
|
+
gauges: {
|
|
360
|
+
raacgauges: {
|
|
366
361
|
id: string;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
id: string;
|
|
377
|
-
name: string;
|
|
378
|
-
contract: string;
|
|
379
|
-
};
|
|
380
|
-
raacgauge: {
|
|
381
|
-
id: string;
|
|
382
|
-
name: string;
|
|
383
|
-
contract: string;
|
|
362
|
+
label: string;
|
|
363
|
+
gaugeType: string;
|
|
364
|
+
controller: string;
|
|
365
|
+
distributor: string;
|
|
366
|
+
gauges: {
|
|
367
|
+
id: string;
|
|
368
|
+
name: string;
|
|
369
|
+
contract: string;
|
|
370
|
+
}[];
|
|
384
371
|
};
|
|
385
|
-
|
|
372
|
+
rwagauges: {
|
|
386
373
|
id: string;
|
|
387
|
-
|
|
388
|
-
|
|
374
|
+
label: string;
|
|
375
|
+
gaugeType: string;
|
|
376
|
+
controller: string;
|
|
377
|
+
distributor: string;
|
|
378
|
+
gauges: any[];
|
|
389
379
|
};
|
|
390
380
|
};
|
|
391
381
|
proposals: any[];
|
package/dist/utils/contracts.js
CHANGED
|
@@ -54,7 +54,7 @@ const getContractAddress = (chainId, contractName) => {
|
|
|
54
54
|
if (!config) {
|
|
55
55
|
throw new Error(`Unsupported chain ID: ${chainId}`);
|
|
56
56
|
}
|
|
57
|
-
const chainKeys = ["contracts", "governance", "assets", "pools", "nfts", "lockers", "zap"
|
|
57
|
+
const chainKeys = ["contracts", "governance", "assets", "pools", "nfts", "lockers", "zap"];
|
|
58
58
|
const keys = Object.keys(config).filter((key) => chainKeys.includes(key));
|
|
59
59
|
let address = null;
|
|
60
60
|
for (const key of keys) {
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getStartEpoch = void 0;
|
|
7
|
-
const ethers_1 = require("ethers");
|
|
8
|
-
const chains_1 = __importDefault(require("../../../configs/chains"));
|
|
9
|
-
const getContractAddress_1 = require("../../getContractAddress");
|
|
10
|
-
const artifacts_1 = require("../../../utils/artifacts");
|
|
11
|
-
/**
|
|
12
|
-
* Gets the distributor's start epoch timestamp.
|
|
13
|
-
*
|
|
14
|
-
* @param chainId - The chain/network to use.
|
|
15
|
-
* @param provider - Optional ethers.js Provider instance.
|
|
16
|
-
* @returns Start epoch (bigint).
|
|
17
|
-
*/
|
|
18
|
-
const getStartEpoch = async (chainId, provider) => {
|
|
19
|
-
if (!provider) {
|
|
20
|
-
const rpc = chains_1.default[chainId].rpcs[0];
|
|
21
|
-
provider = new ethers_1.ethers.JsonRpcProvider(rpc);
|
|
22
|
-
}
|
|
23
|
-
const address = (0, getContractAddress_1.getContractAddress)(chainId, "gaugerewardsdistributor");
|
|
24
|
-
const abi = (0, artifacts_1.getABI)("gaugerewardsdistributor");
|
|
25
|
-
const contract = new ethers_1.ethers.Contract(address, abi, provider);
|
|
26
|
-
return contract.startEpoch();
|
|
27
|
-
};
|
|
28
|
-
exports.getStartEpoch = getStartEpoch;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withdrawUnallocatedRewards = void 0;
|
|
4
|
-
const ethers_1 = require("ethers");
|
|
5
|
-
const getContractAddress_1 = require("../../getContractAddress");
|
|
6
|
-
const artifacts_1 = require("../../../utils/artifacts");
|
|
7
|
-
/**
|
|
8
|
-
* Withdraws unallocated rewards to a recipient.
|
|
9
|
-
* Requires DEFAULT_ADMIN_ROLE.
|
|
10
|
-
*
|
|
11
|
-
* @param chainId - The chain/network to use.
|
|
12
|
-
* @param recipient - Address to receive the withdrawn rewards.
|
|
13
|
-
* @param signer - An ethers.js Signer instance (required).
|
|
14
|
-
* @returns Transaction after it has been mined.
|
|
15
|
-
*/
|
|
16
|
-
const withdrawUnallocatedRewards = async (chainId, recipient, signer) => {
|
|
17
|
-
if (!signer)
|
|
18
|
-
throw new Error("Signer is required");
|
|
19
|
-
const address = (0, getContractAddress_1.getContractAddress)(chainId, "gaugerewardsdistributor");
|
|
20
|
-
const abi = (0, artifacts_1.getABI)("gaugerewardsdistributor");
|
|
21
|
-
const contract = new ethers_1.ethers.Contract(address, abi, signer);
|
|
22
|
-
const tx = await contract.withdrawUnallocatedRewards(recipient);
|
|
23
|
-
await tx.wait();
|
|
24
|
-
return tx;
|
|
25
|
-
};
|
|
26
|
-
exports.withdrawUnallocatedRewards = withdrawUnallocatedRewards;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.setDistributorApproval = void 0;
|
|
7
|
-
const ethers_1 = require("ethers");
|
|
8
|
-
const artifacts_1 = require("../../../utils/artifacts");
|
|
9
|
-
const getContractAddress_1 = __importDefault(require("../../getContractAddress"));
|
|
10
|
-
/**
|
|
11
|
-
* Sets the approval flag for a distributor on the gauge (requires GAUGE_ADMIN).
|
|
12
|
-
* @param chainId - The chain/network to use.
|
|
13
|
-
* @param gaugeAddressOrId - Address of the gauge contract or its config ID.
|
|
14
|
-
* @param distributor - Address of the distributor.
|
|
15
|
-
* @param isApproved - Whether the distributor should be approved.
|
|
16
|
-
* @param signer - An ethers.js Signer instance (required).
|
|
17
|
-
*/
|
|
18
|
-
const setDistributorApproval = async (chainId, gaugeAddressOrId, distributor, isApproved, signer) => {
|
|
19
|
-
if (!signer)
|
|
20
|
-
throw new Error("Signer is required");
|
|
21
|
-
let gaugeAddress;
|
|
22
|
-
if ((0, ethers_1.isAddress)(gaugeAddressOrId)) {
|
|
23
|
-
gaugeAddress = gaugeAddressOrId;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
gaugeAddress = (0, getContractAddress_1.default)(chainId, gaugeAddressOrId.toLowerCase());
|
|
28
|
-
}
|
|
29
|
-
const abi = (0, artifacts_1.getABI)("basegauge");
|
|
30
|
-
const contract = new ethers_1.ethers.Contract(gaugeAddress, abi, signer);
|
|
31
|
-
const tx = await contract.setDistributorApproval(distributor, isApproved);
|
|
32
|
-
await tx.wait();
|
|
33
|
-
return tx;
|
|
34
|
-
};
|
|
35
|
-
exports.setDistributorApproval = setDistributorApproval;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Provider } from "ethers";
|
|
2
|
-
import { ChainId } from "../../../configs/chains";
|
|
3
|
-
/**
|
|
4
|
-
* Gets the distributor's start epoch timestamp.
|
|
5
|
-
*
|
|
6
|
-
* @param chainId - The chain/network to use.
|
|
7
|
-
* @param provider - Optional ethers.js Provider instance.
|
|
8
|
-
* @returns Start epoch (bigint).
|
|
9
|
-
*/
|
|
10
|
-
export declare const getStartEpoch: (chainId: ChainId, provider?: Provider) => Promise<bigint>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Signer } from "ethers";
|
|
2
|
-
import { ChainId } from "../../../configs/chains";
|
|
3
|
-
/**
|
|
4
|
-
* Withdraws unallocated rewards to a recipient.
|
|
5
|
-
* Requires DEFAULT_ADMIN_ROLE.
|
|
6
|
-
*
|
|
7
|
-
* @param chainId - The chain/network to use.
|
|
8
|
-
* @param recipient - Address to receive the withdrawn rewards.
|
|
9
|
-
* @param signer - An ethers.js Signer instance (required).
|
|
10
|
-
* @returns Transaction after it has been mined.
|
|
11
|
-
*/
|
|
12
|
-
export declare const withdrawUnallocatedRewards: (chainId: ChainId, recipient: string, signer: Signer) => Promise<any>;
|