-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add fully fledge eip7702 template #6022
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
✅ Deploy Preview for remixproject ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ee3fa6b
to
d069f57
Compare
@@ -6,7 +6,8 @@ export const templates = (intl, plugin) => { | |||
{ value: "remixDefault", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.basic' }), description: 'The default project' }, | |||
{ value: "blank", displayName: intl.formatMessage({ id: 'filePanel.blank' }), IsArtefact: true, description: 'A blank project' }, | |||
{ value: "simpleEip7702", displayName: 'Simple EIP 7702', IsArtefact: true, description: 'Pectra upgrade allowing externally owned accounts (EOAs) to run contract code.' }, | |||
{ value: "accountAbstraction", displayName: 'Account Abstraction', IsArtefact: true, description: 'Experiment with Account Abstraction contracts: (ERC-4337, EIP-7702)' } | |||
{ value: "accountAbstraction", displayName: 'Account Abstraction', IsArtefact: true, description: 'Github repo for ERC-4337 and EIP-7702.' }, | |||
{ value: "fullyFledgeEIP7702", displayName: 'Fully Fledge EIP7702 example', IsArtefact: true, description: 'A fully fledge template using EIP7702.' } |
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.
Line 9 and 10 should switch places - so that both 7702 templates are next to each other.
displayName should be 'Intro to EIP-7702' not 'Fully Fledge'
and
description: 'Examples contracts and scripts for EIP-7702
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.
probably you should update the value as well from value: "fullyFledgeEIP7702" to value: "introToEIP7702"
@@ -6,7 +6,8 @@ export const templates = (intl, plugin) => { | |||
{ value: "remixDefault", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.basic' }), description: 'The default project' }, | |||
{ value: "blank", displayName: intl.formatMessage({ id: 'filePanel.blank' }), IsArtefact: true, description: 'A blank project' }, | |||
{ value: "simpleEip7702", displayName: 'Simple EIP 7702', IsArtefact: true, description: 'Pectra upgrade allowing externally owned accounts (EOAs) to run contract code.' }, |
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.
displayName: 'Simple EIP-7702'
description: 'A contract for demoing EIP-7702'
@@ -6,7 +6,8 @@ export const templates = (intl, plugin) => { | |||
{ value: "remixDefault", tagList: ["Solidity"], displayName: intl.formatMessage({ id: 'filePanel.basic' }), description: 'The default project' }, | |||
{ value: "blank", displayName: intl.formatMessage({ id: 'filePanel.blank' }), IsArtefact: true, description: 'A blank project' }, | |||
{ value: "simpleEip7702", displayName: 'Simple EIP 7702', IsArtefact: true, description: 'Pectra upgrade allowing externally owned accounts (EOAs) to run contract code.' }, | |||
{ value: "accountAbstraction", displayName: 'Account Abstraction', IsArtefact: true, description: 'Experiment with Account Abstraction contracts: (ERC-4337, EIP-7702)' } | |||
{ value: "accountAbstraction", displayName: 'Account Abstraction', IsArtefact: true, description: 'Github repo for ERC-4337 and EIP-7702.' }, |
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.
Remove period "." and update title text
description: 'A repo about ERC-4337 and EIP-7702'
@@ -18,7 +18,8 @@ export const TEMPLATE_NAMES = { | |||
'breakthroughLabsUniswapv4Hooks': 'Breakthrough-Labs Uniswapv4Hooks', | |||
'uniswapV4Template': 'Uniswap v4 Template', | |||
'uniswapV4HookBookMultiSigSwapHook': 'Uniswap V4 HookBook MultiSigSwapHook', | |||
'accountAbstraction': 'Account Abstraction Template' | |||
'accountAbstraction': 'Account Abstraction Template', | |||
'fullyFledgeEIP7702': 'EIP7702 Fully Fledge Template', |
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.
This line should be updated - so its not fullyFedgeEIP7702
libs/remix-ws-templates/src/index.ts
Outdated
@@ -1,5 +1,6 @@ | |||
export { default as remixDefault } from './templates/remixDefault' | |||
export { default as simpleEip7702 } from './templates/simpleEip7702' | |||
export { default as fullyFledgeEIP7702 } from './templates/fullyFledgeEIP7702' |
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.
update name
- Deploy Example7702.sol. | ||
- Use delegation on the contract above. | ||
- Run the script `run-eip7702.ts`. | ||
- Copy the logged input data. |
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.
- In the terminal, copy the logged data from
console.log(executeBatch)
- Use delegation on the contract above. | ||
- Run the script `run-eip7702.ts`. | ||
- Copy the logged input data. | ||
- Find the `executeBatch`, copy the data and run the transaction. |
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.
- Back in Deploy & Run, find the DELEGATED SIMPLE7702ACCOUNT and open it up to see its functions.
- In the
executeBatch
function , paste the data and then run the transaction.
- Run the script `run-eip7702.ts`. | ||
- Copy the logged input data. | ||
- Find the `executeBatch`, copy the data and run the transaction. | ||
- Check that balance of the first and second account has been updated. |
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.
- Go to the the deployed token's
balanceOf
function. Input the first and then the second account to check that each address' balance has been updated.
For more information please see [this page](https://eip7702.io) | ||
|
||
### How to | ||
|
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.
This needs an introduction like:
In this demo, we'll deploy a contract and assign it to an EOA. Then we'll run a script that will deploy a token and another contract. The script will also prepare the data to batch a transaction so that it will contain the approval for the transfer and as well as the transfer.
- Copy the logged input data. | ||
- Find the `executeBatch`, copy the data and run the transaction. | ||
- Check that balance of the first and second account has been updated. | ||
|
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.
This is possible because of the 7702 connection between the contract and the first EOA address.
(more info could be provided here as well).
1ed6673
to
5dbc07d
Compare
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.
I'm going to approve the changes here, but I'm going to make a followup PR to update some of the text in the Readme file
28d81d1
to
86be34b
Compare
86be34b
to
aa2119e
Compare
Uh oh!
There was an error while loading. Please reload this page.