Skip to content

Commit

Permalink
respond to AI comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Nov 28, 2024
1 parent 2395890 commit d6d7fe2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions script/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -983,18 +983,14 @@ async function updateGenesisFile() {
(element) => element.token === tokenAddress && element.impacted_validators.includes(operator)
);
let totalSlashing = new Decimal(0);
let selfSlashing = new Decimal(0);
for(let k = 0; k < matchingEntries.length; k++) {
let matchingEntry = matchingEntries[k];
let delegation = await myContract.methods.delegations(
matchingEntry.staker, validatorExoAddress, tokenAddress
matchingEntry.staker, operator, tokenAddress
).call();
if (delegation > 0) {
let slashing = new Decimal(delegation).mul(matchingEntry.proportion);
totalSlashing = totalSlashing.plus(slashing);
if (matchingEntry.staker == validatorEthAddress) {
selfSlashing = slashing;
}
}
}
const amount = new Decimal((await myContract.methods.delegations(
Expand Down

0 comments on commit d6d7fe2

Please sign in to comment.