Skip to content

feat: [ERC20 - Native Token] Fix WETH deploy. #2

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

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ethereum/contracts/zksync/facets/Mailbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ contract MailboxFacet is Base, IMailbox {
// sender = AddressAliasHelper.applyL1ToL2Alias(msg.sender);
// }


// Enforcing that `_l2GasPerPubdataByteLimit` equals to a certain constant number. This is needed
// to ensure that users do not get used to using "exotic" numbers for _l2GasPerPubdataByteLimit, e.g. 1-2, etc.
// VERY IMPORTANT: nobody should rely on this constant to be fixed and every contract should give their users the ability to provide the
Expand Down Expand Up @@ -322,7 +321,7 @@ contract MailboxFacet is Base, IMailbox {
uint256 baseCost = params.l2GasPrice * _l2GasLimit;
require(_amount >= baseCost + _l2Value, "mv"); // The `msg.value` doesn't cover the transaction cost
}

// If the `_refundRecipient` is not provided, we use the `_sender` as the recipient.
address refundRecipient = _refundRecipient == address(0) ? _sender : _refundRecipient;
// If the `_refundRecipient` is a smart contract, we apply the L1 to L2 alias to prevent foot guns.
Expand Down
2 changes: 1 addition & 1 deletion ethereum/scripts/initialize-l2-weth-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async function main() {
const tx = await zkSync.requestL2Transaction(
l2WethTokenProxyAddress,
0,
0,
requiredValueToInitializeBridge,
calldata,
DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT,
REQUIRED_L2_GAS_PRICE_PER_PUBDATA,
Expand Down