Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28207846 | 303 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
LimitedCallsEnforcer
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT AND Apache-2.0
pragma solidity 0.8.23;
import { CaveatEnforcer } from "./CaveatEnforcer.sol";
import { ModeCode } from "../utils/Types.sol";
/**
* @title Limited Calls Enforcer Contract
* @dev This contract extends the CaveatEnforcer contract. It provides functionality to enforce a limit on the number of times a
* delegate may perform transactions on behalf of the delegator.
* @dev This enforcer operates only in default execution mode.
*/
contract LimitedCallsEnforcer is CaveatEnforcer {
////////////////////////////// State //////////////////////////////
mapping(address delegationManager => mapping(bytes32 delegationHash => uint256 count)) public callCounts;
////////////////////////////// Events //////////////////////////////
event IncreasedCount(
address indexed sender, address indexed redeemer, bytes32 indexed delegationHash, uint256 limit, uint256 callCount
);
////////////////////////////// Public Methods //////////////////////////////
/**
* @notice Allows the delegator to specify a maximum number of times the recipient may perform transactions on their behalf.
* @param _terms - The maximum number of times the delegate may perform transactions on their behalf.
* @param _delegationHash - The hash of the delegation being operated on.
* @param _mode The execution mode. (Must be Default execType)
*/
function beforeHook(
bytes calldata _terms,
bytes calldata,
ModeCode _mode,
bytes calldata,
bytes32 _delegationHash,
address,
address _redeemer
)
public
override
onlyDefaultExecutionMode(_mode)
{
uint256 limit_ = getTermsInfo(_terms);
uint256 callCounts_ = ++callCounts[msg.sender][_delegationHash];
require(callCounts_ <= limit_, "LimitedCallsEnforcer:limit-exceeded");
emit IncreasedCount(msg.sender, _redeemer, _delegationHash, limit_, callCounts_);
}
/**
* @notice Decodes the terms used in this CaveatEnforcer.
* @param _terms encoded data that is used during the execution hooks.
* @return limit_ The maximum number of times the delegate may perform transactions on the delegator's behalf.
*/
function getTermsInfo(bytes calldata _terms) public pure returns (uint256 limit_) {
require(_terms.length == 32, "LimitedCallsEnforcer:invalid-terms-length");
limit_ = uint256(bytes32(_terms));
}
}// SPDX-License-Identifier: MIT AND Apache-2.0
pragma solidity 0.8.23;
import { ModeLib } from "@erc7579/lib/ModeLib.sol";
import { ICaveatEnforcer } from "../interfaces/ICaveatEnforcer.sol";
import { ModeCode, ExecType } from "../utils/Types.sol";
import { CALLTYPE_SINGLE, CALLTYPE_BATCH, EXECTYPE_DEFAULT, EXECTYPE_TRY } from "../utils/Constants.sol";
/**
* @title CaveatEnforcer
* @dev This abstract contract enforces caveats before and after the execution of an execution.
*/
abstract contract CaveatEnforcer is ICaveatEnforcer {
using ModeLib for ModeCode;
/// @inheritdoc ICaveatEnforcer
function beforeAllHook(bytes calldata, bytes calldata, ModeCode, bytes calldata, bytes32, address, address) public virtual { }
/// @inheritdoc ICaveatEnforcer
function beforeHook(bytes calldata, bytes calldata, ModeCode, bytes calldata, bytes32, address, address) public virtual { }
/// @inheritdoc ICaveatEnforcer
function afterHook(bytes calldata, bytes calldata, ModeCode, bytes calldata, bytes32, address, address) public virtual { }
/// @inheritdoc ICaveatEnforcer
function afterAllHook(bytes calldata, bytes calldata, ModeCode, bytes calldata, bytes32, address, address) public virtual { }
/**
* @dev Require the function call to be in single call type
*/
modifier onlySingleCallTypeMode(ModeCode _mode) {
{
require(ModeLib.getCallType(_mode) == CALLTYPE_SINGLE, "CaveatEnforcer:invalid-call-type");
}
_;
}
/**
* @dev Require the function call to be in batch call type
*/
modifier onlyBatchCallTypeMode(ModeCode _mode) {
{
require(ModeLib.getCallType(_mode) == CALLTYPE_BATCH, "CaveatEnforcer:invalid-call-type");
}
_;
}
/**
* @dev Require the function call to be in default execution mode
*/
modifier onlyDefaultExecutionMode(ModeCode _mode) {
{
(, ExecType _execType,,) = _mode.decode();
require(_execType == EXECTYPE_DEFAULT, "CaveatEnforcer:invalid-execution-type");
}
_;
}
/**
* @dev Require the function call to be in try execution mode
*/
modifier onlyTryExecutionMode(ModeCode _mode) {
{
(, ExecType _execType,,) = _mode.decode();
require(_execType == EXECTYPE_TRY, "CaveatEnforcer:invalid-execution-type");
}
_;
}
}// SPDX-License-Identifier: MIT AND Apache-2.0
pragma solidity 0.8.23;
import { PackedUserOperation } from "@account-abstraction/interfaces/PackedUserOperation.sol";
import { Execution } from "@erc7579/interfaces/IERC7579Account.sol";
import { ModeCode, CallType, ExecType, ModeSelector, ModePayload } from "@erc7579/lib/ModeLib.sol";
/**
* @title EIP712Domain
* @notice Struct representing the EIP712 domain for signature validation.
*/
struct EIP712Domain {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
/**
* @title Delegation
* @notice Struct representing a delegation to give a delegate authority to act on behalf of a delegator.
* @dev `signature` is ignored during delegation hashing so it can be manipulated post signing.
*/
struct Delegation {
address delegate;
address delegator;
bytes32 authority;
Caveat[] caveats;
uint256 salt;
bytes signature;
}
/**
* @title Caveat
* @notice Struct representing a caveat to enforce on a delegation.
* @dev `args` is ignored during caveat hashing so it can be manipulated post signing.
*/
struct Caveat {
address enforcer;
bytes terms;
bytes args;
}
/**
* @title P256 Public Key
* @notice Struct containing the X and Y coordinates of a P256 public key.
*/
struct P256PublicKey {
uint256 x;
uint256 y;
}
struct DecodedWebAuthnSignature {
uint256 r;
uint256 s;
bytes authenticatorData;
bool requireUserVerification;
string clientDataJSONPrefix;
string clientDataJSONSuffix;
uint256 responseTypeLocation;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
/**
* @title ModeLib
* To allow smart accounts to be very simple, but allow for more complex execution, A custom mode
* encoding is used.
* Function Signature of execute function:
* function execute(ModeCode mode, bytes calldata executionCalldata) external payable;
* This allows for a single bytes32 to be used to encode the execution mode, calltype, execType and
* context.
* NOTE: Simple Account implementations only have to scope for the most significant byte. Account that
* implement
* more complex execution modes may use the entire bytes32.
*
* |--------------------------------------------------------------------|
* | CALLTYPE | EXECTYPE | UNUSED | ModeSelector | ModePayload |
* |--------------------------------------------------------------------|
* | 1 byte | 1 byte | 4 bytes | 4 bytes | 22 bytes |
* |--------------------------------------------------------------------|
*
* CALLTYPE: 1 byte
* CallType is used to determine how the executeCalldata paramter of the execute function has to be
* decoded.
* It can be either single, batch or delegatecall. In the future different calls could be added.
* CALLTYPE can be used by a validation module to determine how to decode <userOp.callData[36:]>.
*
* EXECTYPE: 1 byte
* ExecType is used to determine how the account should handle the execution.
* It can indicate if the execution should revert on failure or continue execution.
* In the future more execution modes may be added.
* Default Behavior (EXECTYPE = 0x00) is to revert on a single failed execution. If one execution in
* a batch fails, the entire batch is reverted
*
* UNUSED: 4 bytes
* Unused bytes are reserved for future use.
*
* ModeSelector: bytes4
* The "optional" mode selector can be used by account vendors, to implement custom behavior in
* their accounts.
* the way a ModeSelector is to be calculated is bytes4(keccak256("vendorname.featurename"))
* this is to prevent collisions between different vendors, while allowing innovation and the
* development of new features without coordination between ERC-7579 implementing accounts
*
* ModePayload: 22 bytes
* Mode payload is used to pass additional data to the smart account execution, this may be
* interpreted depending on the ModeSelector
*
* ExecutionCallData: n bytes
* single, delegatecall or batch exec abi.encoded as bytes
*/
import { Execution } from "../interfaces/IERC7579Account.sol";
// Custom type for improved developer experience
type ModeCode is bytes32;
type CallType is bytes1;
type ExecType is bytes1;
type ModeSelector is bytes4;
type ModePayload is bytes22;
// Default CallType
CallType constant CALLTYPE_SINGLE = CallType.wrap(0x00);
// Batched CallType
CallType constant CALLTYPE_BATCH = CallType.wrap(0x01);
// @dev Implementing delegatecall is OPTIONAL!
// implement delegatecall with extreme care.
CallType constant CALLTYPE_STATIC = CallType.wrap(0xFE);
CallType constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF);
// @dev default behavior is to revert on failure
// To allow very simple accounts to use mode encoding, the default behavior is to revert on failure
// Since this is value 0x00, no additional encoding is required for simple accounts
ExecType constant EXECTYPE_DEFAULT = ExecType.wrap(0x00);
// @dev account may elect to change execution behavior. For example "try exec" / "allow fail"
ExecType constant EXECTYPE_TRY = ExecType.wrap(0x01);
ModeSelector constant MODE_DEFAULT = ModeSelector.wrap(bytes4(0x00000000));
// Example declaration of a custom mode selector
ModeSelector constant MODE_OFFSET = ModeSelector.wrap(bytes4(keccak256("default.mode.offset")));
/**
* @dev ModeLib is a helper library to encode/decode ModeCodes
*/
library ModeLib {
function decode(ModeCode mode)
internal
pure
returns (
CallType _calltype,
ExecType _execType,
ModeSelector _modeSelector,
ModePayload _modePayload
)
{
assembly {
_calltype := mode
_execType := shl(8, mode)
_modeSelector := shl(48, mode)
_modePayload := shl(80, mode)
}
}
function encode(
CallType callType,
ExecType execType,
ModeSelector mode,
ModePayload payload
)
internal
pure
returns (ModeCode)
{
return ModeCode.wrap(
bytes32(
abi.encodePacked(callType, execType, bytes4(0), ModeSelector.unwrap(mode), payload)
)
);
}
function encodeSimpleBatch() internal pure returns (ModeCode mode) {
mode = encode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));
}
function encodeSimpleSingle() internal pure returns (ModeCode mode) {
mode = encode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, ModePayload.wrap(0x00));
}
function getCallType(ModeCode mode) internal pure returns (CallType calltype) {
assembly {
calltype := mode
}
}
}
using { eqModeSelector as == } for ModeSelector global;
using { eqCallType as == } for CallType global;
using { eqExecType as == } for ExecType global;
function eqCallType(CallType a, CallType b) pure returns (bool) {
return CallType.unwrap(a) == CallType.unwrap(b);
}
function eqExecType(ExecType a, ExecType b) pure returns (bool) {
return ExecType.unwrap(a) == ExecType.unwrap(b);
}
function eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) {
return ModeSelector.unwrap(a) == ModeSelector.unwrap(b);
}// SPDX-License-Identifier: MIT AND Apache-2.0
pragma solidity 0.8.23;
import { ModeCode } from "../utils/Types.sol";
/**
* @title CaveatEnforcer
* @notice This is an abstract contract that exposes pre and post Execution hooks during delegation redemption.
* @dev Hooks can be used to enforce conditions before and after an Execution is performed.
* @dev Reverting during the hooks will revert the entire delegation redemption.
* @dev Child contracts can implement the beforeAllHook, beforeHook, afterAllHook, afterHook methods.
* @dev NOTE: There is no guarantee that the Execution is performed. If you are relying on the execution then
* be sure to use the `afterHook` or `afterAllHook` methods to validate any required conditions.
*/
interface ICaveatEnforcer {
/**
* @notice Enforces conditions before any actions in a batch redemption process begin.
* @dev This function MUST revert if the conditions are not met.
* @param _terms The terms to enforce set by the delegator.
* @param _args An optional input parameter set by the redeemer at time of invocation.
* @param _mode The mode of execution for the executionCalldata.
* @param _executionCalldata The data representing the execution.
* @param _delegationHash The hash of the delegation.
* @param _delegator The address of the delegator.
* @param _redeemer The address that is redeeming the delegation.
*/
function beforeAllHook(
bytes calldata _terms,
bytes calldata _args,
ModeCode _mode,
bytes calldata _executionCalldata,
bytes32 _delegationHash,
address _delegator,
address _redeemer
)
external;
/**
* @notice Enforces conditions before the execution tied to a specific delegation in the redemption process.
* @dev This function MUST revert if the conditions are not met.
* @param _terms The terms to enforce set by the delegator.
* @param _args An optional input parameter set by the redeemer at time of invocation.
* @param _mode The mode of execution for the executionCalldata.
* @param _executionCalldata The data representing the execution.
* @param _delegationHash The hash of the delegation.
* @param _delegator The address of the delegator.
* @param _redeemer The address that is redeeming the delegation.
*/
function beforeHook(
bytes calldata _terms,
bytes calldata _args,
ModeCode _mode,
bytes calldata _executionCalldata,
bytes32 _delegationHash,
address _delegator,
address _redeemer
)
external;
/**
* @notice Enforces conditions after the execution tied to a specific delegation in the redemption process.
* @dev This function MUST revert if the conditions are not met.
* @param _terms The terms to enforce set by the delegator.
* @param _args An optional input parameter set by the redeemer at time of invocation.
* @param _mode The mode of execution for the executionCalldata.
* @param _executionCalldata The data representing the execution.
* @param _delegationHash The hash of the delegation.
* @param _delegator The address of the delegator.
* @param _redeemer The address that is redeeming the delegation.
*/
function afterHook(
bytes calldata _terms,
bytes calldata _args,
ModeCode _mode,
bytes calldata _executionCalldata,
bytes32 _delegationHash,
address _delegator,
address _redeemer
)
external;
/**
* @notice Enforces conditions after all actions in a batch redemption process have been executed.
* @dev This function MUST revert if the conditions are not met.
* @param _terms The terms to enforce set by the delegator.
* @param _args An optional input parameter set by the redeemer at time of invocation.
* @param _mode The mode of execution for the executionCalldata.
* @param _executionCalldata The data representing the execution.
* @param _delegationHash The hash of the delegation.
* @param _delegator The address of the delegator.
* @param _redeemer The address that is redeeming the delegation.
*/
function afterAllHook(
bytes calldata _terms,
bytes calldata _args,
ModeCode _mode,
bytes calldata _executionCalldata,
bytes32 _delegationHash,
address _delegator,
address _redeemer
)
external;
}// SPDX-License-Identifier: MIT AND Apache-2.0
pragma solidity 0.8.23;
import {
CALLTYPE_SINGLE, CALLTYPE_BATCH, EXECTYPE_DEFAULT, EXECTYPE_TRY, MODE_DEFAULT, MODE_OFFSET
} from "@erc7579/lib/ModeLib.sol";
bytes32 constant EIP712_DOMAIN_TYPEHASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
// NOTE: signature is omitted from the Delegation typehash
bytes32 constant DELEGATION_TYPEHASH = keccak256(
"Delegation(address delegate,address delegator,bytes32 authority,Caveat[] caveats,uint256 salt)Caveat(address enforcer,bytes terms)"
);
bytes32 constant CAVEAT_TYPEHASH = keccak256("Caveat(address enforcer,bytes terms)");// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.5;
/**
* User Operation struct
* @param sender - The sender account of this request.
* @param nonce - Unique value the sender uses to verify it is not a replay.
* @param initCode - If set, the account contract will be created by this constructor/
* @param callData - The method call to execute on this account.
* @param accountGasLimits - Packed gas limits for validateUserOp and gas limit passed to the callData method call.
* @param preVerificationGas - Gas not calculated by the handleOps method, but added to the gas paid.
* Covers batch overhead.
* @param gasFees - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.
* @param paymasterAndData - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data
* The paymaster will pay for the transaction instead of the sender.
* @param signature - Sender-verified signature over the entire request, the EntryPoint address and the chain ID.
*/
struct PackedUserOperation {
address sender;
uint256 nonce;
bytes initCode;
bytes callData;
bytes32 accountGasLimits;
uint256 preVerificationGas;
bytes32 gasFees;
bytes paymasterAndData;
bytes signature;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import { CallType, ExecType, ModeCode } from "../lib/ModeLib.sol";
struct Execution {
address target;
uint256 value;
bytes callData;
}
interface IERC7579Account {
event ModuleInstalled(uint256 moduleTypeId, address module);
event ModuleUninstalled(uint256 moduleTypeId, address module);
/**
* @dev Executes a transaction on behalf of the account.
* This function is intended to be called by ERC-4337 EntryPoint.sol
* @dev Ensure adequate authorization control: i.e. onlyEntryPointOrSelf
*
* @dev MSA MUST implement this function signature.
* If a mode is requested that is not supported by the Account, it MUST revert
* @param mode The encoded execution mode of the transaction. See ModeLib.sol for details
* @param executionCalldata The encoded execution call data
*/
function execute(ModeCode mode, bytes calldata executionCalldata) external payable;
/**
* @dev Executes a transaction on behalf of the account.
* This function is intended to be called by Executor Modules
* @dev Ensure adequate authorization control: i.e. onlyExecutorModule
*
* @dev MSA MUST implement this function signature.
* If a mode is requested that is not supported by the Account, it MUST revert
* @param mode The encoded execution mode of the transaction. See ModeLib.sol for details
* @param executionCalldata The encoded execution call data
*/
function executeFromExecutor(
ModeCode mode,
bytes calldata executionCalldata
)
external
payable
returns (bytes[] memory returnData);
/**
* @dev ERC-1271 isValidSignature
* This function is intended to be used to validate a smart account signature
* and may forward the call to a validator module
*
* @param hash The hash of the data that is signed
* @param data The data that is signed
*/
function isValidSignature(bytes32 hash, bytes calldata data) external view returns (bytes4);
/**
* @dev installs a Module of a certain type on the smart account
* @dev Implement Authorization control of your chosing
* @param moduleTypeId the module type ID according the ERC-7579 spec
* @param module the module address
* @param initData arbitrary data that may be required on the module during `onInstall`
* initialization.
*/
function installModule(
uint256 moduleTypeId,
address module,
bytes calldata initData
)
external
payable;
/**
* @dev uninstalls a Module of a certain type on the smart account
* @dev Implement Authorization control of your chosing
* @param moduleTypeId the module type ID according the ERC-7579 spec
* @param module the module address
* @param deInitData arbitrary data that may be required on the module during `onUninstall`
* de-initialization.
*/
function uninstallModule(
uint256 moduleTypeId,
address module,
bytes calldata deInitData
)
external
payable;
/**
* Function to check if the account supports a certain CallType or ExecType (see ModeLib.sol)
* @param encodedMode the encoded mode
*/
function supportsExecutionMode(ModeCode encodedMode) external view returns (bool);
/**
* Function to check if the account supports installation of a certain module type Id
* @param moduleTypeId the module type ID according the ERC-7579 spec
*/
function supportsModule(uint256 moduleTypeId) external view returns (bool);
/**
* Function to check if the account has a certain module installed
* @param moduleTypeId the module type ID according the ERC-7579 spec
* Note: keep in mind that some contracts can be multiple module types at the same time. It
* thus may be necessary to query multiple module types
* @param module the module address
* @param additionalContext additional context data that the smart account may interpret to
* identifiy conditions under which the module is installed.
* usually this is not necessary, but for some special hooks that
* are stored in mappings, this param might be needed
*/
function isModuleInstalled(
uint256 moduleTypeId,
address module,
bytes calldata additionalContext
)
external
view
returns (bool);
/**
* @dev Returns the account id of the smart account
* @return accountImplementationId the account id of the smart account
* the accountId should be structured like so:
* "vendorname.accountname.semver"
*/
function accountId() external view returns (string memory accountImplementationId);
}{
"remappings": [
"@account-abstraction/=lib/account-abstraction/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-upgradable-contracts/contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"@solidity-stringutils/=lib/solidity-stringutils/src/",
"@bytes-utils/=lib/solidity-bytes-utils/contracts/",
"@FCL/=lib/FCL/solidity/src/",
"@erc7579/=lib/erc7579-implementation/src/",
"@SCL/=lib/SCL/src/",
"@solidity/=lib/SCL/src/",
"FCL/=lib/FCL/solidity/src/",
"FreshCryptoLib/=lib/FreshCryptoLib/solidity/src/",
"SCL/=lib/SCL/",
"account-abstraction/=lib/account-abstraction/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"erc7579-implementation/=lib/erc7579-implementation/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"sentinellist/=lib/erc7579-implementation/node_modules/@rhinestone/sentinellist/src/",
"solady/=lib/erc7579-implementation/node_modules/solady/src/",
"solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/",
"solidity-stringutils/=lib/solidity-stringutils/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"redeemer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"delegationHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"callCount","type":"uint256"}],"name":"IncreasedCount","type":"event"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"ModeCode","name":"","type":"bytes32"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"afterAllHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"ModeCode","name":"","type":"bytes32"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"afterHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"ModeCode","name":"","type":"bytes32"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"beforeAllHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_terms","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"ModeCode","name":"_mode","type":"bytes32"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes32","name":"_delegationHash","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"_redeemer","type":"address"}],"name":"beforeHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegationManager","type":"address"},{"internalType":"bytes32","name":"delegationHash","type":"bytes32"}],"name":"callCounts","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_terms","type":"bytes"}],"name":"getTermsInfo","outputs":[{"internalType":"uint256","name":"limit_","type":"uint256"}],"stateMutability":"pure","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506104e9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806319054d8914610067578063414c3e33146100a1578063a145832a146100bd578063b99deb0e146100d0578063d3eddcc5146100a1578063ed463367146100a1575b600080fd5b61008f6100753660046102ec565b600060208181529281526040808220909352908152205481565b60405190815260200160405180910390f35b6100bb6100af36600461035f565b50505050505050505050565b005b6100bb6100cb36600461035f565b6100e3565b61008f6100de36600461042c565b610244565b85600881901b6100f48160006102b9565b6101535760405162461bcd60e51b815260206004820152602560248201527f436176656174456e666f726365723a696e76616c69642d657865637574696f6e6044820152642d7479706560d81b60648201526084015b60405180910390fd5b5060006101608c8c610244565b33600090815260208181526040808320898452909152812080549293509091829061018a9061046e565b91829055509050818111156101ed5760405162461bcd60e51b815260206004820152602360248201527f4c696d6974656443616c6c73456e666f726365723a6c696d69742d657863656560448201526219195960ea1b606482015260840161014a565b604080518381526020810183905287916001600160a01b0387169133917f449da07f2c06c9d1a6b19d2454ffe749e8cf991d22f686e076a1a4844c5ff370910160405180910390a450505050505050505050505050565b6000602082146102a85760405162461bcd60e51b815260206004820152602960248201527f4c696d6974656443616c6c73456e666f726365723a696e76616c69642d7465726044820152680dae65ad8cadccee8d60bb1b606482015260840161014a565b6102b28284610495565b9392505050565b6001600160f81b0319828116908216145b92915050565b80356001600160a01b03811681146102e757600080fd5b919050565b600080604083850312156102ff57600080fd5b610308836102d0565b946020939093013593505050565b60008083601f84011261032857600080fd5b50813567ffffffffffffffff81111561034057600080fd5b60208301915083602082850101111561035857600080fd5b9250929050565b60008060008060008060008060008060e08b8d03121561037e57600080fd5b8a3567ffffffffffffffff8082111561039657600080fd5b6103a28e838f01610316565b909c509a5060208d01359150808211156103bb57600080fd5b6103c78e838f01610316565b909a50985060408d0135975060608d01359150808211156103e757600080fd5b506103f48d828e01610316565b90965094505060808b0135925061040d60a08c016102d0565b915061041b60c08c016102d0565b90509295989b9194979a5092959850565b6000806020838503121561043f57600080fd5b823567ffffffffffffffff81111561045657600080fd5b61046285828601610316565b90969095509350505050565b60006001820161048e57634e487b7160e01b600052601160045260246000fd5b5060010190565b803560208310156102ca57600019602084900360031b1b169291505056fea26469706673582212202c3f46b0859baa05ad68ac999840f0730e6a8b3553b600a51784470af7b87c1d64736f6c63430008170033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c806319054d8914610067578063414c3e33146100a1578063a145832a146100bd578063b99deb0e146100d0578063d3eddcc5146100a1578063ed463367146100a1575b600080fd5b61008f6100753660046102ec565b600060208181529281526040808220909352908152205481565b60405190815260200160405180910390f35b6100bb6100af36600461035f565b50505050505050505050565b005b6100bb6100cb36600461035f565b6100e3565b61008f6100de36600461042c565b610244565b85600881901b6100f48160006102b9565b6101535760405162461bcd60e51b815260206004820152602560248201527f436176656174456e666f726365723a696e76616c69642d657865637574696f6e6044820152642d7479706560d81b60648201526084015b60405180910390fd5b5060006101608c8c610244565b33600090815260208181526040808320898452909152812080549293509091829061018a9061046e565b91829055509050818111156101ed5760405162461bcd60e51b815260206004820152602360248201527f4c696d6974656443616c6c73456e666f726365723a6c696d69742d657863656560448201526219195960ea1b606482015260840161014a565b604080518381526020810183905287916001600160a01b0387169133917f449da07f2c06c9d1a6b19d2454ffe749e8cf991d22f686e076a1a4844c5ff370910160405180910390a450505050505050505050505050565b6000602082146102a85760405162461bcd60e51b815260206004820152602960248201527f4c696d6974656443616c6c73456e666f726365723a696e76616c69642d7465726044820152680dae65ad8cadccee8d60bb1b606482015260840161014a565b6102b28284610495565b9392505050565b6001600160f81b0319828116908216145b92915050565b80356001600160a01b03811681146102e757600080fd5b919050565b600080604083850312156102ff57600080fd5b610308836102d0565b946020939093013593505050565b60008083601f84011261032857600080fd5b50813567ffffffffffffffff81111561034057600080fd5b60208301915083602082850101111561035857600080fd5b9250929050565b60008060008060008060008060008060e08b8d03121561037e57600080fd5b8a3567ffffffffffffffff8082111561039657600080fd5b6103a28e838f01610316565b909c509a5060208d01359150808211156103bb57600080fd5b6103c78e838f01610316565b909a50985060408d0135975060608d01359150808211156103e757600080fd5b506103f48d828e01610316565b90965094505060808b0135925061040d60a08c016102d0565b915061041b60c08c016102d0565b90509295989b9194979a5092959850565b6000806020838503121561043f57600080fd5b823567ffffffffffffffff81111561045657600080fd5b61046285828601610316565b90969095509350505050565b60006001820161048e57634e487b7160e01b600052601160045260246000fd5b5060010190565b803560208310156102ca57600019602084900360031b1b169291505056fea26469706673582212202c3f46b0859baa05ad68ac999840f0730e6a8b3553b600a51784470af7b87c1d64736f6c63430008170033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.