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

fix: [N-02] Incomplete Event Emissions #327

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions contracts/ZkSync_SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract ZkSync_SpokePool is SpokePool {
// Bridge used to withdraw ERC20's to L1
ZkBridgeLike public zkErc20Bridge;

event SetZkBridge(address indexed erc20Bridge);
event SetZkBridge(address indexed erc20Bridge, address indexed oldErc20Bridge);
Copy link
Contributor

Choose a reason for hiding this comment

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

Good call

event ZkSyncTokensBridged(address indexed l2Token, address target, uint256 numberOfTokensBridged);

/**
Expand Down Expand Up @@ -161,8 +161,9 @@ contract ZkSync_SpokePool is SpokePool {
}

function _setZkBridge(ZkBridgeLike _zkErc20Bridge) internal {
address oldErc20Bridge = address(zkErc20Bridge);
zkErc20Bridge = _zkErc20Bridge;
emit SetZkBridge(address(_zkErc20Bridge));
emit SetZkBridge(address(_zkErc20Bridge), oldErc20Bridge);
}

// L1 addresses are transformed during l1->l2 calls.
Expand Down