ETH Price: $3,378.67 (+8.24%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x61012060235686802025-10-13 12:05:4757 days ago1760357147
0x0FC66355...d809FD6db
 Contract Creation0 ETH
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
PoolBoosterFactoryMerkl

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { PoolBoosterMerkl } from "./PoolBoosterMerkl.sol";
import { AbstractPoolBoosterFactory, IPoolBoostCentralRegistry } from "./AbstractPoolBoosterFactory.sol";

/**
 * @title Pool booster factory for creating Merkl pool boosters.
 * @author Origin Protocol Inc
 */
contract PoolBoosterFactoryMerkl is AbstractPoolBoosterFactory {
    uint256 public constant version = 1;

    /// @notice address of the Merkl distributor
    address public merklDistributor;

    /// @notice event emitted when the Merkl distributor is updated
    event MerklDistributorUpdated(address newDistributor);

    /**
     * @param _oToken address of the OToken token
     * @param _governor address governor
     * @param _centralRegistry address of the central registry
     * @param _merklDistributor address of the Merkl distributor
     */
    constructor(
        address _oToken,
        address _governor,
        address _centralRegistry,
        address _merklDistributor
    ) AbstractPoolBoosterFactory(_oToken, _governor, _centralRegistry) {
        _setMerklDistributor(_merklDistributor);
    }

    /**
     * @dev Create a Pool Booster for Merkl.
     * @param _campaignType The type of campaign to create. This is used to determine the type of
     *        bribe contract to create. The type is defined in the MerklDistributor contract.
     * @param _ammPoolAddress address of the AMM pool where the yield originates from
     * @param _campaignDuration The duration of the campaign in seconds
     * @param campaignData The data to be used for the campaign. This is used to determine the type of
     *        bribe contract to create. The type is defined in the MerklDistributor contract.
     *        This should be fetched from the Merkl UI.
     * @param _salt A unique number that affects the address of the pool booster created. Note: this number
     *        should match the one from `computePoolBoosterAddress` in order for the final deployed address
     *        and pre-computed address to match
     */
    function createPoolBoosterMerkl(
        uint32 _campaignType,
        address _ammPoolAddress,
        uint32 _campaignDuration,
        bytes calldata campaignData,
        uint256 _salt
    ) external onlyGovernor {
        require(
            _ammPoolAddress != address(0),
            "Invalid ammPoolAddress address"
        );
        require(_salt > 0, "Invalid salt");
        require(_campaignDuration > 1 hours, "Invalid campaign duration");
        require(campaignData.length > 0, "Invalid campaign data");

        address poolBoosterAddress = _deployContract(
            abi.encodePacked(
                type(PoolBoosterMerkl).creationCode,
                abi.encode(
                    oToken,
                    merklDistributor,
                    _campaignDuration,
                    _campaignType,
                    governor(),
                    campaignData
                )
            ),
            _salt
        );

        _storePoolBoosterEntry(
            poolBoosterAddress,
            _ammPoolAddress,
            IPoolBoostCentralRegistry.PoolBoosterType.MerklBooster
        );
    }

    /**
     * @dev Create a Pool Booster for Merkl.
     * @param _campaignType The type of campaign to create. This is used to determine the type of
     *        bribe contract to create. The type is defined in the MerklDistributor contract.
     * @param _ammPoolAddress address of the AMM pool where the yield originates from
     * @param _salt A unique number that affects the address of the pool booster created. Note: this number
     *        should match the one from `createPoolBoosterMerkl` in order for the final deployed address
     *        and pre-computed address to match
     */
    function computePoolBoosterAddress(
        uint32 _campaignType,
        address _ammPoolAddress,
        uint32 _campaignDuration,
        bytes calldata campaignData,
        uint256 _salt
    ) external view returns (address) {
        require(
            _ammPoolAddress != address(0),
            "Invalid ammPoolAddress address"
        );
        require(_salt > 0, "Invalid salt");
        require(_campaignDuration > 1 hours, "Invalid campaign duration");
        require(campaignData.length > 0, "Invalid campaign data");

        return
            _computeAddress(
                abi.encodePacked(
                    type(PoolBoosterMerkl).creationCode,
                    abi.encode(
                        oToken,
                        merklDistributor,
                        _campaignDuration,
                        _campaignType,
                        governor(),
                        campaignData
                    )
                ),
                _salt
            );
    }

    /**
     * @dev Set the address of the Merkl distributor
     * @param _merklDistributor The address of the Merkl distributor
     */
    function setMerklDistributor(address _merklDistributor)
        external
        onlyGovernor
    {
        _setMerklDistributor(_merklDistributor);
    }

    function _setMerklDistributor(address _merklDistributor) internal {
        require(
            _merklDistributor != address(0),
            "Invalid merklDistributor address"
        );
        merklDistributor = _merklDistributor;
        emit MerklDistributorUpdated(_merklDistributor);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

/**
 * @title Base for contracts that are managed by the Origin Protocol's Governor.
 * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change
 *      from owner to governor and renounce methods removed. Does not use
 *      Context.sol like Ownable.sol does for simplification.
 * @author Origin Protocol Inc
 */
abstract contract Governable {
    // Storage position of the owner and pendingOwner of the contract
    // keccak256("OUSD.governor");
    bytes32 private constant governorPosition =
        0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;

    // keccak256("OUSD.pending.governor");
    bytes32 private constant pendingGovernorPosition =
        0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;

    // keccak256("OUSD.reentry.status");
    bytes32 private constant reentryStatusPosition =
        0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;

    // See OpenZeppelin ReentrancyGuard implementation
    uint256 constant _NOT_ENTERED = 1;
    uint256 constant _ENTERED = 2;

    event PendingGovernorshipTransfer(
        address indexed previousGovernor,
        address indexed newGovernor
    );

    event GovernorshipTransferred(
        address indexed previousGovernor,
        address indexed newGovernor
    );

    /**
     * @notice Returns the address of the current Governor.
     */
    function governor() public view returns (address) {
        return _governor();
    }

    /**
     * @dev Returns the address of the current Governor.
     */
    function _governor() internal view returns (address governorOut) {
        bytes32 position = governorPosition;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            governorOut := sload(position)
        }
    }

    /**
     * @dev Returns the address of the pending Governor.
     */
    function _pendingGovernor()
        internal
        view
        returns (address pendingGovernor)
    {
        bytes32 position = pendingGovernorPosition;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            pendingGovernor := sload(position)
        }
    }

    /**
     * @dev Throws if called by any account other than the Governor.
     */
    modifier onlyGovernor() {
        require(isGovernor(), "Caller is not the Governor");
        _;
    }

    /**
     * @notice Returns true if the caller is the current Governor.
     */
    function isGovernor() public view returns (bool) {
        return msg.sender == _governor();
    }

    function _setGovernor(address newGovernor) internal {
        emit GovernorshipTransferred(_governor(), newGovernor);

        bytes32 position = governorPosition;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(position, newGovernor)
        }
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        bytes32 position = reentryStatusPosition;
        uint256 _reentry_status;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            _reentry_status := sload(position)
        }

        // On the first call to nonReentrant, _notEntered will be true
        require(_reentry_status != _ENTERED, "Reentrant call");

        // Any calls to nonReentrant after this point will fail
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(position, _ENTERED)
        }

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(position, _NOT_ENTERED)
        }
    }

    function _setPendingGovernor(address newGovernor) internal {
        bytes32 position = pendingGovernorPosition;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(position, newGovernor)
        }
    }

    /**
     * @notice Transfers Governance of the contract to a new account (`newGovernor`).
     * Can only be called by the current Governor. Must be claimed for this to complete
     * @param _newGovernor Address of the new Governor
     */
    function transferGovernance(address _newGovernor) external onlyGovernor {
        _setPendingGovernor(_newGovernor);
        emit PendingGovernorshipTransfer(_governor(), _newGovernor);
    }

    /**
     * @notice Claim Governance of the contract to a new account (`newGovernor`).
     * Can only be called by the new Governor.
     */
    function claimGovernance() external {
        require(
            msg.sender == _pendingGovernor(),
            "Only the pending Governor can complete the claim"
        );
        _changeGovernor(msg.sender);
    }

    /**
     * @dev Change Governance of the contract to a new account (`newGovernor`).
     * @param _newGovernor Address of the new Governor
     */
    function _changeGovernor(address _newGovernor) internal {
        require(_newGovernor != address(0), "New Governor is address(0)");
        _setGovernor(_newGovernor);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IMerklDistributor {
    struct CampaignParameters {
        // POPULATED ONCE CREATED

        // ID of the campaign. This can be left as a null bytes32 when creating campaigns
        // on Merkl.
        bytes32 campaignId;
        // CHOSEN BY CAMPAIGN CREATOR

        // Address of the campaign creator, if marked as address(0), it will be overriden with the
        // address of the `msg.sender` creating the campaign
        address creator;
        // Address of the token used as a reward
        address rewardToken;
        // Amount of `rewardToken` to distribute across all the epochs
        // Amount distributed per epoch is `amount/numEpoch`
        uint256 amount;
        // Type of campaign
        uint32 campaignType;
        // Timestamp at which the campaign should start
        uint32 startTimestamp;
        // Duration of the campaign in seconds. Has to be a multiple of EPOCH = 3600
        uint32 duration;
        // Extra data to pass to specify the campaign
        bytes campaignData;
    }

    function createCampaign(CampaignParameters memory newCampaign)
        external
        returns (bytes32);

    function signAndCreateCampaign(
        CampaignParameters memory newCampaign,
        bytes memory _signature
    ) external returns (bytes32);

    function sign(bytes memory _signature) external;

    function rewardTokenMinAmounts(address _rewardToken)
        external
        view
        returns (uint256);
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

interface IPoolBoostCentralRegistry {
    /**
     * @dev all the supported pool booster types are listed here. It is possible
     *      to have multiple versions of the factory that supports the same type of
     *      pool booster. Factories are immutable and this can happen when a factory
     *      or related pool booster required code update.
     *      e.g. "PoolBoosterSwapxDouble" & "PoolBoosterSwapxDouble_v2"
     */
    enum PoolBoosterType {
        // Supports bribing 2 contracts per pool. Appropriate for Ichi vault concentrated
        // liquidity pools where (which is expected in most/all cases) both pool gauges
        // require bribing.
        SwapXDoubleBooster,
        // Supports bribing a single contract per pool. Appropriate for Classic Stable &
        // Classic Volatile pools and Ichi vaults where only 1 side (1 of the 2 gauges)
        // needs bribing
        SwapXSingleBooster,
        // Supports bribing a single contract per pool. Appropriate for Metropolis pools
        MetropolisBooster,
        // Supports creating a Merkl campaign.
        MerklBooster
    }

    struct PoolBoosterEntry {
        address boosterAddress;
        address ammPoolAddress;
        PoolBoosterType boosterType;
    }

    event PoolBoosterCreated(
        address poolBoosterAddress,
        address ammPoolAddress,
        PoolBoosterType poolBoosterType,
        address factoryAddress
    );
    event PoolBoosterRemoved(address poolBoosterAddress);

    function emitPoolBoosterCreated(
        address _poolBoosterAddress,
        address _ammPoolAddress,
        PoolBoosterType _boosterType
    ) external;

    function emitPoolBoosterRemoved(address _poolBoosterAddress) external;
}

File 6 of 8 : IPoolBooster.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

interface IPoolBooster {
    event BribeExecuted(uint256 amount);

    /// @notice Execute the bribe action
    function bribe() external;
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { Governable } from "../governance/Governable.sol";
import { IPoolBooster } from "../interfaces/poolBooster/IPoolBooster.sol";
import { IPoolBoostCentralRegistry } from "../interfaces/poolBooster/IPoolBoostCentralRegistry.sol";

/**
 * @title Abstract Pool booster factory
 * @author Origin Protocol Inc
 */
contract AbstractPoolBoosterFactory is Governable {
    struct PoolBoosterEntry {
        address boosterAddress;
        address ammPoolAddress;
        IPoolBoostCentralRegistry.PoolBoosterType boosterType;
    }

    // @notice address of Origin Token
    address public immutable oToken;
    // @notice Central registry contract
    IPoolBoostCentralRegistry public immutable centralRegistry;

    // @notice list of all the pool boosters created by this factory
    PoolBoosterEntry[] public poolBoosters;
    // @notice mapping of AMM pool to pool booster
    mapping(address => PoolBoosterEntry) public poolBoosterFromPool;

    // @param address _oToken address of the OToken token
    // @param address _governor address governor
    // @param address _centralRegistry address of the central registry
    constructor(
        address _oToken,
        address _governor,
        address _centralRegistry
    ) {
        require(_oToken != address(0), "Invalid oToken address");
        require(_governor != address(0), "Invalid governor address");
        require(
            _centralRegistry != address(0),
            "Invalid central registry address"
        );

        oToken = _oToken;
        centralRegistry = IPoolBoostCentralRegistry(_centralRegistry);
        _setGovernor(_governor);
    }

    /**
     * @notice Goes over all the pool boosters created by this factory and
     *         calls bribe() on them.
     * @param _exclusionList A list of pool booster addresses to skip when
     *        calling this function.
     */
    function bribeAll(address[] memory _exclusionList) external {
        uint256 lengthI = poolBoosters.length;
        for (uint256 i = 0; i < lengthI; i++) {
            address poolBoosterAddress = poolBoosters[i].boosterAddress;
            bool skipBribeCall = false;
            uint256 lengthJ = _exclusionList.length;
            for (uint256 j = 0; j < lengthJ; j++) {
                // pool booster in exclusion list
                if (_exclusionList[j] == poolBoosterAddress) {
                    skipBribeCall = true;
                    break;
                }
            }

            if (!skipBribeCall) {
                IPoolBooster(poolBoosterAddress).bribe();
            }
        }
    }

    /**
     * @notice Removes the pool booster from the internal list of pool boosters.
     * @dev This action does not destroy the pool booster contract nor does it
     *      stop the yield delegation to it.
     * @param _poolBoosterAddress address of the pool booster
     */
    function removePoolBooster(address _poolBoosterAddress)
        external
        onlyGovernor
    {
        uint256 boostersLen = poolBoosters.length;
        for (uint256 i = 0; i < boostersLen; ++i) {
            if (poolBoosters[i].boosterAddress == _poolBoosterAddress) {
                // erase mapping
                delete poolBoosterFromPool[poolBoosters[i].ammPoolAddress];

                // overwrite current pool booster with the last entry in the list
                poolBoosters[i] = poolBoosters[boostersLen - 1];
                // drop the last entry
                poolBoosters.pop();

                centralRegistry.emitPoolBoosterRemoved(_poolBoosterAddress);
                break;
            }
        }
    }

    function _storePoolBoosterEntry(
        address _poolBoosterAddress,
        address _ammPoolAddress,
        IPoolBoostCentralRegistry.PoolBoosterType _boosterType
    ) internal {
        PoolBoosterEntry memory entry = PoolBoosterEntry(
            _poolBoosterAddress,
            _ammPoolAddress,
            _boosterType
        );

        poolBoosters.push(entry);
        poolBoosterFromPool[_ammPoolAddress] = entry;

        // emit the events of the pool booster created
        centralRegistry.emitPoolBoosterCreated(
            _poolBoosterAddress,
            _ammPoolAddress,
            _boosterType
        );
    }

    function _deployContract(bytes memory _bytecode, uint256 _salt)
        internal
        returns (address _address)
    {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            _address := create2(
                0,
                add(_bytecode, 0x20),
                mload(_bytecode),
                _salt
            )
        }

        require(
            _address.code.length > 0 && _address != address(0),
            "Failed creating a pool booster"
        );
    }

    // pre-compute the address of the deployed contract that will be
    // created when create2 is called
    function _computeAddress(bytes memory _bytecode, uint256 _salt)
        internal
        view
        returns (address)
    {
        bytes32 hash = keccak256(
            abi.encodePacked(
                bytes1(0xff),
                address(this),
                _salt,
                keccak256(_bytecode)
            )
        );

        // cast last 20 bytes of hash to address
        return address(uint160(uint256(hash)));
    }

    function poolBoosterLength() external view returns (uint256) {
        return poolBoosters.length;
    }
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IPoolBooster } from "../interfaces/poolBooster/IPoolBooster.sol";
import { IMerklDistributor } from "../interfaces/poolBooster/IMerklDistributor.sol";

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 _data
     */
    function isValidSignature(bytes32 hash, bytes memory signature)
        external
        view
        returns (bytes4 magicValue);
}

/**
 * @title Pool booster for Merkl distributor
 * @author Origin Protocol Inc
 */
contract PoolBoosterMerkl is IPoolBooster, IERC1271 {
    /// @notice address of merkl distributor
    IMerklDistributor public immutable merklDistributor;
    /// @notice address of the OS token
    IERC20 public immutable rewardToken;
    /// @notice if balance under this amount the bribe action is skipped
    uint256 public constant MIN_BRIBE_AMOUNT = 1e10;
    /// @notice Campaign duration in seconds
    uint32 public immutable duration; // -> should be immutable
    /// @notice Campaign type
    uint32 public immutable campaignType;
    /// @notice Owner of the campaign
    address public immutable creator;
    /// @notice Campaign data
    bytes public campaignData;

    constructor(
        address _rewardToken,
        address _merklDistributor,
        uint32 _duration,
        uint32 _campaignType,
        address _creator,
        bytes memory _campaignData
    ) {
        require(_rewardToken != address(0), "Invalid rewardToken address");
        require(
            _merklDistributor != address(0),
            "Invalid merklDistributor address"
        );
        require(_campaignData.length > 0, "Invalid campaignData");
        require(_duration > 1 hours, "Invalid duration");

        campaignType = _campaignType;
        duration = _duration;
        creator = _creator;

        merklDistributor = IMerklDistributor(_merklDistributor);
        rewardToken = IERC20(_rewardToken);
        campaignData = _campaignData;
    }

    /// @notice Create a campaign on the Merkl distributor
    function bribe() external override {
        // Ensure token is approved for the Merkl distributor
        uint256 minAmount = merklDistributor.rewardTokenMinAmounts(
            address(rewardToken)
        );
        require(minAmount > 0, "Min reward amount must be > 0");

        // if balance too small or below threshold, do no bribes
        uint256 balance = rewardToken.balanceOf(address(this));
        if (
            balance < MIN_BRIBE_AMOUNT ||
            (balance * 1 hours < minAmount * duration)
        ) {
            return;
        }

        // Approve the bribe contract to spend the reward token
        rewardToken.approve(address(merklDistributor), balance);

        // Notify the bribe contract of the reward amount
        merklDistributor.signAndCreateCampaign(
            IMerklDistributor.CampaignParameters({
                campaignId: bytes32(0),
                creator: creator,
                rewardToken: address(rewardToken),
                amount: balance,
                campaignType: campaignType,
                startTimestamp: getNextPeriodStartTime(),
                duration: duration,
                campaignData: campaignData
            }),
            bytes("")
        );
        emit BribeExecuted(balance);
    }

    /// @notice Used to sign a campaign on the Merkl distributor
    function isValidSignature(bytes32, bytes memory)
        external
        view
        override
        returns (bytes4 magicValue)
    {
        require(msg.sender == address(merklDistributor), "Invalid sender");
        // bytes4(keccak256("isValidSignature(bytes32,bytes)")) == 0x1626ba7e
        return bytes4(0x1626ba7e);
    }

    /// @notice Returns the timestamp for the start of the next period based on the configured duration
    function getNextPeriodStartTime() public view returns (uint32) {
        // Calculate the timestamp for the next period boundary
        return uint32((block.timestamp / duration + 1) * duration);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_oToken","type":"address"},{"internalType":"address","name":"_governor","type":"address"},{"internalType":"address","name":"_centralRegistry","type":"address"},{"internalType":"address","name":"_merklDistributor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"GovernorshipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newDistributor","type":"address"}],"name":"MerklDistributorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"PendingGovernorshipTransfer","type":"event"},{"inputs":[{"internalType":"address[]","name":"_exclusionList","type":"address[]"}],"name":"bribeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"centralRegistry","outputs":[{"internalType":"contract IPoolBoostCentralRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_campaignType","type":"uint32"},{"internalType":"address","name":"_ammPoolAddress","type":"address"},{"internalType":"uint32","name":"_campaignDuration","type":"uint32"},{"internalType":"bytes","name":"campaignData","type":"bytes"},{"internalType":"uint256","name":"_salt","type":"uint256"}],"name":"computePoolBoosterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_campaignType","type":"uint32"},{"internalType":"address","name":"_ammPoolAddress","type":"address"},{"internalType":"uint32","name":"_campaignDuration","type":"uint32"},{"internalType":"bytes","name":"campaignData","type":"bytes"},{"internalType":"uint256","name":"_salt","type":"uint256"}],"name":"createPoolBoosterMerkl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isGovernor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merklDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolBoosterFromPool","outputs":[{"internalType":"address","name":"boosterAddress","type":"address"},{"internalType":"address","name":"ammPoolAddress","type":"address"},{"internalType":"enum IPoolBoostCentralRegistry.PoolBoosterType","name":"boosterType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolBoosterLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolBoosters","outputs":[{"internalType":"address","name":"boosterAddress","type":"address"},{"internalType":"address","name":"ammPoolAddress","type":"address"},{"internalType":"enum IPoolBoostCentralRegistry.PoolBoosterType","name":"boosterType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_poolBoosterAddress","type":"address"}],"name":"removePoolBooster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_merklDistributor","type":"address"}],"name":"setMerklDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernor","type":"address"}],"name":"transferGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b506040516127bb3803806127bb83398101604081905261002f9161029d565b8383836001600160a01b03831661008d5760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206f546f6b656e20616464726573730000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166100e35760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420676f7665726e6f72206164647265737300000000000000006044820152606401610084565b6001600160a01b0381166101395760405162461bcd60e51b815260206004820181905260248201527f496e76616c69642063656e7472616c20726567697374727920616464726573736044820152606401610084565b6001600160a01b03808416608052811660a05261015582610170565b505050610167816101d760201b60201c565b505050506102f1565b6001600160a01b03811661019060008051602061279b8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a360008051602061279b83398151915255565b6001600160a01b03811661022d5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d65726b6c4469737472696275746f7220616464726573736044820152606401610084565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1a0e4b3bfcac0fa1e13f7c8b088964c6daea7147fa49e39f54db5787518fe9c99060200160405180910390a150565b80516001600160a01b038116811461029857600080fd5b919050565b600080600080608085870312156102b357600080fd5b6102bc85610281565b93506102ca60208601610281565b92506102d860408601610281565b91506102e660608601610281565b905092959194509250565b60805160a051612469610332600039600081816101c2015281816109ab0152610eb2015260008181610163015281816105270152610b6501526124696000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80638f73dcfa11610097578063d517786811610066578063d51778681461024f578063dbfba95914610262578063e24abe6314610275578063e331db3f1461028857600080fd5b80638f73dcfa146101bd578063b6eee962146101e4578063c7af335214610224578063d38bfff41461023c57600080fd5b80632fa4abea116100d35780632fa4abea1461018557806354fd4d50146101985780635d36b190146101a05780636720bd3f146101aa57600080fd5b80630c340a2414610105578063110c1a411461012a57806317c01cb31461014c5780631a32aad61461015e575b600080fd5b61010d61029b565b6040516001600160a01b0390911681526020015b60405180910390f35b61013d610138366004611042565b6102b8565b60405161012193929190611071565b6000545b604051908152602001610121565b61010d7f000000000000000000000000000000000000000000000000000000000000000081565b60025461010d906001600160a01b031681565b610150600181565b6101a86102fe565b005b6101a86101b83660046110e5565b6103a9565b61010d7f000000000000000000000000000000000000000000000000000000000000000081565b61013d6101f2366004611194565b600160208190526000918252604090912080549101546001600160a01b0391821691811690600160a01b900460ff1683565b61022c6105bc565b6040519015158152602001610121565b6101a861024a366004611194565b6105ed565b6101a861025d3660046111cc565b610691565b6101a8610270366004611194565b610789565b6101a8610283366004611194565b6107b9565b61010d6102963660046110e5565b610a0b565b60006102b36000805160206124148339815191525490565b905090565b600081815481106102c857600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b03161461039e5760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084015b60405180910390fd5b6103a733610c40565b565b6103b16105bc565b6103cd5760405162461bcd60e51b81526004016103959061129c565b6001600160a01b0385166104235760405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420616d6d506f6f6c41646472657373206164647265737300006044820152606401610395565b600081116104625760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081cd85b1d60a21b6044820152606401610395565b610e108463ffffffff16116104b55760405162461bcd60e51b815260206004820152601960248201527824b73b30b634b21031b0b6b830b4b3b710323ab930ba34b7b760391b6044820152606401610395565b816104fa5760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642063616d706169676e206461746160581b6044820152606401610395565b60006105a56040518060200161050f90611035565b601f1982820381018352601f909101166040526002547f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0316888b61055a61029b565b8a8a60405160200161057297969594939291906112d3565b60408051601f1981840301815290829052610590929160200161136b565b60405160208183030381529060405283610c9f565b90506105b381876003610d21565b50505050505050565b60006105d46000805160206124148339815191525490565b6001600160a01b0316336001600160a01b031614905090565b6105f56105bc565b6106115760405162461bcd60e51b81526004016103959061129c565b610639817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166106596000805160206124148339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b60008054905b818110156107845760008082815481106106b3576106b3611388565b6000918252602082206002909102015485516001600160a01b039091169250815b8181101561071f57836001600160a01b03168782815181106106f8576106f8611388565b60200260200101516001600160a01b031603610717576001925061071f565b6001016106d4565b508161077957826001600160a01b03166337d0208c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561076057600080fd5b505af1158015610774573d6000803e3d6000fd5b505050505b505050600101610697565b505050565b6107916105bc565b6107ad5760405162461bcd60e51b81526004016103959061129c565b6107b681610f24565b50565b6107c16105bc565b6107dd5760405162461bcd60e51b81526004016103959061129c565b60008054905b8181101561078457826001600160a01b03166000828154811061080857610808611388565b60009182526020909120600290910201546001600160a01b031603610a03576001600080838154811061083d5761083d611388565b6000918252602080832060016002909302018201546001600160a01b031684528301939093526040909101812080546001600160a01b0319168155820180546001600160a81b031916905590610893908461139e565b815481106108a3576108a3611388565b9060005260206000209060020201600082815481106108c4576108c4611388565b60009182526020909120825460029092020180546001600160a01b03199081166001600160a01b0393841617825560018085018054918401805493841692909516918217855554929360ff600160a01b94859004169390926001600160a81b0319169091179083600381111561093c5761093c61105b565b02179055509050506000805480610955576109556113bf565b6000828152602090206002600019929092019182020180546001600160a01b031916815560010180546001600160a81b03191690559055604051630702522960e01b81526001600160a01b0384811660048301527f00000000000000000000000000000000000000000000000000000000000000001690630702522990602401600060405180830381600087803b1580156109ef57600080fd5b505af11580156105b3573d6000803e3d6000fd5b6001016107e3565b60006001600160a01b038616610a635760405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420616d6d506f6f6c41646472657373206164647265737300006044820152606401610395565b60008211610aa25760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081cd85b1d60a21b6044820152606401610395565b610e108563ffffffff1611610af55760405162461bcd60e51b815260206004820152601960248201527824b73b30b634b21031b0b6b830b4b3b710323ab930ba34b7b760391b6044820152606401610395565b82610b3a5760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642063616d706169676e206461746160581b6044820152606401610395565b610c3560405180602001610b4d90611035565b601f1982820381018352601f909101166040526002547f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0316888b610b9861029b565b8a8a604051602001610bb097969594939291906112d3565b60408051601f1981840301815290829052610bce929160200161136b565b60408051601f1981840301815282825280516020918201206001600160f81b0319848301526bffffffffffffffffffffffff193060601b16602185015260358401879052605580850191909152825180850390910181526075909301909152815191012090565b979650505050505050565b6001600160a01b038116610c965760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f7220697320616464726573732830290000000000006044820152606401610395565b6107b681610fce565b6000818351602085016000f590506000816001600160a01b03163b118015610ccf57506001600160a01b03811615155b610d1b5760405162461bcd60e51b815260206004820152601e60248201527f4661696c6564206372656174696e67206120706f6f6c20626f6f7374657200006044820152606401610395565b92915050565b60006040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001836003811115610d5e57610d5e61105b565b905260008054600181018255908052815160029091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563810180546001600160a01b039384166001600160a01b031991821617825560208501517f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5649093018054939094169083168117845560408501519495508594919391926001600160a81b03191617600160a01b836003811115610e1957610e1961105b565b021790555050506001600160a01b03808416600090815260016020818152604092839020855181549086166001600160a01b03199182161782559186015192810180549390951691831682178555928501518594909290916001600160a81b031990911617600160a01b836003811115610e9557610e9561105b565b021790555050604051630b22521d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063591290e890610eec90879087908790600401611071565b600060405180830381600087803b158015610f0657600080fd5b505af1158015610f1a573d6000803e3d6000fd5b5050505050505050565b6001600160a01b038116610f7a5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d65726b6c4469737472696275746f7220616464726573736044820152606401610395565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1a0e4b3bfcac0fa1e13f7c8b088964c6daea7147fa49e39f54db5787518fe9c99060200160405180910390a150565b806001600160a01b0316610fee6000805160206124148339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a360008051602061241483398151915255565b61103e806113d683390190565b60006020828403121561105457600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0384811682528316602082015260608101600483106110a757634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b803563ffffffff811681146110c957600080fd5b919050565b80356001600160a01b03811681146110c957600080fd5b60008060008060008060a087890312156110fe57600080fd5b611107876110b5565b9550611115602088016110ce565b9450611123604088016110b5565b9350606087013567ffffffffffffffff81111561113f57600080fd5b8701601f8101891361115057600080fd5b803567ffffffffffffffff81111561116757600080fd5b89602082840101111561117957600080fd5b96999598509396602090940195946080909401359392505050565b6000602082840312156111a657600080fd5b6111af826110ce565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156111de57600080fd5b813567ffffffffffffffff8111156111f557600080fd5b8201601f8101841361120657600080fd5b803567ffffffffffffffff811115611220576112206111b6565b8060051b604051601f19603f830116810181811067ffffffffffffffff8211171561124d5761124d6111b6565b60405291825260208184018101929081018784111561126b57600080fd5b6020850194505b8385101561129157611283856110ce565b815260209485019401611272565b509695505050505050565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b6001600160a01b038881168252878116602083015263ffffffff8781166040840152861660608301528416608082015260c060a082018190528101829052818360e0830137600081830160e090810191909152601f909201601f191601019695505050505050565b6000815160005b8181101561135c5760208185018101518683015201611342565b50600093019283525090919050565b600061138061137a838661133b565b8461133b565b949350505050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610d1b57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fdfe61012060405234801561001157600080fd5b5060405161103e38038061103e83398101604081905261003091610204565b6001600160a01b03861661008b5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c696420726577617264546f6b656e2061646472657373000000000060448201526064015b60405180910390fd5b6001600160a01b0385166100e15760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d65726b6c4469737472696275746f7220616464726573736044820152606401610082565b60008151116101325760405162461bcd60e51b815260206004820152601460248201527f496e76616c69642063616d706169676e446174610000000000000000000000006044820152606401610082565b610e108463ffffffff161161017c5760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b6044820152606401610082565b63ffffffff80841660e052841660c0526001600160a01b0380831661010052858116608052861660a05260006101b282826103ac565b5050505050505061046a565b80516001600160a01b03811681146101d557600080fd5b919050565b805163ffffffff811681146101d557600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c0878903121561021d57600080fd5b610226876101be565b9550610234602088016101be565b9450610242604088016101da565b9350610250606088016101da565b925061025e608088016101be565b60a08801519092506001600160401b0381111561027a57600080fd5b8701601f8101891361028b57600080fd5b80516001600160401b038111156102a4576102a46101ee565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102d2576102d26101ee565b6040528181528282016020018b10156102ea57600080fd5b60005b82811015610309576020818501810151838301820152016102ed565b506000602083830101528093505050509295509295509295565b600181811c9082168061033757607f821691505b60208210810361035757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156103a757806000526020600020601f840160051c810160208510156103845750805b601f840160051c820191505b818110156103a45760008155600101610390565b50505b505050565b81516001600160401b038111156103c5576103c56101ee565b6103d9816103d38454610323565b8461035d565b6020601f82116001811461040d57600083156103f55750848201515b600019600385901b1c1916600184901b1784556103a4565b600084815260208120601f198516915b8281101561043d578785015182556020948501946001909201910161041d565b508482101561045b5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e05161010051610b376105076000396000818160a801526105af0152600081816101a7015261061301526000818160ec0152818161028e0152818161047801526106520152600081816101e3015281816102e9015281816103eb015281816104fb01526105de0152600081816101540152818161021201528181610314015281816104cc015261056b0152610b376000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806337d0208c1161006657806337d0208c1461017e5780633978033f14610188578063759dadce146101a2578063edd5271e146101c9578063f7c618c1146101de57600080fd5b806302d05d3f146100a35780630fb5a6b4146100e75780631626ba7e146101235780632fa4abea1461014f57806334bb9c1714610176575b600080fd5b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61010e7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100de565b610136610131366004610856565b610205565b6040516001600160e01b031990911681526020016100de565b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b61010e610285565b6101866102d2565b005b6101946402540be40081565b6040519081526020016100de565b61010e7f000000000000000000000000000000000000000000000000000000000000000081565b6101d16107b2565b6040516100de919061095f565b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102755760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b60448201526064015b60405180910390fd5b50630b135d3f60e11b5b92915050565b600063ffffffff7f0000000000000000000000000000000000000000000000000000000000000000166102b8814261098f565b6102c39060016109b1565b6102cd91906109c4565b905090565b604051630ab35fb160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690632acd7ec490602401602060405180830381865afa15801561035d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038191906109db565b9050600081116103d35760405162461bcd60e51b815260206004820152601d60248201527f4d696e2072657761726420616d6f756e74206d757374206265203e2030000000604482015260640161026c565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561043a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045e91906109db565b90506402540be4008110806104ac575061049e63ffffffff7f000000000000000000000000000000000000000000000000000000000000000016836109c4565b6104aa82610e106109c4565b105b156104b5575050565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af1158015610544573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056891906109f4565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e55f577b6040518061010001604052806000801b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018481526020017f000000000000000000000000000000000000000000000000000000000000000063ffffffff168152602001610645610285565b63ffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000063ffffffff1681526020016000805461068990610a16565b80601f01602080910402602001604051908101604052809291908181526020018280546106b590610a16565b80156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b5050505050815250604051806020016040528060008152506040518363ffffffff1660e01b8152600401610737929190610a50565b6020604051808303816000875af1158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a91906109db565b506040518181527f1424c3a24f9b1f30558ab0a7b48e07ce9f7d85b293a69a90356e1478504232eb9060200160405180910390a15050565b600080546107bf90610a16565b80601f01602080910402602001604051908101604052809291908181526020018280546107eb90610a16565b80156108385780601f1061080d57610100808354040283529160200191610838565b820191906000526020600020905b81548152906001019060200180831161081b57829003601f168201915b505050505081565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561086957600080fd5b82359150602083013567ffffffffffffffff81111561088757600080fd5b8301601f8101851361089857600080fd5b803567ffffffffffffffff8111156108b2576108b2610840565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156108e1576108e1610840565b6040528181528282016020018710156108f957600080fd5b816020840160208301376000602083830101528093505050509250929050565b6000815180845260005b8181101561093f57602081850181015186830182015201610923565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006109726020830184610919565b9392505050565b634e487b7160e01b600052601160045260246000fd5b6000826109ac57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561027f5761027f610979565b808202811582820484141761027f5761027f610979565b6000602082840312156109ed57600080fd5b5051919050565b600060208284031215610a0657600080fd5b8151801515811461097257600080fd5b600181811c90821680610a2a57607f821691505b602082108103610a4a57634e487b7160e01b600052602260045260246000fd5b50919050565b604081528251604082015260018060a01b03602084015116606082015260018060a01b036040840151166080820152606083015160a082015260006080840151610aa260c084018263ffffffff169052565b5060a084015163ffffffff811660e08401525060c084015163ffffffff81166101008401525060e0840151610100610120840152610ae4610140840182610919565b90508281036020840152610af88185610919565b9594505050505056fea2646970667358221220817db8bdc668d25df24aadb8b56f8a0ab82b2dd31c90c4f91b3a56e8725f85dc64736f6c634300081c00337bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa2646970667358221220bb73a2e828ce2079899df04de933c1356cec356e2771a71d8e0332732df9291b64736f6c634300081c00337bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a000000000000000000000000856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc30000000000000000000000004ff1b9d9ba8558f5eafcec096318ea0d8b541971000000000000000000000000aa8af8db4b6a827b51786334d26349eb035697310000000000000000000000008bb4c975ff3c250e0ceea271728547f3802b36fd

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638f73dcfa11610097578063d517786811610066578063d51778681461024f578063dbfba95914610262578063e24abe6314610275578063e331db3f1461028857600080fd5b80638f73dcfa146101bd578063b6eee962146101e4578063c7af335214610224578063d38bfff41461023c57600080fd5b80632fa4abea116100d35780632fa4abea1461018557806354fd4d50146101985780635d36b190146101a05780636720bd3f146101aa57600080fd5b80630c340a2414610105578063110c1a411461012a57806317c01cb31461014c5780631a32aad61461015e575b600080fd5b61010d61029b565b6040516001600160a01b0390911681526020015b60405180910390f35b61013d610138366004611042565b6102b8565b60405161012193929190611071565b6000545b604051908152602001610121565b61010d7f000000000000000000000000856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc381565b60025461010d906001600160a01b031681565b610150600181565b6101a86102fe565b005b6101a86101b83660046110e5565b6103a9565b61010d7f000000000000000000000000aa8af8db4b6a827b51786334d26349eb0356973181565b61013d6101f2366004611194565b600160208190526000918252604090912080549101546001600160a01b0391821691811690600160a01b900460ff1683565b61022c6105bc565b6040519015158152602001610121565b6101a861024a366004611194565b6105ed565b6101a861025d3660046111cc565b610691565b6101a8610270366004611194565b610789565b6101a8610283366004611194565b6107b9565b61010d6102963660046110e5565b610a0b565b60006102b36000805160206124148339815191525490565b905090565b600081815481106102c857600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b03161461039e5760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084015b60405180910390fd5b6103a733610c40565b565b6103b16105bc565b6103cd5760405162461bcd60e51b81526004016103959061129c565b6001600160a01b0385166104235760405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420616d6d506f6f6c41646472657373206164647265737300006044820152606401610395565b600081116104625760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081cd85b1d60a21b6044820152606401610395565b610e108463ffffffff16116104b55760405162461bcd60e51b815260206004820152601960248201527824b73b30b634b21031b0b6b830b4b3b710323ab930ba34b7b760391b6044820152606401610395565b816104fa5760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642063616d706169676e206461746160581b6044820152606401610395565b60006105a56040518060200161050f90611035565b601f1982820381018352601f909101166040526002547f000000000000000000000000856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3906001600160a01b0316888b61055a61029b565b8a8a60405160200161057297969594939291906112d3565b60408051601f1981840301815290829052610590929160200161136b565b60405160208183030381529060405283610c9f565b90506105b381876003610d21565b50505050505050565b60006105d46000805160206124148339815191525490565b6001600160a01b0316336001600160a01b031614905090565b6105f56105bc565b6106115760405162461bcd60e51b81526004016103959061129c565b610639817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166106596000805160206124148339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b60008054905b818110156107845760008082815481106106b3576106b3611388565b6000918252602082206002909102015485516001600160a01b039091169250815b8181101561071f57836001600160a01b03168782815181106106f8576106f8611388565b60200260200101516001600160a01b031603610717576001925061071f565b6001016106d4565b508161077957826001600160a01b03166337d0208c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561076057600080fd5b505af1158015610774573d6000803e3d6000fd5b505050505b505050600101610697565b505050565b6107916105bc565b6107ad5760405162461bcd60e51b81526004016103959061129c565b6107b681610f24565b50565b6107c16105bc565b6107dd5760405162461bcd60e51b81526004016103959061129c565b60008054905b8181101561078457826001600160a01b03166000828154811061080857610808611388565b60009182526020909120600290910201546001600160a01b031603610a03576001600080838154811061083d5761083d611388565b6000918252602080832060016002909302018201546001600160a01b031684528301939093526040909101812080546001600160a01b0319168155820180546001600160a81b031916905590610893908461139e565b815481106108a3576108a3611388565b9060005260206000209060020201600082815481106108c4576108c4611388565b60009182526020909120825460029092020180546001600160a01b03199081166001600160a01b0393841617825560018085018054918401805493841692909516918217855554929360ff600160a01b94859004169390926001600160a81b0319169091179083600381111561093c5761093c61105b565b02179055509050506000805480610955576109556113bf565b6000828152602090206002600019929092019182020180546001600160a01b031916815560010180546001600160a81b03191690559055604051630702522960e01b81526001600160a01b0384811660048301527f000000000000000000000000aa8af8db4b6a827b51786334d26349eb035697311690630702522990602401600060405180830381600087803b1580156109ef57600080fd5b505af11580156105b3573d6000803e3d6000fd5b6001016107e3565b60006001600160a01b038616610a635760405162461bcd60e51b815260206004820152601e60248201527f496e76616c696420616d6d506f6f6c41646472657373206164647265737300006044820152606401610395565b60008211610aa25760405162461bcd60e51b815260206004820152600c60248201526b125b9d985b1a59081cd85b1d60a21b6044820152606401610395565b610e108563ffffffff1611610af55760405162461bcd60e51b815260206004820152601960248201527824b73b30b634b21031b0b6b830b4b3b710323ab930ba34b7b760391b6044820152606401610395565b82610b3a5760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642063616d706169676e206461746160581b6044820152606401610395565b610c3560405180602001610b4d90611035565b601f1982820381018352601f909101166040526002547f000000000000000000000000856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3906001600160a01b0316888b610b9861029b565b8a8a604051602001610bb097969594939291906112d3565b60408051601f1981840301815290829052610bce929160200161136b565b60408051601f1981840301815282825280516020918201206001600160f81b0319848301526bffffffffffffffffffffffff193060601b16602185015260358401879052605580850191909152825180850390910181526075909301909152815191012090565b979650505050505050565b6001600160a01b038116610c965760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f7220697320616464726573732830290000000000006044820152606401610395565b6107b681610fce565b6000818351602085016000f590506000816001600160a01b03163b118015610ccf57506001600160a01b03811615155b610d1b5760405162461bcd60e51b815260206004820152601e60248201527f4661696c6564206372656174696e67206120706f6f6c20626f6f7374657200006044820152606401610395565b92915050565b60006040518060600160405280856001600160a01b03168152602001846001600160a01b03168152602001836003811115610d5e57610d5e61105b565b905260008054600181018255908052815160029091027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563810180546001600160a01b039384166001600160a01b031991821617825560208501517f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5649093018054939094169083168117845560408501519495508594919391926001600160a81b03191617600160a01b836003811115610e1957610e1961105b565b021790555050506001600160a01b03808416600090815260016020818152604092839020855181549086166001600160a01b03199182161782559186015192810180549390951691831682178555928501518594909290916001600160a81b031990911617600160a01b836003811115610e9557610e9561105b565b021790555050604051630b22521d60e31b81526001600160a01b037f000000000000000000000000aa8af8db4b6a827b51786334d26349eb0356973116915063591290e890610eec90879087908790600401611071565b600060405180830381600087803b158015610f0657600080fd5b505af1158015610f1a573d6000803e3d6000fd5b5050505050505050565b6001600160a01b038116610f7a5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d65726b6c4469737472696275746f7220616464726573736044820152606401610395565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1a0e4b3bfcac0fa1e13f7c8b088964c6daea7147fa49e39f54db5787518fe9c99060200160405180910390a150565b806001600160a01b0316610fee6000805160206124148339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a360008051602061241483398151915255565b61103e806113d683390190565b60006020828403121561105457600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0384811682528316602082015260608101600483106110a757634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b803563ffffffff811681146110c957600080fd5b919050565b80356001600160a01b03811681146110c957600080fd5b60008060008060008060a087890312156110fe57600080fd5b611107876110b5565b9550611115602088016110ce565b9450611123604088016110b5565b9350606087013567ffffffffffffffff81111561113f57600080fd5b8701601f8101891361115057600080fd5b803567ffffffffffffffff81111561116757600080fd5b89602082840101111561117957600080fd5b96999598509396602090940195946080909401359392505050565b6000602082840312156111a657600080fd5b6111af826110ce565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156111de57600080fd5b813567ffffffffffffffff8111156111f557600080fd5b8201601f8101841361120657600080fd5b803567ffffffffffffffff811115611220576112206111b6565b8060051b604051601f19603f830116810181811067ffffffffffffffff8211171561124d5761124d6111b6565b60405291825260208184018101929081018784111561126b57600080fd5b6020850194505b8385101561129157611283856110ce565b815260209485019401611272565b509695505050505050565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b6001600160a01b038881168252878116602083015263ffffffff8781166040840152861660608301528416608082015260c060a082018190528101829052818360e0830137600081830160e090810191909152601f909201601f191601019695505050505050565b6000815160005b8181101561135c5760208185018101518683015201611342565b50600093019283525090919050565b600061138061137a838661133b565b8461133b565b949350505050565b634e487b7160e01b600052603260045260246000fd5b81810381811115610d1b57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fdfe61012060405234801561001157600080fd5b5060405161103e38038061103e83398101604081905261003091610204565b6001600160a01b03861661008b5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c696420726577617264546f6b656e2061646472657373000000000060448201526064015b60405180910390fd5b6001600160a01b0385166100e15760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d65726b6c4469737472696275746f7220616464726573736044820152606401610082565b60008151116101325760405162461bcd60e51b815260206004820152601460248201527f496e76616c69642063616d706169676e446174610000000000000000000000006044820152606401610082565b610e108463ffffffff161161017c5760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b6044820152606401610082565b63ffffffff80841660e052841660c0526001600160a01b0380831661010052858116608052861660a05260006101b282826103ac565b5050505050505061046a565b80516001600160a01b03811681146101d557600080fd5b919050565b805163ffffffff811681146101d557600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c0878903121561021d57600080fd5b610226876101be565b9550610234602088016101be565b9450610242604088016101da565b9350610250606088016101da565b925061025e608088016101be565b60a08801519092506001600160401b0381111561027a57600080fd5b8701601f8101891361028b57600080fd5b80516001600160401b038111156102a4576102a46101ee565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102d2576102d26101ee565b6040528181528282016020018b10156102ea57600080fd5b60005b82811015610309576020818501810151838301820152016102ed565b506000602083830101528093505050509295509295509295565b600181811c9082168061033757607f821691505b60208210810361035757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156103a757806000526020600020601f840160051c810160208510156103845750805b601f840160051c820191505b818110156103a45760008155600101610390565b50505b505050565b81516001600160401b038111156103c5576103c56101ee565b6103d9816103d38454610323565b8461035d565b6020601f82116001811461040d57600083156103f55750848201515b600019600385901b1c1916600184901b1784556103a4565b600084815260208120601f198516915b8281101561043d578785015182556020948501946001909201910161041d565b508482101561045b5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e05161010051610b376105076000396000818160a801526105af0152600081816101a7015261061301526000818160ec0152818161028e0152818161047801526106520152600081816101e3015281816102e9015281816103eb015281816104fb01526105de0152600081816101540152818161021201528181610314015281816104cc015261056b0152610b376000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806337d0208c1161006657806337d0208c1461017e5780633978033f14610188578063759dadce146101a2578063edd5271e146101c9578063f7c618c1146101de57600080fd5b806302d05d3f146100a35780630fb5a6b4146100e75780631626ba7e146101235780632fa4abea1461014f57806334bb9c1714610176575b600080fd5b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61010e7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100de565b610136610131366004610856565b610205565b6040516001600160e01b031990911681526020016100de565b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b61010e610285565b6101866102d2565b005b6101946402540be40081565b6040519081526020016100de565b61010e7f000000000000000000000000000000000000000000000000000000000000000081565b6101d16107b2565b6040516100de919061095f565b6100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102755760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b60448201526064015b60405180910390fd5b50630b135d3f60e11b5b92915050565b600063ffffffff7f0000000000000000000000000000000000000000000000000000000000000000166102b8814261098f565b6102c39060016109b1565b6102cd91906109c4565b905090565b604051630ab35fb160e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000917f000000000000000000000000000000000000000000000000000000000000000090911690632acd7ec490602401602060405180830381865afa15801561035d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038191906109db565b9050600081116103d35760405162461bcd60e51b815260206004820152601d60248201527f4d696e2072657761726420616d6f756e74206d757374206265203e2030000000604482015260640161026c565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561043a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045e91906109db565b90506402540be4008110806104ac575061049e63ffffffff7f000000000000000000000000000000000000000000000000000000000000000016836109c4565b6104aa82610e106109c4565b105b156104b5575050565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af1158015610544573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056891906109f4565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e55f577b6040518061010001604052806000801b81526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031681526020018481526020017f000000000000000000000000000000000000000000000000000000000000000063ffffffff168152602001610645610285565b63ffffffff1681526020017f000000000000000000000000000000000000000000000000000000000000000063ffffffff1681526020016000805461068990610a16565b80601f01602080910402602001604051908101604052809291908181526020018280546106b590610a16565b80156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b5050505050815250604051806020016040528060008152506040518363ffffffff1660e01b8152600401610737929190610a50565b6020604051808303816000875af1158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a91906109db565b506040518181527f1424c3a24f9b1f30558ab0a7b48e07ce9f7d85b293a69a90356e1478504232eb9060200160405180910390a15050565b600080546107bf90610a16565b80601f01602080910402602001604051908101604052809291908181526020018280546107eb90610a16565b80156108385780601f1061080d57610100808354040283529160200191610838565b820191906000526020600020905b81548152906001019060200180831161081b57829003601f168201915b505050505081565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561086957600080fd5b82359150602083013567ffffffffffffffff81111561088757600080fd5b8301601f8101851361089857600080fd5b803567ffffffffffffffff8111156108b2576108b2610840565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156108e1576108e1610840565b6040528181528282016020018710156108f957600080fd5b816020840160208301376000602083830101528093505050509250929050565b6000815180845260005b8181101561093f57602081850181015186830182015201610923565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006109726020830184610919565b9392505050565b634e487b7160e01b600052601160045260246000fd5b6000826109ac57634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561027f5761027f610979565b808202811582820484141761027f5761027f610979565b6000602082840312156109ed57600080fd5b5051919050565b600060208284031215610a0657600080fd5b8151801515811461097257600080fd5b600181811c90821680610a2a57607f821691505b602082108103610a4a57634e487b7160e01b600052602260045260246000fd5b50919050565b604081528251604082015260018060a01b03602084015116606082015260018060a01b036040840151166080820152606083015160a082015260006080840151610aa260c084018263ffffffff169052565b5060a084015163ffffffff811660e08401525060c084015163ffffffff81166101008401525060e0840151610100610120840152610ae4610140840182610919565b90508281036020840152610af88185610919565b9594505050505056fea2646970667358221220817db8bdc668d25df24aadb8b56f8a0ab82b2dd31c90c4f91b3a56e8725f85dc64736f6c634300081c00337bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa2646970667358221220bb73a2e828ce2079899df04de933c1356cec356e2771a71d8e0332732df9291b64736f6c634300081c0033

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

000000000000000000000000856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc30000000000000000000000004ff1b9d9ba8558f5eafcec096318ea0d8b541971000000000000000000000000aa8af8db4b6a827b51786334d26349eb035697310000000000000000000000008bb4c975ff3c250e0ceea271728547f3802b36fd

-----Decoded View---------------
Arg [0] : _oToken (address): 0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3
Arg [1] : _governor (address): 0x4FF1b9D9ba8558F5EAfCec096318eA0d8b541971
Arg [2] : _centralRegistry (address): 0xAA8af8Db4B6a827B51786334d26349eb03569731
Arg [3] : _merklDistributor (address): 0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3
Arg [1] : 0000000000000000000000004ff1b9d9ba8558f5eafcec096318ea0d8b541971
Arg [2] : 000000000000000000000000aa8af8db4b6a827b51786334d26349eb03569731
Arg [3] : 0000000000000000000000008bb4c975ff3c250e0ceea271728547f3802b36fd


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.