ETH Price: $3,436.24 (+1.19%)
Gas: 56 Gwei

Contract

0xa7429af4DeB16827dAd0e71D8AEEa9C2bF70e32c
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Provide Liquidit...149677282022-06-15 13:36:06625 days ago1655300166IN
Aura: BAL Liquidity Provider
0 ETH0.0182645667.35443247
Rescue Token149633852022-06-14 19:17:31626 days ago1655234251IN
Aura: BAL Liquidity Provider
0 ETH0.002506544.67760518
0x61012060149324642022-06-09 11:57:08631 days ago1654775828IN
 Create: BalLiquidityProvider
0 ETH0.0315584325.91419403

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BalLiquidityProvider

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 5 : BalLiquidityProvider.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

import { IVault } from "./Interfaces.sol";
import { IERC20 } from "@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts-0.8/token/ERC20/utils/SafeERC20.sol";

/**
 * @title   BalLiquidityProvider
 * @notice  Provides initial liquidity to a Balancer pool on behalf of a given DAO
 */
contract BalLiquidityProvider {
    using SafeERC20 for IERC20;

    IERC20 public immutable startToken;
    IERC20 public immutable pairToken;
    uint256 public minPairAmount;

    address private immutable provider;
    address public immutable dao;

    IVault public immutable bVault;

    event LiquidityProvided(uint256[] input, uint256 output);
    event MinPairAmountChanged(uint256 oldMinPairAmount, uint256 newMinPairAmount);

    constructor(
        address _startToken,
        address _pairToken,
        uint256 _minPairAmount,
        address _dao,
        address _bVault
    ) {
        startToken = IERC20(_startToken);
        pairToken = IERC20(_pairToken);
        minPairAmount = _minPairAmount;
        provider = msg.sender;
        dao = _dao;
        bVault = IVault(_bVault);
    }

    /**
     * @dev Provides liquidity on behalf of the dao, in a non-custodial manner.
     *      Has protections in place to ensure that no erroneous liquidity data gets added.
     */
    function provideLiquidity(bytes32 _poolId, IVault.JoinPoolRequest memory _request) public {
        require(msg.sender == provider, "!auth");
        require(_request.assets.length == 2 && _request.maxAmountsIn.length == 2, "!valid");
        require(_request.assets[0] != _request.assets[1], "!assets");
        require(pairToken.balanceOf(address(this)) > minPairAmount, "!minLiq");

        for (uint256 i = 0; i < 2; i++) {
            address asset = address(_request.assets[i]);
            require(asset == address(startToken) || asset == address(pairToken), "!asset");

            IERC20 tkn = IERC20(asset);
            uint256 bal = tkn.balanceOf(address(this));
            require(
                bal > 0 && bal >= _request.maxAmountsIn[i] && bal <= (_request.maxAmountsIn[i] * 102) / 100,
                "!bal"
            );

            tkn.safeApprove(address(bVault), 0);
            tkn.safeApprove(address(bVault), bal);
        }

        (address pool, ) = bVault.getPool(_poolId);
        uint256 supplyBefore = IERC20(pool).totalSupply();
        require(supplyBefore == 0, "!init");

        bVault.joinPool(_poolId, address(this), dao, _request);

        uint256 balAfter = IERC20(pool).balanceOf(dao);
        require(balAfter > 0, "!mint");

        emit LiquidityProvided(_request.maxAmountsIn, balAfter);
    }

    /**
     * @dev Allows the DAO to change the minimum amount of the pair token that must be added as liquidity
     */
    function changeMinPairAmount(uint256 _newAmount) external {
        require(msg.sender == dao, "!auth");
        emit MinPairAmountChanged(minPairAmount, _newAmount);
        minPairAmount = _newAmount;
    }

    /**
     * @dev Rescues a given token from the contract.
     * Only provider or DAO can call this function.
     */
    function rescueToken(address _erc20, uint256 _amount) external {
        require(msg.sender == provider || msg.sender == dao, "!auth");
        IERC20 tkn = IERC20(_erc20);
        tkn.safeTransfer(dao, _amount);
    }
}

File 2 of 5 : Interfaces.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

