Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x30891995b7aD3d4d38D16E14EE91B57372C091d2
Balance 0 ETH
Nonce 1
Code Size 1461 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1461 bytes
0x608060405234801561000f575f80fd5b5060043610610064575f3560e01c80633e28391d1161004d5780633e28391d14610090578063c7c8427e146100e2578063f208d989146100f5575f80fd5b80630e9b55f114610068578063287399ff1461007d575b5f80fd5b61007b610076366004610355565b61012a565b005b61007b61008b3660046103b1565b6101ed565b6100cd61009e3660046103fc565b6001600160a01b03163f7f749146a2b6ed1ded54cf1fe86a6e1da845bd22c8bd2403a351d813b938dedb4a1490565b60405190151581526020015b60405180910390f35b61007b6100f036600461041c565b6102ac565b61011c7f749146a2b6ed1ded54cf1fe86a6e1da845bd22c8bd2403a351d813b938dedb4a81565b6040519081526020016100d9565b7f749146a2b6ed1ded54cf1fe86a6e1da845bd22c8bd2403a351d813b938dedb4a836001600160a01b03163f146101745760405163a7e874f360e01b815260040160405180910390fd5b6040517fde9013ac0000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063de9013ac906101bb9085908590600401610497565b5f604051808303815f87803b1580156101d2575f80fd5b505af11580156101e4573d5f803e3d5ffd5b50505050505050565b7f749146a2b6ed1ded54cf1fe86a6e1da845bd22c8bd2403a351d813b938dedb4a826001600160a01b03163f146102375760405163a7e874f360e01b815260040160405180910390fd5b604080516060810182525f8082526020820181905281830152905163ee264b7b60e01b81526001600160a01b0384169163ee264b7b9161027b91859160040161055b565b5f604051808303815f87803b158015610292575f80fd5b505af11580156102a4573d5f803e3d5ffd5b505050505050565b7f749146a2b6ed1ded54cf1fe86a6e1da845bd22c8bd2403a351d813b938dedb4a836001600160a01b03163f146102f65760405163a7e874f360e01b815260040160405180910390fd5b60405163ee264b7b60e01b81526001600160a01b0384169063ee264b7b906101bb9085908590600401610594565b80356001600160a01b038116811461033a575f80fd5b919050565b5f6060828403121561034f575f80fd5b50919050565b5f805f83850360a0811215610368575f80fd5b61037185610324565b93506020601f1982011215610384575f80fd5b50602084019150610398856040860161033f565b90509250925092565b5f6080828403121561034f575f80fd5b5f80604083850312156103c2575f80fd5b6103cb83610324565b9150602083013567ffffffffffffffff8111156103e6575f80fd5b6103f2858286016103a1565b9150509250929050565b5f6020828403121561040c575f80fd5b61041582610324565b9392505050565b5f805f60a0848603121561042e575f80fd5b61043784610324565b9250602084013567ffffffffffffffff811115610452575f80fd5b61045e868287016103a1565b925050610398856040860161033f565b803560ff811680821461047f575f80fd5b83525060208181013590830152604090810135910152565b8235815260808101610415602083018461046e565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b80358252602080820135908301525f6001600160a01b036104f760408401610324565b1660408401526060820135601e19833603018112610513575f80fd5b820160208101903567ffffffffffffffff81111561052f575f80fd5b80360382131561053d575f80fd5b608060608601526105526080860182846104ac565b95945050505050565b608081525f61056d60808301856104d4565b905060ff835116602083015260208301516040830152604083015160608301529392505050565b608081525f6105a660808301856104d4565b9050610415602083018461046e56

Verified Source Code Partial Match

Compiler: v0.8.26+commit.8a97fa7a EVM: cancun Optimization: Yes (1000 runs)
Gateway.sol 66 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

import {Constants} from "../libraries/Constants.sol";
import {InstructionLib} from "../libraries/Instruction.sol";

import {IGateway} from "./interfaces/IGateway.sol";
import {IOtimDelegate} from "../IOtimDelegate.sol";

