S Price: $0.06735 (+2.47%)
Gas: 55 Gwei

Contract

0x1967afaBb05b535a7b2fa54ddF75f74fcA8f8A58

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Reserve

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 99999999 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

import { IERC20 } from "openzeppelin/token/ERC20/IERC20.sol";
import { SafeERC20 } from "openzeppelin/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "openzeppelin/access/Ownable.sol";
import { Ownable2Step } from "openzeppelin/access/Ownable2Step.sol";
import { Pausable } from "openzeppelin/utils/Pausable.sol";

/// @title Reserve Contract
/// @notice Contract holding a reserve of token to be dripped periodically based on the total held balance.
contract Reserve is Ownable2Step, Pausable {
    using SafeERC20 for IERC20;

    /** @notice Max BPS value : 100%  */
    uint256 private constant MAX_BPS = 10000;

    /** @notice Duration of a period  */
    uint256 private constant PERIOD_DURATION = 1 weeks;
    
    /** @notice BPS value of the total balance to drip each period  */
    uint256 public dripBps = 50;

    /** @notice Timestamp of the next period to drip  */
    uint256 public nextDripPeriod;

    /** @notice ERC20 contract of the token to drip  */
    IERC20 public immutable dripToken;

    /** @notice Address to receive the dripped tokens  */
    address public receiver;

    /** @notice Tracking of already distributed periods  */
    mapping(uint256 => bool) public periodDripDistributed;

    /** @notice Event emitted when a period drips tokens  */
    event Drip(uint256 period, uint256 amount);
    /** @notice Event emitted when the receiver address is updated  */
    event ReceiverUpdated(address oldReceiver, address newReceiver);
    /** @notice Event emitted when the drip BPS value is updated  */
    event DripBpsUpdated(uint256 oldDripBps, uint256 newDripBps);

    /** @notice Error raised if the given parameters are invalid  */
    error InvalidParameter();

    constructor(address _token, address _receiver) Ownable(msg.sender) {
        dripToken = IERC20(_token);
        receiver = _receiver;

        nextDripPeriod = _getCurrentPeriod() + PERIOD_DURATION;
        periodDripDistributed[_getCurrentPeriod()] = true;
    }

    /**
     * @notice Get the current period based on the block timestamp.
     * @return uint256 : Current period timestamp
     */
    function getCurrentPeriod() external view returns (uint256) {
        return _getCurrentPeriod();
    }

    /**
     * @dev Get the current period based on the block timestamp.
     * @return uint256 : Current period timestamp
     */
    function _getCurrentPeriod() internal view returns (uint256) {
        return (block.timestamp / PERIOD_DURATION) * PERIOD_DURATION;
    }

    /**
     * @notice Drip tokens to the receiver based on the total balance held in the contract.
     */
    function drip() external whenNotPaused {
        uint256 period = nextDripPeriod;
        uint256 currentPeriod = _getCurrentPeriod();
        // Check if there is period to drip based on current period
        if(currentPeriod < period) return;
        
        // For all periods to cover, drip tokens
        while(period <= currentPeriod) {
            _distributeDrip(period);
            period += PERIOD_DURATION;
        }
        
        nextDripPeriod = period;
    }

    /**
     * @dev Distribute the drip for a specific period.
     * @param period The period to distribute the drip for
     */
    function _distributeDrip(uint256 period) internal {
        // Skip if the period has already been distributed
        if(periodDripDistributed[period]) return;

        periodDripDistributed[period] = true;

        uint256 currentBalance = dripToken.balanceOf(address(this));
        if(currentBalance == 0) return;

        // Calculate the amount to drip based on the BPS value
        uint256 amount = (currentBalance * dripBps) / MAX_BPS;
        dripToken.safeTransfer(receiver, amount);

        emit Drip(period, amount);
    }

    /**
     * @notice Pause the contract
     */
    function pause() external onlyOwner {
        _pause();
    }

    /**
     * @notice Unpause the contract
     */
    function unpause() external onlyOwner {
        _unpause();
    }

    /**
     * @notice Update the receiver address
     * @param _receiver The new receiver address
     */
    function updateReceiver(address _receiver) external onlyOwner {
        if(_receiver == address(0)) revert InvalidParameter();

        address oldReceiver = receiver;
        receiver = _receiver;

        emit ReceiverUpdated(oldReceiver, _receiver);
    }

    /**
     * @notice Update the drip BPS value
     * @param _dripBps The new drip BPS value
     */
    function updateDripBps(uint256 _dripBps) external onlyOwner {
        if(_dripBps > MAX_BPS / 2) revert InvalidParameter();

        uint256 oldDripBps = dripBps;
        dripBps = _dripBps;

        emit DripBpsUpdated(oldDripBps, _dripBps);
    }

    /**
     * @notice Pull tokens sent to this contract
     * @param token The address of the token to pull
     * @param amount The amount of tokens to pull
     */
    function pullTokens(address token, uint256 amount) external onlyOwner {
        IERC20(token).safeTransfer(msg.sender, amount);
    }

    function renounceOwnership() public override onlyOwner {
        revert();
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This extension of the {Ownable} contract includes a two-step mechanism to transfer
 * ownership, where the new owner must call {acceptOwnership} in order to replace the
 * old one. This can help prevent common mistakes, such as transfers of ownership to
 * incorrect accounts, or to contracts that are unable to interact with the
 * permission system.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     *
     * Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 9 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 10 of 11 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

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

// 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);
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "solmate/=lib/solmate/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/",
    "@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/",
    "@layerzerolabs/test-devtools-evm-foundry/=lib/devtools/packages/test-devtools-evm-foundry/",
    "@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/",
    "@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/messagelib/",
    "@layerzerolabs/lz-evm-oapp-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/oapp/",
    "@layerzerolabs/lz-evm-v1-0.7/=lib/LayerZero-v1/",
    "solidity-bytes-utils/=lib/solidity-bytes-utils/",
    "LayerZero-v1/=lib/LayerZero-v1/contracts/",
    "devtools/=lib/devtools/packages/toolbox-foundry/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "layerzero-v2/=lib/layerzero-v2/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solady/=lib/solady/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 99999999
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": true
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"InvalidParameter","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Drip","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDripBps","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDripBps","type":"uint256"}],"name":"DripBpsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldReceiver","type":"address"},{"indexed":false,"internalType":"address","name":"newReceiver","type":"address"}],"name":"ReceiverUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"drip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dripBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dripToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextDripPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"periodDripDistributed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"pullTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dripBps","type":"uint256"}],"name":"updateDripBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"updateReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a03461015457601f610e7d38819003918201601f19168301916001600160401b0383118484101761015857808492604094855283398101031261015457610052602061004b8361016c565b920161016c565b903315610141576001545f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001600160a81b03191660015560326002556001600160a01b03908116608052600480546001600160a01b031916929091169190911790556100e0610180565b62093a80810180911161012d576003556100f8610180565b5f52600560205260405f20600160ff19825416179055604051610cdc90816101a1823960805181818161084d0152610ac00152f35b634e487b7160e01b5f52601160045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b038216820361015457565b62093a80420462093a8081029080820462093a80149015171561012d579056fe60806040526004361015610011575f80fd5b5f3560e01c8063086146d2146108be57806315924b6114610871578063335bbf11146108035780633f4ba83a146107455780635c975abb14610702578063715018a6146106cc57806379ba5097146105c65780637ba2196a146104f85780638456cb591461044f57806384f0e056146103ab5780638da5cb5b1461035b5780639c7fea33146103205780639f678cca146102e2578063e30c397814610291578063eada79cc1461022c578063f2fde38b1461016f578063f7260d3e1461011e5763fdaf7a39146100df575f80fd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576020600354604051908152f35b5f80fd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5773ffffffffffffffffffffffffffffffffffffffff6101bb6108fe565b6101c36109b0565b16807fffffffffffffffffffffffff0000000000000000000000000000000000000000600154161760015573ffffffffffffffffffffffffffffffffffffffff5f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b3461011a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5761028f6102666108fe565b61026e6109b0565b6024359073ffffffffffffffffffffffffffffffffffffffff339116610bf0565b005b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576103186109d0565b61028f610921565b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576020600254604051908152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576004356103e56109b0565b61138881116104275760407f4c56754069a5c1ce656af3bc0b21e203362c4ae6a9cb414536247f874f4a651d91600254908060025582519182526020820152a1005b7f613970e0000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576104856109b0565b61048d6109d0565b740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60015416176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5773ffffffffffffffffffffffffffffffffffffffff6105446108fe565b61054c6109b0565b1680156104275760407fbda2bcccbfa5ae883ab7d9f03480ab68fe68e9200c9b52c0c47abc21d2c90ec99160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a1005b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576001543373ffffffffffffffffffffffffffffffffffffffff8216036106a0577fffffffffffffffffffffffff0000000000000000000000000000000000000000166001555f54337fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f5573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5761011a6109b0565b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602060ff60015460a01c166040519015158152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5761077b6109b0565b60015460ff8160a01c16156107db577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576004355f526005602052602060ff60405f2054166040519015158152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5760206108f6610990565b604051908152f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361011a57565b60035461092c610990565b81811061098c575b808211156109425750600355565b9061094c81610a75565b62093a80810180911161095f5790610934565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5050565b62093a80420462093a8081029080820462093a80149015171561095f5790565b73ffffffffffffffffffffffffffffffffffffffff5f541633036106a057565b60ff60015460a01c166109df57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610a4857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b805f52600560205260ff60405f205416610bed57805f52600560205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f000000000000000000000000000000000000000000000000000000000000000090604051907f70a0823100000000000000000000000000000000000000000000000000000000825230600483015260208260248173ffffffffffffffffffffffffffffffffffffffff87165afa918215610be2575f92610bae575b508115610ba9576002548083029283040361095f577fad1e8a53178522eb68a9d94d862bf30c841f709d2115f743eb6b34528751c79f92610b9c61271060409404809273ffffffffffffffffffffffffffffffffffffffff6004541690610bf0565b82519182526020820152a1565b505050565b9091506020813d602011610bda575b81610bca60209383610a07565b8101031261011a5751905f610b3a565b3d9150610bbd565b6040513d5f823e3d90fd5b50565b916020915f916040519073ffffffffffffffffffffffffffffffffffffffff858301937fa9059cbb000000000000000000000000000000000000000000000000000000008552166024830152604482015260448152610c50606482610a07565b519082855af115610be2575f513d610cc6575073ffffffffffffffffffffffffffffffffffffffff81163b155b610c845750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b60011415610c7d56fea164736f6c634300081a000a000000000000000000000000e90fe2de4a415ad48b6dcec08ba6ae98231948ac000000000000000000000000e2a7de3c3190afd79c49c8e8f2fa30ca78b97dfd

