Contract 0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c3 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x7292892c82f2d944eb5eb7eaf1bea864f7ad8c87db3231484ac023dc52b47b16Pull And Convert...115173742023-12-09 0:30:442 days 1 hr ago0x78907c0989dabb8a30ec34a914606b1a638c90f0 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO8.176510284369 4,606.069472256
0xb972b66cc5eae791fe119423edc4cd048c239a84456c862331ad2a18543ea979Pull And Convert...112233702023-11-19 22:12:1121 days 4 hrs agoCronos ID Name kittynuckles.cro IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.3934875917280
0x8fb97a49203e9bd339c5da4053271560d339d0dd98ac42ce89ba8bbac808df2ePull And Convert...112184032023-11-19 14:27:4321 days 11 hrs agoCronos ID Name kittynuckles.cro IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.3134850844260
0x85417d4f9bf65f8af241f8a54e0643f652c6a8533aa1c821b35c760164b229c4Pull And Convert...111933282023-11-17 23:24:0123 days 2 hrs agoCronos ID Name kittynuckles.cro IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.5318037086680
0xecd5aa562e4ad61f9d50610a2a2208491e1b161034b7cd3fbeb3842611db196aPull And Convert...111851672023-11-17 10:40:5323 days 15 hrs ago0x85b0e6312638404d4379bc2fd2443f1d2fd8dd1b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO1.9386142611530
0x9090a998513d9cd851a1f436a1128cca4db34017f6a60d324d31473116492bf9Pull And Convert...111851662023-11-17 10:40:4723 days 15 hrs ago0x85b0e6312638404d4379bc2fd2443f1d2fd8dd1b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO2.8115950517070
0x57ebfcc686ea6af67a292bad6026d947aeb95c3aa28e33d5f0a80d0ec4051e59Pull And Convert...111089902023-11-12 11:43:2628 days 14 hrs ago0x85b0e6312638404d4379bc2fd2443f1d2fd8dd1b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.317983733340
0x50ab378ef423c45b174c55889c6b48c0fcb691d3bb4530236c13538ebf0fdfaePull And Convert...111027922023-11-12 2:02:4829 days 9 mins ago0x85b0e6312638404d4379bc2fd2443f1d2fd8dd1b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO5.3248894379740
0x08409fe745fed35ad9a72d6049a24a448777b58d38bb6204bbe3a557d1379200Pull And Convert...110958422023-11-11 15:08:5629 days 11 hrs ago0x828ae76d0a55bb0d32e6800da654e802ddc6852b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.511475566760
0x4d0d8844fc01254c32b5055e6cba7572a2a0e7c5619f0a376b1a0bb5d3d27181Pull And Convert...110885072023-11-11 3:40:2229 days 22 hrs ago0x05e72d5a79a14a1b6d890fddeb0de970bf4da6a9 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.874125195780
0x2a43ab5d6111062c34b3926651b9032bd9a2839264fff62d62bc70bc263bf1dfPull And Convert...110745772023-11-10 5:54:4630 days 20 hrs ago0x3c0a2c4efebaeb96ad05b4f829354962c925bba2 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.5121724394830
0xc8aab6771ecab85f3c6fda42edd14b84f10cf909fbdaae592e2e4240ea4be06fPull And Convert...110632162023-11-09 12:11:1931 days 14 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO5.309401649090
0x42c0a5191c30760b649cf0fa17172bb5fba8a5f45673bf7ca2789a01b0fc6190Pull And Convert...110623902023-11-09 10:54:0831 days 15 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.4405256076930
0xe05a77982daee950f6db34bc88f0370012e2e52eae1822dd9cd55f4188951be2Pull And Convert...110505612023-11-08 16:27:3032 days 9 hrs ago0x3d23cd55bccc9a8d342faffe053faec0e6e6cec9 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.5129771339590
0x27d878a9f96c7d0366daadca1bd54a8e264d68dbc22ef1077766d988e8a5c6f2Pull And Convert...110473562023-11-08 11:27:3132 days 14 hrs ago0x5b2675ea3a5b23f26d07d73d99d90e5c687afd7a IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.4339917179310
0xc3c0ad4e79948bb14eedcf58447484b9902167476e1fadd75c8bca153e3f9c84Pull And Convert...110085212023-11-05 22:51:3735 days 3 hrs ago0x6f39601777ced10e66c0dfd6b48d456bc5234413 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO1.7811516801170
0x4ba3861beb46b673a18ed9ce4d9e216dd98fab8cf271274dd1319c69e502ca48Pull And Convert...109825212023-11-04 6:21:0936 days 19 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO5.409111603470
0x29aa64214d991aa8bc1e0011fea63adab4e4f87ed505f89098e8203d6bf50d5aPull And Convert...109809282023-11-04 3:52:2736 days 22 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.4023953112020
0x35dd918d2b365109addb640f59a657c5348ea6567c80b119dd423e2dbc31dfc0Pull And Convert...109701232023-11-03 11:03:3437 days 15 hrs ago0x85b0e6312638404d4379bc2fd2443f1d2fd8dd1b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.5237039827940
0xad8dbd7daebef86924be64e225794cb517a69ddd93e48fe9e2c021a200922f50Pull And Convert...109697772023-11-03 10:31:1837 days 15 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.5949436172450
0xf191ff2d1bb96b0ee4f4ee8b1c240b4f0b4bca4f142769682b74dfad27a5fe85Pull And Convert...109670762023-11-03 6:18:4237 days 19 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.4029864619430
0x4e95d17f7fc44834c131a83b18d820139e235e9927968bf3da19e3df2018be31Pull And Convert...109607952023-11-02 20:31:2838 days 5 hrs ago0x9aa90fe632a3b131d4b7a9dddbb9835fb4922abd IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO3.43685840550
0x6b18e78f00db5655f3d39831682edffaba3af1090950f0b22a4d2780944b777dPull And Convert...109592852023-11-02 18:10:2038 days 8 hrs agoCronos ID Name kittynuckles.cro IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO4.4319761413760
0x60cb4167e076e174318860bc348ce2ab8c90f68f81b7bfb5b507830db5912ed1Pull And Convert...109544822023-11-02 10:41:1438 days 15 hrs ago0x85b0e6312638404d4379bc2fd2443f1d2fd8dd1b IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO1.4870273031260
0xf11f3023347fd18dc6d40029324f312e06f56ccb2d4a13b94b6e5c9a43b933dePull And Convert...109544802023-11-02 10:41:0338 days 15 hrs ago0x6e0fb7f44862182ba4e66c003e9098ae11e03d59 IN  0xc817176c6bb58fc5f67eec947ad2cfe588c9e1c30 CRO2.8177776543010
[ Download CSV Export 
Parent Txn Hash Block From To Value
Index Block
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TectonicSPBountyHelper

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion
File 1 of 5 : StakingPoolBountyHelper.sol
pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";

interface ITectonicStakingPool {
  function performConversionForTokens(
    address[][] memory _paths,
    uint[] memory _amounts
  )
  external
  returns (
    uint[] memory errorCodes,
    uint tonicAmount, uint minTonicAmount
  );

  function performConversionForTokensFullBalance(
    address[][] memory _paths
  )
  external 
  returns (
    uint[] memory errorCodes,
    uint tonicAmount,
    uint minTonicAmount
  );
}


interface ITTokenAdmin {
  function pullReserves() external returns(uint[] memory errorCodes);
}

contract TectonicSPBountyHelper {
  ITectonicStakingPool stakingPool;
  ITTokenAdmin tTokenAdmin;
  ERC20 tonic;

  /* ============ Events ============ */
  event DeregisterSuccess(address tToken);
  event DisablePullReservesPublicAccess();
  event EnablePullReservesPublicAccess();
  event ETHWithdrawn(address recipient, uint amount);
  event FallbackAddressChanged(address oldFallback, address newFallback);
  event PullSuccess(address tToken, uint256 reserveRecipientAmount, uint256 rewardAmount);
  event PullError(address tToken, uint256 reservesToPull, uint errorCode);
  event RegisterSuccess(address tToken);
  event RegisterError(address tToken, uint errorCode);
  event ResignAdminSuccess(address tToken, address newAdmin);
  event ResignAdminError(address tToken, address newAdmin, uint errorCode);
  event ReserveRatioChanged(uint oldReserveRatio, uint newReserveRatio);
  event ReserveRecipientChanged(address oldRecipient, address newRecipient);
  event RewardRatioChanged(uint oldRewardRatio, uint newRewardRatio);

  event TonicStaked(address indexed user, uint tonicStaked, uint xTonicMinted);
  event TonicUnstaked(address indexed user, uint xTonicLocked, uint releasableBlockNum);
  event TonicReleased(address indexed user, uint xTonicBurned, uint tonicReleased);
  event ExchangeRateUpdated(uint newExchangeRate, uint timestamp);
  event CooldownChanged(uint oldCooldown, uint newCooldown);

  event Transfer(address indexed from, address indexed to, uint256 value);


  constructor(address _stakingPool, address _tTokenAdmin, address _tonic) {
    stakingPool = ITectonicStakingPool(_stakingPool);
    tTokenAdmin = ITTokenAdmin(_tTokenAdmin);
    tonic = ERC20(_tonic);
  }

  function pullAndConvertFull(bool skipPull, address[][] memory paths) external {
    if (!skipPull) {
      tTokenAdmin.pullReserves();
    }
    uint balanceBefore = tonic.balanceOf(address(this));
    stakingPool.performConversionForTokensFullBalance(paths);
    uint balanceAfter = tonic.balanceOf(address(this));

    require(balanceAfter >= balanceBefore, "Reduced TONIC balance");

    uint rewardAmount = balanceAfter - balanceBefore;
    tonic.transfer(msg.sender, rewardAmount);
  }

  // For static call only
  function pendingYieldingAndRewards(
    address[][] memory paths
  ) external returns (uint yieldingAmount, uint rewardAmount) {
    uint tonicInStakingPoolBefore = tonic.balanceOf(address(stakingPool));
    uint myBalanceBefore = tonic.balanceOf(address(this));
    tTokenAdmin.pullReserves();
    stakingPool.performConversionForTokensFullBalance(paths);
    uint tonicInStakingPoolAfter = tonic.balanceOf(address(stakingPool));
    uint myBalanceAfter = tonic.balanceOf(address(this));

    rewardAmount = myBalanceAfter - myBalanceBefore;
    yieldingAmount = tonicInStakingPoolAfter - tonicInStakingPoolBefore;
  }

  fallback() external payable {}
}

File 2 of 5 : ERC20.sol
// SPDX-License-Identifier: MIT

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 guidelines: functions revert instead
 * of 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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, 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 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 {}
}

