Skip to content

Commit

Permalink
Fix building of empty contract
Browse files Browse the repository at this point in the history
  • Loading branch information
valar999 committed Jul 13, 2024
1 parent 0667d7a commit e8c575f
Show file tree
Hide file tree
Showing 6 changed files with 3,158 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/foundry.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
libs = ["node_modules"]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
1 change: 0 additions & 1 deletion contracts/lib/forge-std
Submodule forge-std deleted from 07263d
8 changes: 8 additions & 0 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "contracts",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@rhinestone/modulekit": "^0.4.7"
}
}
14 changes: 14 additions & 0 deletions contracts/remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ExcessivelySafeCall/=node_modules/excessively-safe-call/src/
account-abstraction-v0.6/=node_modules/@ERC4337/account-abstraction-v0.6/contracts/
account-abstraction/=node_modules/@ERC4337/account-abstraction/contracts/
erc4337-validation/=node_modules/@rhinestone/erc4337-validation/src/
erc7579/=node_modules/erc7579/src/
forge-std/=node_modules/forge-std/src/
kernel/=node_modules/@zerodev/kernel/src/
module-bases/=node_modules/@rhinestone/module-bases/src/
modulekit/=node_modules/@rhinestone/modulekit/src/
safe7579/=node_modules/@rhinestone/safe7579/src/
sentinellist/=node_modules/@rhinestone/sentinellist/src/
solady/=node_modules/solady/src/
solarray/=node_modules/solarray/src/
@prb/math/=node_modules/@prb/math/src/
13 changes: 13 additions & 0 deletions contracts/src/Wingman.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ contract Wingman is ERC7579HookBase, ERC7579ValidatorBase {
return typeID == TYPE_HOOK || typeID == TYPE_VALIDATOR;
}

function _postCheck(address account, bytes calldata hookData) internal override { }

function _preCheck(address account, address, uint256, bytes calldata) internal override returns (bytes memory hookData) {
return "";
}

function isValidSignatureWithSender(address, bytes32, bytes calldata) external pure override returns (bytes4) {
return "";
}

function validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash) external override returns (ValidationData) {
}

function name() external pure virtual returns (string memory) {
return "Web3Wingman";
}
Expand Down
Loading

0 comments on commit e8c575f

Please sign in to comment.