/// @title Gateway
/// @author Otim Labs, Inc.
/// @notice a helper contract that protects the Otim Executor from delegation front-running attacks
contract Gateway is IGateway {
    /// @notice hash of the "delegation designator" i.e. keccak256(0xef0100 || delegate_address)
    bytes32 public immutable designatorHash;

    constructor() {
        designatorHash = keccak256(abi.encodePacked(Constants.EIP7702_PREFIX, msg.sender));
    }

    /// @inheritdoc IGateway
    function isDelegated(address target) external view override returns (bool) {
        return target.codehash == designatorHash;
    }

    /// @inheritdoc IGateway
    function safeExecuteInstruction(
        address target,
        InstructionLib.Instruction calldata instruction,
        InstructionLib.Signature calldata signature
    ) external {
        // revert if the target is not delegated to OtimDelegate at runtime
        if (target.codehash != designatorHash) {
            revert TargetNotDelegated();
        }

        // execute the Instruction on the target account
        IOtimDelegate(target).executeInstruction(instruction, signature);
    }

    /// @inheritdoc IGateway
    function safeExecuteInstruction(address target, InstructionLib.Instruction calldata instruction) external {
        // revert if the target is not delegated to OtimDelegate at runtime
        if (target.codehash != designatorHash) {
            revert TargetNotDelegated();
        }

        // execute the Instruction on the target account with no signature
        IOtimDelegate(target).executeInstruction(instruction, InstructionLib.Signature(0, 0, 0));
    }

    /// @inheritdoc IGateway
    function safeDeactivateInstruction(
        address target,
        InstructionLib.InstructionDeactivation calldata deactivation,
        InstructionLib.Signature calldata signature
    ) external {
        // revert if the target is not delegated to OtimDelegate at runtime
        if (target.codehash != designatorHash) {
            revert TargetNotDelegated();
        }

        // execute the Instruction on the target account
        IOtimDelegate(target).deactivateInstruction(deactivation, signature);
    }
}
Constants.sol 13 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

/// @title Constants
/// @author Otim Labs, Inc.
/// @notice a library defining constants used throughout the protocol
library Constants {
    /// @notice the EIP-712 signature prefix
    bytes2 public constant EIP712_PREFIX = 0x1901;

    /// @notice the EIP-7702 delegation designator prefix
    bytes3 public constant EIP7702_PREFIX = 0xef0100;
}
Instruction.sol 99 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

import {Constants} from "./Constants.sol";

/// @title InstructionLib
/// @author Otim Labs, Inc.
/// @notice a library defining the Instruction datatype and util functions
library InstructionLib {
    /// @notice defines a signature
    struct Signature {
        uint8 v;
        bytes32 r;
        bytes32 s;
    }

    /// @notice defines the ExecutionState datatype
    /// @param deactivated - whether the Instruction has been deactivated
    /// @param executionCount - the number of times the Instruction has been executed
    /// @param lastExecuted - the unix timestamp of the last time the Instruction was executed
    struct ExecutionState {
        bool deactivated;
        uint120 executionCount;
        uint120 lastExecuted;
    }

    /// @notice defines the Instruction datatype
    /// @param salt - a number to ensure the uniqueness of the Instruction
    /// @param maxExecutions - the maximum number of times the Instruction can be executed
    /// @param action - the address of the Action contract to be executed
    /// @param arguments - the arguments to be passed to the Action contract
    struct Instruction {
        uint256 salt;
        uint256 maxExecutions;
        address action;
        bytes arguments;
    }

    /// @notice abi.encodes and hashes an Instruction struct to create a unique Instruction identifier
    /// @param instruction - an Instruction struct to hash
    /// @return instructionId - unique identifier for the Instruction
    function id(Instruction calldata instruction) internal pure returns (bytes32) {
        return keccak256(abi.encode(instruction));
    }

    /// @notice calculates the EIP-712 hash for activating an Instruction
    /// @param instruction - an Instruction struct to hash
    /// @param domainSeparator - the EIP-712 domain separator for the verifying contract
    /// @return hash - EIP-712 hash for activating `instruction`
    function signingHash(
        Instruction calldata instruction,
        bytes32 domainSeparator,
        bytes32 instructionTypeHash,
        bytes32 argumentsHash
    ) internal pure returns (bytes32) {
        return keccak256(
            abi.encodePacked(
                Constants.EIP712_PREFIX,
                domainSeparator,
                keccak256(
                    abi.encode(
                        instructionTypeHash,
                        instruction.salt,
                        instruction.maxExecutions,
                        instruction.action,
                        argumentsHash
                    )
                )
            )
        );
    }

    /// @notice defines a deactivation instruction
    /// @param instructionId - the unique identifier of the Instruction to deactivate
    struct InstructionDeactivation {
        bytes32 instructionId;
    }

    /// @notice the EIP-712 type-hash for an InstructionDeactivation
    bytes32 public constant DEACTIVATION_TYPEHASH = keccak256("InstructionDeactivation(bytes32 instructionId)");

    /// @notice calculates the EIP-712 hash for a InstructionDeactivation
    /// @param deactivation - an InstructionDeactivation struct to hash
    /// @param domainSeparator - the EIP-712 domain separator for the verifying contract
    /// @return hash - EIP-712 hash for the `deactivation`
    function signingHash(InstructionDeactivation calldata deactivation, bytes32 domainSeparator)
        internal
        pure
        returns (bytes32)
    {
        return keccak256(
            abi.encodePacked(
                Constants.EIP712_PREFIX,
                domainSeparator,
                keccak256(abi.encode(DEACTIVATION_TYPEHASH, deactivation.instructionId))
            )
        );
    }
}
IGateway.sol 42 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

