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 Bridge contract artifact for Sepolia #811

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

lukasz-zimnoch
Copy link
Member

While fetching contract events, the start block for the searched range is taken based on the contract creation block. This is the receipt.blockNumber field living in the contract artifact. However, this field may be overwritten by the Hardhat Upgrades plugin and point to the deployment block of the recent contract implementation, not the transparent proxy.

This was the case for the Sepolia Bridge artifact. Contract events like NewWalletRegistered were taken starting from the recent implementation deployment block which occurred much later than the Bridge proxy deployment. In effect, it was not possible to fetch all Bridge wallets ever created.

Here we fix that problem.

While fetching contract events, the start block for the searched range
is taken based on the contract creation block. This is the
`receipt.blockNumber` field living in the contract artifact.
However, this field may be overwritten by the Hardhat Upgrades plugin and
point to the deployment block of the recent contract implementation, not the
transparent proxy.

This was the case for the Sepolia `Bridge` artifact. Contract
events like `NewWalletRegistered` were taken starting from the
recent implementation deployment block which occurred much later
than the `Bridge` proxy deployment. In effect, it was not possible
to fetch all `Bridge` wallets ever created.

Here we fix that problem.
@lukasz-zimnoch lukasz-zimnoch added 🐛 bug Something isn't working 🔌 typescript TypeScript library labels Apr 18, 2024
@lukasz-zimnoch lukasz-zimnoch self-assigned this Apr 18, 2024
@michalinacienciala michalinacienciala merged commit 503f8ae into main Apr 18, 2024
38 checks passed
@michalinacienciala michalinacienciala deleted the fix-sepolia-bridge-artifact branch April 18, 2024 11:21
@lukasz-zimnoch lukasz-zimnoch added this to the typescript/v2.4.1 milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🔌 typescript TypeScript library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants