Verified contractExactBUSL-1.1
MaseerValve
Address0x049409551fba2032ca2d348b24cdbece212c9b40
- Balance
0 ETH
- Transactions
7
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 20,000 runs
- EVM version
- cancun
- License
- BUSL-1.1
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 22,341,349
- Creation transaction
- 0x695185858a…4cd459451d
src/MaseerValve.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.28;
interface IPip {
function poke(uint256 _next) external;
}
contract MaseerValve {
// wards
mapping (address => uint256) public wards;
function rely(address _usr) external auth { wards[_usr] = 1; }
function deny(address _usr) external auth { wards[_usr] = 0; }
modifier auth { if (wards[msg.sender] != 1) { revert NotAuthorized(msg.sender); } _; }
// buds
mapping (address => uint256) public buds;
function kiss(address _usr) external auth { buds[_usr] = 1; }
function diss(address _usr) external auth { buds[_usr] = 0; }
modifier bud { if (buds[msg.sender] != 1) { revert NotAuthorized(msg.sender); } _; }
error NotAuthorized(address usr);
error NotEta(uint256 eta);
uint256 public constant zzz = 10 hours;
address public immutable pip;
uint256 public nxt;
uint256 public eta;
constructor(address _pip) {
pip = _pip;
eta = type(uint256).max; // Deactivate until next poke
wards[msg.sender] = 1;
}
function poke(uint256 _nxt) external bud {
eta = block.timestamp + zzz;
nxt = _nxt;
}
function flow() external {
if (block.timestamp < eta) revert NotEta(eta);
IPip(pip).poke(nxt);
eta = type(uint256).max; // Deactivate until next poke
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 20000,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"forge-std/=lib/forge-std/src/",
"maseer-one/=lib/maseer-one/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.