Skip to content
Merged

V3 #93

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
92fa99d
chore: forge init
leekt Nov 13, 2023
6adf9d4
forge install: forge-std
leekt Nov 13, 2023
d54265c
temp
leekt Feb 18, 2024
9df9d67
cleanup
leekt Feb 19, 2024
8d25573
temp
leekt Feb 20, 2024
eb6f595
fmt
leekt Feb 20, 2024
5b2f87c
fmt
leekt Feb 21, 2024
e19cab2
temp
leekt Feb 21, 2024
afd4a28
small steps
leekt Feb 21, 2024
a59c227
initial test for permission manager
leekt Feb 22, 2024
9827a24
enable with selector
leekt Feb 22, 2024
3e6a0ee
removed coverage folder
leekt Feb 22, 2024
0533e5e
removed coverage folder
leekt Feb 22, 2024
d45002e
separated validation from validator
leekt Feb 23, 2024
c248682
permission rule added
leekt Feb 23, 2024
4072947
draft for bootloader
leekt Feb 26, 2024
5e1f113
cleanup code to work with permission mode
leekt Feb 26, 2024
df4ced3
nonce starts from 0
leekt Feb 27, 2024
39a5baa
nonce starts from 0
leekt Feb 27, 2024
b374a47
renamed validation config/storage
leekt Feb 27, 2024
dbe8e89
push for example ecdsa
leekt Feb 28, 2024
87a124c
updated 7579
leekt Mar 2, 2024
5f08673
removed module type lib
leekt Mar 2, 2024
5d8eaae
forge install: openzeppelin-contracts
adnpark Mar 4, 2024
2379f25
feat: port ecdsa, weighted ecdsa, webauthn validators
adnpark Mar 4, 2024
f2ea314
feat: add isModuleType to webauthn validator
adnpark Mar 4, 2024
9e4b7a7
push
leekt Mar 6, 2024
956ed3d
Merge pull request #1 from zerodevapp/feat/port-validator
leekt Mar 6, 2024
d477443
Merge pull request #2 from zerodevapp/fix/permission_7579
leekt Mar 6, 2024
3087b66
works with via-ir, remove for next commit
leekt Mar 6, 2024
3f77ec4
removed oz
leekt Mar 6, 2024
f322140
removed webauthn
leekt Mar 6, 2024
85df492
module types
leekt Mar 6, 2024
d3d1667
fallback and action separation
leekt Mar 7, 2024
8a9c240
refactor
leekt Mar 8, 2024
fa17b43
mock policy
leekt Mar 8, 2024
5da1357
additional data for check userop policy
leekt Mar 8, 2024
0868ab6
updated interface
leekt Mar 8, 2024
4834c4e
removed group
leekt Mar 8, 2024
5ab8c16
removed group type
leekt Mar 8, 2024
6f2c941
extradata
leekt Mar 8, 2024
671622f
todo : set root validator sig
leekt Mar 9, 2024
ea1d087
policy/signer mock test
leekt Mar 10, 2024
0db292a
feat: removed validuntil/validfrom
leekt Mar 10, 2024
aa0debd
fmt
leekt Mar 10, 2024
4482876
0xff dedicated to signer
leekt Mar 10, 2024
581d4bb
to permissionConfig
leekt Mar 10, 2024
b1f64f3
fmt
leekt Mar 10, 2024
176535c
to easier naming
leekt Mar 10, 2024
d83948b
permission data to policy data
leekt Mar 10, 2024
99ad1f8
pass flag for permission
leekt Mar 10, 2024
8646f2c
Merge pull request #3 from zerodevapp/feat/signer
leekt Mar 10, 2024
cc90f41
KernelTestBase (#4)
leekt Mar 19, 2024
dd7a2b8
Fix/module base (#5)
leekt Mar 19, 2024
ec223ed
Update SignerBase.sol (#6)
leekt Mar 19, 2024
19ba63c
fix: signer oninstall with permission id (#7)
leekt Mar 20, 2024
2cc3508
changed solady remapping (#8)
leekt Mar 21, 2024
5d2395b
fix: return false for rejected proposal (#9)
leekt Mar 24, 2024
c8efac4
fix: max limit for invalidation size is 10 (#10)
leekt Mar 24, 2024
64d370c
fix: installValidations function to allow multiple validation install…
leekt Mar 24, 2024
db1b0aa
Fix/zerodev 005 (#12)
leekt Mar 24, 2024
37e0188
Feat/optional hook uninstall (#14)
leekt Mar 24, 2024
47f83b3
feat: conditional nonce increase, current nonce only increases when s…
leekt Mar 24, 2024
379417c
fix: use msg.sender for isValidSignatureWithSender (#16)
leekt Mar 25, 2024
8974127
clean up the permission data first when there is pre exsiting permiss…
leekt Mar 28, 2024
38a045b
Feat/excessively safe call (#23)
leekt Mar 28, 2024
7bb689c
Feat/selector call support (#28)
leekt Mar 29, 2024
efd57ee
upgradeTo (#29)
leekt Apr 1, 2024
abe389c
validUntil (#30)
leekt Apr 1, 2024
ff71e29
doing abi.encodeWithSelector (#31)
leekt Apr 2, 2024
c62d0a2
Feat/install selector (#33)
leekt Apr 2, 2024
efc94ff
Script/deploy (#34)
leekt Apr 2, 2024
9d2f89d
fix: signature offset for root (#37)
leekt Apr 5, 2024
6b18aa6
factory : factory staker added (#38)
leekt Apr 6, 2024
2ed1bf4
Refactor/cleanup (#39)
leekt Apr 8, 2024
8561795
Test/factory (#40)
leekt Apr 8, 2024
49842d5
Test/factory (#41)
leekt Apr 8, 2024
5f5b30f
Refactor/cleanup (#42)
leekt Apr 11, 2024
9912341
Refactor/cleanup (#44)
leekt Apr 16, 2024
0a31198
removed v2
leekt Apr 16, 2024
8f29a70
Merge remote-tracking branch 'v3/master' into v3
leekt Apr 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 1 addition & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: test

on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
- "dev"
on: workflow_dispatch

env:
FOUNDRY_PROFILE: ci
Expand Down Expand Up @@ -38,10 +32,3 @@ jobs:
run: |
forge test -vvv
id: test

- name: Run snapshot
run: NO_COLOR=1 forge snapshot --via-ir >> $GITHUB_STEP_SUMMARY
id: snapshot

- name: Run coverage
run: NO_COLOR=1 forge coverage >> $GITHUB_STEP_SUMMARY
26 changes: 10 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Compiler files
cache/
out/
dist/
types/

# Ignores development broadcast logs
!/broadcast
Expand All @@ -15,21 +13,17 @@ docs/
# Dotenv file
.env

# coverage files
lcov.info
coverage/
node_modules
.env
coverage
coverage.json
typechain
typechain-types

# Hardhat files
cache
artifacts
artifacts-selected
# node
node_modules/

cache_hardhat
# hardhat
artifacts/
cache_hardhat/
typechain-types/

lcov.info
settings.json
# zerodev orchestra
log/
.envrc
12 changes: 3 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/I4337"]
path = lib/I4337
url = https://github.com/leekt/I4337
[submodule "lib/FreshCryptoLib"]
path = lib/FreshCryptoLib
url = https://github.com/rdubois-crypto/FreshCryptoLib
[submodule "lib/p256-verifier"]
path = lib/p256-verifier
url = https://github.com/daimo-eth/p256-verifier
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/vectorized/solady
[submodule "lib/ExcessivelySafeCall"]
path = lib/ExcessivelySafeCall
url = https://github.com/nomad-xyz/ExcessivelySafeCall
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Kernel

> If you are looking for Kernel v3 source code, [it's sitting here](https://github.com/zerodevapp/kernel_v3) while we figure out how to merge it.

Kernel is a smart contract account that is:

- Compatible with [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337).
Expand Down
107 changes: 107 additions & 0 deletions broadcast/Deploy.s.sol/1/run-1712893238.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"transactions": [
{
"hash": "0xd86c946e6f30ec0b4705ea39154b4e53c4133f8a5954fc38fa00bd3f9f75131c",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"function": "approveFactory(address,bool)",
"arguments": [
"0x6723b44Abeec4E71eBE3232BD5B455805baDD22f",
"true"
],
"transaction": {
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"gas": "0x108d1",
"value": "0x0",
"input": "0x6e7dbabb0000000000000000000000006723b44abeec4e71ebe3232bd5b455805badd22f0000000000000000000000000000000000000000000000000000000000000001",
"nonce": "0x31",
"chainId": "0x1",
"accessList": null,
"type": null
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0x577e44c80c51789fd019552ec4d081eec41c1ca39e708803bfc30008458c60e8",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"function": "stake(address,uint32)",
"arguments": [
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"86400"
],
"transaction": {
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"gas": "0x15b7f",
"value": "0x16345785d8a0000",
"input": "0xc7e55f3e0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0320000000000000000000000000000000000000000000000000000000000015180",
"nonce": "0x32",
"chainId": "0x1",
"accessList": null,
"type": null
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x864783",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x0",
"transactionHash": "0xd86c946e6f30ec0b4705ea39154b4e53c4133f8a5954fc38fa00bd3f9f75131c",
"transactionIndex": "0x38",
"blockHash": "0x462f20133ad7d590e9912e41441a8c8b5d4402f33ab30c6f6315b0321c7b2c0a",
"blockNumber": "0x12ba2aa",
"gasUsed": "0xb513",
"effectiveGasPrice": "0x2f0dbd9a2",
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"contractAddress": null
},
{
"status": "0x1",
"cumulativeGasUsed": "0xf4cd4a",
"logs": [
{
"address": "0x0000000071727de22e5e9d8baf0edac6f37da032",
"topics": [
"0xa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01",
"0x000000000000000000000000d703aae79538628d27099b8c4f621be4ccd142d5"
],
"data": "0x000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000015180",
"blockHash": "0x462f20133ad7d590e9912e41441a8c8b5d4402f33ab30c6f6315b0321c7b2c0a",
"blockNumber": "0x12ba2aa",
"transactionHash": "0x577e44c80c51789fd019552ec4d081eec41c1ca39e708803bfc30008458c60e8",
"transactionIndex": "0x9e",
"logIndex": "0x19d",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000800000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000040000000000000000000000000000100000000000000000000000000000000000a00000000000000000000000000",
"type": "0x0",
"transactionHash": "0x577e44c80c51789fd019552ec4d081eec41c1ca39e708803bfc30008458c60e8",
"transactionIndex": "0x9e",
"blockHash": "0x462f20133ad7d590e9912e41441a8c8b5d4402f33ab30c6f6315b0321c7b2c0a",
"blockNumber": "0x12ba2aa",
"gasUsed": "0xed9b",
"effectiveGasPrice": "0x2f0dbd9a2",
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"contractAddress": null
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1712893238,
"chain": 1,
"commit": "1ae967d"
}
107 changes: 107 additions & 0 deletions broadcast/Deploy.s.sol/1/run-latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"transactions": [
{
"hash": "0xd86c946e6f30ec0b4705ea39154b4e53c4133f8a5954fc38fa00bd3f9f75131c",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"function": "approveFactory(address,bool)",
"arguments": [
"0x6723b44Abeec4E71eBE3232BD5B455805baDD22f",
"true"
],
"transaction": {
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"gas": "0x108d1",
"value": "0x0",
"input": "0x6e7dbabb0000000000000000000000006723b44abeec4e71ebe3232bd5b455805badd22f0000000000000000000000000000000000000000000000000000000000000001",
"nonce": "0x31",
"chainId": "0x1",
"accessList": null,
"type": null
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0x577e44c80c51789fd019552ec4d081eec41c1ca39e708803bfc30008458c60e8",
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"function": "stake(address,uint32)",
"arguments": [
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"86400"
],
"transaction": {
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"gas": "0x15b7f",
"value": "0x16345785d8a0000",
"input": "0xc7e55f3e0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0320000000000000000000000000000000000000000000000000000000000015180",
"nonce": "0x32",
"chainId": "0x1",
"accessList": null,
"type": null
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0x864783",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x0",
"transactionHash": "0xd86c946e6f30ec0b4705ea39154b4e53c4133f8a5954fc38fa00bd3f9f75131c",
"transactionIndex": "0x38",
"blockHash": "0x462f20133ad7d590e9912e41441a8c8b5d4402f33ab30c6f6315b0321c7b2c0a",
"blockNumber": "0x12ba2aa",
"gasUsed": "0xb513",
"effectiveGasPrice": "0x2f0dbd9a2",
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"contractAddress": null
},
{
"status": "0x1",
"cumulativeGasUsed": "0xf4cd4a",
"logs": [
{
"address": "0x0000000071727de22e5e9d8baf0edac6f37da032",
"topics": [
"0xa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01",
"0x000000000000000000000000d703aae79538628d27099b8c4f621be4ccd142d5"
],
"data": "0x000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000015180",
"blockHash": "0x462f20133ad7d590e9912e41441a8c8b5d4402f33ab30c6f6315b0321c7b2c0a",
"blockNumber": "0x12ba2aa",
"transactionHash": "0x577e44c80c51789fd019552ec4d081eec41c1ca39e708803bfc30008458c60e8",
"transactionIndex": "0x9e",
"logIndex": "0x19d",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000800000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000040000000000000000000000000000100000000000000000000000000000000000a00000000000000000000000000",
"type": "0x0",
"transactionHash": "0x577e44c80c51789fd019552ec4d081eec41c1ca39e708803bfc30008458c60e8",
"transactionIndex": "0x9e",
"blockHash": "0x462f20133ad7d590e9912e41441a8c8b5d4402f33ab30c6f6315b0321c7b2c0a",
"blockNumber": "0x12ba2aa",
"gasUsed": "0xed9b",
"effectiveGasPrice": "0x2f0dbd9a2",
"from": "0x9775137314fe595c943712b0b336327dfa80ae8a",
"to": "0xd703aae79538628d27099b8c4f621be4ccd142d5",
"contractAddress": null
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1712893238,
"chain": 1,
"commit": "1ae967d"
}
Loading