ETH Price: $2,296.84 (-5.96%)

Contract

0xD7aF644b6747b0cDF84443416c38102B3CE45DA6

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Claim961231712023-05-30 21:09:48978 days ago1685480988IN
Sector Finance: Reward Distributor
0 ETH0.000255320.1
Claim961220702023-05-30 21:05:10978 days ago1685480710IN
Sector Finance: Reward Distributor
0 ETH0.0002560.1
Claim961214302023-05-30 21:02:27978 days ago1685480547IN
Sector Finance: Reward Distributor
0 ETH0.000268820.1
Claim961207092023-05-30 20:59:28978 days ago1685480368IN
Sector Finance: Reward Distributor
0 ETH0.000270090.1
Claim961206432023-05-30 20:59:12978 days ago1685480352IN
Sector Finance: Reward Distributor
0 ETH0.000269660.1
Claim960809802023-05-30 18:12:42978 days ago1685470362IN
Sector Finance: Reward Distributor
0 ETH0.000304350.1
Claim960735712023-05-30 17:41:49978 days ago1685468509IN
Sector Finance: Reward Distributor
0 ETH0.00028190.1
Claim959532872023-05-30 9:22:28978 days ago1685438548IN
Sector Finance: Reward Distributor
0 ETH0.000278120.1
Claim959172732023-05-30 6:52:24978 days ago1685429544IN
Sector Finance: Reward Distributor
0 ETH0.000301390.1
Claim958399452023-05-30 1:18:04979 days ago1685409484IN
Sector Finance: Reward Distributor
0 ETH0.000143720.1
Claim958317562023-05-30 0:41:59979 days ago1685407319IN
Sector Finance: Reward Distributor
0 ETH0.000138890.1
Claim958122222023-05-29 23:14:44979 days ago1685402084IN
Sector Finance: Reward Distributor
0 ETH0.000168090.1
Claim953718072023-05-28 16:19:01980 days ago1685290741IN
Sector Finance: Reward Distributor
0 ETH0.000191160.1
Claim951330442023-05-27 23:34:59981 days ago1685230499IN
Sector Finance: Reward Distributor
0 ETH0.000166160.1
Claim949459622023-05-27 10:29:18981 days ago1685183358IN
Sector Finance: Reward Distributor
0 ETH0.000151660.1
Claim949393532023-05-27 10:01:51981 days ago1685181711IN
Sector Finance: Reward Distributor
0 ETH0.000150110.1
Claim949172562023-05-27 8:30:08981 days ago1685176208IN
Sector Finance: Reward Distributor
0 ETH0.000138330.1
Claim948900252023-05-27 6:36:37981 days ago1685169397IN
Sector Finance: Reward Distributor
0 ETH0.000153860.1
Claim948281022023-05-27 2:13:45981 days ago1685153625IN
Sector Finance: Reward Distributor
0 ETH0.000164490.1
Claim947343722023-05-26 19:33:31982 days ago1685129611IN
Sector Finance: Reward Distributor
0 ETH0.000188120.1
Claim946729982023-05-26 15:17:13982 days ago1685114233IN
Sector Finance: Reward Distributor
0 ETH0.000261790.1
Claim946527842023-05-26 13:53:30982 days ago1685109210IN
Sector Finance: Reward Distributor
0 ETH0.000254050.1
Claim946422622023-05-26 13:09:51982 days ago1685106591IN
Sector Finance: Reward Distributor
0 ETH0.000160720.1
Claim945587412023-05-26 7:22:45982 days ago1685085765IN
Sector Finance: Reward Distributor
0 ETH0.000207880.1
Claim945548812023-05-26 7:06:43982 days ago1685084803IN
Sector Finance: Reward Distributor
0 ETH0.000200320.1
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RewardDistributor

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion, MIT license
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

// partially inspired by
// https://github.com/Gearbox-protocol/rewards/blob/master/contracts/AirdropDistributor.sol

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import { IRewardDistributor } from "./interfaces/IRewardDistributor.sol";
import { IbSect, IveSect } from "./interfaces/ITokens.sol";

// import "hardhat/console.sol";

