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

Remove non-essential fields from ERC20 transfer structs #1789

Merged
merged 48 commits into from
Sep 6, 2023

Conversation

sug0
Copy link
Contributor

@sug0 sug0 commented Aug 7, 2023

Describe your changes

To implement #1704, a new field would have to be added to the Erc20Transfer struct in Bridge.sol, such that we could preserve the token type used to pay gas fees. Namada stores pending Bridge pool transfers as part of the protocol, so there is no reason for the Ethereum smart contracts to have any knowledge of Namada-specific metadata. This PR addresses this, by removing all non-essential fields. A mapping of confirmed Ethereum events to pending transfers kept in Namada's storage can still be obtained by hashing all Namada metadata, and storing it in Erc20Transfer structs.

The PR is configured to merge into the base (tiago/cap-wnam) to make reviewing easier. It should be changed back to main, once the base is upstreamed.

Indicate on which release or other PRs this topic is based on

Based on #1781

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

sug0 added a commit that referenced this pull request Aug 7, 2023
sug0 added a commit that referenced this pull request Aug 7, 2023
@sug0 sug0 force-pushed the tiago/update-ethbridge-rs branch from 97319a5 to 1ac1406 Compare August 7, 2023 15:09
@sug0 sug0 requested a review from batconjurer August 8, 2023 09:53
batconjurer
batconjurer previously approved these changes Aug 8, 2023
@sug0 sug0 mentioned this pull request Aug 8, 2023
2 tasks
sug0 added a commit that referenced this pull request Aug 8, 2023
@sug0 sug0 force-pushed the tiago/update-ethbridge-rs branch from 1ac1406 to 80854c5 Compare August 8, 2023 16:17
tzemanovic
tzemanovic previously approved these changes Aug 9, 2023
@sug0 sug0 marked this pull request as draft August 28, 2023 09:38
@sug0 sug0 force-pushed the tiago/update-ethbridge-rs branch from 80854c5 to 5678ee7 Compare August 28, 2023 14:44
@sug0 sug0 marked this pull request as ready for review August 28, 2023 14:45
@sug0 sug0 mentioned this pull request Aug 28, 2023
@sug0 sug0 changed the base branch from tiago/cap-wnam to main August 28, 2023 14:54
@sug0 sug0 dismissed stale reviews from tzemanovic and batconjurer August 28, 2023 14:54

The base branch was changed.

sug0 added a commit that referenced this pull request Aug 30, 2023
Fraccaman added a commit that referenced this pull request Sep 6, 2023
* origin/tiago/update-ethbridge-rs:
  Changelog for #1789
  Test pending transfers and events have the same ABI encoding
  Fix compilation errors to support new `ethbridge-rs`
  Update ethbridge-rs to v0.22.0
Fraccaman added a commit that referenced this pull request Sep 6, 2023
* origin/tiago/update-ethbridge-rs:
  Changelog for #1789
  Test pending transfers and events have the same ABI encoding
  Fix compilation errors to support new `ethbridge-rs`
  Update ethbridge-rs to v0.22.0
@Fraccaman Fraccaman merged commit c015932 into main Sep 6, 2023
4 checks passed
@Fraccaman Fraccaman deleted the tiago/update-ethbridge-rs branch September 6, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants