FRAX Price: $0.82 (+0.76%)

Contract

0xe4e4C82e482Bb1C122004dd9579E872a24b0050C

Overview

FRAX Balance | FXTL Balance

0 FRAX | 874 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

> 10 Internal Transactions and > 10 Token Transfers found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
301212782025-12-30 0:07:4728 days ago1767053267
0xe4e4C82e...a24b0050C
0 FRAX
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PoolTokenBalanceChecker

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
No with 2000 runs

Other Settings:
london EvmVersion
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.19;

// ====================================================================
// |     ______                   _______                             |
// |    / _____________ __  __   / ____(_____  ____ _____  ________   |
// |   / /_  / ___/ __ `| |/_/  / /_  / / __ \/ __ `/ __ \/ ___/ _ \  |
// |  / __/ / /  / /_/ _>  <   / __/ / / / / / /_/ / / / / /__/  __/  |
// | /_/   /_/   \__,_/_/|_|  /_/   /_/_/ /_/\__,_/_/ /_/\___/\___/   |
// |                                                                  |
// ====================================================================
// =================== BalancerHiddenHandsHandler =====================
// ====================================================================
// Frax Finance: https://github.com/FraxFinance

// Primary Author(s)
// Amirnader Aghayeghazvini: https://github.com/amirnader-ghazvini

import "../interfaces/IHiddenHandsBribeMarket.sol";
import "../interfaces/IBalancerIncentive.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";



interface IVaultMini {
    function getPoolTokens(bytes32 poolId)
        external
        view
        returns (
            IERC20[] memory tokens,
            uint256[] memory balances,
            uint256 lastChangeBlock
        );
}

interface IBasePoolMini {
    function getPoolId() external view returns (bytes32);
}


// @title BalancerV2PoolTokenBalanceChecker
// @notice Helper contract to check the balance of a pool token in a Balancer V2 pool
contract PoolTokenBalanceChecker {
    IVaultMini public immutable vault;
    constructor(IVaultMini _vault) {
        // Balancer Native Deployments always have vault address 0xba12222222228d8ba445958a75a0704d566bf2c8
        vault = _vault;
    }

    // @notice Get the balance of a pool token in the pool
    // @param token The pool token to check the balance of
    // @return The balance of the pool token in the pool
    function getPoolTokenBalance(IERC20 token, address bpt) external view returns (uint256) {
        bytes32 poolId = IBasePoolMini(bpt).getPoolId();
        (IERC20[] memory tokens, uint256[] memory balances, ) = vault.getPoolTokens(poolId);
        for (uint256 i = 0; i < tokens.length; i++) {
            if (tokens[i] == token) {
                return balances[i];
            }
        }
        return 0;
    }
}

contract BalancerHiddenHandsHandler {
    /// @notice Function to show balance of a pool 
    /// @param poolAddress Address of liquidity pool
    /// @param gaugeAddress Address of liquidity pool's gauge
    /// @param targetTokenAddress Address of target token
    function balanceOfTargetToken(
        address poolAddress, 
        address gaugeAddress,
        address targetTokenAddress) external view returns(uint256) 
    {
        PoolTokenBalanceChecker balancerAdaptor = PoolTokenBalanceChecker(0x937a74558767fa7f43080376e81dFD18754550a5);
        return  balancerAdaptor.getPoolTokenBalance(IERC20(targetTokenAddress), poolAddress);
    } 
    
    /* ================================================== FUNCTIONS ========================================================= */
    
    /// @notice Function to deposit incentives for one pool 
    /// @param poolAddress Address of liquidity pool
    /// @param gaugeAddress Address of liquidity pool's gauge
    /// @param incentivePoolAddress Contract that handle incentive distribution e.g. Bribe contract
    /// @param incentiveTokenAddress Address of Token that AMO uses as an incentive (e.g. FXS)
    /// @param indexId Pool ID in Votium or Votemarket platforms 
    /// @param amount Amount of incentives to be deposited
    function incentivizePool(
        address poolAddress, 
        address gaugeAddress,
        address incentivePoolAddress, 
        address incentiveTokenAddress,
        uint256 indexId, // In Votemarket Handler this would be Bounty ID
        uint256 amount) external 
    {
        ERC20 _incentiveToken = ERC20(incentiveTokenAddress);
        IHiddenHandsBribeMarket bribeContract = IHiddenHandsBribeMarket(incentivePoolAddress);
        _incentiveToken.approve(bribeContract.BRIBE_VAULT(), amount);
        bytes32 _proposal = keccak256(abi.encodePacked(gaugeAddress));
        uint256 _maxTokensPerVote = 0;
        uint256 _periods = 2;
        bribeContract.depositBribe(
            _proposal, 
            incentiveTokenAddress, 
            amount, 
            _maxTokensPerVote,
            _periods);
    }
} 



