Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.3 KiB
Solidity
45 lines
1.3 KiB
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.4;
|
|
|
|
import {ERC4337} from "../../../src/accounts/ERC4337.sol";
|
|
import {Brutalizer} from "../Brutalizer.sol";
|
|
|
|
/// @dev WARNING! This mock is strictly intended for testing purposes only.
|
|
/// Do NOT copy anything here into production code unless you really know what you are doing.
|
|
contract MockERC4337 is ERC4337, Brutalizer {
|
|
function withdrawDepositTo(address to, uint256 amount) public payable virtual override {
|
|
super.withdrawDepositTo(_brutalized(to), amount);
|
|
}
|
|
|
|
function executeBatch(uint256 filler, Call[] calldata calls)
|
|
public
|
|
payable
|
|
virtual
|
|
onlyEntryPointOrOwner
|
|
returns (bytes[] memory results)
|
|
{
|
|
/// @solidity memory-safe-assembly
|
|
assembly {
|
|
mstore(0x40, add(mload(0x40), mod(filler, 0x40)))
|
|
}
|
|
return super.executeBatch(calls);
|
|
}
|
|
|
|
function _domainNameAndVersion()
|
|
internal
|
|
pure
|
|
override
|
|
returns (string memory, string memory)
|
|
{
|
|
return ("Milady", "1");
|
|
}
|
|
|
|
function hashTypedData(bytes32 structHash) external view returns (bytes32) {
|
|
return _hashTypedData(structHash);
|
|
}
|
|
|
|
function DOMAIN_SEPARATOR() external view returns (bytes32) {
|
|
return _domainSeparator();
|
|
}
|
|
}
|