Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaShWoof committed Nov 21, 2024
1 parent 007f201 commit 48d7010
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scenario/RewardsV2Scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ethers, exp, Numeric } from '../test/helpers';
import { isRewardSupported, matchesDeployment } from './utils';
import { Contract, ContractReceipt, Signer } from 'ethers';
import { ERC20__factory } from '../build/types';
import {World} from '../plugins/scenario';
import { World } from '../plugins/scenario';
import { getLatestStartAndFinishMerkleTreeForCampaign } from '../scripts/rewards_v2/utils';
import { getConfigForScenario } from './utils/scenarioHelper';
import {
Expand Down
10 changes: 5 additions & 5 deletions scripts/rewards_v2/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ export const generateMerkleTreeForCampaign = async (
.sort((a, b) => a[0].localeCompare(b[0])) // Sort by address (key) in ascending order
.map(([address, accrued], index) => [address, index.toString(), accrued]);

const merklTree = generateMerkleTree(sortedDataWithIndexes);
const merkleTree = generateMerkleTree(sortedDataWithIndexes);

const file = createCampaignFile(
sortedDataWithIndexes,
merklTree,
merkleTree,
{ network, market: deployment, blockNumber, generatedTimestamp, type }
);

Expand All @@ -235,7 +235,7 @@ export const generateMerkleTreeForCampaign = async (
await writeFile(filePath, JSON.stringify(file, null, 2), 'utf-8');

console.log('Merkle tree successfully generated');
return merklTree;
return merkleTree;
};

export const getContractDeploymentData = async (network: string, address: string): Promise<{ blockNumber: number, hash: string }> => {
Expand Down Expand Up @@ -292,7 +292,7 @@ export const generateMerkleTree = (data: string[][]) => {
]);
};

export const getMerklTreeProof = (address: string, tree: StandardMerkleTree<string[]>) => {
export const getMerkleTreeProof = (address: string, tree: StandardMerkleTree<string[]>) => {
for (const [i, v] of tree.entries()) {
if (v[0] === address) {
const proof = tree.getProof(i);
Expand Down Expand Up @@ -397,7 +397,7 @@ export const createCampaignFile = (data: string[][], tree: StandardMerkleTree<st

data.forEach(d => payload[d[0]] = {
index: +d[1],
proof: getMerklTreeProof(d[0], tree),
proof: getMerkleTreeProof(d[0], tree),
accrue: d[2]
});

Expand Down

0 comments on commit 48d7010

Please sign in to comment.