Skip to content

refactor: split Passage enter/exit from Orders #41

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

Merged
merged 8 commits into from
Jun 10, 2024
Merged

Conversation

anna-carroll
Copy link
Contributor

@anna-carroll anna-carroll commented Jun 6, 2024

current PR TODO

  • fix however this probably breaks CI (e.g. 2 contracts now instead of 1)

@anna-carroll anna-carroll self-assigned this Jun 6, 2024
@anna-carroll
Copy link
Contributor Author

i do think this is conceptually cleaner.

  • Passage — enter/exit — manages mint/burn Ether and tokens

    • custodies TVL of the rollup on host chain.
      • only withdrawalAdmin multisig can take funds out on the host.
    • holds ERC20 mint/burn permissions on rollup.
      • accessible via transact flow via hostPassage address.
    • Node must watch this contract to mint/burn native Ether.
    • (soon) Node must watch this contract for transact flow.
  • Market — swap/fill/sweep — manages intent-based Orders

    • doesn’t custody any funds or permissions.
    • Node must watch this contract to check for intent fulfillment.

Copy link
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

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

directionally I approve. seems there are some TODOs

@anna-carroll
Copy link
Contributor Author

anna-carroll commented Jun 10, 2024

note: ERC20 enters/exits are not specced yet, so i'm removing those functions from this PR for now: 9c6438a

if we decide not to implement them, it would make more sense to remove the token field from the Enter event (as it would always be address(0) - native ether).

let's decide on ERC20 plan then ossify that event interface.

Copy link
Member

@prestwich prestwich left a comment

Choose a reason for hiding this comment

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

i would delete the exit code, as we haven't specified this behavior, and we don't know if the code is appropriate for it

@anna-carroll anna-carroll merged commit 5d70919 into main Jun 10, 2024
1 check passed
@anna-carroll anna-carroll deleted the anna/split branch June 10, 2024 20:49
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