import {InstructionLib} from "../../libraries/Instruction.sol";

/// @title IGateway
/// @author Otim Labs, Inc.
/// @notice interface for the Gateway contract
interface IGateway {
    error TargetNotDelegated();

    /// @notice checks if the target address is delegated to OtimDelegate
    /// @param target - the target address to check
    /// @return delegated - if the target address is delegated to OtimDelegate
    function isDelegated(address target) external view returns (bool);

    /// @notice executes an Instruction on the target address if it is delegated to OtimDelegate
    /// @param target - the target account to execute the Instruction on
    /// @param instruction - the Instruction to execute
    /// @param signature - the Signature over the Instruction signing hash
    function safeExecuteInstruction(
        address target,
        InstructionLib.Instruction calldata instruction,
        InstructionLib.Signature calldata signature
    ) external;

    /// @notice executes an Instruction on the target address if it is delegated to OtimDelegate
    /// @dev After the first execution of an Instruction, the Signature is no longer checked, so we can omit the Signature in this case
    /// @param target - the target account to execute the Instruction on
    /// @param instruction - the Instruction to execute
    function safeExecuteInstruction(address target, InstructionLib.Instruction calldata instruction) external;

    /// @notice deactivates an Instruction on the target address if it is delegated to OtimDelegate
    /// @param target - the target account to deactivate the Instruction on
    /// @param deactivation - the InstructionDeactivation
    /// @param signature - the Signature over the InstructionDeactivation signing hash
    function safeDeactivateInstruction(
        address target,
        InstructionLib.InstructionDeactivation calldata deactivation,
        InstructionLib.Signature calldata signature
    ) external;
}
IOtimDelegate.sol 50 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

import {IERC165} from "@openzeppelin-contracts/utils/introspection/IERC165.sol";
import {IERC721Receiver} from "@openzeppelin-contracts/token/ERC721/IERC721Receiver.sol";
import {IERC1155Receiver} from "@openzeppelin-contracts/token/ERC1155/IERC1155Receiver.sol";
import {IERC1271} from "@openzeppelin-contracts/interfaces/IERC1271.sol";

import {IGateway} from "./core/interfaces/IGateway.sol";
import {IInstructionStorage} from "./core/interfaces/IInstructionStorage.sol";
import {IActionManager} from "./core/interfaces/IActionManager.sol";

import {InstructionLib} from "./libraries/Instruction.sol";

/// @title IOtimDelegate
/// @author Otim Labs, Inc.
/// @notice interface for OtimDelegate contract
interface IOtimDelegate is IERC165, IERC721Receiver, IERC1155Receiver, IERC1271 {
    /// @notice emitted when an Instruction is executed on behalf of a user
    event InstructionExecuted(bytes32 indexed instructionId, uint256 executionCount);
    /// @notice emitted when an Instruction is deactivated by the user before its natural completion
    event InstructionDeactivated(bytes32 indexed instructionId);

    error InvalidSignature(bytes32 instructionId);
    error ActionNotExecutable(bytes32 instructionId);
    error ActionExecutionFailed(bytes32 instructionId, bytes result);
    error ExecutionSameBlock(bytes32 instructionId);
    error InstructionAlreadyDeactivated(bytes32 instructionId);

    function gateway() external view returns (IGateway);
    function instructionStorage() external view returns (IInstructionStorage);
    function actionManager() external view returns (IActionManager);

