Skip to content

Commit

Permalink
test: adjust foundSlot on tests/tenderly-simulation-new.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KanievskyiDanylo committed Jan 29, 2025
1 parent c296c28 commit 5526a7a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/tenderly-simulation-new.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ describe('Tenderly', () => {
const expectedSlot = ethers.utils.defaultAbiCoder.encode(['uint'], [9]);
const foundSlot = await tenderly.findTokenBalanceOfSlot(1, USDC);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});

it('should find Mainnet USDT `balanceOf` storage slot', async () => {
const expectedSlot = ethers.utils.defaultAbiCoder.encode(['uint'], [2]);
const foundSlot = await tenderly.findTokenBalanceOfSlot(1, USDT);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});

it('should find Mainnet stETH `balanceOf` storage slot', async () => {
Expand All @@ -99,7 +99,7 @@ describe('Tenderly', () => {
'0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', // Lido's `stETH`
);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});

it('should find Mainnet aEthDai `balanceOf` storage slot', async () => {
Expand All @@ -109,7 +109,7 @@ describe('Tenderly', () => {
'0x018008bfb33d285247A21d44E50697654f754e63', // Aave's `aEthDai`
);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});
});

Expand All @@ -118,14 +118,14 @@ describe('Tenderly', () => {
const expectedSlot = ethers.utils.defaultAbiCoder.encode(['uint'], [10]);
const foundSlot = await tenderly.findTokenAllowanceSlot(1, USDC);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});

it('should find Mainnet USDT `allowance` storage slot', async () => {
const expectedSlot = ethers.utils.defaultAbiCoder.encode(['uint'], [5]);
const foundSlot = await tenderly.findTokenAllowanceSlot(1, USDT);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});

it('should find Mainnet stETH `allowance` storage slot', async () => {
Expand All @@ -135,7 +135,7 @@ describe('Tenderly', () => {
'0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', // Lido's `stETH`
);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});

it('should find Mainnet aEthDai `allowance` storage slot', async () => {
Expand All @@ -145,7 +145,7 @@ describe('Tenderly', () => {
'0x018008bfb33d285247A21d44E50697654f754e63', // Aave's `aEthDai`
);
// assert
expect(foundSlot).toEqual(expectedSlot);
expect(foundSlot.slot).toEqual(expectedSlot);
});
});
});

0 comments on commit 5526a7a

Please sign in to comment.