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(lazer/contracts/evm): Add fees for verification #2163

Merged
merged 13 commits into from
Dec 9, 2024

Conversation

darunrs
Copy link
Contributor

@darunrs darunrs commented Dec 3, 2024

No description provided.

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 9:14pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 9:14pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 9:14pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Dec 6, 2024 9:14pm
insights ⬜️ Ignored (Inspect) Visit Preview Dec 6, 2024 9:14pm

ali-bahjati
ali-bahjati previously approved these changes Dec 3, 2024
@ali-bahjati ali-bahjati dismissed their stale review December 3, 2024 18:23

i noticed something after review

@darunrs
Copy link
Contributor Author

darunrs commented Dec 6, 2024

I was able to successfully upgrade the contract using a local anvil. Will attempt to upgrade the actual contract tomorrow.

@darunrs
Copy link
Contributor Author

darunrs commented Dec 6, 2024

Performed the following test which succeeded:

  1. Reverted to main and deployed contract (took about 2M gas)
  2. Added trusted signer (Same one in the unit test)
  3. Switched to this branch
  4. Updated migrate call to also call the below code after its original upgrade code
vm.startBroadcast();
        PythLazer lazer = PythLazer(payable(proxyAddress));
        bytes
            memory update = hex"2a22999a577d3cc0202197939d736bc0dcf71b9dde7b9470e4d16fa8e2120c0787a1c0d744d0c39cc372af4d1ecf2d09e84160ca905f3f597d20e2eec144a446a0459ad600001c93c7d3750006240af373971c01010000000201000000000005f5e100";
        lazer.verifyUpdate{value: 1}(update);
        vm.stopBroadcast();
  1. Verified that the verifyUpdate function succeeds
  2. Called verifyUpdate with no fee attached and received expected revert Error

So, it seems we are able to carry over the previous signature and correctly validate with it still, as well as expect the fee.

Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

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

Approving to unblock you from merging it after changing storage layout.

@darunrs
Copy link
Contributor Author

darunrs commented Dec 9, 2024

Contract was upgraded successfully. Merging.
Proxy Address: https://sepolia.etherscan.io/address/0xACeA761c27A909d4D3895128EBe6370FDE2dF481

@darunrs darunrs merged commit ba3b04f into main Dec 9, 2024
12 checks passed
@darunrs darunrs deleted the add-fees-to-lazer-evm-contract branch December 9, 2024 19:39
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.

3 participants