Verified contractExactMIT
DeadManSigner
Address0xa7966424f84472e348d24dccc74df817f664e2e1
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.8.36
- Same code
1 more contract
Details
- Compiler
- solc 0.8.36+commit.8a079791
- Language
- solidity
- Optimization
- Yes, 1,000,000 runs
- EVM version
- osaka
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 25,874,303
- Creation transaction
- 0xf88e6dfafe…9f8bc898d0
src/DeadManSigner.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.36;
interface ISafe {
function isOwner(address owner) external view returns (bool);
function approveHash(bytes32 hashToApprove) external;
}
contract DeadManSigner {
ISafe internal immutable safe;
uint256 internal immutable delay;
bytes32 public safeTxHash;
uint256 public validAfter;
error InvalidConfig();
error AlreadyTriggered();
error NotSafeOwner();
error ManNotDead();
constructor(ISafe safe_, uint256 delay_) {
require(address(safe_) != address(0) && delay_ != 0, InvalidConfig());
safe = safe_;
delay = delay_;
}
function params() public view returns (ISafe, uint256) {
return (safe, delay);
}
function queue(bytes32 hash) external {
require(validAfter == 0 && safeTxHash == bytes32(0), AlreadyTriggered());
require(safe.isOwner(msg.sender), NotSafeOwner());
safeTxHash = hash;
validAfter = block.timestamp + delay;
}
function pushSignature() external {
require(validAfter != 0 && block.timestamp >= validAfter, ManNotDead());
safe.approveHash(safeTxHash);
safeTxHash = bytes32(0);
validAfter = 0;
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 1000000,
"enabled": true
},
"viaSSACFG": false,
"evmVersion": "osaka",
"remappings": [
"forge-std/=lib/forge-std/src/"
],
"experimental": false
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.