Verified contractPartialMIT
PlatformExecutor
Address0xb7f91a1aadb5c8fc9987a7e7ab72d704aa65967a
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.24
- Same code
Only this contract
Details
- Compiler
- solc 0.8.24+commit.e11b9ed9
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,403,726
- Creation transaction
- 0xdd008e1d72…7d49c7c868
src/PlatformExecutor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
interface IModuleSafe {
function execTransactionFromModule(address to, uint256 value, bytes calldata data, uint8 operation) external returns (bool success);
}
/// @notice One revocable permission: the configured executor may make any CALL
/// from any Safe which enabled this module. Owners revoke with disableModule.
/// No per-order signatures, target lists, spending caps or expiry policies.
contract PlatformExecutor {
struct Call { address to; uint256 value; bytes data; uint8 operation; }
address public immutable executor;
mapping(address => mapping(uint256 => bool)) public used;
error Unauthorized();
error InvalidExecutor();
error AlreadyExecuted();
error CallOnly();
error SafeAdministration();
error Expired();
error ExecutionFailed();
event Executed(address indexed safe, uint256 indexed nonce, bytes32 callsHash);
constructor(address executor_) {
if (executor_ == address(0)) revert InvalidExecutor();
executor = executor_;
}
/// @notice Existing receipt/nonexecution readers share this read-only ABI.
function isNonceUsed(address safe, uint256 nonce) external view returns (bool) {
return used[safe][nonce];
}
/// @dev Nonce is the existing server-issued intent identity, not an order
/// grant. Mark before external calls; a failed batch rolls it back atomically.
function execute(address safe, uint256 nonce, uint256 deadline, Call[] calldata calls) external {
if (msg.sender != executor) revert Unauthorized();
if (block.timestamp > deadline) revert Expired();
if (used[safe][nonce]) revert AlreadyExecuted();
used[safe][nonce] = true;
for (uint256 i; i < calls.length; ++i) {
Call calldata c = calls[i];
if (c.operation != 0) revert CallOnly();
// Financial CALL authority must never become Safe owner/module,
// threshold, guard or fallback-handler administration.
if (c.to == safe) revert SafeAdministration();
if (!IModuleSafe(safe).execTransactionFromModule(c.to, c.value, c.data, 0)) revert ExecutionFailed();
}
emit Executed(safe, nonce, keccak256(abi.encode(calls)));
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "none",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.