contract BalancerDirectIncentiveHandler {
    /// @notice Function to show balance of a pool 
    /// @param poolAddress Address of liquidity pool
    /// @param gaugeAddress Address of liquidity pool's gauge
    /// @param targetTokenAddress Address of target token
    function balanceOfTargetToken(
        address poolAddress, 
        address gaugeAddress,
        address targetTokenAddress) external view returns(uint256) 
    {
        PoolTokenBalanceChecker balancerAdaptor = PoolTokenBalanceChecker(0x937a74558767fa7f43080376e81dFD18754550a5);
        return  balancerAdaptor.getPoolTokenBalance(IERC20(targetTokenAddress), poolAddress);
    } 
    
    /* ================================================== FUNCTIONS ========================================================= */
    
    /// @notice Function to deposit incentives for one pool 
    /// @param poolAddress Address of liquidity pool
    /// @param gaugeAddress Address of liquidity pool's gauge
    /// @param incentivePoolAddress Contract that handle incentive distribution e.g. Bribe contract
    /// @param incentiveTokenAddress Address of Token that AMO uses as an incentive (e.g. FXS)
    /// @param indexId Pool ID in Votium or Votemarket platforms 
    /// @param amount Amount of incentives to be deposited
    function incentivizePool(
        address poolAddress, 
        address gaugeAddress,
        address incentivePoolAddress, 
        address incentiveTokenAddress,
        uint256 indexId, // In Votemarket Handler this would be Bounty ID
        uint256 amount) external 
    {
        IBalancerIncentive balancerIncentive = IBalancerIncentive(incentivePoolAddress);
        balancerIncentive.deposit_reward_token(incentiveTokenAddress, amount);
    }
}

File 2 of 7 : IHiddenHandsBribeMarket.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;

interface IHiddenHandsBribeMarket {
  function BRIBE_VAULT (  ) external view returns ( address );
  function DEFAULT_ADMIN_ROLE (  ) external view returns ( bytes32 );
  function MAX_PERIODS (  ) external view returns ( uint256 );
  function MAX_PERIOD_DURATION (  ) external view returns ( uint256 );
  function PROTOCOL (  ) external view returns ( string memory );
  function TEAM_ROLE (  ) external view returns ( bytes32 );
  function addBlacklistedVoters ( address[] memory _voters ) external;
  function addWhitelistedTokens ( address[] memory _tokens ) external;
  function depositBribe ( bytes32 _proposal, address _token, uint256 _amount, uint256 _maxTokensPerVote, uint256 _periods ) external;
  function depositBribeWithPermit ( bytes32 _proposal, address _token, uint256 _amount, uint256 _maxTokensPerVote, uint256 _periods, uint256 _permitDeadline, bytes memory _signature ) external;
  function getBlacklistedVoters (  ) external view returns ( address[] memory );
  function getBribe ( bytes32 _proposal, uint256 _proposalDeadline, address _token ) external view returns ( address bribeToken, uint256 bribeAmount );
  function getRoleAdmin ( bytes32 role ) external view returns ( bytes32 );
  function getWhitelistedTokens (  ) external view returns ( address[] memory );
  function grantRole ( bytes32 role, address account ) external;
  function grantTeamRole ( address _teamMember ) external;
  function hasRole ( bytes32 role, address account ) external view returns ( bool );
  function indexOfBlacklistedVoter ( address ) external view returns ( uint256 );
  function indexOfWhitelistedToken ( address ) external view returns ( uint256 );
  function initialize ( address _bribeVault, address _admin, string memory _protocol, uint256 _maxPeriods, uint256 _periodDuration ) external;
  function isBlacklistedVoter ( address _voter ) external view returns ( bool );
  function isWhitelistedToken ( address _token ) external view returns ( bool );
  function maxPeriods (  ) external view returns ( uint256 );
  function periodDuration (  ) external view returns ( uint256 );
  function proposalDeadlines ( bytes32 ) external view returns ( uint256 );
  function removeBlacklistedVoters ( address[] memory _voters ) external;
  function removeWhitelistedTokens ( address[] memory _tokens ) external;
  function renounceRole ( bytes32 role, address account ) external;
  function revokeRole ( bytes32 role, address account ) external;
  function revokeTeamRole ( address _teamMember ) external;
  function setMaxPeriods ( uint256 _periods ) external;
  function setPeriodDuration ( uint256 _periodDuration ) external;
  function setProposals ( bytes[] memory _identifiers, uint256 _deadline ) external;
  function setProposalsByAddress ( address[] memory _addresses, uint256 _deadline ) external;
  function setProposalsById ( uint256 _proposalIndex, uint256 _choiceCount, uint256 _deadline ) external;
  function supportsInterface ( bytes4 interfaceId ) external view returns ( bool );
}