interface IPriceOracle {
    struct OracleAverageQuery {
        Variable variable;
        uint256 secs;
        uint256 ago;
    }
    enum Variable {
        PAIR_PRICE,
        BPT_PRICE,
        INVARIANT
    }

    function getTimeWeightedAverage(OracleAverageQuery[] memory queries)
        external
        view
        returns (uint256[] memory results);
}

interface IVault {
    enum PoolSpecialization {
        GENERAL,
        MINIMAL_SWAP_INFO,
        TWO_TOKEN
    }
    enum JoinKind {
        INIT,
        EXACT_TOKENS_IN_FOR_BPT_OUT,
        TOKEN_IN_FOR_EXACT_BPT_OUT,
        ALL_TOKENS_IN_FOR_EXACT_BPT_OUT
    }

    enum SwapKind {
        GIVEN_IN,
        GIVEN_OUT
    }

    struct SingleSwap {
        bytes32 poolId;
        SwapKind kind;
        IAsset assetIn;
        IAsset assetOut;
        uint256 amount;
        bytes userData;
    }

    struct FundManagement {
        address sender;
        bool fromInternalBalance;
        address payable recipient;
        bool toInternalBalance;
    }

    struct JoinPoolRequest {
        IAsset[] assets;
        uint256[] maxAmountsIn;
        bytes userData;
        bool fromInternalBalance;
    }

    function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);

    function getPoolTokens(bytes32 poolId)
        external
        view
        returns (
            address[] memory tokens,
            uint256[] memory balances,
            uint256 lastChangeBlock
        );

    function joinPool(
        bytes32 poolId,
        address sender,
        address recipient,
        JoinPoolRequest memory request
    ) external payable;

    function swap(
        SingleSwap memory singleSwap,
        FundManagement memory funds,
        uint256 limit,
        uint256 deadline
    ) external returns (uint256 amountCalculated);

    function exitPool(
        bytes32 poolId,
        address sender,
        address payable recipient,
        ExitPoolRequest memory request
    ) external;

    struct ExitPoolRequest {
        IAsset[] assets;
        uint256[] minAmountsOut;
        bytes userData;
        bool toInternalBalance;
    }
    enum ExitKind {
        EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,
        EXACT_BPT_IN_FOR_TOKENS_OUT,
        BPT_IN_FOR_EXACT_TOKENS_OUT,
        MANAGEMENT_FEE_TOKENS_OUT // for ManagedPool
    }
}

interface IAsset {
    // solhint-disable-previous-line no-empty-blocks
}

interface IAuraLocker {
    function lock(address _account, uint256 _amount) external;

    function checkpointEpoch() external;

    function epochCount() external view returns (uint256);

    function balanceAtEpochOf(uint256 _epoch, address _user) external view returns (uint256 amount);

    function totalSupplyAtEpoch(uint256 _epoch) external view returns (uint256 supply);

    function queueNewRewards(address _rewardsToken, uint256 reward) external;

    function getReward(address _account, bool _stake) external;

    function getReward(address _account) external;
}

interface IExtraRewardsDistributor {
    function addReward(address _token, uint256 _amount) external;
}

interface ICrvDepositorWrapper {
    function getMinOut(uint256, uint256) external view returns (uint256);

