-
High - 100xp
-
Medium - 20xp
-
Low - 2xp
-
Starts: May 09, 2024 Noon UTC
-
Ends: May 16, 2024 Noon UTC
- nSLOC: 89
- Complexity Scope: 82
This code was created for Codehawks as the first flight. It is made with bugs and flaws on purpose. Don't use any part of this code without reviewing it and audit it.
This is your opportunity to learn about account abstraction!
- Mondrian Wallet
- Contest Details
- Table of Contents
- About
- Getting Started
- Audit Scope Details
- Roles
- Known Issues
Our team loves account abstraction, and abstract art, so we decided to combine them!
Users who create an account abstraction wallet with MondrianWallet
will get a cool account abstraction wallet, with a random Mondrian art painting!
Account abstraction (EIP-4337) essentailly allows wallets to sign transactions with anything instead of just a private key.
You can see a diagram of what this looks like below.
We do not use the Paymaster
or Aggregator
in our Mondrian Wallet.
For our wallet, a user can execute transactions by one of two methods:
- A direct call from the Mondrian Wallet Owner, via the
execute
function - A
UserOp
from a user who has a signed transaction from the Mondrian Wallet Owner via thehandleOps
function in theEntryPoint
contract.
To learn more about how this works, you can read the EIP-4337 documentation.
You'll see the tokenURI
function returns one of 4 random Mondrian art paintings. Each should have equal distribution and be random.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- Nodejs
- You'll know you've installed nodejs right if you can run:
node --version
and get an ouput like:vx.x.x
- You'll know you've installed nodejs right if you can run:
- Yarn instead of
npm
- You'll know you've installed yarn right if you can run:
yarn --version
and get an output like:x.x.x
- You might need to install it with
npm
- You'll know you've installed yarn right if you can run:
- Clone the repository and compile contracts
git clone https://github.com/cyfrin/2024-05-Mondrian-Wallet
cd 2024-05-Mondrian-Wallet
yarn
yarn compile
yarn test
- In Scope:
./contracts/
└── MondrianWallet.sol
- Solc Version:
0.8.24
- Chain(s) to deploy contract to:
- Ethereum
- zkSync
- Deployer address (who will be deploying the contract):
- 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
Onwer - The one who can execute transactions by directly calling the execute
function.
- None