Skip to content

Commit

Permalink
Merge pull request #359 from curvefi/feat/add-FeesCrvUSD
Browse files Browse the repository at this point in the history
fix: fixed abi fee_distributor_crvusd
  • Loading branch information
amytsang authored Jun 27, 2024
2 parents c6d1dff + cefdec9 commit 1e0d8e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curvefi/api",
"version": "2.60.3",
"version": "2.60.4",
"description": "JavaScript library for curve.fi",
"main": "lib/index.js",
"author": "Macket",
Expand Down
1 change: 1 addition & 0 deletions src/boosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export const claimFeesCrvUSD = async (address = ""): Promise<string> => {

await curve.updateFeeData();
const gasLimit = mulBy1_3(DIGas(await contract.claim.estimateGas(address, curve.constantOptions)));

return (await contract.claim(address, { ...curve.options, gasLimit })).hash
}

Expand Down
4 changes: 2 additions & 2 deletions src/constants/abis/fee_distributor_crvusd.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@
"name": "_addr"
}
],
"stateMutability": "view",
"type": "function"
"stateMutability": "nonpayable",
"type": "function",
},
{
"name": "claim_many",
Expand Down
7 changes: 1 addition & 6 deletions src/curve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ class Curve implements ICurve {
this.constantOptions = { gasLimit: 9000000 }
}


this.multicallProvider = new MulticallProvider(this.chainId, this.provider);

if (this.signer) {
Expand All @@ -602,7 +601,6 @@ class Curve implements ICurve {
}

this.feeData = { gasPrice: options.gasPrice, maxFeePerGas: options.maxFeePerGas, maxPriorityFeePerGas: options.maxPriorityFeePerGas };

await this.updateFeeData();

for (const pool of Object.values({...this.constants.POOLS_DATA, ...this.constants.LLAMMAS_DATA})) {
Expand Down Expand Up @@ -666,16 +664,13 @@ class Curve implements ICurve {
if(this.chainId === 1) {
this.setContract(this.constants.ALIASES.minter, minterMainnetABI)
this.setContract(this.constants.ALIASES.gauge_factory_fraxtal, gaugeFactoryForFraxtalABI)
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
}

this.setContract(this.constants.ALIASES.voting_escrow, votingEscrowABI);

this.setContract(this.constants.ALIASES.fee_distributor, feeDistributorABI);

if(this.chainId === 1) {
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
}

this.setContract(this.constants.ALIASES.gauge_controller, gaugeControllerABI);

if (this.chainId == 137) {
Expand Down

0 comments on commit 1e0d8e1

Please sign in to comment.