ETH Price: $3,131.38 (+0.25%)

Contract

0x195B6eA50150900A25FA0928b8B65B03C7666D10

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
Claim All2062100742024-04-30 0:38:53594 days ago1714437533IN
Plutus DAO: TGE Controller
0 ETH0.000000590.01
Claim All391562132022-11-18 22:04:031122 days ago1668809043IN
Plutus DAO: TGE Controller
0 ETH0.000022480.1
Claim All211581782022-08-24 14:03:011208 days ago1661349781IN
Plutus DAO: TGE Controller
0 ETH0.000054843647 ETH0.10462351
Claim All206267492022-08-18 21:45:511214 days ago1660859151IN
Plutus DAO: TGE Controller
0 ETH0.000088856126 ETH0.17055737
Claim All205744332022-08-18 7:42:251214 days ago1660808545IN
Plutus DAO: TGE Controller
0 ETH0.000069941863 ETH0.14809688
Claim All203416212022-08-15 19:42:301217 days ago1660592550IN
Plutus DAO: TGE Controller
0 ETH0.000117284197 ETH0.20402432
Claim All200540022022-08-12 3:40:041220 days ago1660275604IN
Plutus DAO: TGE Controller
0 ETH0.000119619145 ETH0.22796105
Claim All199100042022-08-10 13:12:181222 days ago1660137138IN
Plutus DAO: TGE Controller
0 ETH0.001310967481 ETH194.44475677
Claim All195321192022-08-06 11:13:171226 days ago1659784397IN
Plutus DAO: TGE Controller
0 ETH0.000054120284 ETH0.10360189
Claim All176539242022-07-14 23:36:041249 days ago1657841764IN
Plutus DAO: TGE Controller
0 ETH0.000242289877 ETH0.42079994
Claim All176395422022-07-14 17:40:071249 days ago1657820407IN
Plutus DAO: TGE Controller
0 ETH0.000181777917 ETH0.34771598
Claim All173863512022-07-10 19:06:341253 days ago1657479994IN
Plutus DAO: TGE Controller
0 ETH0.000095472876 ETH0.18229825
Claim All173318022022-07-09 19:04:531254 days ago1657393493IN
Plutus DAO: TGE Controller
0 ETH0.000111625541 ETH0.19387243
Claim All159197642022-06-26 13:58:341267 days ago1656251914IN
Plutus DAO: TGE Controller
0 ETH0.000159164953 ETH0.30386473
Claim All156620242022-06-24 17:01:161269 days ago1656090076IN
Plutus DAO: TGE Controller
0 ETH0.000249527387 ETH0.4730933
Claim All140150962022-06-07 22:22:241286 days ago1654640544IN
Plutus DAO: TGE Controller
0 ETH0.00045028329 ETH0.78393166
Claim All137207992022-06-04 17:01:531289 days ago1654362113IN
Plutus DAO: TGE Controller
0 ETH0.000314217862 ETH0.59725881
Claim All136580422022-06-04 2:26:431290 days ago1654309603IN
Plutus DAO: TGE Controller
0 ETH0.000335256137 ETH0.64345869
Claim All135629362022-06-02 22:12:441291 days ago1654207964IN
Plutus DAO: TGE Controller
0 ETH0.000363309536 ETH0.69555423
Claim All132868542022-05-30 17:03:261294 days ago1653930206IN
Plutus DAO: TGE Controller
0 ETH0.000198746479 ETH0.38141699
Claim All132414472022-05-30 3:09:331294 days ago1653880173IN
Plutus DAO: TGE Controller
0 ETH0.000137855749 ETH0.23788247
Claim All126778712022-05-22 4:12:351302 days ago1653192755IN
Plutus DAO: TGE Controller
0 ETH0.00013191369 ETH0.25255968
Claim All126651262022-05-21 22:36:101303 days ago1653172570IN
Plutus DAO: TGE Controller
0 ETH0.000118628005 ETH0.2249307
Claim All125261112022-05-20 3:12:111304 days ago1653016331IN
Plutus DAO: TGE Controller
0 ETH0.000136866389 ETH0.2604315
Claim All125086902022-05-19 20:16:191305 days ago1652991379IN
Plutus DAO: TGE Controller
0 ETH0.000135876678 ETH0.26081879
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
391562132022-11-18 22:04:031122 days ago1668809043
Plutus DAO: TGE Controller
0 ETH
391562132022-11-18 22:04:031122 days ago1668809043
Plutus DAO: TGE Controller
0 ETH
391562132022-11-18 22:04:031122 days ago1668809043
Plutus DAO: TGE Controller
0 ETH
391562132022-11-18 22:04:031122 days ago1668809043
Plutus DAO: TGE Controller
0 ETH
391562132022-11-18 22:04:031122 days ago1668809043
Plutus DAO: TGE Controller
0 ETH
211581782022-08-24 14:03:011208 days ago1661349781
Plutus DAO: TGE Controller
0 ETH
211581782022-08-24 14:03:011208 days ago1661349781
Plutus DAO: TGE Controller
0 ETH
211581782022-08-24 14:03:011208 days ago1661349781
Plutus DAO: TGE Controller
0 ETH
211581782022-08-24 14:03:011208 days ago1661349781
Plutus DAO: TGE Controller
0 ETH
211581782022-08-24 14:03:011208 days ago1661349781
Plutus DAO: TGE Controller
0 ETH
206267492022-08-18 21:45:511214 days ago1660859151
Plutus DAO: TGE Controller
0 ETH
206267492022-08-18 21:45:511214 days ago1660859151
Plutus DAO: TGE Controller
0 ETH
206267492022-08-18 21:45:511214 days ago1660859151
Plutus DAO: TGE Controller
0 ETH
206267492022-08-18 21:45:511214 days ago1660859151
Plutus DAO: TGE Controller
0 ETH
206267492022-08-18 21:45:511214 days ago1660859151
Plutus DAO: TGE Controller
0 ETH
205744332022-08-18 7:42:251214 days ago1660808545
Plutus DAO: TGE Controller
0 ETH
205744332022-08-18 7:42:251214 days ago1660808545
Plutus DAO: TGE Controller
0 ETH
205744332022-08-18 7:42:251214 days ago1660808545
Plutus DAO: TGE Controller
0 ETH
205744332022-08-18 7:42:251214 days ago1660808545
Plutus DAO: TGE Controller
0 ETH
205744332022-08-18 7:42:251214 days ago1660808545
Plutus DAO: TGE Controller
0 ETH
203416212022-08-15 19:42:301217 days ago1660592550
Plutus DAO: TGE Controller
0 ETH
203416212022-08-15 19:42:301217 days ago1660592550
Plutus DAO: TGE Controller
0 ETH
203416212022-08-15 19:42:301217 days ago1660592550
Plutus DAO: TGE Controller
0 ETH
203416212022-08-15 19:42:301217 days ago1660592550
Plutus DAO: TGE Controller
0 ETH
203416212022-08-15 19:42:301217 days ago1660592550
Plutus DAO: TGE Controller
0 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TGEController

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import './TGEVault.sol';
import './interfaces/IController.sol';

