Skip to content

Commit

Permalink
chore: debug ci failure
Browse files Browse the repository at this point in the history
  • Loading branch information
viraj124 committed Dec 30, 2024
1 parent 2ebc8b7 commit 22dafb8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/solidity-contracts/integration-tests/bridge_erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,34 +146,42 @@ describe('Bridging ERC20 tokens', async function () {
const commitHeight = new BN(nextBlockHeight).div(blocksPerCommitInterval);

let cooldown = await env.eth.fuelChainState.COMMIT_COOLDOWN();


// fast forward post the commit cooldown period
await env.eth.provider.send('evm_increaseTime', [Number(cooldown) * 10]); // Advance 1 hour
await env.eth.provider.send('evm_mine', []); // Mine a new block

// override the commit hash in a existing block
await env.eth.fuelChainState
.connect(env.eth.signers[1])
.commit(
'0x0000000000000000000000000000000000000000000000000000000000000000',
commitHeight.toString()
);


// fast forward to the block finalization time
await env.eth.provider.send('evm_increaseTime', [
Number(TIME_TO_FINALIZE) * 2,
]);
await env.eth.provider.send('evm_mine', []); // Mine a new block

cooldown = await env.eth.fuelChainState.COMMIT_COOLDOWN();

// fast forward post the commit cooldown period
await env.eth.provider.send('evm_increaseTime', [Number(cooldown) * 10]); // Advance 1 hour
await env.eth.provider.send('evm_mine', []); // Mine a new block


// produce more blocks to fetch the block height
await forwardFuelChain(env.fuel.provider, blocksPerCommitInterval);

const block = await getBlockWithHeight(env, nextBlockHeight.toString());

// reset the commit hash in the local L2 network
await env.eth.fuelChainState
.connect(env.eth.signers[1])
.commit(block.id, commitHeight.toString());

// fast forward to the block finalization time
await env.eth.provider.send('evm_increaseTime', [
Number(TIME_TO_FINALIZE) * 2,
]);
Expand Down
12 changes: 12 additions & 0 deletions packages/solidity-contracts/integration-tests/transfer_eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,33 +102,41 @@ describe('Transferring ETH', async function () {

let cooldown = await env.eth.fuelChainState.COMMIT_COOLDOWN();

// fast forward post the commit cooldown period
await env.eth.provider.send('evm_increaseTime', [Number(cooldown) * 10]); // Advance 1 hour
await env.eth.provider.send('evm_mine', []); // Mine a new block

// override the commit hash in a existing block
await env.eth.fuelChainState
.connect(env.eth.signers[1])
.commit(
'0x0000000000000000000000000000000000000000000000000000000000000000',
commitHeight.toString()
);

// fast forward to the block finalization time
await env.eth.provider.send('evm_increaseTime', [
Number(TIME_TO_FINALIZE) * 2,
]);
await env.eth.provider.send('evm_mine', []); // Mine a new block

cooldown = await env.eth.fuelChainState.COMMIT_COOLDOWN();

// fast forward post the commit cooldown period
await env.eth.provider.send('evm_increaseTime', [Number(cooldown) * 10]); // Advance 1 hour
await env.eth.provider.send('evm_mine', []); // Mine a new block

// produce more blocks to fetch the block height
await forwardFuelChain(env.fuel.provider, blocksPerCommitInterval);

const block = await getBlockWithHeight(env, nextBlockHeight.toString());

// reset the commit hash in the local L2 network
await env.eth.fuelChainState
.connect(env.eth.signers[1])
.commit(block.id, commitHeight.toString());

// fast forward to the block finalization time
await env.eth.provider.send('evm_increaseTime', [
Number(TIME_TO_FINALIZE) * 2,
]);
Expand Down Expand Up @@ -446,9 +454,13 @@ describe('Transferring ETH', async function () {
const currentPeriodEndBeforeRelay =
await env.eth.fuelMessagePortal.currentPeriodEnd();

console.log("reset limit")

await env.eth.fuelMessagePortal
.connect(deployer)
.resetRateLimitAmount(parseEther(largeRateLimit));

console.log("generateWithdrawalMessageProof")

withdrawMessageProof = await generateWithdrawalMessageProof(
fuelETHSender,
Expand Down

0 comments on commit 22dafb8

Please sign in to comment.