Skip to content

Commit

Permalink
Overlooked migration from ethers v4->v5
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Nov 9, 2022
1 parent 6654932 commit e91762e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/reputation-miner/ReputationMiner.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,8 @@ class ReputationMiner {
}
let gasEstimate = ethers.BigNumber.from(1000000);
try {
gasEstimate = await repCycle.estimate.submitRootHash(hash, nLeaves, jrh, entryIndex);
gasEstimate = await repCycle.estimateGas.submitRootHash(hash, nLeaves, jrh, entryIndex);
gasEstimate = gasEstimate.mul(11).div(10);
} catch (err) { // eslint-disable-line no-empty

}
Expand Down Expand Up @@ -1003,9 +1004,9 @@ class ReputationMiner {

let gasEstimate = ethers.BigNumber.from(6000000);
try {
gasEstimate = await repCycle.estimate.confirmJustificationRootHash(round, index, siblings1, siblings2);
gasEstimate = await repCycle.estimateGas.confirmJustificationRootHash(round, index, siblings1, siblings2);
gasEstimate = gasEstimate.mul(11).div(10)
} catch (err) { // eslint-disable-line no-empty

}

return repCycle.confirmJustificationRootHash(
Expand Down Expand Up @@ -1085,12 +1086,13 @@ class ReputationMiner {

let gasEstimate = ethers.BigNumber.from(1000000);
try {
gasEstimate = await repCycle.estimate.respondToBinarySearchForChallenge(
gasEstimate = await repCycle.estimateGas.respondToBinarySearchForChallenge(
round,
index,
intermediateReputationHash,
siblings
);
gasEstimate = gasEstimate.mul(11).div(10);
} catch (err) { // eslint-disable-line no-empty

}
Expand Down Expand Up @@ -1124,7 +1126,8 @@ class ReputationMiner {
let gasEstimate = ethers.BigNumber.from(1000000);

try {
gasEstimate = await repCycle.estimate.confirmBinarySearchResult(round, index, intermediateReputationHash, siblings);
gasEstimate = await repCycle.estimateGas.confirmBinarySearchResult(round, index, intermediateReputationHash, siblings);
gasEstimate = gasEstimate.mul(11).div(10);
} catch (err){ // eslint-disable-line no-empty

}
Expand Down Expand Up @@ -1227,7 +1230,8 @@ class ReputationMiner {

let gasEstimate = ethers.BigNumber.from(4000000);
try {
gasEstimate = await repCycle.estimate.respondToChallenge(...functionArgs);
gasEstimate = await repCycle.estimateGas.respondToChallenge(...functionArgs);
gasEstimate = gasEstimate.mul(11).div(10);
} catch (err){ // eslint-disable-line no-empty

}
Expand All @@ -1248,6 +1252,7 @@ class ReputationMiner {
let gasEstimate = ethers.BigNumber.from(4000000);
try {
gasEstimate = await repCycle.estimateGas.confirmNewHash(round);
gasEstimate = gasEstimate.mul(11).div(10);
} catch (err){ // eslint-disable-line no-empty

}
Expand Down

0 comments on commit e91762e

Please sign in to comment.