File 3 of 7 : IBalancerIncentive.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;

interface IBalancerIncentive {
  function deposit ( uint256 _value ) external;
  function deposit ( uint256 _value, address _user ) external;
  function withdraw ( uint256 _value ) external;
  function withdraw ( uint256 _value, address _user ) external;
  function transferFrom ( address _from, address _to, uint256 _value ) external returns ( bool );
  function approve ( address _spender, uint256 _value ) external returns ( bool );
  function permit ( address _owner, address _spender, uint256 _value, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external returns ( bool );
  function transfer ( address _to, uint256 _value ) external returns ( bool );
  function increaseAllowance ( address _spender, uint256 _added_value ) external returns ( bool );
  function decreaseAllowance ( address _spender, uint256 _subtracted_value ) external returns ( bool );
  function user_checkpoint ( address addr ) external returns ( bool );
  function claimable_tokens ( address addr ) external returns ( uint256 );
  function claimed_reward ( address _addr, address _token ) external view returns ( uint256 );
  function claimable_reward ( address _user, address _reward_token ) external view returns ( uint256 );
  function set_rewards_receiver ( address _receiver ) external;
  function claim_rewards (  ) external;
  function claim_rewards ( address _addr ) external;
  function claim_rewards ( address _addr, address _receiver ) external;
  function claim_rewards ( address _addr, address _receiver, uint256[] memory _reward_indexes ) external;
  function add_reward ( address _reward_token, address _distributor ) external;
  function set_reward_distributor ( address _reward_token, address _distributor ) external;
  function deposit_reward_token ( address _reward_token, uint256 _amount ) external;
  function killGauge (  ) external;
  function unkillGauge (  ) external;
  function decimals (  ) external view returns ( uint256 );
  function allowance ( address owner, address spender ) external view returns ( uint256 );
  function integrate_checkpoint (  ) external view returns ( uint256 );
  function bal_token (  ) external view returns ( address );
  function bal_pseudo_minter (  ) external view returns ( address );
  function voting_escrow_delegation_proxy (  ) external view returns ( address );
  function authorizer_adaptor (  ) external view returns ( address );
  function initialize ( address _lp_token, string memory _version ) external;
  function DOMAIN_SEPARATOR (  ) external view returns ( bytes32 );
  function nonces ( address arg0 ) external view returns ( uint256 );
  function name (  ) external view returns ( string memory);
  function symbol (  ) external view returns ( string memory);
  function balanceOf ( address arg0 ) external view returns ( uint256 );
  function totalSupply (  ) external view returns ( uint256 );
  function lp_token (  ) external view returns ( address );
  function version (  ) external view returns ( string memory );
  function factory (  ) external view returns ( address );
  function working_balances ( address arg0 ) external view returns ( uint256 );
  function working_supply (  ) external view returns ( uint256 );
  function period (  ) external view returns ( uint256 );
  function period_timestamp ( uint256 arg0 ) external view returns ( uint256 );
  function integrate_checkpoint_of ( address arg0 ) external view returns ( uint256 );
  function integrate_fraction ( address arg0 ) external view returns ( uint256 );
  function integrate_inv_supply ( uint256 arg0 ) external view returns ( uint256 );
  function integrate_inv_supply_of ( address arg0 ) external view returns ( uint256 );
  function reward_count (  ) external view returns ( uint256 );
  function reward_tokens ( uint256 arg0 ) external view returns ( address );
  function reward_data ( address arg0 ) external view returns ( bytes memory );
  function rewards_receiver ( address arg0 ) external view returns ( address );
  function reward_integral_for ( address arg0, address arg1 ) external view returns ( uint256 );
  function is_killed (  ) external view returns ( bool );
  function inflation_rate ( uint256 arg0 ) external view returns ( uint256 );
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * 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}.
     *
     * 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 default value returned by this function, unless
     * it's 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, allowance(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 = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * 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;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _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;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _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;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _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 Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * 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.9.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 (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
{
  "remappings": [
    "ds-test/=node_modules/ds-test/src/",
    "forge-std/=node_modules/forge-std/src/",
    "frax-std/=node_modules/frax-standard-solidity/src/",
    "@chainlink/=node_modules/@chainlink/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "frax-standard-solidity/=node_modules/frax-standard-solidity/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 2000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IVaultMini","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"bpt","type":"address"}],"name":"getPoolTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVaultMini","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b50604051610952380380610952833981810160405281019061003291906100e1565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505061010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061009c82610071565b9050919050565b60006100ae82610091565b9050919050565b6100be816100a3565b81146100c957600080fd5b50565b6000815190506100db816100b5565b92915050565b6000602082840312156100f7576100f661006c565b5b6000610105848285016100cc565b91505092915050565b60805161082261013060003960008181610102015261024701526108226000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063ab14cd171461003b578063fbfa77cf1461006b575b600080fd5b61005560048036038101906100509190610319565b610089565b6040516100629190610372565b60405180910390f35b610073610245565b60405161008091906103ec565b60405180910390f35b6000808273ffffffffffffffffffffffffffffffffffffffff166338fff2d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061043d565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f94d4668846040518263ffffffff1660e01b81526004016101599190610479565b600060405180830381865afa158015610176573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061019f91906106f1565b509150915060005b8251811015610236578673ffffffffffffffffffffffffffffffffffffffff168382815181106101da576101d961077c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603610223578181815181106102105761020f61077c565b5b602002602001015194505050505061023f565b808061022e906107da565b9150506101a7565b50600093505050505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102a88261027d565b9050919050565b60006102ba8261029d565b9050919050565b6102ca816102af565b81146102d557600080fd5b50565b6000813590506102e7816102c1565b92915050565b6102f68161029d565b811461030157600080fd5b50565b600081359050610313816102ed565b92915050565b600080604083850312156103305761032f610273565b5b600061033e858286016102d8565b925050602061034f85828601610304565b9150509250929050565b6000819050919050565b61036c81610359565b82525050565b60006020820190506103876000830184610363565b92915050565b6000819050919050565b60006103b26103ad6103a88461027d565b61038d565b61027d565b9050919050565b60006103c482610397565b9050919050565b60006103d6826103b9565b9050919050565b6103e6816103cb565b82525050565b600060208201905061040160008301846103dd565b92915050565b6000819050919050565b61041a81610407565b811461042557600080fd5b50565b60008151905061043781610411565b92915050565b60006020828403121561045357610452610273565b5b600061046184828501610428565b91505092915050565b61047381610407565b82525050565b600060208201905061048e600083018461046a565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6104e282610499565b810181811067ffffffffffffffff82111715610501576105006104aa565b5b80604052505050565b6000610514610269565b905061052082826104d9565b919050565b600067ffffffffffffffff8211156105405761053f6104aa565b5b602082029050602081019050919050565b600080fd5b600081519050610565816102c1565b92915050565b600061057e61057984610525565b61050a565b905080838252602082019050602084028301858111156105a1576105a0610551565b5b835b818110156105ca57806105b68882610556565b8452602084019350506020810190506105a3565b5050509392505050565b600082601f8301126105e9576105e8610494565b5b81516105f984826020860161056b565b91505092915050565b600067ffffffffffffffff82111561061d5761061c6104aa565b5b602082029050602081019050919050565b61063781610359565b811461064257600080fd5b50565b6000815190506106548161062e565b92915050565b600061066d61066884610602565b61050a565b905080838252602082019050602084028301858111156106905761068f610551565b5b835b818110156106b957806106a58882610645565b845260208401935050602081019050610692565b5050509392505050565b600082601f8301126106d8576106d7610494565b5b81516106e884826020860161065a565b91505092915050565b60008060006060848603121561070a57610709610273565b5b600084015167ffffffffffffffff81111561072857610727610278565b5b610734868287016105d4565b935050602084015167ffffffffffffffff81111561075557610754610278565b5b610761868287016106c3565b925050604061077286828701610645565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006107e582610359565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610817576108166107ab565b5b60018201905091905056000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063ab14cd171461003b578063fbfa77cf1461006b575b600080fd5b61005560048036038101906100509190610319565b610089565b6040516100629190610372565b60405180910390f35b610073610245565b60405161008091906103ec565b60405180910390f35b6000808273ffffffffffffffffffffffffffffffffffffffff166338fff2d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061043d565b90506000807f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c873ffffffffffffffffffffffffffffffffffffffff1663f94d4668846040518263ffffffff1660e01b81526004016101599190610479565b600060405180830381865afa158015610176573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061019f91906106f1565b509150915060005b8251811015610236578673ffffffffffffffffffffffffffffffffffffffff168382815181106101da576101d961077c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603610223578181815181106102105761020f61077c565b5b602002602001015194505050505061023f565b808061022e906107da565b9150506101a7565b50600093505050505b92915050565b7f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c881565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102a88261027d565b9050919050565b60006102ba8261029d565b9050919050565b6102ca816102af565b81146102d557600080fd5b50565b6000813590506102e7816102c1565b92915050565b6102f68161029d565b811461030157600080fd5b50565b600081359050610313816102ed565b92915050565b600080604083850312156103305761032f610273565b5b600061033e858286016102d8565b925050602061034f85828601610304565b9150509250929050565b6000819050919050565b61036c81610359565b82525050565b60006020820190506103876000830184610363565b92915050565b6000819050919050565b60006103b26103ad6103a88461027d565b61038d565b61027d565b9050919050565b60006103c482610397565b9050919050565b60006103d6826103b9565b9050919050565b6103e6816103cb565b82525050565b600060208201905061040160008301846103dd565b92915050565b6000819050919050565b61041a81610407565b811461042557600080fd5b50565b60008151905061043781610411565b92915050565b60006020828403121561045357610452610273565b5b600061046184828501610428565b91505092915050565b61047381610407565b82525050565b600060208201905061048e600083018461046a565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6104e282610499565b810181811067ffffffffffffffff82111715610501576105006104aa565b5b80604052505050565b6000610514610269565b905061052082826104d9565b919050565b600067ffffffffffffffff8211156105405761053f6104aa565b5b602082029050602081019050919050565b600080fd5b600081519050610565816102c1565b92915050565b600061057e61057984610525565b61050a565b905080838252602082019050602084028301858111156105a1576105a0610551565b5b835b818110156105ca57806105b68882610556565b8452602084019350506020810190506105a3565b5050509392505050565b600082601f8301126105e9576105e8610494565b5b81516105f984826020860161056b565b91505092915050565b600067ffffffffffffffff82111561061d5761061c6104aa565b5b602082029050602081019050919050565b61063781610359565b811461064257600080fd5b50565b6000815190506106548161062e565b92915050565b600061066d61066884610602565b61050a565b905080838252602082019050602084028301858111156106905761068f610551565b5b835b818110156106b957806106a58882610645565b845260208401935050602081019050610692565b5050509392505050565b600082601f8301126106d8576106d7610494565b5b81516106e884826020860161065a565b91505092915050565b60008060006060848603121561070a57610709610273565b5b600084015167ffffffffffffffff81111561072857610727610278565b5b610734868287016105d4565b935050602084015167ffffffffffffffff81111561075557610754610278565b5b610761868287016106c3565b925050604061077286828701610645565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006107e582610359565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610817576108166107ab565b5b60018201905091905056

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

000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8

-----Decoded View---------------
Arg [0] : _vault (address): 0xBA12222222228d8Ba445958a75a0704d566BF2C8

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8


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

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.