    function deposit(
        uint256,
        uint256,
        bool,
        address _stakeAddress
    ) external;
}

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

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 5 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 5 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_startToken","type":"address"},{"internalType":"address","name":"_pairToken","type":"address"},{"internalType":"uint256","name":"_minPairAmount","type":"uint256"},{"internalType":"address","name":"_dao","type":"address"},{"internalType":"address","name":"_bVault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"input","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"output","type":"uint256"}],"name":"LiquidityProvided","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMinPairAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinPairAmount","type":"uint256"}],"name":"MinPairAmountChanged","type":"event"},{"inputs":[],"name":"bVault","outputs":[{"internalType":"contract IVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAmount","type":"uint256"}],"name":"changeMinPairAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dao","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPairAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_poolId","type":"bytes32"},{"components":[{"internalType":"contract IAsset[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"maxAmountsIn","type":"uint256[]"},{"internalType":"bytes","name":"userData","type":"bytes"},{"internalType":"bool","name":"fromInternalBalance","type":"bool"}],"internalType":"struct IVault.JoinPoolRequest","name":"_request","type":"tuple"}],"name":"provideLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_erc20","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101206040523480156200001257600080fd5b506040516200163838038062001638833981016040819052620000359162000080565b6001600160a01b0394851660805292841660a0526000919091553360c052821660e0521661010052620000e7565b80516001600160a01b03811681146200007b57600080fd5b919050565b600080600080600060a086880312156200009957600080fd5b620000a48662000063565b9450620000b46020870162000063565b935060408601519250620000cb6060870162000063565b9150620000db6080870162000063565b90509295509295909350565b60805160a05160c05160e051610100516114b3620001856000396000818160a70152818161074e01528181610783015281816107d80152610918015260008181610112015281816101d501528181610240015281816102750152818161094901526109ba0152600081816101a3015261031601526000818160eb0152818161048201526105ad015260008181610176015261057201526114b36000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80635e0c9ae51161005b5780635e0c9ae514610134578063a13a2d8d14610147578063a7966a5b1461015a578063cd00ee0d1461017157600080fd5b806333f3d6281461008d578063394b71cf146100a25780633de35b79146100e65780634162169f1461010d575b600080fd5b6100a061009b366004610f02565b610198565b005b6100c97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c97f000000000000000000000000000000000000000000000000000000000000000081565b6100c97f000000000000000000000000000000000000000000000000000000000000000081565b6100a0610142366004610f2e565b61026a565b6100a06101553660046110d4565b61030b565b61016360005481565b6040519081526020016100dd565b6100c97f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806101f75750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b6102305760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b60448201526064015b60405180910390fd5b816102656001600160a01b0382167f000000000000000000000000000000000000000000000000000000000000000084610ac8565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102ca5760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b6044820152606401610227565b60005460408051918252602082018390527f7f31eb68312e190658babc30c9bcce33e0f9d8d363bc5c39af10358c5059877d910160405180910390a1600055565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461036b5760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b6044820152606401610227565b805151600214801561038257508060200151516002145b6103ce5760405162461bcd60e51b815260206004820152600660248201527f2176616c696400000000000000000000000000000000000000000000000000006044820152606401610227565b8051805160019081106103e3576103e3611202565b60200260200101516001600160a01b0316816000015160008151811061040b5761040b611202565b60200260200101516001600160a01b0316141561046a5760405162461bcd60e51b815260206004820152600760248201527f21617373657473000000000000000000000000000000000000000000000000006044820152606401610227565b6000546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156104d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f59190611218565b116105425760405162461bcd60e51b815260206004820152600760248201527f216d696e4c6971000000000000000000000000000000000000000000000000006044820152606401610227565b60005b60028110156107be5760008260000151828151811061056657610566611202565b602002602001015190507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614806105e157507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316145b61062d5760405162461bcd60e51b815260206004820152600660248201527f21617373657400000000000000000000000000000000000000000000000000006044820152606401610227565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069a9190611218565b90506000811180156106c95750846020015184815181106106bd576106bd611202565b60200260200101518110155b801561070a57506064856020015185815181106106e8576106e8611202565b602002602001015160666106fc9190611247565b6107069190611266565b8111155b61073f5760405162461bcd60e51b8152600401610227906020808252600490820152630858985b60e21b604082015260600190565b6107746001600160a01b0383167f00000000000000000000000000000000000000000000000000000000000000006000610b58565b6107a86001600160a01b0383167f000000000000000000000000000000000000000000000000000000000000000083610b58565b50505080806107b690611288565b915050610545565b5060405163f6c0092760e01b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f6c00927906024016040805180830381865afa158015610826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084a91906112a3565b5090506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561088d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b19190611218565b905080156109015760405162461bcd60e51b815260206004820152600560248201527f21696e69740000000000000000000000000000000000000000000000000000006044820152606401610227565b60405163172b958560e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b95cac289061097390879030907f0000000000000000000000000000000000000000000000000000000000000000908990600401611378565b600060405180830381600087803b15801561098d57600080fd5b505af11580156109a1573d6000803e3d6000fd5b50506040516370a0823160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260009350851691506370a0823190602401602060405180830381865afa158015610a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a329190611218565b905060008111610a845760405162461bcd60e51b815260206004820152600560248201527f216d696e740000000000000000000000000000000000000000000000000000006044820152606401610227565b7f8175833915d965e38738114817b016426974f3daad3a87888308da9f3ec1d4dd846020015182604051610ab9929190611438565b60405180910390a15050505050565b6040516001600160a01b03831660248201526044810182905261026590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610c74565b801580610bd25750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610bac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd09190611218565b155b610c445760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610227565b6040516001600160a01b03831660248201526044810182905261026590849063095ea7b360e01b90606401610af4565b6000610cc9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d599092919063ffffffff16565b8051909150156102655780806020019051810190610ce7919061145a565b6102655760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610227565b6060610d688484600085610d72565b90505b9392505050565b606082471015610dea5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610227565b843b610e385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610227565b600080866001600160a01b03168587604051610e549190611477565b60006040518083038185875af1925050503d8060008114610e91576040519150601f19603f3d011682016040523d82523d6000602084013e610e96565b606091505b5091509150610ea6828286610eb1565b979650505050505050565b60608315610ec0575081610d6b565b825115610ed05782518084602001fd5b8160405162461bcd60e51b81526004016102279190611493565b6001600160a01b0381168114610eff57600080fd5b50565b60008060408385031215610f1557600080fd5b8235610f2081610eea565b946020939093013593505050565b600060208284031215610f4057600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715610f8057610f80610f47565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610faf57610faf610f47565b604052919050565b600067ffffffffffffffff821115610fd157610fd1610f47565b5060051b60200190565b600082601f830112610fec57600080fd5b81356020611001610ffc83610fb7565b610f86565b82815260059290921b8401810191818101908684111561102057600080fd5b8286015b8481101561103b5780358352918301918301611024565b509695505050505050565b600082601f83011261105757600080fd5b813567ffffffffffffffff81111561107157611071610f47565b611084601f8201601f1916602001610f86565b81815284602083860101111561109957600080fd5b816020850160208301376000918101602001919091529392505050565b8015158114610eff57600080fd5b80356110cf816110b6565b919050565b600080604083850312156110e757600080fd5b8235915060208084013567ffffffffffffffff8082111561110757600080fd5b908501906080828803121561111b57600080fd5b611123610f5d565b82358281111561113257600080fd5b8301601f8101891361114357600080fd5b8035611151610ffc82610fb7565b81815260059190911b8201860190868101908b83111561117057600080fd5b928701925b8284101561119757833561118881610eea565b82529287019290870190611175565b845250505082840135828111156111ad57600080fd5b6111b989828601610fdb565b858301525060408301359350818411156111d257600080fd5b6111de88858501611046565b60408201526111ef606084016110c4565b6060820152809450505050509250929050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561122a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561126157611261611231565b500290565b60008261128357634e487b7160e01b600052601260045260246000fd5b500490565b600060001982141561129c5761129c611231565b5060010190565b600080604083850312156112b657600080fd5b82516112c181610eea565b6020840151909250600381106112d657600080fd5b809150509250929050565b600081518084526020808501945080840160005b83811015611311578151875295820195908201906001016112f5565b509495945050505050565b60005b8381101561133757818101518382015260200161131f565b83811115611346576000848401525b50505050565b6000815180845261136481602086016020860161131c565b601f01601f19169290920160200192915050565b848152600060206001600160a01b038087168285015280861660408501526080606085015261010084018551608080870152818151808452610120880191508583019350600092505b808310156113e3578351851682529285019260019290920191908501906113c1565b50848801519450607f199350838782030160a088015261140381866112e1565b94505050506040850151818584030160c0860152611421838261134c565b92505050606084015161103b60e085018215159052565b60408152600061144b60408301856112e1565b90508260208301529392505050565b60006020828403121561146c57600080fd5b8151610d6b816110b6565b6000825161148981846020870161131c565b9190910192915050565b602081526000610d6b602083018461134c56fea164736f6c634300080b000a000000000000000000000000c0c293ce456ff0ed870add98a0828dd4d2903dbf000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000014542ba12a337c0000000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca9000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c80635e0c9ae51161005b5780635e0c9ae514610134578063a13a2d8d14610147578063a7966a5b1461015a578063cd00ee0d1461017157600080fd5b806333f3d6281461008d578063394b71cf146100a25780633de35b79146100e65780634162169f1461010d575b600080fd5b6100a061009b366004610f02565b610198565b005b6100c97f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c881565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c97f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6100c97f000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca981565b6100a0610142366004610f2e565b61026a565b6100a06101553660046110d4565b61030b565b61016360005481565b6040519081526020016100dd565b6100c97f000000000000000000000000c0c293ce456ff0ed870add98a0828dd4d2903dbf81565b336001600160a01b037f000000000000000000000000a28ea848801da877e1844f954ff388e857d405e51614806101f75750336001600160a01b037f000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca916145b6102305760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b60448201526064015b60405180910390fd5b816102656001600160a01b0382167f000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca984610ac8565b505050565b336001600160a01b037f000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca916146102ca5760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b6044820152606401610227565b60005460408051918252602082018390527f7f31eb68312e190658babc30c9bcce33e0f9d8d363bc5c39af10358c5059877d910160405180910390a1600055565b336001600160a01b037f000000000000000000000000a28ea848801da877e1844f954ff388e857d405e5161461036b5760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b6044820152606401610227565b805151600214801561038257508060200151516002145b6103ce5760405162461bcd60e51b815260206004820152600660248201527f2176616c696400000000000000000000000000000000000000000000000000006044820152606401610227565b8051805160019081106103e3576103e3611202565b60200260200101516001600160a01b0316816000015160008151811061040b5761040b611202565b60200260200101516001600160a01b0316141561046a5760405162461bcd60e51b815260206004820152600760248201527f21617373657473000000000000000000000000000000000000000000000000006044820152606401610227565b6000546040516370a0823160e01b81523060048201527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316906370a0823190602401602060405180830381865afa1580156104d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f59190611218565b116105425760405162461bcd60e51b815260206004820152600760248201527f216d696e4c6971000000000000000000000000000000000000000000000000006044820152606401610227565b60005b60028110156107be5760008260000151828151811061056657610566611202565b602002602001015190507f000000000000000000000000c0c293ce456ff0ed870add98a0828dd4d2903dbf6001600160a01b0316816001600160a01b031614806105e157507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316816001600160a01b0316145b61062d5760405162461bcd60e51b815260206004820152600660248201527f21617373657400000000000000000000000000000000000000000000000000006044820152606401610227565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069a9190611218565b90506000811180156106c95750846020015184815181106106bd576106bd611202565b60200260200101518110155b801561070a57506064856020015185815181106106e8576106e8611202565b602002602001015160666106fc9190611247565b6107069190611266565b8111155b61073f5760405162461bcd60e51b8152600401610227906020808252600490820152630858985b60e21b604082015260600190565b6107746001600160a01b0383167f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c86000610b58565b6107a86001600160a01b0383167f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c883610b58565b50505080806107b690611288565b915050610545565b5060405163f6c0092760e01b8152600481018390526000907f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c86001600160a01b03169063f6c00927906024016040805180830381865afa158015610826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084a91906112a3565b5090506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561088d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b19190611218565b905080156109015760405162461bcd60e51b815260206004820152600560248201527f21696e69740000000000000000000000000000000000000000000000000000006044820152606401610227565b60405163172b958560e31b81526001600160a01b037f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8169063b95cac289061097390879030907f000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca9908990600401611378565b600060405180830381600087803b15801561098d57600080fd5b505af11580156109a1573d6000803e3d6000fd5b50506040516370a0823160e01b81526001600160a01b037f000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca98116600483015260009350851691506370a0823190602401602060405180830381865afa158015610a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a329190611218565b905060008111610a845760405162461bcd60e51b815260206004820152600560248201527f216d696e740000000000000000000000000000000000000000000000000000006044820152606401610227565b7f8175833915d965e38738114817b016426974f3daad3a87888308da9f3ec1d4dd846020015182604051610ab9929190611438565b60405180910390a15050505050565b6040516001600160a01b03831660248201526044810182905261026590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610c74565b801580610bd25750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610bac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd09190611218565b155b610c445760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610227565b6040516001600160a01b03831660248201526044810182905261026590849063095ea7b360e01b90606401610af4565b6000610cc9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d599092919063ffffffff16565b8051909150156102655780806020019051810190610ce7919061145a565b6102655760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610227565b6060610d688484600085610d72565b90505b9392505050565b606082471015610dea5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610227565b843b610e385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610227565b600080866001600160a01b03168587604051610e549190611477565b60006040518083038185875af1925050503d8060008114610e91576040519150601f19603f3d011682016040523d82523d6000602084013e610e96565b606091505b5091509150610ea6828286610eb1565b979650505050505050565b60608315610ec0575081610d6b565b825115610ed05782518084602001fd5b8160405162461bcd60e51b81526004016102279190611493565b6001600160a01b0381168114610eff57600080fd5b50565b60008060408385031215610f1557600080fd5b8235610f2081610eea565b946020939093013593505050565b600060208284031215610f4057600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715610f8057610f80610f47565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610faf57610faf610f47565b604052919050565b600067ffffffffffffffff821115610fd157610fd1610f47565b5060051b60200190565b600082601f830112610fec57600080fd5b81356020611001610ffc83610fb7565b610f86565b82815260059290921b8401810191818101908684111561102057600080fd5b8286015b8481101561103b5780358352918301918301611024565b509695505050505050565b600082601f83011261105757600080fd5b813567ffffffffffffffff81111561107157611071610f47565b611084601f8201601f1916602001610f86565b81815284602083860101111561109957600080fd5b816020850160208301376000918101602001919091529392505050565b8015158114610eff57600080fd5b80356110cf816110b6565b919050565b600080604083850312156110e757600080fd5b8235915060208084013567ffffffffffffffff8082111561110757600080fd5b908501906080828803121561111b57600080fd5b611123610f5d565b82358281111561113257600080fd5b8301601f8101891361114357600080fd5b8035611151610ffc82610fb7565b81815260059190911b8201860190868101908b83111561117057600080fd5b928701925b8284101561119757833561118881610eea565b82529287019290870190611175565b845250505082840135828111156111ad57600080fd5b6111b989828601610fdb565b858301525060408301359350818411156111d257600080fd5b6111de88858501611046565b60408201526111ef606084016110c4565b6060820152809450505050509250929050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561122a57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561126157611261611231565b500290565b60008261128357634e487b7160e01b600052601260045260246000fd5b500490565b600060001982141561129c5761129c611231565b5060010190565b600080604083850312156112b657600080fd5b82516112c181610eea565b6020840151909250600381106112d657600080fd5b809150509250929050565b600081518084526020808501945080840160005b83811015611311578151875295820195908201906001016112f5565b509495945050505050565b60005b8381101561133757818101518382015260200161131f565b83811115611346576000848401525b50505050565b6000815180845261136481602086016020860161131c565b601f01601f19169290920160200192915050565b848152600060206001600160a01b038087168285015280861660408501526080606085015261010084018551608080870152818151808452610120880191508583019350600092505b808310156113e3578351851682529285019260019290920191908501906113c1565b50848801519450607f199350838782030160a088015261140381866112e1565b94505050506040850151818584030160c0860152611421838261134c565b92505050606084015161103b60e085018215159052565b60408152600061144b60408301856112e1565b90508260208301529392505050565b60006020828403121561146c57600080fd5b8151610d6b816110b6565b6000825161148981846020870161131c565b9190910192915050565b602081526000610d6b602083018461134c56fea164736f6c634300080b000a

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

000000000000000000000000c0c293ce456ff0ed870add98a0828dd4d2903dbf000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000014542ba12a337c0000000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca9000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8

-----Decoded View---------------
Arg [0] : _startToken (address): 0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF
Arg [1] : _pairToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _minPairAmount (uint256): 375000000000000000000
Arg [3] : _dao (address): 0xfc78f8e1Af80A3bF5A1783BB59eD2d1b10f78cA9
Arg [4] : _bVault (address): 0xBA12222222228d8Ba445958a75a0704d566BF2C8

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c0c293ce456ff0ed870add98a0828dd4d2903dbf
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 000000000000000000000000000000000000000000000014542ba12a337c0000
Arg [3] : 000000000000000000000000fc78f8e1af80a3bf5a1783bb59ed2d1b10f78ca9
Arg [4] : 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

OVERVIEW

Provides initial liquidity to a Balancer pool on behalf of a given DAO.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.