    /// @notice execute an Instruction
    /// @dev the first execution "activates" the Instruction, subsequent calls ignore signature
    /// @param instruction - a conditional or scheduled recurring task to be carried out on behalf of the user
    /// @param signature - user signature over the Instruction activation hash
    function executeInstruction(
        InstructionLib.Instruction calldata instruction,
        InstructionLib.Signature calldata signature
    ) external;

    /// @notice deactivate an Instruction
    /// @param deactivation - a InstructionDeactivation struct
    /// @param signature - user signature over the Instruction deactivation hash
    function deactivateInstruction(
        InstructionLib.InstructionDeactivation calldata deactivation,
        InstructionLib.Signature calldata signature
    ) external;
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
IERC721Receiver.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @title ERC-721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC-721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}
IERC1155Receiver.sol 59 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC-1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC-1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}
IERC1271.sol 17 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC1271.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with `hash`
     */
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}
IInstructionStorage.sol 42 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

import {InstructionLib} from "../../libraries/Instruction.sol";

/// @title IInstructionStorage
/// @author Otim Labs, Inc.
/// @notice interface for InstructionStorage contract
interface IInstructionStorage {
    error DataCorruptionAttempted();

    /// @notice increments the execution counter for an Instruction and sets `lastExecuted` to current block.timestamp
    /// @param instructionId - unique identifier for an Instruction
    function incrementExecutionCounter(bytes32 instructionId) external;

    /// @notice increments the execution counter for an Instruction, sets `lastExecuted` to current block.timestamp, and deactivates
    /// @param instructionId - unique identifier for an Instruction
    function incrementAndDeactivate(bytes32 instructionId) external;

    /// @notice deactivates an Instruction's execution state in storage
    /// @param instructionId - unique identifier for an Instruction
    function deactivateStorage(bytes32 instructionId) external;

    /// @notice returns the execution state of an Instruction for a particular user
    /// @param user - the user the Instruction pertains to
    /// @param instructionId - unique identifier for an Instruction
    /// @return executionState - the current execution state of the Instruction
    function getExecutionState(address user, bytes32 instructionId)
        external
        view
        returns (InstructionLib.ExecutionState memory);

    /// @notice returns the execution state of an Instruction for msg.sender
    /// @param instructionId - unique identifier for an Instruction
    /// @return executionState - the current execution state of the Instruction
    function getExecutionState(bytes32 instructionId) external view returns (InstructionLib.ExecutionState memory);

    /// @notice checks if an Instruction is deactivated for msg.sender
    /// @param instructionId - unique identifier for an Instruction
    /// @return deactivated - true if the Instruction is deactivated
    function isDeactivated(bytes32 instructionId) external view returns (bool);
}
IActionManager.sol 26 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;

/// @title IActionManager
/// @author Otim Labs, Inc.
/// @notice interface for ActionManager contract
interface IActionManager {
    /// @notice emitted when an Action is added
    event ActionAdded(address indexed action);
    /// @notice emitted when an Action is removed
    event ActionRemoved(address indexed action);
    /// @notice emitted when all Actions are globally locked
    event ActionsGloballyLocked();
    /// @notice emitted when all Actions are globally unlocked
    event ActionsGloballyUnlocked();

    error AlreadyAdded();
    error AlreadyRemoved();
    error AlreadyLocked();
    error AlreadyUnlocked();

    /// @notice returns Action metadata
    /// @param action - the address of the Action
    /// @return executable - true if the Action exists and is not locked
    function isExecutable(address action) external view returns (bool);
}
IERC1271.sol 17 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1271.sol)

pragma solidity >=0.5.0;

/**
 * @dev Interface of the ERC-1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with `hash`
     */
    function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);
}
IERC1155Receiver.sol 59 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity >=0.6.2;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC-1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC-1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}
IERC721Receiver.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity >=0.5.0;

/**
 * @title ERC-721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC-721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Read Contract

designatorHash 0xf208d989 → bytes32
isDelegated 0x3e28391d → bool

Write Contract 3 functions

These functions modify contract state and require a wallet transaction to execute.

safeDeactivateInstruction 0xd55d2143
address target
tuple deactivation
tuple signature
safeExecuteInstruction 0x9d519838
address target
tuple instruction
safeExecuteInstruction 0x4f6efdd8
address target
tuple instruction
tuple signature

Recent Transactions

No transactions found for this address