/// @notice This contract distributes 50% lveSECT and 50% bSECT tokens to users
/// it can be used to continuously distribute rewards to users
contract RewardDistributor is Ownable, IRewardDistributor {
	/// @dev Returns the token distributed by the contract
	IERC20 public immutable override token;
	IbSect public immutable override bToken;
	IveSect public immutable override lveToken;

	/// @dev The current merkle root of total claimable balances
	bytes32 public override merkleRoot;

	/// @dev The mapping that stores amounts already claimed by users
	mapping(address => uint256) public claimed;

	/// @param token_ The token to distribute
	/// @param bToken_ The bSECT token
	/// @param lveToken_ The lveSECT token
	/// @param merkleRoot_ The merkle root of the total claimable balances
	constructor(
		address token_,
		address bToken_,
		address lveToken_,
		bytes32 merkleRoot_
	) {
		token = IERC20(token_);
		bToken = IbSect(bToken_);
		lveToken = IveSect(lveToken_);
		merkleRoot = merkleRoot_;
		token.approve(bToken_, type(uint256).max);
		token.approve(lveToken_, type(uint256).max);
	}

	/// @notice Updates the merkle root - this can be used to increment total reward amounts
	/// @param newRoot The new merkle root
	function updateMerkleRoot(bytes32 newRoot) external onlyOwner {
		bytes32 oldRoot = merkleRoot;
		merkleRoot = newRoot;
		emit RootUpdated(oldRoot, newRoot);
	}

	/// @notice Claims the given amount of the token for the account. Reverts if the inputs are not a leaf in the tree
	/// @param account The account to claim for
	/// @param totalAmount The total amount of token to claim
	/// @param merkleProof The merkle proof of the claim
	function claim(
		address account,
		uint256 totalAmount,
		bytes32[] calldata merkleProof
	) external override {
		require(merkleRoot != bytes32(0), "MerkleDistributor: No merkle root set");
		require(claimed[account] < totalAmount, "MerkleDistributor: Nothing to claim");

		bytes32 node = keccak256(bytes.concat(keccak256(abi.encode(account, totalAmount))));

		require(
			MerkleProof.verify(merkleProof, merkleRoot, node),
			"MerkleDistributor: Invalid proof."
		);

		uint256 claimedAmount = totalAmount - claimed[account];
		claimed[account] += claimedAmount;

		uint256 bTokenAmount = claimedAmount / 2;
		uint256 lveTokenAmount = claimedAmount - bTokenAmount;
		bToken.mintTo(account, bTokenAmount);
		lveToken.mintTo(account, lveTokenAmount);

		emit Claimed(account, claimedAmount, false);
	}
}

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

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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 v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IbSect, IveSect } from "./ITokens.sol";

interface IRewardDistributorEvents {
	/// @dev Emits when a user claims tokens
	event Claimed(address indexed account, uint256 amount, bool indexed historic);

	/// @dev Emits when the owner replaces the merkle root
	event RootUpdated(bytes32 oldRoot, bytes32 indexed newRoot);

	/// @dev Emitted from a special function after updating the root to index allocations
	event TokenAllocated(address indexed account, uint8 indexed campaignId, uint256 amount);
}

interface IRewardDistributor is IRewardDistributorEvents {
	/// @dev Returns the token distributed by this contract.
	function token() external view returns (IERC20);

	/// @dev Returns the bToken distributed by this contract.
	function bToken() external view returns (IbSect);

	/// @dev Returns the lveToken distributed by this contract.
	function lveToken() external view returns (IveSect);

	/// @dev Returns the current merkle root containing total claimable balances
	function merkleRoot() external view returns (bytes32);

	/// @dev Returns the total amount of token claimed by the user
	function claimed(address user) external view returns (uint256);

	// Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
	/// @dev Claims the given amount of the token for the account. Reverts if the inputs are not a leaf in the tree
	///      or the total claimed amount for the account is more than the leaf amount.
	function claim(
		address account,
		uint256 totalAmount,
		bytes32[] calldata merkleProof
	) external;
}

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

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

interface IbSect is IERC20 {
	// Sets the price of the lbTokens in underlying tokens
	function setPrice(uint256 price_) external;

	// Mint new bTokens tokens to the specified address
	function mintTo(address to, uint256 amount) external;

	// Convert bTokens to underlying tokens
	function convert(uint256 amount) external;

	// Claim underlying tokens held by the contract
	function claimUnderlying(address to) external;
}

interface IveSect is IERC20 {
	function setVeToken(address veToken_) external;

	function mintTo(address to, uint256 amount) external;

	function convertToLock(uint256 amount) external;

