Validate UserOp

Adding a function validateUserOp to validate a UserOp signature

Solidity Developer

Advanced Foundry

1. Introduction
A deep dive into the technicalities of account abstraction - This lesson unpacks the concept of account abstraction, covering what it is, the benefits it offers over current wallet systems, and how it's implemented in practice. Learn the different ways account abstraction interacts with different blockchains, from the new Ethereum entry point to zkSync's native account abstraction. Duration: 11min
2. Code Overview
Going through the code we will be writing throughout this section Duration: 4min
3. Ethereum Setup
Creating an account smart contract for Ethereum Duration: 10min
4. PackedUserOperation
Understanding the PackedUserOperation struct! Duration: 2min
5. Validate UserOp
Adding a function validateUserOp to validate a UserOp signature Duration: 15min
6. Quiz: Account Abstraction Intro Quiz
Questions: 5
7. EntryPoint Contract
Adding the EntryPoint contact to the Ethereum smart contract account. Duration: 3min
8. Execute Function Ethereum
Adding the execute function so the account can send transactions from the owner or the EntryPoint. Duration: 8min
9. Deployment Script for an Ethereum Account
Creating a deployment (and helper) script to deploy an Ethereum account! Duration: 12min
10. Test Owner can Execute
Writing a test to check the owner of the account can execute a transaction Duration: 13min
11. Unsigned PackedUserOperation Test
Test that an unsigned PackedUserOperation userOp does not pass. Creating the SendPackedUserOp.s.sol script to send a PackedUserOperation. Duration: 11min
12. Signed UserOp Test
Create a test to recover the signer UserOp and check the signer is the owner. Duration: 23min
13. Local Dev Unlocked
Using unlocked accounts to sign messages using vm.sign. Duration: 4min
14. Test Validate UserOps
Testing the validateUserOps function to check the validation is working correctly. Duration: 5min
15. Test EntryPoint
Test that EntryPoint contract can execute the commands. Duration: 6min
16. Advanced Debugging
Going through some Foundry debugging tools to fix your bugs and issues in your code. Duration: 5min
17. Mid Session Recap
Recapping everything you have learned so far! (go get an ice cream for this section) Duration: 4min
18. Quiz: Account Abstraction Mid Section Recap Quiz
Questions: 4
19. Live Demo on Arbitrum
Deploying and sending a UserOp on Arbitrum using the Ethereum smart contract account Duration: 8min
20. zkSync Setup
Setting up the zkSync smart contract account contract. Duration: 9min
21. Iaccount
Understanding the IAccount interface and how transactions are structured on zkSync. Duration: 8min
22. System Contracts
Introduction to understanding what System Contracts are on zkSync and where they are used with zkSync accounts. Duration: 4min
23. Type 113 Lifecycle
The lifecycle of a type 113 transaction on zkSync. Duration: 7min
24. zkSync Accounts Recap
A recap of how accounts work on zkSync. Duration: 3min
25. zkSync Transaction Simulations
Simulating a transaction on zkSync using the system contracts when validating the transaction. Duration: 14min
26. Validate Transaction zkSync
Adding a function to validate the transaction in a zkSync account. Duration: 12min
27. Execute Function zkSync
Adding a function to execute the transaction in a zkSync account. Duration: 9min
28. Pay For Transaction zkSync
Adding a function to pay for the transaction using the Bootloader System Contract in a zkSync account Duration: 3min
29. Execute Transaction From Outside
Adding a function to execute the transaction from outside the account. Duration: 8min
30. zkSync Tests
Adding tests for the zkSync account. Duration: 6min
31. Transaction Struct
How to build a transaction struct. Duration: 9min
32. Via Ir
Using --via-ir to compile to middle language to allow test more effectively. Duration: 2min
33. Validate Transaction Test
Adding a test to check that validateTransaction is validating the transaction correctly. Duration: 14min
34. Clean Up zkSync
Cleaning up the zkSync account code. Duration: 3min
35. Testnet zkSync Demo
A testnet demo! Duration: 5min
36. Quiz: Account Abstraction Recap Quiz
Questions: 4
37. Recap End
Recapping everything we have learned in this section! Duration: 8min

Course Overview

About the course

What you'll learn

Advanced smart contract development

How to develop a stablecoin

How to develop a DeFi protocol

How to develop a DAO

Advanced smart contracts testing

Fuzz testing

Manual verification

Course Description

Who is this course for?

  • Engineers
  • Smart Contract Security researchers

Potential Careers

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

Security researcher

$49,999 - $120,000 (avg. salary)

Meet your instructors

Patrick Collins

Patrick Collins

Founder at Cyfrin

Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.

Guest lecturers:

Juliette Chevalier

Juliette Chevalier

Lead Developer relations at Aragon

Ciara Nightingale

Ciara Nightingale

Developer relations at Thirdweb

Vasiliy Gualoto

Vasiliy Gualoto

Developer relations at Cyfrin

Nader Dabit

Nader Dabit

Director of developer relations at Avara

Ally Haire

Ally Haire

Developer relations at Protocol Labs

Harrison

Harrison

Founder at GasliteGG

Vitto Rivabella

Vitto Rivabella

Lead Developer relations at Cyfrin

Last updated on November 29, 2024

Testimonials

Students Reviews

Read what our students have to say about this course.

Chainlink

Chainlink

Chainlink

Gustavo Gonzalez

Gustavo Gonzalez

Solutions Engineer at OpenZeppelin

Francesco Andreoli

Francesco Andreoli

Lead Devrel at Metamask

Albert Hu

Albert Hu

DeForm Founding Engineer

Radek

Radek

Senior Developer Advocate at Ceramic

Boidushya

Boidushya

WalletConnect

Idris

Idris

Developer Relations Engineer at Axelar

Cyfrin
Updraft
CodeHawks
Solodit
Resources