File 3 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

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

File 4 of 5 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

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

File 5 of 5 : Context.sol
// SPDX-License-Identifier: MIT

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": 10
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingPool","type":"address"},{"internalType":"address","name":"_tTokenAdmin","type":"address"},{"internalType":"address","name":"_tonic","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCooldown","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCooldown","type":"uint256"}],"name":"CooldownChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"}],"name":"DeregisterSuccess","type":"event"},{"anonymous":false,"inputs":[],"name":"DisablePullReservesPublicAccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHWithdrawn","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePullReservesPublicAccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newExchangeRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ExchangeRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldFallback","type":"address"},{"indexed":false,"internalType":"address","name":"newFallback","type":"address"}],"name":"FallbackAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reservesToPull","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"PullError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reserveRecipientAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"name":"PullSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"RegisterError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"}],"name":"RegisterSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldReserveRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newReserveRatio","type":"uint256"}],"name":"ReserveRatioChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRecipient","type":"address"},{"indexed":false,"internalType":"address","name":"newRecipient","type":"address"}],"name":"ReserveRecipientChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"},{"indexed":false,"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"ResignAdminError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tToken","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"ResignAdminSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRewardRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRewardRatio","type":"uint256"}],"name":"RewardRatioChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"xTonicBurned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tonicReleased","type":"uint256"}],"name":"TonicReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tonicStaked","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xTonicMinted","type":"uint256"}],"name":"TonicStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"xTonicLocked","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"releasableBlockNum","type":"uint256"}],"name":"TonicUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address[][]","name":"paths","type":"address[][]"}],"name":"pendingYieldingAndRewards","outputs":[{"internalType":"uint256","name":"yieldingAmount","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"skipPull","type":"bool"},{"internalType":"address[][]","name":"paths","type":"address[][]"}],"name":"pullAndConvertFull","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610bb3380380610bb383398101604081905261002f9161008d565b600080546001600160a01b039485166001600160a01b0319918216179091556001805493851693821693909317909255600280549190931691161790556100cf565b80516001600160a01b038116811461008857600080fd5b919050565b6000806000606084860312156100a1578283fd5b6100aa84610071565b92506100b860208501610071565b91506100c660408501610071565b90509250925092565b610ad5806100de6000396000f3fe6080604052600436106100295760003560e01c80632d0b6cc61461002b578063445fdcfb1461004b575b005b34801561003757600080fd5b506100296100463660046108f9565b610084565b34801561005757600080fd5b5061006b61006636600461081d565b61038c565b6040805192835260208301919091520160405180910390f35b8161011757600160009054906101000a90046001600160a01b03166001600160a01b031663aa8866616040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156100d957600080fd5b505af11580156100ed573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101159190810190610857565b505b6002546040516370a0823160e01b81526000916001600160a01b0316906370a082319061014890309060040161095e565b60206040518083038186803b15801561016057600080fd5b505afa158015610174573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101989190610946565b60005460405163578af2f360e01b81529192506001600160a01b03169063578af2f3906101c9908590600401610972565b600060405180830381600087803b1580156101e357600080fd5b505af11580156101f7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261021f9190810190610889565b50506002546040516370a0823160e01b8152600092506001600160a01b03909116906370a082319061025590309060040161095e565b60206040518083038186803b15801561026d57600080fd5b505afa158015610281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a59190610946565b9050818110156102f35760405162461bcd60e51b81526020600482015260156024820152745265647563656420544f4e49432062616c616e636560581b604482015260640160405180910390fd5b60006102ff8383610a55565b60025460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561034c57600080fd5b505af1158015610360573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038491906108d6565b505050505050565b600254600080546040516370a0823160e01b81529192839283926001600160a01b03928316926370a08231926103c8929091169060040161095e565b60206040518083038186803b1580156103e057600080fd5b505afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104189190610946565b6002546040516370a0823160e01b81529192506000916001600160a01b03909116906370a082319061044e90309060040161095e565b60206040518083038186803b15801561046657600080fd5b505afa15801561047a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049e9190610946565b9050600160009054906101000a90046001600160a01b03166001600160a01b031663aa8866616040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104f057600080fd5b505af1158015610504573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261052c9190810190610857565b5060005460405163578af2f360e01b81526001600160a01b039091169063578af2f39061055d908890600401610972565b600060405180830381600087803b15801561057757600080fd5b505af115801561058b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105b39190810190610889565b5050600254600080546040516370a0823160e01b81529193506001600160a01b03928316926370a08231926105ee929091169060040161095e565b60206040518083038186803b15801561060657600080fd5b505afa15801561061a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063e9190610946565b6002546040516370a0823160e01b81529192506000916001600160a01b03909116906370a082319061067490309060040161095e565b60206040518083038186803b15801561068c57600080fd5b505afa1580156106a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c49190610946565b90506106d08382610a55565b94506106dc8483610a55565b955050505050915091565b600082601f8301126106f7578081fd5b8135602061070c61070783610a32565b610a02565b82815281810190858301855b858110156107b3578135880189603f820112610732578788fd5b85810135604061074461070783610a32565b8083825289820191508285018e848660051b8801011115610763578c8dfd5b8c95505b8486101561079c57803593506001600160a01b0384168414610787578c8dfd5b83835260019590950194918a01918a01610767565b508852505050938501935090840190600101610718565b5090979650505050505050565b600082601f8301126107d0578081fd5b815160206107e061070783610a32565b80838252828201915082860187848660051b89010111156107ff578586fd5b855b858110156107b357815184529284019290840190600101610801565b60006020828403121561082e578081fd5b81356001600160401b03811115610843578182fd5b61084f848285016106e7565b949350505050565b600060208284031215610868578081fd5b81516001600160401b0381111561087d578182fd5b61084f848285016107c0565b60008060006060848603121561089d578182fd5b83516001600160401b038111156108b2578283fd5b6108be868287016107c0565b93505060208401519150604084015190509250925092565b6000602082840312156108e7578081fd5b81516108f281610a8e565b9392505050565b6000806040838503121561090b578182fd5b823561091681610a8e565b915060208301356001600160401b03811115610930578182fd5b61093c858286016106e7565b9150509250929050565b600060208284031215610957578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6000602080830181845280855180835260408601915060408160051b8701019250838701855b828110156109f557878503603f19018452815180518087529087019087870190895b818110156109df5783516001600160a01b0316835292890192918901916001016109ba565b5090965050509285019290850190600101610998565b5092979650505050505050565b604051601f8201601f191681016001600160401b0381118282101715610a2a57610a2a610a78565b604052919050565b60006001600160401b03821115610a4b57610a4b610a78565b5060051b60200190565b600082821015610a7357634e487b7160e01b81526011600452602481fd5b500390565b634e487b7160e01b600052604160045260246000fd5b8015158114610a9c57600080fd5b5056fea26469706673582212206532f970afddb7e51684311cfa4de80a71c3793ac03502641c089a2c17ebbcf564736f6c63430008030033000000000000000000000000e165132fda537fa89ca1b52a647240c2b84c8f89000000000000000000000000d13dd8ec60b571c1a20ebbb3fe3a7c718598c808000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81bb1dc5b2

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

000000000000000000000000e165132fda537fa89ca1b52a647240c2b84c8f89000000000000000000000000d13dd8ec60b571c1a20ebbb3fe3a7c718598c808000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81bb1dc5b2

-----Decoded View---------------
Arg [0] : _stakingPool (address): 0xe165132fda537fa89ca1b52a647240c2b84c8f89
Arg [1] : _tTokenAdmin (address): 0xd13dd8ec60b571c1a20ebbb3fe3a7c718598c808
Arg [2] : _tonic (address): 0xdd73dea10abc2bff99c60882ec5b2b81bb1dc5b2

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e165132fda537fa89ca1b52a647240c2b84c8f89
Arg [1] : 000000000000000000000000d13dd8ec60b571c1a20ebbb3fe3a7c718598c808
Arg [2] : 000000000000000000000000dd73dea10abc2bff99c60882ec5b2b81bb1dc5b2


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.