contract TGEController is IController {
  address public immutable deployer;
  address public immutable pls;

  address public governance;
  address public proposedGovernance;
  bool public started;
  bool public tokenClaimEnabled;
  TGEVault[] public vaults;

  constructor(address _governance, address _pls) {
    governance = _governance;
    pls = _pls;
    deployer = msg.sender;
    started = false;
    tokenClaimEnabled = false;
  }

  /// @dev Claim from all vaults to msg.sender
  function claimAll() external {
    require(tokenClaimEnabled == true, 'Claim not enabled');

    for (uint256 i = 0; i < vaults.length; i++) {
      if (vaults[i].deposit(msg.sender) > 0 && vaults[i].claimed(msg.sender) == false) {
        vaults[i].claim(msg.sender, msg.sender);
      }
    }
  }

  /** MODIFIERS */
  modifier checkTokenClaimEnabled() {
    require(tokenClaimEnabled == true, 'Claim not enabled');
    _;
  }

  modifier onlyGovernance() {
    require(msg.sender == governance, 'Unauthorized');
    _;
  }

  modifier onlyProposedGovernance() {
    require(msg.sender == proposedGovernance, 'Unauthorized');
    _;
  }

  /// @dev Can only be called by the vault contract when it's deployed
  function addVault(address _vault) external {
    require(tx.origin == deployer && msg.sender == _vault, 'Unauthorized');
    vaults.push(TGEVault(_vault));
  }

  /** VIEWS */
  function getVaultCount() external view returns (uint256) {
    return vaults.length;
  }

  /** GOVERNANCE FUNCTIONS */
  function setStarted(bool _started) public onlyGovernance {
    started = _started;
    emit Started(_started);
  }

  function withdrawToGovernance(TGEVault vault) public onlyGovernance {
    vault.withdrawFunds(governance);
  }

  function setTokenClaimEnabled(bool _enabled) external onlyGovernance {
    tokenClaimEnabled = _enabled;
  }

  function endTGE() external onlyGovernance {
    setStarted(false);

    for (uint256 i = 0; i < vaults.length; i++) {
      withdrawToGovernance(vaults[i]);
    }
  }

  function proposeGovernance(address _proposedGovernanceAddr) external onlyGovernance {
    require(_proposedGovernanceAddr != address(0), 'No Zero');
    proposedGovernance = _proposedGovernanceAddr;
    emit GovernancePropose(_proposedGovernanceAddr);
  }

  function claimGovernance() external onlyProposedGovernance {
    address oldGovernance = governance;
    governance = proposedGovernance;
    proposedGovernance = address(0);
    emit GovernanceChange(oldGovernance, governance);
  }

  event Started(bool);
  event VaultDeployed(address indexed vault, address underlying);
  event GovernancePropose(address indexed newAddr);
  event GovernanceChange(address indexed from, address indexed to);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import './interfaces/IController.sol';

contract TGEVault {
  ERC20 public immutable underlyingToken;
  ERC20 public immutable pls;
  IController public immutable controller;
  uint256 public immutable allocation;

  mapping(address => uint256) public deposit;
  mapping(address => bool) public claimed;
  address[] public users;
  uint256 public totalDeposits;

  constructor(
    address _controller,
    address _pls,
    address _underlyingToken,
    uint256 _allocation
  ) {
    controller = IController(_controller);
    controller.addVault(address(this));
    pls = ERC20(_pls);
    underlyingToken = ERC20(_underlyingToken);
    allocation = _allocation;
  }

  function donate(uint256 _amt) external {
    require(controller.started(), 'Soon');
    require(_amt > 0, 'Amount is 0');

    uint256 _prev = underlyingToken.balanceOf(address(this));
    underlyingToken.transferFrom(msg.sender, address(this), _amt);

    require(_prev + _amt == underlyingToken.balanceOf(address(this)), 'Quantity mismatch');

    // If user's first deposit, add to list of users
    if (deposit[msg.sender] == 0) {
      users.push(msg.sender);
    }

    deposit[msg.sender] += _amt;
    totalDeposits += _amt;

    emit Donate(msg.sender, _amt);
  }

  /** CONTROLLER FUNCTIONS */
  /// @dev Should only be callable by controller, guards in controller
  function claim(address _user, address _to) external {
    require(msg.sender == address(controller), 'Unauthorized');

    claimed[_user] = true;

    uint256 plsAllocation = calculateShare(_user);
    pls.transfer(_to, plsAllocation);

    emit Claim(_user, _to, plsAllocation);
  }

  function withdrawFunds(address _to) external {
    require(msg.sender == address(controller), 'Unauthorized');
    uint256 amt = underlyingToken.balanceOf(address(this));
    underlyingToken.transfer(_to, amt);

    emit WithdrawFunds(_to, address(underlyingToken), amt);
  }

  /** GOVERNANCE FUNCTIONS */
  /// @dev Governance address can retrieve stuck funds
  function retrieve(ERC20 token) external {
    require(msg.sender == controller.governance(), 'Unauthorized');
    require(token != underlyingToken, 'token = underlying');

    if (address(this).balance > 0) {
      payable(controller.governance()).transfer(address(this).balance);
    }

    token.transfer(controller.governance(), token.balanceOf(address(this)));
  }

  /** VIEWS */
  /// @dev Get share of the allocation based on how much they deposited.
  function calculateShare(address _addr) public view returns (uint256) {
    return (allocation * deposit[_addr]) / totalDeposits;
  }

  function getUsers() external view returns (address[] memory) {
    return users;
  }

  function getUserCount() external view returns (uint256) {
    return users.length;
  }

  event Donate(address indexed user, uint256 amt);
  event WithdrawFunds(address indexed to, address underlyingToken, uint256 amt);
  event Claim(address indexed user, address to, uint256 plsAmt);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IController {
  function addVault(address) external;

  function started() external view returns (bool);

  function tokenClaimEnabled() external view returns (bool);

  function governance() external view returns (address);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (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 `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);

    /**
     * @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: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_pls","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"GovernanceChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddr","type":"address"}],"name":"GovernancePropose","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"Started","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"underlying","type":"address"}],"name":"VaultDeployed","type":"event"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"addVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTGE","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getVaultCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pls","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_proposedGovernanceAddr","type":"address"}],"name":"proposeGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_started","type":"bool"}],"name":"setStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setTokenClaimEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenClaimEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vaults","outputs":[{"internalType":"contract TGEVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract TGEVault","name":"vault","type":"address"}],"name":"withdrawToGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b50604051610c51380380610c5183398101604081905261002f91610082565b600080546001600160a01b0319166001600160a01b039384161790551660a052336080526001805461ffff60a01b191690556100b5565b80516001600160a01b038116811461007d57600080fd5b919050565b6000806040838503121561009557600080fd5b61009e83610066565b91506100ac60208401610066565b90509250929050565b60805160a051610b706100e1600039600061013301526000818161023601526102760152610b706000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806369eaccad11610097578063c373a08e11610066578063c373a08e14610216578063d1058e5914610229578063d5f3948814610231578063ef6b141a1461025857600080fd5b806369eaccad146101cb57806374d4e491146101df5780638c64ea4a146101f05780638f0ef6101461020357600080fd5b806354b48428116100d357806354b48428146101955780635aa6e6751461019d5780635d36b190146101b057806360f7ac97146101b857600080fd5b80631f2698ab14610105578063223e5a9d1461012e578063256b5a021461016d5780634e93d0ea14610182575b600080fd5b60015461011990600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b6101557f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610125565b61018061017b366004610a5d565b61026b565b005b610180610190366004610a5d565b61034a565b61018061040e565b600054610155906001600160a01b031681565b6101806104b3565b600154610155906001600160a01b031681565b60015461011990600160a81b900460ff1681565b600254604051908152602001610125565b6101556101fe366004610a81565b610563565b610180610211366004610aa8565b61058d565b610180610224366004610a5d565b61060f565b610180610705565b6101557f000000000000000000000000000000000000000000000000000000000000000081565b610180610266366004610aa8565b61098c565b326001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156102ab5750336001600160a01b038216145b6102eb5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064015b60405180910390fd5b600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103935760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b6000546040517f68742da60000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152908216906368742da690602401600060405180830381600087803b1580156103f357600080fd5b505af1158015610407573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146104575760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b610461600061098c565b60005b6002548110156104b05761049e6002828154811061048457610484610ac5565b6000918252602090912001546001600160a01b031661034a565b806104a881610adb565b915050610464565b50565b6001546001600160a01b031633146104fc5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b60008054600180546001600160a01b0380821673ffffffffffffffffffffffffffffffffffffffff1980861682178755909216909255604051919092169283917f5fc381522fb5a2378cc37409c8b4eb0f4598a5bee48aa75a46c4f9101f18cb9a9190a350565b6002818154811061057357600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146105d65760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b60018054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b031633146106585760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b6001600160a01b0381166106ae5760405162461bcd60e51b815260206004820152600760248201527f4e6f205a65726f0000000000000000000000000000000000000000000000000060448201526064016102e2565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f137b524248441127c9d5fdcd7cea3837a9805926dd3c1fd9bd14b176976251d090600090a250565b60018054600160a81b900460ff161515146107625760405162461bcd60e51b815260206004820152601160248201527f436c61696d206e6f7420656e61626c656400000000000000000000000000000060448201526064016102e2565b60005b6002548110156104b05760006002828154811061078457610784610ac5565b6000918252602090912001546040517ff340fa010000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091169063f340fa019060240160206040518083038186803b1580156107e957600080fd5b505afa1580156107fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108219190610b04565b1180156108db57506002818154811061083c5761083c610ac5565b6000918252602090912001546040517fc884ef830000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091169063c884ef839060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190610b1d565b155b1561097a57600281815481106108f3576108f3610ac5565b6000918252602090912001546040517f21c0b342000000000000000000000000000000000000000000000000000000008152336004820181905260248201526001600160a01b03909116906321c0b34290604401600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b505050505b8061098481610adb565b915050610765565b6000546001600160a01b031633146109d55760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b60018054821515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f4f366f0dc5cd876e456f089309e0c62fc2bc0e116c6f6ae308c392b4ad45b5b990610a3d90831515815260200190565b60405180910390a150565b6001600160a01b03811681146104b057600080fd5b600060208284031215610a6f57600080fd5b8135610a7a81610a48565b9392505050565b600060208284031215610a9357600080fd5b5035919050565b80151581146104b057600080fd5b600060208284031215610aba57600080fd5b8135610a7a81610a9a565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610afd57634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610b1657600080fd5b5051919050565b600060208284031215610b2f57600080fd5b8151610a7a81610a9a56fea2646970667358221220feeaaee15c316518a6b21f101a748f250d4aef978034f8f6832a96df220c584f64736f6c63430008090033000000000000000000000000a5c1c5a67ba16430547fea9d608ef81119be187600000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101005760003560e01c806369eaccad11610097578063c373a08e11610066578063c373a08e14610216578063d1058e5914610229578063d5f3948814610231578063ef6b141a1461025857600080fd5b806369eaccad146101cb57806374d4e491146101df5780638c64ea4a146101f05780638f0ef6101461020357600080fd5b806354b48428116100d357806354b48428146101955780635aa6e6751461019d5780635d36b190146101b057806360f7ac97146101b857600080fd5b80631f2698ab14610105578063223e5a9d1461012e578063256b5a021461016d5780634e93d0ea14610182575b600080fd5b60015461011990600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b6101557f00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f81565b6040516001600160a01b039091168152602001610125565b61018061017b366004610a5d565b61026b565b005b610180610190366004610a5d565b61034a565b61018061040e565b600054610155906001600160a01b031681565b6101806104b3565b600154610155906001600160a01b031681565b60015461011990600160a81b900460ff1681565b600254604051908152602001610125565b6101556101fe366004610a81565b610563565b610180610211366004610aa8565b61058d565b610180610224366004610a5d565b61060f565b610180610705565b6101557f0000000000000000000000001756968b96d7ad6ba0333045109004c67b1e4edf81565b610180610266366004610aa8565b61098c565b326001600160a01b037f0000000000000000000000001756968b96d7ad6ba0333045109004c67b1e4edf161480156102ab5750336001600160a01b038216145b6102eb5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064015b60405180910390fd5b600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103935760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b6000546040517f68742da60000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152908216906368742da690602401600060405180830381600087803b1580156103f357600080fd5b505af1158015610407573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146104575760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b610461600061098c565b60005b6002548110156104b05761049e6002828154811061048457610484610ac5565b6000918252602090912001546001600160a01b031661034a565b806104a881610adb565b915050610464565b50565b6001546001600160a01b031633146104fc5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b60008054600180546001600160a01b0380821673ffffffffffffffffffffffffffffffffffffffff1980861682178755909216909255604051919092169283917f5fc381522fb5a2378cc37409c8b4eb0f4598a5bee48aa75a46c4f9101f18cb9a9190a350565b6002818154811061057357600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146105d65760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b60018054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000546001600160a01b031633146106585760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b6001600160a01b0381166106ae5760405162461bcd60e51b815260206004820152600760248201527f4e6f205a65726f0000000000000000000000000000000000000000000000000060448201526064016102e2565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f137b524248441127c9d5fdcd7cea3837a9805926dd3c1fd9bd14b176976251d090600090a250565b60018054600160a81b900460ff161515146107625760405162461bcd60e51b815260206004820152601160248201527f436c61696d206e6f7420656e61626c656400000000000000000000000000000060448201526064016102e2565b60005b6002548110156104b05760006002828154811061078457610784610ac5565b6000918252602090912001546040517ff340fa010000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091169063f340fa019060240160206040518083038186803b1580156107e957600080fd5b505afa1580156107fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108219190610b04565b1180156108db57506002818154811061083c5761083c610ac5565b6000918252602090912001546040517fc884ef830000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039091169063c884ef839060240160206040518083038186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190610b1d565b155b1561097a57600281815481106108f3576108f3610ac5565b6000918252602090912001546040517f21c0b342000000000000000000000000000000000000000000000000000000008152336004820181905260248201526001600160a01b03909116906321c0b34290604401600060405180830381600087803b15801561096157600080fd5b505af1158015610975573d6000803e3d6000fd5b505050505b8061098481610adb565b915050610765565b6000546001600160a01b031633146109d55760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016102e2565b60018054821515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f4f366f0dc5cd876e456f089309e0c62fc2bc0e116c6f6ae308c392b4ad45b5b990610a3d90831515815260200190565b60405180910390a150565b6001600160a01b03811681146104b057600080fd5b600060208284031215610a6f57600080fd5b8135610a7a81610a48565b9392505050565b600060208284031215610a9357600080fd5b5035919050565b80151581146104b057600080fd5b600060208284031215610aba57600080fd5b8135610a7a81610a9a565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610afd57634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610b1657600080fd5b5051919050565b600060208284031215610b2f57600080fd5b8151610a7a81610a9a56fea2646970667358221220feeaaee15c316518a6b21f101a748f250d4aef978034f8f6832a96df220c584f64736f6c63430008090033

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

000000000000000000000000a5c1c5a67ba16430547fea9d608ef81119be187600000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f

-----Decoded View---------------
Arg [0] : _governance (address): 0xa5c1c5a67Ba16430547FEA9D608Ef81119bE1876
Arg [1] : _pls (address): 0x51318B7D00db7ACc4026C88c3952B66278B6A67F

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5c1c5a67ba16430547fea9d608ef81119be1876
Arg [1] : 00000000000000000000000051318b7d00db7acc4026c88c3952b66278b6a67f


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  ]
[ 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.