	function addValueToLock(uint256 amount) external;
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"bToken_","type":"address"},{"internalType":"address","name":"lveToken_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"bool","name":"historic","type":"bool"}],"name":"Claimed","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":"bytes32","name":"oldRoot","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"RootUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint8","name":"campaignId","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenAllocated","type":"event"},{"inputs":[],"name":"bToken","outputs":[{"internalType":"contract IbSect","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lveToken","outputs":[{"internalType":"contract IveSect","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e060405234801561001057600080fd5b50604051610b72380380610b7283398101604081905261002f916101ad565b61003833610141565b6001600160a01b03808516608081905284821660a05290831660c052600182905560405163095ea7b360e01b815263095ea7b39061007e908690600019906004016101f8565b6020604051808303816000875af115801561009d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100c19190610211565b506080516001600160a01b031663095ea7b3836000196040518363ffffffff1660e01b81526004016100f49291906101f8565b6020604051808303816000875af1158015610113573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101379190610211565b505050505061023a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146101a857600080fd5b919050565b600080600080608085870312156101c357600080fd5b6101cc85610191565b93506101da60208601610191565b92506101e860408601610191565b6060959095015193969295505050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561022357600080fd5b8151801515811461023357600080fd5b9392505050565b60805160a05160c0516108fc6102766000396000818161014b0152610466015260008181609801526103e80152600061018501526108fc6000f3fe608060405234801561001057600080fd5b506004361061008e5760003560e01c8063180f5842146100935780632eb4a7ab146100d75780633d13f874146100ee5780634783f0ef14610103578063715018a6146101165780638da5cb5b1461011e578063c884ef8314610126578063ea105c3114610146578063f2fde38b1461016d578063fc0c546a14610180575b600080fd5b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e060015481565b6040519081526020016100ce565b6101016100fc366004610763565b6101a7565b005b6101016101113660046107ec565b61051c565b610101610565565b6100ba610579565b6100e0610134366004610805565b60026020526000908152604090205481565b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b61010161017b366004610805565b610588565b6100ba7f000000000000000000000000000000000000000000000000000000000000000081565b6001546102095760405162461bcd60e51b815260206004820152602560248201527f4d65726b6c654469737472696275746f723a204e6f206d65726b6c6520726f6f6044820152641d081cd95d60da1b60648201526084015b60405180910390fd5b6001600160a01b038416600090815260026020526040902054831161027c5760405162461bcd60e51b815260206004820152602360248201527f4d65726b6c654469737472696275746f723a204e6f7468696e6720746f20636c60448201526261696d60e81b6064820152608401610200565b60008484604051602001610291929190610820565b60408051601f1981840301815282825280516020918201209083015201604051602081830303815290604052805190602001209050610307838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506001549150849050610601565b61035d5760405162461bcd60e51b815260206004820152602160248201527f4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f666044820152601760f91b6064820152608401610200565b6001600160a01b038516600090815260026020526040812054610380908661084f565b6001600160a01b0387166000908152600260205260408120805492935083929091906103ad908490610862565b90915550600090506103c0600283610875565b905060006103ce828461084f565b6040516308934a5f60e31b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063449a52f89061041f908b908690600401610820565b600060405180830381600087803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b50506040516308934a5f60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063449a52f8915061049f908b908590600401610820565b600060405180830381600087803b1580156104b957600080fd5b505af11580156104cd573d6000803e3d6000fd5b5050604051858152600092506001600160a01b038b1691507ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc9060200160405180910390a35050505050505050565b610524610617565b600180549082905560405181815282907f26df13263ccd588bd14d17b939ae977c1d51960da437d7eb886d1cfb6f3d06829060200160405180910390a25050565b61056d610617565b6105776000610676565b565b6000546001600160a01b031690565b610590610617565b6001600160a01b0381166105f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610200565b6105fe81610676565b50565b60008261060e85846106c6565b14949350505050565b33610620610579565b6001600160a01b0316146105775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610200565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b845181101561070b576106f7828683815181106106ea576106ea610897565b6020026020010151610715565b915080610703816108ad565b9150506106cb565b5090505b92915050565b6000818310610731576000828152602084905260409020610740565b60008381526020839052604090205b9392505050565b80356001600160a01b038116811461075e57600080fd5b919050565b6000806000806060858703121561077957600080fd5b61078285610747565b93506020850135925060408501356001600160401b03808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107c857600080fd5b8860208260051b85010111156107dd57600080fd5b95989497505060200194505050565b6000602082840312156107fe57600080fd5b5035919050565b60006020828403121561081757600080fd5b61074082610747565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561070f5761070f610839565b8082018082111561070f5761070f610839565b60008261089257634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016108bf576108bf610839565b506001019056fea2646970667358221220830c18502cc467d4f809b9d803677ddeacce86f36193bc062078251762b19caf64736f6c634300081000330000000000000000000000000b63c61bba4a876a6eb8b5e596800f7649a9b71e00000000000000000000000002f60921f07024a5b44b6e299ae23749090dbcfc000000000000000000000000f4a90562549b68f59050fe89e725ca8c257b30560000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061008e5760003560e01c8063180f5842146100935780632eb4a7ab146100d75780633d13f874146100ee5780634783f0ef14610103578063715018a6146101165780638da5cb5b1461011e578063c884ef8314610126578063ea105c3114610146578063f2fde38b1461016d578063fc0c546a14610180575b600080fd5b6100ba7f00000000000000000000000002f60921f07024a5b44b6e299ae23749090dbcfc81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e060015481565b6040519081526020016100ce565b6101016100fc366004610763565b6101a7565b005b6101016101113660046107ec565b61051c565b610101610565565b6100ba610579565b6100e0610134366004610805565b60026020526000908152604090205481565b6100ba7f000000000000000000000000f4a90562549b68f59050fe89e725ca8c257b305681565b61010161017b366004610805565b610588565b6100ba7f0000000000000000000000000b63c61bba4a876a6eb8b5e596800f7649a9b71e81565b6001546102095760405162461bcd60e51b815260206004820152602560248201527f4d65726b6c654469737472696275746f723a204e6f206d65726b6c6520726f6f6044820152641d081cd95d60da1b60648201526084015b60405180910390fd5b6001600160a01b038416600090815260026020526040902054831161027c5760405162461bcd60e51b815260206004820152602360248201527f4d65726b6c654469737472696275746f723a204e6f7468696e6720746f20636c60448201526261696d60e81b6064820152608401610200565b60008484604051602001610291929190610820565b60408051601f1981840301815282825280516020918201209083015201604051602081830303815290604052805190602001209050610307838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506001549150849050610601565b61035d5760405162461bcd60e51b815260206004820152602160248201527f4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f666044820152601760f91b6064820152608401610200565b6001600160a01b038516600090815260026020526040812054610380908661084f565b6001600160a01b0387166000908152600260205260408120805492935083929091906103ad908490610862565b90915550600090506103c0600283610875565b905060006103ce828461084f565b6040516308934a5f60e31b81529091506001600160a01b037f00000000000000000000000002f60921f07024a5b44b6e299ae23749090dbcfc169063449a52f89061041f908b908690600401610820565b600060405180830381600087803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b50506040516308934a5f60e31b81526001600160a01b037f000000000000000000000000f4a90562549b68f59050fe89e725ca8c257b305616925063449a52f8915061049f908b908590600401610820565b600060405180830381600087803b1580156104b957600080fd5b505af11580156104cd573d6000803e3d6000fd5b5050604051858152600092506001600160a01b038b1691507ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc9060200160405180910390a35050505050505050565b610524610617565b600180549082905560405181815282907f26df13263ccd588bd14d17b939ae977c1d51960da437d7eb886d1cfb6f3d06829060200160405180910390a25050565b61056d610617565b6105776000610676565b565b6000546001600160a01b031690565b610590610617565b6001600160a01b0381166105f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610200565b6105fe81610676565b50565b60008261060e85846106c6565b14949350505050565b33610620610579565b6001600160a01b0316146105775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610200565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b845181101561070b576106f7828683815181106106ea576106ea610897565b6020026020010151610715565b915080610703816108ad565b9150506106cb565b5090505b92915050565b6000818310610731576000828152602084905260409020610740565b60008381526020839052604090205b9392505050565b80356001600160a01b038116811461075e57600080fd5b919050565b6000806000806060858703121561077957600080fd5b61078285610747565b93506020850135925060408501356001600160401b03808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107c857600080fd5b8860208260051b85010111156107dd57600080fd5b95989497505060200194505050565b6000602082840312156107fe57600080fd5b5035919050565b60006020828403121561081757600080fd5b61074082610747565b6001600160a01b03929092168252602082015260400190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561070f5761070f610839565b8082018082111561070f5761070f610839565b60008261089257634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016108bf576108bf610839565b506001019056fea2646970667358221220830c18502cc467d4f809b9d803677ddeacce86f36193bc062078251762b19caf64736f6c63430008100033

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

0000000000000000000000000b63c61bba4a876a6eb8b5e596800f7649a9b71e00000000000000000000000002f60921f07024a5b44b6e299ae23749090dbcfc000000000000000000000000f4a90562549b68f59050fe89e725ca8c257b30560000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : token_ (address): 0x0B63C61bba4a876a6eB8b5e596800F7649A9B71E
Arg [1] : bToken_ (address): 0x02F60921f07024a5b44b6e299Ae23749090dbCfc
Arg [2] : lveToken_ (address): 0xf4A90562549b68f59050FE89E725CA8c257b3056
Arg [3] : merkleRoot_ (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000b63c61bba4a876a6eb8b5e596800f7649a9b71e
Arg [1] : 00000000000000000000000002f60921f07024a5b44b6e299ae23749090dbcfc
Arg [2] : 000000000000000000000000f4a90562549b68f59050fe89e725ca8c257b3056
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty 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
[ 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.