Skip to content

Commit

Permalink
Removed console logging
Browse files Browse the repository at this point in the history
  • Loading branch information
yahgwai committed Nov 13, 2023
1 parent 5a9f256 commit b98da5c
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions test-ts/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,24 +684,20 @@ const execL1Component = async (
crossChain: boolean,
propForm?: Awaited<ReturnType<Proposal["formItUp"]>>
) => {
console.log("c1")
const propFormNonEmpty = propForm!;
const l2ToL1Messages = await l2Tx.getL2ToL1Messages(l1Signer);
const withdrawMessage = await l2ToL1Messages[0];

console.log("c2")
const state = { mining: true };
await Promise.race([
mineUntilStop(l1Deployer, state),
mineUntilStop(l2Deployer, state),
withdrawMessage.waitUntilReadyToExecute(l2Signer.provider!),
]);
state.mining = false;
console.log("c3")

await (await withdrawMessage.execute(l2Deployer.provider!)).wait();

console.log("c4")

await wait(5000);

Expand All @@ -713,8 +709,6 @@ const execL1Component = async (
await wait(1000);
}

console.log("c5")

// execute the proposal
let value = BigNumber.from(0);
if (crossChain) {
Expand All @@ -727,23 +721,15 @@ const execL1Component = async (
value = submissionFee.mul(2);
}

console.log("c6")

const tx = await l1Signer.sendTransaction({
to: propFormNonEmpty.l1Gov.execute.to,
data: propFormNonEmpty.l1Gov.execute.data,
value: value,
});

console.log("c7")

const rec = await tx.wait();
console.log("c8")

expect(await proposalSuccess(), "L1 proposal success").to.be.true;

console.log("c9")

return rec;
};

Expand All @@ -756,15 +742,13 @@ const proposeAndExecuteL2 = async (
proposalSuccess: () => Promise<Boolean>,
propFormed?: Awaited<ReturnType<Proposal["formItUp"]>>
) => {
console.log("a1")
const propFormedNonEmpty = propFormed!;
await (
await l2Signer.sendTransaction({
to: propFormedNonEmpty.l2Gov.propose.to,
data: propFormedNonEmpty.l2Gov.propose.data,
})
).wait();
console.log("a2")

const proposalId = propFormedNonEmpty.l2Gov.proposalId;
const proposalVotes = await l2GovernorContract.proposalVotes(proposalId);
Expand All @@ -774,7 +758,6 @@ const proposeAndExecuteL2 = async (
l1Signer: l1Deployer,
l2Signer: l2Deployer,
});
console.log("a3")
// vote on the proposal
expect(
await (await l2GovernorContract.proposalVotes(proposalId)).forVotes.toString(),
Expand All @@ -789,7 +772,6 @@ const proposeAndExecuteL2 = async (
l1Signer: l1Deployer,
l2Signer: l2Deployer,
});
console.log("a4")

// queue the proposal
await (
Expand All @@ -798,31 +780,25 @@ const proposeAndExecuteL2 = async (
data: propFormedNonEmpty.l2Gov.queue.data,
})
).wait();
console.log("a5")

await mineBlocksAndWaitForProposalState(l2GovernorContract, proposalId, 5, {
l1Signer: l1Deployer,
l2Signer: l2Deployer,
});

console.log("a6")

const opIdBatch = propFormedNonEmpty.l2Gov.operationId;
while (!(await l2TimelockContract.isOperationReady(opIdBatch))) {
await mineBlock(l1Deployer);
await mineBlock(l2Deployer);
await wait(1000);
}

console.log("a7")

const executionTx = await (
await l2Signer.sendTransaction({
to: propFormedNonEmpty.l2Gov.execute.to,
data: propFormedNonEmpty.l2Gov.execute.data,
})
).wait();
console.log("a8")
expect(await proposalSuccess(), "Proposal not executed successfully").to.be.true;
return executionTx;
};
Expand Down Expand Up @@ -879,7 +855,6 @@ export const l2L1ProposalTest = async (
const proposalSuccess = async () => {
return true;
};
console.log("a")

const executionTx = await proposeAndExecuteL2(
l2TimelockContract,
Expand All @@ -890,7 +865,6 @@ export const l2L1ProposalTest = async (
proposalSuccess,
formData
);
console.log("b")

const l2Transaction = new L2TransactionReceipt(executionTx);

Expand All @@ -904,7 +878,6 @@ export const l2L1ProposalTest = async (

return true;
};
console.log("c")

await execL1Component(
l1Deployer,
Expand All @@ -917,8 +890,6 @@ export const l2L1ProposalTest = async (
false,
formData
);

console.log("d")
};

export const l2l1l2Proposal = async (
Expand Down

0 comments on commit b98da5c

Please sign in to comment.