Skip to content
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

Rebase audit-2023-11-20 into main #120

Merged
merged 106 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
75e89b3
style: run forge fmt (#11)
adam-alchemy Dec 11, 2023
009abaa
chore: setup deploy script and deploy to sepolia (#10)
fangting-alchemy Dec 11, 2023
2273cc9
fix: [spearbit-12] Typos (#12)
adam-alchemy Dec 12, 2023
b14e001
fix: Remove variable shadowing and lint deploy script (#13)
adam-alchemy Dec 12, 2023
7e58e99
fix: [spearbit-76] Session key data storage collision (#14)
adam-alchemy Dec 12, 2023
84f4b3d
fix: [spearbit-38] ERC-1271 signature validation with EOA owners of c…
fangting-alchemy Dec 12, 2023
f70c9e5
fix: [spearbit-15] IPlugin function prevention in installing executio…
fangting-alchemy Dec 13, 2023
bfb9b65
fix: [spearbit-34] Session key rotation registration check (#19)
adam-alchemy Dec 13, 2023
9d2fc29
fix: Reorder CI elements to run `forge fmt` on the correct code (#21)
adam-alchemy Dec 14, 2023
ef789cd
fix: [spearbit-94] runtime validation bypass special case should only…
fangting-alchemy Dec 18, 2023
10330fe
fix: [quantstamp-20] clear plugin data early in uninstallPlugin (#25)…
fangting-alchemy Dec 21, 2023
0619de5
fix: [spearbit-97] Prevent createAccount() user error (#26)
howydev Dec 22, 2023
4d4f76a
fix: [spearbit-45] 2 step ownable factories (#23)
howydev Dec 22, 2023
fd097ef
fix: [spearbit-55] switch from .transfer to .call (#24)
howydev Dec 22, 2023
807823b
fix: [quantstamp-3] add target is not self check in executeFromPlugin…
fangting-alchemy Jan 2, 2024
1da79eb
fix: [quantstamp-1] sessionKey ERC20 spending limit to count approve …
fangting-alchemy Jan 2, 2024
60ca631
fix: [spearbit-92] make gas limit validation reverts less expensive (…
jaypaik Jan 3, 2024
43d71c6
fix: [spearbit-89] use newTotalUsage (#31)
jaypaik Jan 3, 2024
96f5fea
fix: [quantstamp-1] sessionKey ERC20 spending limit comments update (…
fangting-alchemy Jan 3, 2024
3e8944f
fix: [spearbit-99] Correctly set post-only hook flag (#20)
adam-alchemy Jan 3, 2024
4016fe8
fix: [spearbit-95][quantstamp-9] disallow self-dependencies (#33)
jaypaik Jan 5, 2024
dec1d76
fix: [spearbit-51][quantstamp-14] clean up upper bits of address in P…
fangting-alchemy Jan 5, 2024
662445a
fix: [spearbit-54] use salt in eip-712 domain separator (#38)
fangting-alchemy Jan 6, 2024
2a22fbc
fix: [quantstamp-6] add runtime deny pre hook for session key plugin …
fangting-alchemy Jan 6, 2024
596ad99
fix: [spearbit-25] Function initialize() can use calldata (#18)
dphilipson Jan 7, 2024
5d0816a
chore: add optimized-build profile (#36)
jaypaik Jan 7, 2024
be5f7d1
style: forge fmt and update foundry version in CI (#37)
adam-alchemy Jan 7, 2024
a46d9cb
chore: bump foundry version (#44)
jaypaik Jan 8, 2024
c67dcb4
fix: [spearbit-86-41] use cached variables accessControlType, callLen…
jaypaik Jan 8, 2024
27fe9de
fix: [spearbit-72] cache dependencies.length earlier (#40)
jaypaik Jan 8, 2024
723ef74
fix: [spearbit-66] remove redundant 0 check (#41)
jaypaik Jan 8, 2024
2b9c5d9
fix: [spearbit-62] cache owners_.length (#42)
jaypaik Jan 8, 2024
a68a807
fix: [spearbit-46] remove extra argument from _checkCallPermissions()…
jaypaik Jan 8, 2024
98094b5
fix: [quantstamp-21] prevent adding IPlugin interface to account (#45)
dphilipson Jan 8, 2024
9ea5112
fix: [spearbit-107] [quantstamp-22] revert UO validation when error i…
fangting-alchemy Jan 9, 2024
1944ca9
fix: [spearbit-29] remove redundant SSTOREs (#51)
dphilipson Jan 10, 2024
18d8ace
fix: [spearbit-43] simplify `tryRemoveKnown()` (#52)
dphilipson Jan 10, 2024
1675a37
fix: [spearbit-27] Remove redundant selector length check (#53)
dphilipson Jan 10, 2024
e39b021
fix: [spearbit-31] Remove unnecessary assignment (#54)
dphilipson Jan 10, 2024
a4f1fe4
chore: remove pinned foundry version (#59)
jaypaik Jan 10, 2024
3c1b5b6
fix: [spearbit-83] [quantstamp-12] revert in session key permissions…
fangting-alchemy Jan 11, 2024
4629e8d
fix: [spearbit-42] reorder add and remove owner s logic in multi owne…
fangting-alchemy Jan 11, 2024
436113e
fix: [spearbit-107] [quantstamp-22] use memory safe revert instead i…
fangting-alchemy Jan 11, 2024
540b0e3
fix: [quantstamp-15] only support executeWithSessionKey method in ses…
fangting-alchemy Jan 11, 2024
0451348
fix: [spearbit-44] optimize CountableLinkedListSetLib (#56)
jaypaik Jan 11, 2024
152910a
fix: [spearbit-14] remove unused error in PluginManagerInternals (#61)
fangting-alchemy Jan 12, 2024
fe87e37
fix: [spearbit-30] [quantstamp-26] fix AssociatedLinkedListSetLib _AS…
fangting-alchemy Jan 12, 2024
b9df282
fix: [quantstamp-32] add owner sorting check and comments in factory …
fangting-alchemy Jan 12, 2024
ac9c87f
fix: [spearbit-11] Clear bits more efficiently (#55)
dphilipson Jan 14, 2024
d7ab6ae
fix: [spearbit-96] make clearFlag consistent in clear() for associate…
fangting-alchemy Jan 17, 2024
cac319d
fix: [spearbit-47] add evm version=paris in config (#67)
howydev Jan 17, 2024
61ff1d3
fix: [spearbit-64] update comments in BasePlugin (#70)
fangting-alchemy Jan 17, 2024
456d322
fix: remove unnecessary view functions for MultiOwnerPlugin (#68)
fangting-alchemy Jan 17, 2024
97fe8a5
fix: [spearbit-61] standardize index variable init (#71)
howydev Jan 18, 2024
28c7bf1
fix: [spearbit-98][quantstamp-8] State is not cached properly before …
adam-alchemy Jan 18, 2024
3b73246
fix: [spearbit-58] improve natSpec (#72)
howydev Jan 18, 2024
73d5051
fix: [spearbit-101] Spend limit interval comments (#75)
adam-alchemy Jan 18, 2024
c53f36a
fix: [spearbit-105] Remove extraneous comment (#74)
adam-alchemy Jan 18, 2024
e7bca9f
fix: [spearbit-90] add warnings for _coalescePreValidation helper fun…
howydev Jan 19, 2024
617677a
fix: [spearbit-79,102][quantstamp-13] Merge session key plugin with p…
adam-alchemy Jan 19, 2024
2b6d7f6
fix: [spearbit-39] Declare memory-safe assembly block in AccountStora…
adam-alchemy Jan 19, 2024
e707f52
fix: [spearbit-37] Add event emission to MultiOwnerPlugin install/uni…
adam-alchemy Jan 19, 2024
ba1ce7c
fix: [spearbit-28] Simplify storage access syntax of executeFromPlugi…
adam-alchemy Jan 19, 2024
bf932c9
fix: [spearbit-100] Limit what selectors can be used by session keys …
adam-alchemy Jan 19, 2024
61baa5e
fix: [spearbit-85] Add documentation for no ERC-20 spend limit checks…
adam-alchemy Jan 19, 2024
27af95a
fix: [quanstamp-req] Contract data key (#81)
adam-alchemy Jan 19, 2024
47fb48b
fix: [spearbit-71] Expanded comment documentation for structs in Sess…
adam-alchemy Jan 19, 2024
ead7836
fix: [spearbit-26] Upgrade to solc 0.8.22 and remove explicit uncheck…
adam-alchemy Jan 19, 2024
cff1b59
fix: [spearbit-97] cap owners on creation to 100 (#82)
jaypaik Jan 20, 2024
11cb21e
fix: [spearbit-35] flip condition to remove a NOT (#63)
jaypaik Jan 20, 2024
f874acd
chore: bump to pragma ^0.8.22 (#89)
jaypaik Jan 22, 2024
1d29c8f
fix: [spearbit-16] Use _assertNotNullFunction in `_addHooks` (#83)
adam-alchemy Jan 22, 2024
fead83d
fix: [spearbit-82] Session key init perms (#80)
adam-alchemy Jan 22, 2024
a37331d
feat: remove permitted call hooks from MSCA (rebase on cache PR) (#76)
fangting-alchemy Jan 22, 2024
13755d4
fix: [spearbit-48] Collapse if/else in SessionKeyPermissionsLoupe (#90)
adam-alchemy Jan 22, 2024
9a7bb2a
fix: [spearbit-68] rename vars in account to be consistent (#91)
fangting-alchemy Jan 22, 2024
5df8485
fix: [spearbit-69] reorder functions and update comments in plugins t…
fangting-alchemy Jan 22, 2024
e90b425
fix: [spearbit-60] add comment to explain that view functions are not…
jaypaik Jan 22, 2024
0d607ed
fix: [spearbit-77] Refactor session key loading util functions (#93)
adam-alchemy Jan 22, 2024
897387b
fix: [spearbit-56] update comments for factory withdraw functions (#96)
fangting-alchemy Jan 23, 2024
ec3c91d
fix: [spearbit-40] Evaluate keccak expressions at compile time when p…
adam-alchemy Jan 23, 2024
8f29800
fix: [spearbit-65] make custom errors more informative (#94)
jaypaik Jan 23, 2024
2c99fcd
refactor: move FunctionReference type to IPluginManager (#100)
jaypaik Jan 23, 2024
851c6cf
fix: [quantstamp-29] add comments for castlib functions (#101)
fangting-alchemy Jan 23, 2024
f258b31
fix: [quantstamp-16] Disallow using dependencies for hooks (#77)
dphilipson Jan 23, 2024
66377e3
fix: [spearbit-24] refactor _resolveManifestFunction (#97)
jaypaik Jan 23, 2024
65547fc
fix: [spearbit-88] move SIG_VALIDATION_X to a global var (#73)
howydev Jan 23, 2024
e4c6d97
fix: [spearbit-106] update comments to use bitwise OR instead of logi…
howydev Jan 23, 2024
ac0ba48
refactor: libraries/AccountStorageV1 -> account/AccountStorageV1 (#102)
jaypaik Jan 23, 2024
b3ecbeb
refactor: libraries/CastLib.sol, libraries/FunctionReference.sol -> h…
jaypaik Jan 23, 2024
28b44f7
refactor: move test files to appropriate folders (#104)
jaypaik Jan 23, 2024
52a5577
refactor: sort imports (#105)
jaypaik Jan 23, 2024
266ea6f
chore: add license for libraries (#106)
jaypaik Jan 23, 2024
8ccfd46
chore: move license to root (#109)
jaypaik Jan 23, 2024
6192189
chore: add license for all other files outside of interfaces and libr…
jaypaik Jan 23, 2024
e68ad9a
chore: add license to interfaces (#110)
jaypaik Jan 23, 2024
a9da8fc
fix: update interface comments and pluginInitData parameter name (#108)
jaypaik Jan 23, 2024
849f1ac
fix: remove PluginIgnoredUninstallCallbackFailure event (#111)
jaypaik Jan 23, 2024
7b23932
fix: obsolete comment within _doPreExecHooks (#112)
jaypaik Jan 23, 2024
80c8803
style: removed unused const (#113)
howydev Jan 23, 2024
4199f10
fix: Cleanup comments, unused vars, config files. (#114)
adam-alchemy Jan 23, 2024
f1c6a16
fix: [spearbit-32] Remove extra iteration for length check in Associa…
adam-alchemy Jan 23, 2024
1c71be9
chore: add doc for immutable entry point var (#116)
fangting-alchemy Jan 24, 2024
1a6b5b7
chore: update readme (#117)
howydev Jan 24, 2024
6e7ee3f
chore: CC0 license update (#118)
jaypaik Jan 24, 2024
57a9f02
chore: update comments (#119)
fangting-alchemy Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
DEPLOYER_PRIVATE_KEY=
OWNER=

RPC_URL_MAINNET=
RPC_URL_GOERLI=
# 1 ether required by bundlers
REQUIRED_STAKE_AMOUNT=1
# 1 day required by bundlers
UNSTAKE_DELAY_SEC=86400

ETHERSCAN_API_KEY=
ENTRYPOINT=
# MSCA_IMPL=
# OWNER_FACTORY=
# OWNER_TOKEN_RECEIVER_FACTORY=

# OWNER_PLUGIN=
# TOKEN_RECEIVER_PLUGIN=
# SESSION_KEY_PLUGIN=
# SESSION_KEY_PERMS_PLUGIN=

RPC_URL=
29 changes: 10 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,13 @@ jobs:
name: Run Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5be158ba6dc7c798a6f032026fe60fc01686b33b
- run: forge install

- run: forge fmt --check

- name: "Check out the repo"
uses: "actions/checkout@v3"
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: "Install Pnpm"
uses: "pnpm/action-setup@v2"
Expand All @@ -40,12 +31,14 @@ jobs:
cache: "pnpm"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
- name: "Install Node.js dependencies"
run: "pnpm install"

- run: forge fmt --check

- name: "Lint the contracts"
run: "pnpm lint"

# check-inspect:
# name: Verify Inspections
# runs-on: ubuntu-latest
Expand All @@ -69,14 +62,13 @@ jobs:
name: Run Forge Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Check out the repo"
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5be158ba6dc7c798a6f032026fe60fc01686b33b

- name: Install forge dependencies
run: forge install
Expand All @@ -91,14 +83,13 @@ jobs:
name: Run Forge Tests [lite build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Check out the repo"
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-5be158ba6dc7c798a6f032026fe60fc01686b33b

- name: Install forge dependencies
run: forge install
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Foundry build and cache directories
out/
out-optimized/
cache/
node_modules/

# coverage
report/
lcov.info
lcov.info

# secret
.env
2 changes: 1 addition & 1 deletion .solhint-src.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rules": {
"immutable-vars-naming": ["error"],
"no-unused-import": ["error"],
"compiler-version": ["error", ">=0.8.21"],
"compiler-version": ["error", ">=0.8.22"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"func-param-name-mixedcase": ["error"],
Expand Down
2 changes: 1 addition & 1 deletion .solhint-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"func-name-mixedcase": "off",
"immutable-vars-naming": ["error"],
"no-unused-import": ["error"],
"compiler-version": ["error", ">=0.8.21"],
"compiler-version": ["error", ">=0.8.22"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"max-states-count": ["warn", 30],
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.compileUsingRemoteVersion": "v0.8.21",
"solidity.compileUsingRemoteVersion": "v0.8.22",
"editor.formatOnSave": true,
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
Expand Down
Loading