Deployed Bytecode

0x60806040526004361015610011575f80fd5b5f3560e01c8063086146d2146108be57806315924b6114610871578063335bbf11146108035780633f4ba83a146107455780635c975abb14610702578063715018a6146106cc57806379ba5097146105c65780637ba2196a146104f85780638456cb591461044f57806384f0e056146103ab5780638da5cb5b1461035b5780639c7fea33146103205780639f678cca146102e2578063e30c397814610291578063eada79cc1461022c578063f2fde38b1461016f578063f7260d3e1461011e5763fdaf7a39146100df575f80fd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576020600354604051908152f35b5f80fd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602073ffffffffffffffffffffffffffffffffffffffff60045416604051908152f35b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5773ffffffffffffffffffffffffffffffffffffffff6101bb6108fe565b6101c36109b0565b16807fffffffffffffffffffffffff0000000000000000000000000000000000000000600154161760015573ffffffffffffffffffffffffffffffffffffffff5f54167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b3461011a5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5761028f6102666108fe565b61026e6109b0565b6024359073ffffffffffffffffffffffffffffffffffffffff339116610bf0565b005b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576103186109d0565b61028f610921565b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576020600254604051908152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576004356103e56109b0565b61138881116104275760407f4c56754069a5c1ce656af3bc0b21e203362c4ae6a9cb414536247f874f4a651d91600254908060025582519182526020820152a1005b7f613970e0000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576104856109b0565b61048d6109d0565b740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60015416176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5773ffffffffffffffffffffffffffffffffffffffff6105446108fe565b61054c6109b0565b1680156104275760407fbda2bcccbfa5ae883ab7d9f03480ab68fe68e9200c9b52c0c47abc21d2c90ec99160045490807fffffffffffffffffffffffff000000000000000000000000000000000000000083161760045573ffffffffffffffffffffffffffffffffffffffff8351921682526020820152a1005b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576001543373ffffffffffffffffffffffffffffffffffffffff8216036106a0577fffffffffffffffffffffffff0000000000000000000000000000000000000000166001555f54337fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f5573ffffffffffffffffffffffffffffffffffffffff3391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b7f118cdaa7000000000000000000000000000000000000000000000000000000005f523360045260245ffd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5761011a6109b0565b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602060ff60015460a01c166040519015158152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5761077b6109b0565b60015460ff8160a01c16156107db577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e90fe2de4a415ad48b6dcec08ba6ae98231948ac168152f35b3461011a5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a576004355f526005602052602060ff60405f2054166040519015158152f35b3461011a575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011a5760206108f6610990565b604051908152f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361011a57565b60035461092c610990565b81811061098c575b808211156109425750600355565b9061094c81610a75565b62093a80810180911161095f5790610934565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5050565b62093a80420462093a8081029080820462093a80149015171561095f5790565b73ffffffffffffffffffffffffffffffffffffffff5f541633036106a057565b60ff60015460a01c166109df57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610a4857604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b805f52600560205260ff60405f205416610bed57805f52600560205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f000000000000000000000000e90fe2de4a415ad48b6dcec08ba6ae98231948ac90604051907f70a0823100000000000000000000000000000000000000000000000000000000825230600483015260208260248173ffffffffffffffffffffffffffffffffffffffff87165afa918215610be2575f92610bae575b508115610ba9576002548083029283040361095f577fad1e8a53178522eb68a9d94d862bf30c841f709d2115f743eb6b34528751c79f92610b9c61271060409404809273ffffffffffffffffffffffffffffffffffffffff6004541690610bf0565b82519182526020820152a1565b505050565b9091506020813d602011610bda575b81610bca60209383610a07565b8101031261011a5751905f610b3a565b3d9150610bbd565b6040513d5f823e3d90fd5b50565b916020915f916040519073ffffffffffffffffffffffffffffffffffffffff858301937fa9059cbb000000000000000000000000000000000000000000000000000000008552166024830152604482015260448152610c50606482610a07565b519082855af115610be2575f513d610cc6575073ffffffffffffffffffffffffffffffffffffffff81163b155b610c845750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b60011415610c7d56fea164736f6c634300081a000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000e90fe2de4a415ad48b6dcec08ba6ae98231948ac000000000000000000000000e2a7de3c3190afd79c49c8e8f2fa30ca78b97dfd

-----Decoded View---------------
Arg [0] : _token (address): 0xe90FE2DE4A415aD48B6DcEc08bA6ae98231948Ac
Arg [1] : _receiver (address): 0xE2a7De3C3190AFd79C49C8E8f2Fa30Ca78B97DFd

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e90fe2de4a415ad48b6dcec08ba6ae98231948ac
Arg [1] : 000000000000000000000000e2a7de3c3190afd79c49c8e8f2fa30ca78b97dfd


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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.