Skip to content

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

Merged
merged 3 commits into from
May 20, 2025
Merged

add fully fledge eip7702 template #6022

merged 3 commits into from
May 20, 2025

Conversation

yann300
Copy link
Contributor

@yann300 yann300 commented May 13, 2025

  • an fix an issue with signing messages

@yann300 yann300 requested a review from ryestew May 13, 2025 14:36
Copy link

netlify bot commented May 13, 2025

Deploy Preview for remixproject ready!

Name Link
🔨 Latest commit aa2119e
🔍 Latest deploy log https://app.netlify.com/projects/remixproject/deploys/682c368bda24e50008506c92
😎 Deploy Preview https://deploy-preview-6022--remixproject.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@yann300 yann300 force-pushed the new-eip7702-template branch 6 times, most recently from ee3fa6b to d069f57 Compare May 14, 2025 13:33
@@ -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.' }
Copy link
Collaborator

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

Copy link
Collaborator

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.' },
Copy link
Collaborator

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.' },
Copy link
Collaborator

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',
Copy link
Collaborator

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

@@ -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'
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Collaborator

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).

@yann300 yann300 force-pushed the new-eip7702-template branch 4 times, most recently from 1ed6673 to 5dbc07d Compare May 19, 2025 20:27
Copy link
Collaborator

@ryestew ryestew left a 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

@yann300 yann300 force-pushed the new-eip7702-template branch 2 times, most recently from 28d81d1 to 86be34b Compare May 20, 2025 07:08
@Aniket-Engg Aniket-Engg force-pushed the new-eip7702-template branch from 86be34b to aa2119e Compare May 20, 2025 08:00
@Aniket-Engg Aniket-Engg merged commit 2c84e86 into master May 20, 2025
33 checks passed
@Aniket-Engg Aniket-Engg deleted the new-eip7702-template branch May 20, 2025 09:11
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.

3 participants