-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(kl-factory): update integration tests #1492
Conversation
@@ -54,6 +87,7 @@ describe('Tests for L1 behavior', () => { | |||
alice.requestExecute({ | |||
contractAddress: counterContract.address, | |||
calldata, | |||
mintValue: isETHBasedChain ? ethers.BigNumber.from(0) : expectedL2Costs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MintValue should not be zero for not Eth based chains. Just msg.Value can be zero. The difference is mintValue is the amount of baseTokens that is deposited to the L2, while msg.value is on L1 and in ether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it is not zero for not Eth based chains. It is zero in case of Eth chains, as in Eth based chain test no mintValue was passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what @kelemeno means is that mintValue
semantics should be simply "deposit value". Whether it is passed as msg.value or a method argument should be decided by the SDK based on the base token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the eth based chains could be 0 then I don't see why it could not also be 0 for custom base chains?
What I meant that "mintValue
" is the some of l2GasFees
and the l2Value
, and is equal to the total deposited value on L1. And yes, normally when depositing tokens the SDK decides.
Also what I also meant was that even if you don't set mintValue, it will not normally be 0 when the contract is called, as then the tx will fail. So maybe you can set it to 0 here ( depending on the SDK) but potentially that is not ideal. Maybe null/undefined is better.
Also linting is not running, you can run it with |
964ac80
to
7b85dc7
Compare
|
||
await sleep(8); | ||
// console.log('balances after deposit: '); | ||
// console.log('alice.getBalance(): ', await alice.getBalance()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to delete these comments, if however you want to print them then use the debugging reporter I think ( but not console logs)
2aa1f43
to
0efd1b7
Compare
115755e
to
bac9345
Compare
What ❔
This PR fixes part of the integration tests.
Why ❔
After addition of bridgehub some of the tests were failing.
Updated the zksync-ethers dependency to latest version, updated paymaster tests, verified that fees, l1, mempool, self-unit and system tests are green, removed l2-weth test.
Checklist
zk fmt
andzk lint
.zk spellcheck
.zk linkcheck
.