-
Notifications
You must be signed in to change notification settings - Fork 252
docs: EVM Wallet integration with Ymax Contract #12294
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
Conversation
Added documentation for EVM Wallet integration with Ymax Contract, including sequence diagrams and detailed explanations of the process for opening portfolios and handling deposits.
Added detailed orchestration sequence for creating and depositing in the EVM wallet.
Clarify the signature check process in the EVM wallet documentation.
| note right of YO: call via Axelar GMP<br/>from contractAccount | ||
| YO-->>FF: execute() | ||
| FF-->>FF: Factory = new Factory{<br/>owner=agoric1ymaxlca} | ||
| FF-->>R: FactoryCreated{address=0xFAC1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a round-trip to establish 0xFAC1? or can we use CREATE2 to predict it?
p.s. looks like we're predicting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either. I didn't want to prescribe one here, but I believe the current prototype uses CREATE2.
closes: https://github.com/Agoric/agoric-private/issues/665 ## Description Adds a stub EVM Handler and the invitation mechanism akin to planner and resolver. Adds a planner invitation test, later replicated with the EVM handler ### Security Considerations This does not implement any revocation for the EVM handler. In the future we can switch the current implementation with a noop, and replace with a revocable power. ### Scaling Considerations None ### Documentation Considerations See #12294 ### Testing Considerations Added test of inviation ### Upgrade Considerations Will be deployed in the next ymax release. Operator will need to send invitation.
refs: https://github.com/Agoric/agoric-private/issues/666 refs: agoric-labs/ymax0-ui0#25 ## Description Adds shared helpers for handling Permit2 and Ymax EIP-712 messages, both on chain, in services and in the UI. This is all implemented as `.ts` in published packages so for external consumers, this will need to be consumed through jsr.io, until we can properly generate and .js files from .ts files (and rewrite import specifiers) before publishing. Also updates the codegen of vendored viem for on-chain usage. ### Security Considerations Need to review the EIP-712 signed data handling, since it will be used on chain for user submitted messages. Will be done as part of #12318 ### Scaling Considerations We previously checked that doing signature verification in JS on chain was not too expensive. ### Documentation Considerations See #12294 ### Testing Considerations This was manually tested in agoric-labs/ymax0-ui0#25 TODO: Unit tests, in a follow-up PR This will be integration tested when integrated in #12318. ### Upgrade Considerations None, new helpers
a58d7eb to
96fbfaa
Compare
…evm-wallet-design
Will land in separate PR
mhofman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's land this
closes: https://github.com/Agoric/agoric-private/issues/666 closes: #12320 Refs: agoric-labs/agoric-to-axelar-local#52 ## Description - Updates GMP flows to support `createAndDeposit` message to the new `despositFactory` (see agoric-labs/agoric-to-axelar-local#52) - Implememt `openPortfolioFromEVM`, with a Permit2-backed create+deposit, plus supporting orchestration utilities and tests. - Add handling logic for EVM wallet messages, invoking related EVM facet and flows in the portfolio contract Key areas to review: `packages/portfolio-contract/src/portfolio.flows.ts`, `packages/portfolio-contract/src/pos-gmp.flows.ts`, and the flow/contract tests. ### Security Considerations The flow relies on Permit2 signatures and Axelar GMP payloads; it introduces a new entrypoint that consumes signed permit data and triggers EVM account creation and deposits. Review signature validation boundaries and payload decoding in the flow path. ### Scaling Considerations Unremarkable. ### Documentation Considerations See #12294 No end-user docs expected for this contributor-facing change; the contract test and flow tests serve as executable documentation for the API and design. ### Testing Considerations The several **test.todo**s represent a proposal to postpone those tests indefinitely on the basis that these are not cost-effective at this point. Reviewers will please advise. Primitive bootstrap test of the EVM Wallet message handler. ### Upgrade Considerations - The new factory and deposit factory EVM contract used by the change emit a different `SmartWalletCreated` event. The resolver change included in this PR needs to be deployed in conjunction with the deployment of the corresponding portfolio contract on chain.
Added documentation for EVM Wallet integration with Ymax Contract, including sequence diagrams and detailed explanations of the process for opening portfolios and handling deposits.
rendered:
closes: #XXXX
refs:
Description
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations