-
Notifications
You must be signed in to change notification settings - Fork 5k
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: CAIP Multichain (New) #27782
Draft
jiexi
wants to merge
414
commits into
caip25-permission-migration
Choose a base branch
from
jl/caip-multichain-migrate-core
base: caip25-permission-migration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: CAIP Multichain (New) #27782
jiexi
wants to merge
414
commits into
caip25-permission-migration
from
jl/caip-multichain-migrate-core
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** * Add `isMultichainOrigin` flag to the CAIP-25 permission * Unsure if this should have been added as a separate caveat or not though * Consider CAIP-25 permission inapplicable in the multichain flow if `isMultichainOrigin` is false for the existing authorization * Allow all previously implicit permissions in the EIP-1193 flow when there is a no CAIP-25 permission, or the CAIP-25 permission has `isMultichainOrigin` as false * Enforce the CAIP-25 permission in the EIP-1193 flow when the CAIP-25 permission has `isMultichainOrigin` true * Set `isMultichainOrigin` true when CAIP-25 permission is granted as part of the multichain flow via `provider_authorize` * Set `isMultichainOrigin` false when a CAIP-25 permission is granted (not updated) as part of `eth_requestAccounts` or `wallet_requestPermissions` in the EIP-1193 flow [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26296?quickstart=1) ## **Related issues** See: MetaMask/MetaMask-planning#2922 See: MetaMask/MetaMask-planning#2862 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <[email protected]>
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Added multichain api notifications <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25869?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Jiexi Luan <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: MetaMask Bot <[email protected]>
# Conflicts: # lavamoat/browserify/beta/policy.json # lavamoat/browserify/flask/policy.json # lavamoat/browserify/main/policy.json # lavamoat/browserify/mmi/policy.json
…' into caip-multichain
This reverts commit d46d3bb.
This reverts commit bbbf8e5.
Builds ready [038e490]
Page Load Metrics (1753 ± 101 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [cd4011e]
Page Load Metrics (2011 ± 67 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [db816ce]
Page Load Metrics (1707 ± 61 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [bf32e15]
Page Load Metrics (1590 ± 74 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Work for integrating [CAIP294](https://github.com/ffmcgee725/caip294-diagram/blob/main/instructions.md) feat: programatically send extensionId in metamask_getProviderState For testing this, we make a call json rpc call to `metamask_getProviderState` and check if response data contains the `extensionId` <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29111?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Remove `BARAD_DUR` env var and move into Flask code fence [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29003?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
adonesky1
force-pushed
the
jl/caip-multichain-migrate-core
branch
from
December 13, 2024 15:32
96f372c
to
d522c25
Compare
Builds ready [d522c25]
Page Load Metrics (1535 ± 53 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
adonesky1
force-pushed
the
jl/caip-multichain-migrate-core
branch
from
December 13, 2024 20:58
d522c25
to
82aab64
Compare
Builds ready [886ec3c]
Page Load Metrics (1521 ± 115 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
… into jl/caip-multichain-migrate-core
… into jl/caip-multichain-migrate-core
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This branch is the feature branch for CAIP-25, CAIP-27, CAIP stream bifurcation. TODO better PR desc.
Related issues
Related: MetaMask/core#4813
Upstream: #27847
See: https://github.com/MetaMask/MetaMask-planning/issues/2360
See: MetaMask/test-dapp#324
Manual testing steps
Replace EXTENSION_ID with your local extension ID
Locked Wallet Behavior
wallet_getSession
returns full session with all accountswallet_revokeSession
works as usualwallet_createSession
prompts for unlockwallet_invokeMethod
on signature methods fails with method or accounts not authorizedwallet_invokeMethod
on non-signature methods work as usualwallet_sessionChanged
not being fired when locked and revokeSession is called (TODO need to fix this). Is being fired when unlocked and revokeSession is called.Wallet Onboarding Behavior (fresh install, not setup yet)
wallet_createSession
causes wallet setup screen to be shown insteadwallet_getSession
returns no session since there is nonewallet_invokeMethod
fails for everything since there is no active sessionScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist