Skip to content
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(Dataworker): ZkSync should count ETH and WETH towards balance needed to execute leaves #872

Merged
merged 6 commits into from
Aug 11, 2023

Conversation

nicholaspai
Copy link
Member

No description provided.

…eded to execute leaves

Current code assumes only OVM chains need to count both ETH and WETH towards balance that can be used to execute spoke leaves
Copy link
Contributor

@james-a-morris james-a-morris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments

src/clients/BalanceAllocator.ts Outdated Show resolved Hide resolved
// then it should return both ETH and WETH. For other chains, it should only return the l2TokenAddress.
function getWethAndEth(chainId): string[] {
const wethAndEth = [CONTRACT_ADDRESSES[chainId].weth.address, CONTRACT_ADDRESSES[chainId].eth.address];
if (wethAndEth.some((chainId) => !isDefined(chainId))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is chainId supposed to be a chain id or a token address?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes it should be a token address, will rename

nicholaspai and others added 4 commits August 10, 2023 21:40
@nicholaspai nicholaspai merged commit 3de58d6 into master Aug 11, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants