1/5
## Account Abstraction Lesson 33: Testnet zkSync Demo The final step is to deploy and send a transaction. As of the creation of this lesson, foundry scripts don't work that well with zkSync. We are going to use Hardhat. Since Hardhat isn't a part of this course, we won't do any explanation of the code. However, you will get to see how it is deployed and sent. First, we do need to make some updates to our `ZkMinimalAccount` contract. You may remember that our `_validateTransaction` function `returns (bytes4 magic)`. However, we forgot to do this when calling it in the `executeTransactionFromOutside` function. Let's make this update now. **Before** ```js function executeTransactionFromOutside(Transaction memory _transaction) external payable { _validateTransaction(_transaction); _executeTransaction(_transaction); } ``` **After** ```js function executeTransactionFromOutside(Transaction memory _transaction) external payable { bytes4 magic = _validateTransaction(_transaction); if (magic != ACCOUNT_VALIDATION_SUCCESS_MAGIC) { revert ZkMinimalAccount__InvalidSignature(); } _executeTransaction(_transaction); } ``` Now add the custom error with the others. ```js error ZkMinimalAccount__InvalidSignature(); ``` --- ### Deploy with Hardhat Please follow along with the video from this point. If you would like to see the code, you can find it in the [Javascript-scripts folder.](https://github.com/Cyfrin/minimal-account-abstraction/tree/main/javascript-scripts) **Steps covered in the video** 1. run `yarn deploy` in the terminal 2. copy the address from **zkMinimalAccount deployed to:** that will display in the terminal 3. paste it in [zksync sepolia explorer](https://sepolia.explorer.zksync.io/) 4. send it some funds from testnet wallet 5. go into `SendAATx.ts` in the javascript-scripts folder 6. paste our address into `const ZK_MINIMAL_ADDRESS` 7. run yarn sendTx in the terminal 8. once successful, go back to zksync sepolia explorer and refresh the page 9. should see the two transactions on the screen Congratulations! Take some time to reflect and move on to the next lesson when you are ready.
A testnet demo!
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
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
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)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on November 29, 2024
Solidity Developer
Advanced FoundryDuration: 36min
Duration: 3h 06min
Duration: 5h 02min
Duration: 2h 47min
Duration: 1h 23min
Duration: 4h 28min
Duration: 1h 19min
Duration: 58min
Course Overview
About the course
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
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)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on November 29, 2024
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar