Skip to content

Commit

Permalink
temp/3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leekt committed May 10, 2024
1 parent 9204bab commit f105149
Show file tree
Hide file tree
Showing 10 changed files with 730 additions and 5 deletions.
124 changes: 124 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715192178.json

Large diffs are not rendered by default.

124 changes: 124 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715192285.json

Large diffs are not rendered by default.

124 changes: 124 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715192309.json

Large diffs are not rendered by default.

124 changes: 124 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715192359.json

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715263836.json

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715263846.json

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions broadcast/DeployKernel.s.sol/11155111/run-1715263858.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion broadcast/DeployKernel.s.sol/11155111/run-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1715101470,
"timestamp": 1715263858,
"chain": 11155111,
"commit": "10c0997"
}
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ out = "out"
libs = ["lib"]
bytecode_hash = "none"
cbor_metadata = false
solc_version = "0.8.25"
optimize = true
via-ir = false
runs = 1000
runs = 200

[profile.deploy]
via-ir = true
Expand Down
9 changes: 6 additions & 3 deletions src/Kernel.sol
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,18 @@ contract Kernel is IAccount, IAccountExecute, IERC7579Account, ValidationManager
} else {
// action installed
bytes memory context;
if (address(config.hook) == 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF) {
if (
address(config.hook) != address(1) && address(config.hook) != 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
) {
context = _doPreHook(config.hook, msg.value, msg.data);
} else if (address(config.hook) == 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF) {
// for selector manager, address(0) for the hook will default to type(address).max,
// and this will only allow entrypoints to interact
if (msg.sender != address(entrypoint)) {
revert InvalidCaller();
}
} else if (address(config.hook) != address(1)) {
context = _doPreHook(config.hook, msg.value, msg.data);
}
// execute action
if (config.callType == CALLTYPE_SINGLE) {
(success, result) = ExecLib.doFallback2771Call(config.target);
} else if (config.callType == CALLTYPE_DELEGATECALL) {
Expand Down

0 comments on commit f105149

Please sign in to comment.