Contract 0x9A74cBFf3f36FF1E433Ef88D0ec1cdCD1eb79AFa 2

 

Contract Overview

Balance:
0 Ether

EtherValue:
$0.00

Token:
Txn Hash
Method
Block
From
To
Value
0x97a3b5cc65f690e7911787b4b8dd63e3051c08a9fca076dcbe6d80772a86c8b7Set Swap Enabled153195272022-08-11 7:54:564 hrs 1 min ago0xcd71c9512e7b070a14199d3d6043520b01a891c4 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00074767 19.‍33924748
0x63e26a0ee3c8c426794042af28ba85cb9a2502a99dfadfd30e5e5b269b74be4a0x0a511760153195232022-08-11 7:54:154 hrs 2 mins ago0xcd71c9512e7b070a14199d3d6043520b01a891c4 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍10103674 20.‍93193725
0x401353871c1102caf0dc22585fdaa3ee7a7d4482984a1d8c2d815b2d1e6fd34bSet Swap Enabled153187422022-08-11 5:00:276 hrs 55 mins ago0x2ff7f5cb753b43591347b6d751aa3f6fdb26b473 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00059326 15.‍34539593
0xa8763cb5cd76ab7fe73c30098729701a8742f618db1b8ee41e556eba87a58b900x0a511760153186612022-08-11 4:41:187 hrs 15 mins ago0x2ff7f5cb753b43591347b6d751aa3f6fdb26b473 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍05253418 10.‍89463402
0xc63e356b7e4b9d473a041acf4103d79d599dbe69bdd1f9cbded1a60fc5e966afSet Swap Enabled153164152022-08-10 20:14:0415 hrs 42 mins ago0xe34e900318d35a799da3a0f44f2cde81a7bc4f82 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00061075 15.‍79780332
0x9febb84fe915aa51ff252cc7a32d1cb2a5c7131e33f3ef39c5a5f53b9a32609eSet Swap Enabled153162552022-08-10 19:39:3216 hrs 16 mins ago0xe34e900318d35a799da3a0f44f2cde81a7bc4f82 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00083107 21.‍4975583
0x63ed1116fb9753e70b9f10c2985c5b26276e642ecf2fa305d2706ceb325851ccSet Swap Enabled153149432022-08-10 14:47:3321 hrs 8 mins ago0xe34e900318d35a799da3a0f44f2cde81a7bc4f82 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00209355 54.‍15158971
0xe8092eccb3e4c2d09d8e9ac618f8f16e18ee2ec97e5199a2d1eac3a8318cdfffExit Pool153095632022-08-09 18:31:501 day 17 hrs agoENS Name omnislabs.eth IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00791895 21.‍1127219
0x5adff43d2033e76442bfafecc943836aaee351e2739a67df113e0ea8a7716852Exit Pool153088432022-08-09 15:37:381 day 20 hrs agoENS Name xiadeployer.eth IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00547913 17.‍69368449
0xa29cac4398a8f7964c0501649ceea81288edb180097951862d6df07dba3594a6Set Swap Enabled153068712022-08-09 8:14:182 days 3 hrs ago0xf5796212d2a4779cc321cce68173cda91ec446a1 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍0003897 10.‍07994252
0x99d82215a84ec1c74efc1a614b0223a7fb8c8e72dba82afa8045eef1a25285e30x0a511760153066902022-08-09 7:31:502 days 4 hrs ago0xf5796212d2a4779cc321cce68173cda91ec446a1 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍061086 12.‍63066125
0xb624d2759cba99a6b186d647f45dd3f812a0a6812bfb54623066732458fcecfeSet Swap Enabled153054892022-08-09 3:02:462 days 8 hrs ago0xdead3742493df7a90c5320afd126628eec885d27 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00050773 13.‍13308744
0x5026ab1c50295cc89db12cc1e9db04b57249dfb208d24de3f1c223570eab93c40x0a511760153048622022-08-09 0:40:162 days 11 hrs ago0xdead3742493df7a90c5320afd126628eec885d27 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍09278369 19.‍21167204
0x18446de8ab45b9084e2ff58b6df79a49559f3714c5a07b47b0f46b38a8944c8cExit Pool153048532022-08-09 0:37:472 days 11 hrs ago0xa31ba15f5ebde1dd3f2867a805bb4afd88593c31 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00793361 25.‍71239247
0xc77624cc20e46ab31afe0ee64997d1b536fa73718d56ae5fe0b878d54e6d509f0x0a511760153044692022-08-08 23:12:042 days 12 hrs ago0xe34e900318d35a799da3a0f44f2cde81a7bc4f82 IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍08173585 16.‍18616785
0x7c054baecaa7f764a0d8c2e25f4fdbf29c030ba2d5c0cc99b834d3ce1c410392Set Swap Enabled153037662022-08-08 20:39:092 days 15 hrs agoChopper Inu: Deployer IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00373322 96.‍56296539
0x9ba69f0cc4bd7b855f802932afc993c4039e68968f7a253852e89572dad0ba5f0x0a511760153036132022-08-08 20:06:482 days 15 hrs agoChopper Inu: Deployer IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍12258927 24.‍98236143
0xbad4f39468dc7e419121d7168e26150e1d881b5f0a4bdb577ef5f4f5b3433356Exit Pool153035592022-08-08 19:55:022 days 16 hrs ago0x1be924a4a95352523086b7a41b9d2618f79f58ab IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00593764 26.‍85817359
0x2082261ddbb57b7b89eec89ad0bb555e3f554631d760404b4cbaae0a4ea8e157Exit Pool152990002022-08-08 2:40:043 days 9 hrs ago0xc5d227e24afa507db467dde016b32d25fae6f11d IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00391105 11.‍94650856
0x23f145bf5b800db72ca7316bd226a7c7fa83a013e883551eb3cfc809e87d4151Set Swap Enabled152972502022-08-07 20:05:163 days 15 hrs agoENS Name xiadeployer.eth IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00047199 12.‍2086497
0xa78538420f519706c0978ba0d26f0761cc6eb576f4a060ecc91c618b876e0c150x0a511760152971722022-08-07 19:47:403 days 16 hrs agoENS Name xiadeployer.eth IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍07774109 16.‍08332154
0xf3feaddad3f93cf00122e4464eaa1728eaaed9c3f6dd70430f97c02fe6eee069Exit Pool152930482022-08-07 4:40:384 days 7 hrs agoENS Name ufo2.eth IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00239693 6.‍99137828
0x395be79f4e8385ae04ecd4420bdf985c820b32e75fe62332774a3fc47f00ab69Exit Pool152927382022-08-07 3:28:154 days 8 hrs ago0xa6663d2f189810139b018856959244323872b7ac IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00184885 8.‍26784086
0x75134258758ed87b6c6bab6c8f6dd97944473bb2182b4cef59ba7d4b10865bd1Exit Pool152920432022-08-07 0:38:564 days 11 hrs agoENS Name unrugme.eth IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍00133132 4.‍07122067
0x6e0a60ba5d26636363ec660e7a205ef14a3f6a4f37643a6e7ca7a30f1f626220Set Swap Enabled152918972022-08-07 0:13:034 days 11 hrs ago0xa6663d2f189810139b018856959244323872b7ac IN  0x9a74cbff3f36ff1e433ef88d0ec1cdcd1eb79afa0 Ether0.‍0001704 4.‍40763246
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CopperProxyV2

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 6 : CopperProxyV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import {TransferHelper} from "@uniswap/lib/contracts/libraries/TransferHelper.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

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

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

interface LBPFactory {
    function create(
        string memory name,
        string memory symbol,
        address[] memory tokens,
        uint256[] memory weights,
        uint256 swapFeePercentage,
        address owner,
        bool swapEnabledOnStart
    ) external returns (address);
}

interface Vault {
    struct JoinPoolRequest {
        address[] assets;
        uint256[] maxAmountsIn;
        bytes userData;
        bool fromInternalBalance;
    }

    struct ExitPoolRequest {
        address[] assets;
        uint256[] minAmountsOut;
        bytes userData;
        bool toInternalBalance;
    }

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

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

    function getPoolTokens(bytes32 poolId)
        external
        view
        returns (
            address[] memory tokens,
            uint256[] memory balances,
            uint256 lastChangeBlock
        );
    
    function swap(
        SingleSwap memory singleSwap,
        FundManagement memory funds,
        uint256 limit,
        uint256 deadline
    )
        external
        payable
        returns (uint256 amountCalculated);
}

interface LBP {
    function updateWeightsGradually(
        uint256 startTime,
        uint256 endTime,
        uint256[] memory endWeights
    ) external;

    function setSwapEnabled(bool swapEnabled) external;

    function getPoolId() external returns (bytes32 poolID);
}

interface Blocklist {
    function isNotBlocked(address _address) external view returns(bool);
}

/// @title CopperProxyV2
/// @notice This contract allows for simplified creation and management of Balancer LBPs
/// It currently supports:
/// - LBPs with 2 tokens
/// - Withdrawl of the full liquidity at once
/// - Having multiple fee recipients
contract CopperProxyV2 is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;

    struct PoolData {
        address owner;
        bool isCorrectOrder;
        uint256 fundTokenInputAmount;
    }

    mapping(address => PoolData) private _poolData;
    EnumerableSet.AddressSet private _pools;
    mapping(address => uint256) private _feeRecipientsBPS;
    EnumerableSet.AddressSet private _recipientAddresses;


    address public constant VAULT = address(0xBA12222222228d8Ba445958a75a0704d566BF2C8);
    uint256 private constant _TEN_THOUSAND_BPS = 10_000;
    address public immutable LBPFactoryAddress;
    uint256 public immutable platformAccessFeeBPS;
    address public blockListAddress;

    constructor(
        uint256 _platformAccessFeeBPS,
        address _LBPFactoryAddress
    ) {
        platformAccessFeeBPS = _platformAccessFeeBPS;
        LBPFactoryAddress = _LBPFactoryAddress;
        // set initial fee recipient to owner of contract
        _recipientAddresses.add(owner());
        _feeRecipientsBPS[owner()] = _TEN_THOUSAND_BPS;
    }

    // Events
    event PoolCreated(
        address indexed pool,
        bytes32 poolId,
        string  name,
        string  symbol,
        address[]  tokens,
        uint256[]  weights,
        uint256 swapFeePercentage,
        address owner,
        bool swapEnabledOnStart
    );

    event JoinedPool(address indexed pool, address[] tokens, uint256[] amounts, bytes userData);

    event GradualWeightUpdateScheduled(address indexed pool, uint256 startTime, uint256 endTime, uint256[] endWeights);

    event SwapEnabledSet(address indexed pool, bool swapEnabled);

    event TransferredPoolOwnership(address indexed pool, address previousOwner, address newOwner);

    event TransferredFee(address indexed pool, address token, address feeRecipient, uint256 feeAmount);

    event TransferredToken(address indexed pool, address token, address to, uint256 amount);

    event RecipientsUpdated(address[] recipients, uint256[] recipientShareBPS);

    event Skimmed(address token, address to, uint256 balance);

    // Pool access control
    modifier onlyPoolOwner(address pool) {
        require(msg.sender == _poolData[pool].owner, "!owner");
        _;
    }

    /**
     * @dev Checks if the pool address was created in this smart contract
     */
    function isPool(address pool) external view returns (bool valid) {
        return _pools.contains(pool);
    }

    /**
     * @dev Returns the total amount of pools created in the contract
     */
    function poolCount() external view returns (uint256 count) {
        return _pools.length();
    }

    /**
     * @dev Returns a pool for a specific index
     */
    function getPoolAt(uint256 index) external view returns (address pool) {
        return _pools.at(index);
    }

    /**
     * @dev Returns all the pool values
     */
    function getPools() external view returns (address[] memory pools) {
        return _pools.values();
    }

    /**
     * @dev Returns the pool's data saved during creation
     */
    function getPoolData(address pool) external view returns (PoolData memory poolData) {
        return _poolData[pool];
    }

    /**
     * @dev Returns the total amount of LBP Tokens for a pool. These tokens are burned when exit
     */
    function getBPTTokenBalance(address pool) external view returns (uint256 bptBalance) {
        return IERC20(pool).balanceOf(address(this));
    }

    /**
     * @dev Returns all the fee recipients
     */
    function getFeeRecipients() external view returns (address[] memory recipients) {
        return _recipientAddresses.values();
    }

    /**
     * @dev Returns the fee share percentage in BPS for a fee recipient
     */
    function getRecipientShareBPS(address recipientAddress) external view returns (uint256 shareSize) {
        if (_recipientAddresses.contains(recipientAddress)) {
            return _feeRecipientsBPS[recipientAddress];
        }
        return uint256(0);
    }

    struct PoolConfig {
        string name;
        string symbol;
        address[] tokens;
        uint256[] amounts;
        uint256[] weights;
        uint256[] endWeights;
        bool isCorrectOrder;
        uint256 swapFeePercentage;
        uint256 startTime;
        uint256 endTime;
    }

    /**
     * @dev Creates a pool and return the contract address of the new pool
     */
    function createLBP(PoolConfig memory poolConfig) external returns (address) {
        // 1: deposit tokens and approve vault
        require(poolConfig.tokens.length == 2, "Copper LBPs must have exactly two tokens");
        require(poolConfig.tokens[0] != poolConfig.tokens[1], "LBP tokens must be unique");
        require(poolConfig.startTime > block.timestamp, "LBP start time must be in the future");
        require(poolConfig.endTime > poolConfig.startTime, "LBP end time must be greater than start time");
        require(blockListAddress != address(0), "no blocklist address set");
        bool msgSenderIsNotBlocked = Blocklist(blockListAddress).isNotBlocked(msg.sender);
        require(msgSenderIsNotBlocked, "msg.sender is blocked");
        TransferHelper.safeTransferFrom(poolConfig.tokens[0], msg.sender, address(this), poolConfig.amounts[0]);
        TransferHelper.safeTransferFrom(poolConfig.tokens[1], msg.sender, address(this), poolConfig.amounts[1]);
        TransferHelper.safeApprove(poolConfig.tokens[0], VAULT, poolConfig.amounts[0]);
        TransferHelper.safeApprove(poolConfig.tokens[1], VAULT, poolConfig.amounts[1]);

        // 2: pool creation
        address pool = LBPFactory(LBPFactoryAddress).create(
            poolConfig.name,
            poolConfig.symbol,
            poolConfig.tokens,
            poolConfig.weights,
            poolConfig.swapFeePercentage,
            address(this), // owner set to this proxy
            false // swaps disabled on start
        );

        bytes32 poolId = LBP(pool).getPoolId();
        emit PoolCreated(
            pool,
            poolId,
            poolConfig.name,
            poolConfig.symbol,
            poolConfig.tokens,
            poolConfig.weights,
            poolConfig.swapFeePercentage,
            address(this),
            false    
        );

        // 3: store pool data
        _poolData[pool] = PoolData(
            msg.sender,
            poolConfig.isCorrectOrder,
            poolConfig.amounts[poolConfig.isCorrectOrder ? 0 : 1]
        );
        require(_pools.add(pool), "exists already");

        bytes memory userData = abi.encode(0, poolConfig.amounts); // JOIN_KIND_INIT = 0
        // 4: deposit tokens into pool
        Vault(VAULT).joinPool(
            poolId,
            address(this), // sender
            address(this), // recipient
            Vault.JoinPoolRequest(
                poolConfig.tokens,
                poolConfig.amounts,
                userData,
                false)
        );
        emit JoinedPool(pool, poolConfig.tokens, poolConfig.amounts, userData);

        // 5: configure weights
        LBP(pool).updateWeightsGradually(poolConfig.startTime, poolConfig.endTime, poolConfig.endWeights);
        emit GradualWeightUpdateScheduled(pool, poolConfig.startTime, poolConfig.endTime, poolConfig.endWeights);

        return pool;
    }

    /**
     * @dev Enable or disables swaps.
     * Note: LBPs are created with trading disabled by default.
     */
    function setSwapEnabled(address pool, bool swapEnabled) external onlyPoolOwner(pool) {
        LBP(pool).setSwapEnabled(swapEnabled);
        emit SwapEnabledSet(pool, swapEnabled);
    }

    /**
     * @dev Transfer ownership of the pool to a new owner
     */
    function transferPoolOwnership(address pool, address newOwner) external onlyPoolOwner(pool) {
        require(blockListAddress != address(0), "no blocklist address set");
        bool newOwnerIsNotBlocked = Blocklist(blockListAddress).isNotBlocked(msg.sender);
        require(newOwnerIsNotBlocked, "newOwner is blocked");

        address previousOwner = _poolData[pool].owner;
        _poolData[pool].owner = newOwner;
        emit TransferredPoolOwnership(pool, previousOwner, newOwner);
    }

    enum ExitKind {
        EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,
        EXACT_BPT_IN_FOR_TOKENS_OUT,
        BPT_IN_FOR_EXACT_TOKENS_OUT
    }

    /**
     * @dev calculate the amount of BPToken to burn.
     * - if maxBPTTokenOut is 0, everything will be burned
     * - else it will burn only the amount passed
     */
    function _calcBPTokenToBurn(address pool, uint256 maxBPTTokenOut) internal view returns(uint256) {
        uint256 bptBalance = IERC20(pool).balanceOf(address(this));
        require(maxBPTTokenOut <= bptBalance, "Specifed BPT out amount out exceeds owner balance");
        require(bptBalance > 0, "Pool owner BPT balance is less than zero");
        return maxBPTTokenOut == 0 ? bptBalance : maxBPTTokenOut;
    }

    /**
     * @dev Exit a pool, burn the BPT token and transfer back the tokens.
     * - If maxBPTTokenOut is passed as 0, the function will use the total balance available for the BPT token.
     * - If maxBPTTokenOut is between 0 and the total of BPT available, that will be the amount used to burn.
     * maxBPTTokenOut must be greater than or equal to 0
     * - isStandardFee value should be true unless there is an issue with safeTransfer, in which case it can be passed
     * as false, and the fee will stay in the contract and later on distributed manualy to mitigate errors
     */
    function exitPool(address pool, uint256 maxBPTTokenOut, bool isStandardFee) external onlyPoolOwner(pool) {
        uint256[]  memory minAmountsOut = new uint256[](2);
        minAmountsOut[0] = uint256(0);
        minAmountsOut[1] = uint256(0);

        // 1. Get pool data
        bytes32 poolId = LBP(pool).getPoolId();
        (address[] memory poolTokens, uint256[] memory balances, ) = Vault(VAULT).getPoolTokens(poolId);
        require(poolTokens.length == minAmountsOut.length, "invalid input length");
        PoolData memory poolData = _poolData[pool];

        // 2. Specify the exact BPT amount to burn
        uint256 bptToBurn = _calcBPTokenToBurn(pool, maxBPTTokenOut);
        
        // 3. Exit pool and keep tokens in contract
        Vault(VAULT).exitPool(
            poolId,
            address(this),
            payable(address(this)),
            Vault.ExitPoolRequest(
                poolTokens,
                minAmountsOut, 
                abi.encode(ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptToBurn),
                false
            ) 
        );

        // 4. Get the amount of Fund token from the pool that was left behind after exit (dust)
        ( ,uint256[] memory balancesAfterExit, ) = Vault(VAULT).getPoolTokens(poolId);
        uint256 fundTokenIndex = poolData.isCorrectOrder ? 0 : 1;

        // 5. Distribute tokens and fees
        _distributeTokens(
            pool,
            poolTokens,
            poolData,
            balances[fundTokenIndex] - balancesAfterExit[fundTokenIndex],
            isStandardFee
        );
    }

    /**
     * @dev Distributes the tokens to the owner and the fee to the fee recipients
     */
    function _distributeTokens(
        address pool,
        address[] memory poolTokens,
        PoolData memory poolData,
        uint256 fundTokenFromPool,
        bool isStandardFee) internal {

        address mainToken = poolTokens[poolData.isCorrectOrder ? 1 : 0];
        address fundToken = poolTokens[poolData.isCorrectOrder ? 0 : 1];
        uint256 mainTokenBalance = IERC20(mainToken).balanceOf(address(this));
        uint256 remainingFundBalance = fundTokenFromPool;

        // if the amount of fund token increased during the LBP
        if (fundTokenFromPool > poolData.fundTokenInputAmount) { 
            uint256 totalPlatformAccessFeeAmount = ((fundTokenFromPool - poolData.fundTokenInputAmount) * platformAccessFeeBPS)
                / _TEN_THOUSAND_BPS;
            // Fund amount after substracting the fee
            remainingFundBalance = fundTokenFromPool - totalPlatformAccessFeeAmount;

            if (isStandardFee == true ) {
                _distributePlatformAccessFee(pool, fundToken, totalPlatformAccessFeeAmount);
            } else {
                _distributeSafeFee(pool, fundToken, totalPlatformAccessFeeAmount);
            }
        }

        // Transfer the balance of the main token
        _transferTokenToPoolOwner(pool, mainToken, mainTokenBalance);
        // Transfer the balanace of fund token excluding the platform access fee
        _transferTokenToPoolOwner(pool, fundToken, remainingFundBalance);
    }

    /**
     * @dev Transfer token to pool owner
     */
    function _transferTokenToPoolOwner(address pool, address token, uint256 amount) private {
        TransferHelper.safeTransfer(
            token,
            msg.sender,
            amount
        );
        emit TransferredToken(pool, token, msg.sender, amount);
    }

    /**
     * @dev Send fee to owner of contract.
     *      Only used for exits where there was a transfer error between fee recipients
     */
    function _distributeSafeFee(address pool, address fundToken, uint256 totalFeeAmount) private {
        TransferHelper.safeTransfer(fundToken, owner(), totalFeeAmount);
        emit TransferredFee(pool, fundToken, owner(), totalFeeAmount);
    }

    /**
     * @dev Distribute fee between recipients
     */
    function _distributePlatformAccessFee(address pool, address fundToken, uint256 totalFeeAmount) private {
        uint256 recipientsLength = _recipientAddresses.length();
        for (uint256 i = 0; i < recipientsLength; i++) {
            address recipientAddress =  _recipientAddresses.at(i);
            // calculate amount for each recipient based on the their _feeRecipientsBPS
            uint256 proportionalAmount = (totalFeeAmount * _feeRecipientsBPS[recipientAddress]) / _TEN_THOUSAND_BPS;
            TransferHelper.safeTransfer(fundToken, recipientAddress, proportionalAmount);
            emit TransferredFee(pool, fundToken, recipientAddress, proportionalAmount);
        }
    }

    /**
     * @dev Resets _recipientAddresses mapping and _feeRecipientsBPS.
     * Note this should only be used in updateRecipients.
     *      None of these mapping/array should be empty
     */
    function _resetRecipients() private {
        uint256 recipientsLength = _recipientAddresses.length();
        address[] memory recipientValues = _recipientAddresses.values();
        for (uint i=0; i < recipientsLength; i++) {
            address recipientAddress = recipientValues[i];
            delete _feeRecipientsBPS[recipientAddress];
            _recipientAddresses.remove(recipientAddress);
        }
    }

    /**
     * @dev Updates recipients and share.
     * NOTE: the first recipient will be the one used for emergency safeDistributeFee
     */
    function updateRecipients(
        address[] calldata recipients,
        uint256[] calldata recipientShareBPS
    ) external onlyOwner {
        require(recipients.length > 0,  "recipients must have values");
        require(recipientShareBPS.length > 0,  "recipientShareBPS must have values");
        require(recipients.length == recipientShareBPS.length,
            "'recipients' and 'recipientShareBPS' arrays must have the same length");
        _resetRecipients();
        require(blockListAddress != address(0), "no blocklist address set");
        uint256 sumBPS = 0;
        uint256 arraysLength = recipientShareBPS.length;
        for (uint256 i = 0; i < arraysLength; i++) {
            require(recipientShareBPS[i] > uint256(0), "Share BPS size must be greater than 0");
            bool recipientIsNotBlocked = Blocklist(blockListAddress).isNotBlocked(recipients[i]);
            require(recipientIsNotBlocked, "recipient is blocked");
            sumBPS += recipientShareBPS[i];
            _recipientAddresses.add(recipients[i]);
            _feeRecipientsBPS[recipients[i]] = recipientShareBPS[i];
        }
        require(sumBPS == _TEN_THOUSAND_BPS, "Invalid recipients BPS sum");
        require(_recipientAddresses.length() == recipientShareBPS.length, "Fee recipient address must be unique");
        // emit event
        emit RecipientsUpdated(recipients, recipientShareBPS);
    }

    /**
     * @dev Transfer any token that is not LBPT to the given address
     */
    function skim(address token, address recipient) external onlyOwner {
        require(!_pools.contains(token), "can't skim BPT tokens");
        uint256 balance = IERC20(token).balanceOf(address(this));
        TransferHelper.safeTransfer(token, recipient, balance);
        emit Skimmed(token, recipient, balance);
    }

    function updateBlocklistAddress(address contractAddress) external onlyOwner {
        blockListAddress = contractAddress;
    }
}

File 2 of 6 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_platformAccessFeeBPS","type":"uint256"},{"internalType":"address","name":"_LBPFactoryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"endWeights","type":"uint256[]"}],"name":"GradualWeightUpdateScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"bytes","name":"userData","type":"bytes"}],"name":"JoinedPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"bytes32","name":"poolId","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"weights","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"swapFeePercentage","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bool","name":"swapEnabledOnStart","type":"bool"}],"name":"PoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"recipientShareBPS","type":"uint256[]"}],"name":"RecipientsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"Skimmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"bool","name":"swapEnabled","type":"bool"}],"name":"SwapEnabledSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"feeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"TransferredFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"TransferredPoolOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferredToken","type":"event"},{"inputs":[],"name":"LBPFactoryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockListAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"weights","type":"uint256[]"},{"internalType":"uint256[]","name":"endWeights","type":"uint256[]"},{"internalType":"bool","name":"isCorrectOrder","type":"bool"},{"internalType":"uint256","name":"swapFeePercentage","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct CopperProxyV2.PoolConfig","name":"poolConfig","type":"tuple"}],"name":"createLBP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"maxBPTTokenOut","type":"uint256"},{"internalType":"bool","name":"isStandardFee","type":"bool"}],"name":"exitPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"getBPTTokenBalance","outputs":[{"internalType":"uint256","name":"bptBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeRecipients","outputs":[{"internalType":"address[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getPoolAt","outputs":[{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"getPoolData","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bool","name":"isCorrectOrder","type":"bool"},{"internalType":"uint256","name":"fundTokenInputAmount","type":"uint256"}],"internalType":"struct CopperProxyV2.PoolData","name":"poolData","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPools","outputs":[{"internalType":"address[]","name":"pools","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipientAddress","type":"address"}],"name":"getRecipientShareBPS","outputs":[{"internalType":"uint256","name":"shareSize","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"isPool","outputs":[{"internalType":"bool","name":"valid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformAccessFeeBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"swapEnabled","type":"bool"}],"name":"setSwapEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferPoolOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"updateBlocklistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"recipientShareBPS","type":"uint256[]"}],"name":"updateRecipients","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b506040516200379138038062003791833981016040819052620000349162000183565b6200003f33620000c1565b60a08290526001600160601b0319606082901b16608052620000836200006d6000546001600160a01b031690565b60056200011160201b62001e431790919060201c565b50612710600460006200009e6000546001600160a01b031690565b6001600160a01b0316815260208101919091526040016000205550620001c29050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062000128836001600160a01b03841662000131565b90505b92915050565b60008181526001830160205260408120546200017a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200012b565b5060006200012b565b600080604083850312156200019757600080fd5b825160208401519092506001600160a01b0381168114620001b757600080fd5b809150509250929050565b60805160601c60a051613598620001f96000396000818161033601526126170152600081816101e401526108d801526135986000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c8063715018a6116100d8578063cac626bb1161008c578063f1279b7411610066578063f1279b74146103d6578063f2fde38b146103e9578063f525cb68146103fc57600080fd5b8063cac626bb1461039d578063ee9ee0e4146103b0578063ef910a5b146103c357600080fd5b80638da5cb5b116100bd5780638da5cb5b146103665780639c26bb2a14610377578063b50e97561461038a57600080fd5b8063715018a61461032957806375ac3cb01461033157600080fd5b806313d21cdf1161013a5780635b16ebb7116101145780635b16ebb7146102eb578063673a2a1f1461030e578063712b772f1461031657600080fd5b806313d21cdf1461021b578063411557d1146102bd57806351d48cea146102d857600080fd5b80630a5117601161016b5780630a511760146101cc5780630e7d90aa146101df5780631073ecd21461020657600080fd5b806305ea21831461018757806308df6923146101b7575b600080fd5b61019a610195366004612fe8565b610404565b6040516001600160a01b0390911681526020015b60405180910390f35b6101bf610417565b6040516101ae91906131bb565b61019a6101da366004612e93565b610428565b61019a7f000000000000000000000000000000000000000000000000000000000000000081565b610219610214366004612d1c565b610d47565b005b610290610229366004612c39565b6040805160608101825260008082526020820181905291810191909152506001600160a01b03908116600090815260016020818152604092839020835160608101855281549586168152600160a01b90950460ff1615159185019190915201549082015290565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016101ae565b61019a73ba12222222228d8ba445958a75a0704d566bf2c881565b6102196102e6366004612cac565b6112ee565b6102fe6102f9366004612c39565b611400565b60405190151581526020016101ae565b6101bf61140d565b610219610324366004612c73565b611419565b6102196115a2565b6103587f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101ae565b6000546001600160a01b031661019a565b610358610385366004612c39565b611608565b60075461019a906001600160a01b031681565b6103586103ab366004612c39565b61163e565b6102196103be366004612c73565b6116b8565b6102196103d1366004612cda565b6118ac565b6102196103e4366004612c39565b611ccc565b6102196103f7366004612c39565b611d55565b610358611e37565b6000610411600283611e5f565b92915050565b60606104236005611e6b565b905090565b60008160400151516002146104aa5760405162461bcd60e51b815260206004820152602860248201527f436f70706572204c425073206d75737420686176652065786163746c7920747760448201527f6f20746f6b656e7300000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b81604001516001815181106104c1576104c1613513565b60200260200101516001600160a01b031682604001516000815181106104e9576104e9613513565b60200260200101516001600160a01b031614156105485760405162461bcd60e51b815260206004820152601960248201527f4c425020746f6b656e73206d75737420626520756e697175650000000000000060448201526064016104a1565b42826101000151116105c15760405162461bcd60e51b8152602060048201526024808201527f4c42502073746172742074696d65206d75737420626520696e2074686520667560448201527f747572650000000000000000000000000000000000000000000000000000000060648201526084016104a1565b816101000151826101200151116106405760405162461bcd60e51b815260206004820152602c60248201527f4c425020656e642074696d65206d75737420626520677265617465722074686160448201527f6e2073746172742074696d65000000000000000000000000000000000000000060648201526084016104a1565b6007546001600160a01b03166106985760405162461bcd60e51b815260206004820152601860248201527f6e6f20626c6f636b6c697374206164647265737320736574000000000000000060448201526064016104a1565b60075460405163099750a560e11b81523360048201526000916001600160a01b03169063132ea14a9060240160206040518083038186803b1580156106dc57600080fd5b505afa1580156106f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107149190612e5d565b9050806107635760405162461bcd60e51b815260206004820152601560248201527f6d73672e73656e64657220697320626c6f636b6564000000000000000000000060448201526064016104a1565b6107ab836040015160008151811061077d5761077d613513565b60200260200101513330866060015160008151811061079e5761079e613513565b6020026020010151611e78565b6107e683604001516001815181106107c5576107c5613513565b60200260200101513330866060015160018151811061079e5761079e613513565b610841836040015160008151811061080057610800613513565b602002602001015173ba12222222228d8ba445958a75a0704d566bf2c8856060015160008151811061083457610834613513565b6020026020010151611fdb565b61088f836040015160018151811061085b5761085b613513565b602002602001015173ba12222222228d8ba445958a75a0704d566bf2c8856060015160018151811061083457610834613513565b82516020840151604080860151608087015160e088015192517f236797190000000000000000000000000000000000000000000000000000000081526000956001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001695632367971995610913959294919330908a9060040161330d565b602060405180830381600087803b15801561092d57600080fd5b505af1158015610941573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109659190612c56565b90506000816001600160a01b03166338fff2d06040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156109a457600080fd5b505af11580156109b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dc9190612e7a565b9050816001600160a01b03167f2b416ce78f01c3304331a3a35005ee09bfb64c878f2be9849fc9909101bc61ac828760000151886020015189604001518a608001518b60e00151306000604051610a3a989796959493929190613243565b60405180910390a26040518060600160405280336001600160a01b031681526020018660c001511515815260200186606001518760c00151610a7d576001610a80565b60005b60ff1681518110610a9357610a93613513565b6020908102919091018101519091526001600160a01b038085166000908152600180845260409182902085518154958701511515600160a01b027fffffffffffffffffffffff0000000000000000000000000000000000000000009096169416939093179390931782559290920151910155610b10600283611e43565b610b5c5760405162461bcd60e51b815260206004820152600e60248201527f65786973747320616c726561647900000000000000000000000000000000000060448201526064016104a1565b6000808660600151604051602001610b759291906132f1565b60408051601f198184030181526080830182528882015183526060808a0151602085015283830182905260009084015290517fb95cac2800000000000000000000000000000000000000000000000000000000815290925073ba12222222228d8ba445958a75a0704d566bf2c89163b95cac2891610bfb91869130918291600401613211565b600060405180830381600087803b158015610c1557600080fd5b505af1158015610c29573d6000803e3d6000fd5b50505050826001600160a01b03167f5dcdc6c8b7b09c26d0c867e99f2b7389b69d982aa8f10b1373f84667a8f58b358760400151886060015184604051610c72939291906131ce565b60405180910390a2826001600160a01b0316633e5692058761010001518861012001518960a001516040518463ffffffff1660e01b8152600401610cb893929190613385565b600060405180830381600087803b158015610cd257600080fd5b505af1158015610ce6573d6000803e3d6000fd5b50505050826001600160a01b03167f5b604c3eb0508fc702242270d353c7673f02b609e03862e244766785e39c278c8761010001518861012001518960a00151604051610d3593929190613385565b60405180910390a25090949350505050565b6000546001600160a01b03163314610da15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a1565b82610dee5760405162461bcd60e51b815260206004820152601b60248201527f726563697069656e7473206d75737420686176652076616c756573000000000060448201526064016104a1565b80610e615760405162461bcd60e51b815260206004820152602260248201527f726563697069656e745368617265425053206d75737420686176652076616c7560448201527f657300000000000000000000000000000000000000000000000000000000000060648201526084016104a1565b828114610efc5760405162461bcd60e51b815260206004820152604560248201527f27726563697069656e74732720616e642027726563697069656e74536861726560448201527f4250532720617272617973206d7573742068617665207468652073616d65206c60648201527f656e677468000000000000000000000000000000000000000000000000000000608482015260a4016104a1565b610f04612135565b6007546001600160a01b0316610f5c5760405162461bcd60e51b815260206004820152601860248201527f6e6f20626c6f636b6c697374206164647265737320736574000000000000000060448201526064016104a1565b600081815b818110156111da576000858583818110610f7d57610f7d613513565b9050602002013511610ff75760405162461bcd60e51b815260206004820152602560248201527f5368617265204250532073697a65206d7573742062652067726561746572207460448201527f68616e203000000000000000000000000000000000000000000000000000000060648201526084016104a1565b6007546000906001600160a01b031663132ea14a89898581811061101d5761101d613513565b90506020020160208101906110329190612c39565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561108957600080fd5b505afa15801561109d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c19190612e5d565b9050806111105760405162461bcd60e51b815260206004820152601460248201527f726563697069656e7420697320626c6f636b656400000000000000000000000060448201526064016104a1565b85858381811061112257611122613513565b9050602002013584611134919061342c565b935061116888888481811061114b5761114b613513565b90506020020160208101906111609190612c39565b600590611e43565b5085858381811061117b5761117b613513565b90506020020135600460008a8a8681811061119857611198613513565b90506020020160208101906111ad9190612c39565b6001600160a01b0316815260208101919091526040016000205550806111d2816134cc565b915050610f61565b50612710821461122c5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420726563697069656e7473204250532073756d00000000000060448201526064016104a1565b8261123760056121bf565b146112a95760405162461bcd60e51b8152602060048201526024808201527f46656520726563697069656e742061646472657373206d75737420626520756e60448201527f697175650000000000000000000000000000000000000000000000000000000060648201526084016104a1565b7f8c9f152d7c0d7400a8b012ae741ccf50d62ac36f2828130d4b8b2c16dc8be0fd868686866040516112de949392919061311e565b60405180910390a1505050505050565b6001600160a01b0382811660009081526001602052604090205483911633146113425760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b60448201526064016104a1565b6040517fe01af92c00000000000000000000000000000000000000000000000000000000815282151560048201526001600160a01b0384169063e01af92c90602401600060405180830381600087803b15801561139e57600080fd5b505af11580156113b2573d6000803e3d6000fd5b50505050826001600160a01b03167fdc5bc5b27f91cbe9bad8b85e20c9519fb6d126629108f16d474af76579696ea9836040516113f3911515815260200190565b60405180910390a2505050565b60006104116002836121c9565b60606104236002611e6b565b6000546001600160a01b031633146114735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a1565b61147e6002836121c9565b156114cb5760405162461bcd60e51b815260206004820152601560248201527f63616e277420736b696d2042505420746f6b656e73000000000000000000000060448201526064016104a1565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b15801561150d57600080fd5b505afa158015611521573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115459190612e7a565b90506115528383836121eb565b604080516001600160a01b038086168252841660208201529081018290527f0cfb7d414a57e3fd35da9f4b61341e65026c225646228ba0262d9264f541c32e9060600160405180910390a1505050565b6000546001600160a01b031633146115fc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a1565b611606600061233e565b565b60006116156005836121c9565b1561163657506001600160a01b031660009081526004602052604090205490565b506000919050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b15801561168057600080fd5b505afa158015611694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104119190612e7a565b6001600160a01b03828116600090815260016020526040902054839116331461170c5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b60448201526064016104a1565b6007546001600160a01b03166117645760405162461bcd60e51b815260206004820152601860248201527f6e6f20626c6f636b6c697374206164647265737320736574000000000000000060448201526064016104a1565b60075460405163099750a560e11b81523360048201526000916001600160a01b03169063132ea14a9060240160206040518083038186803b1580156117a857600080fd5b505afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190612e5d565b90508061182f5760405162461bcd60e51b815260206004820152601360248201527f6e65774f776e657220697320626c6f636b65640000000000000000000000000060448201526064016104a1565b6001600160a01b03848116600081815260016020908152604091829020805488861673ffffffffffffffffffffffffffffffffffffffff19821681179092558351951680865291850152927f384b4ebfb7a1daf517a31e956ff005ea9f315e5a5f92ebee1e4a498e56a5c00e910160405180910390a25050505050565b6001600160a01b0383811660009081526001602052604090205484911633146119005760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b60448201526064016104a1565b60408051600280825260608201835260009260208301908036833701905050905060008160008151811061193657611936613513565b60200260200101818152505060008160018151811061195757611957613513565b6020026020010181815250506000856001600160a01b03166338fff2d06040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156119a057600080fd5b505af11580156119b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d89190612e7a565b604051631f29a8cd60e31b815260048101829052909150600090819073ba12222222228d8ba445958a75a0704d566bf2c89063f94d46689060240160006040518083038186803b158015611a2b57600080fd5b505afa158015611a3f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a679190810190612d88565b50915091508351825114611abd5760405162461bcd60e51b815260206004820152601460248201527f696e76616c696420696e707574206c656e67746800000000000000000000000060448201526064016104a1565b6001600160a01b038881166000908152600160208181526040808420815160608101835281549687168152600160a01b90960460ff1615159286019290925291015490830152611b0d8a8a61239b565b905073ba12222222228d8ba445958a75a0704d566bf2c86001600160a01b0316638bdb391386303060405180608001604052808a81526020018c8152602001600188604051602001611b609291906132c5565b6040516020818303038152906040528152602001600015158152506040518563ffffffff1660e01b8152600401611b9a9493929190613211565b600060405180830381600087803b158015611bb457600080fd5b505af1158015611bc8573d6000803e3d6000fd5b5050604051631f29a8cd60e31b8152600481018890526000925073ba12222222228d8ba445958a75a0704d566bf2c8915063f94d46689060240160006040518083038186803b158015611c1a57600080fd5b505afa158015611c2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c569190810190612d88565b5091505060008360200151611c6c576001611c6f565b60005b60ff169050611cbe8c8786858581518110611c8c57611c8c613513565b6020026020010151898681518110611ca657611ca6613513565b6020026020010151611cb89190613485565b8e61251b565b505050505050505050505050565b6000546001600160a01b03163314611d265760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a1565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611daf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a1565b6001600160a01b038116611e2b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a1565b611e348161233e565b50565b600061042360026121bf565b6000611e58836001600160a01b0384166126b1565b9392505050565b6000611e588383612700565b60606000611e588361272a565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691611ef59190613102565b6000604051808303816000865af19150503d8060008114611f32576040519150601f19603f3d011682016040523d82523d6000602084013e611f37565b606091505b5091509150818015611f61575080511580611f61575080806020019051810190611f619190612e5d565b611fd35760405162461bcd60e51b815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c656400000000000000000000000000000060648201526084016104a1565b505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167f095ea7b30000000000000000000000000000000000000000000000000000000017905291516000928392908716916120509190613102565b6000604051808303816000865af19150503d806000811461208d576040519150601f19603f3d011682016040523d82523d6000602084013e612092565b606091505b50915091508180156120bc5750805115806120bc5750808060200190518101906120bc9190612e5d565b61212e5760405162461bcd60e51b815260206004820152602b60248201527f5472616e7366657248656c7065723a3a73616665417070726f76653a2061707060448201527f726f7665206661696c656400000000000000000000000000000000000000000060648201526084016104a1565b5050505050565b600061214160056121bf565b9050600061214f6005611e6b565b905060005b828110156121ba57600082828151811061217057612170613513565b6020908102919091018101516001600160a01b03811660009081526004909252604082209190915590506121a5600582612786565b505080806121b2906134cc565b915050612154565b505050565b6000610411825490565b6001600160a01b03811660009081526001830160205260408120541515611e58565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b03167fa9059cbb0000000000000000000000000000000000000000000000000000000017905291516000928392908716916122609190613102565b6000604051808303816000865af19150503d806000811461229d576040519150601f19603f3d011682016040523d82523d6000602084013e6122a2565b606091505b50915091508180156122cc5750805115806122cc5750808060200190518101906122cc9190612e5d565b61212e5760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016104a1565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a082319060240160206040518083038186803b1580156123df57600080fd5b505afa1580156123f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124179190612e7a565b90508083111561248f5760405162461bcd60e51b815260206004820152603160248201527f537065636966656420425054206f757420616d6f756e74206f7574206578636560448201527f656473206f776e65722062616c616e636500000000000000000000000000000060648201526084016104a1565b600081116125055760405162461bcd60e51b815260206004820152602860248201527f506f6f6c206f776e6572204250542062616c616e6365206973206c657373207460448201527f68616e207a65726f00000000000000000000000000000000000000000000000060648201526084016104a1565b82156125115782612513565b805b949350505050565b600084846020015161252e576000612531565b60015b60ff168151811061254457612544613513565b602002602001015190506000858560200151612561576001612564565b60005b60ff168151811061257757612577613513565b60209081029190910101516040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a082319060240160206040518083038186803b1580156125c757600080fd5b505afa1580156125db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ff9190612e7a565b604087015190915085908111156126905760006127107f00000000000000000000000000000000000000000000000000000000000000008960400151896126469190613485565b6126509190613466565b61265a9190613444565b90506126668188613485565b9150600186151514156126835761267e8a858361279b565b61268e565b61268e8a8583612868565b505b61269b8985846128e9565b6126a68984836128e9565b505050505050505050565b60008181526001830160205260408120546126f857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610411565b506000610411565b600082600001828154811061271757612717613513565b9060005260206000200154905092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561277a57602002820191906000526020600020905b815481526020019060010190808311612766575b50505050509050919050565b6000611e58836001600160a01b03841661293f565b60006127a760056121bf565b905060005b8181101561212e5760006127c1600583611e5f565b6001600160a01b03811660009081526004602052604081205491925090612710906127ec9087613466565b6127f69190613444565b90506128038683836121eb565b604080516001600160a01b0388811682528481166020830152918101839052908816907f204ae686c4033ffe86d8c43a868b07572798d37b4f75a781bd55980b187a96ad9060600160405180910390a250508080612860906134cc565b9150506127ac565b6128848261287e6000546001600160a01b031690565b836121eb565b826001600160a01b03167f204ae686c4033ffe86d8c43a868b07572798d37b4f75a781bd55980b187a96ad836128c26000546001600160a01b031690565b604080516001600160a01b03938416815292909116602083015281018490526060016113f3565b6128f48233836121eb565b604080516001600160a01b038481168252336020830152918101839052908416907f18197d7ddedf9f741835c97e5b80d0e808803c23812ccaeb0ab9bc9c08ee3645906060016113f3565b60008181526001830160205260408120548015612a28576000612963600183613485565b855490915060009061297790600190613485565b90508181146129dc57600086600001828154811061299757612997613513565b90600052602060002001549050808760000184815481106129ba576129ba613513565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806129ed576129ed6134fd565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610411565b6000915050610411565b60008083601f840112612a4457600080fd5b50813567ffffffffffffffff811115612a5c57600080fd5b6020830191508360208260051b8501011115612a7757600080fd5b9250929050565b600082601f830112612a8f57600080fd5b81356020612aa4612a9f83613408565b6133d7565b80838252828201915082860187848660051b8901011115612ac457600080fd5b60005b85811015612aec578135612ada8161353f565b84529284019290840190600101612ac7565b5090979650505050505050565b600082601f830112612b0a57600080fd5b81356020612b1a612a9f83613408565b80838252828201915082860187848660051b8901011115612b3a57600080fd5b60005b85811015612aec57813584529284019290840190600101612b3d565b600082601f830112612b6a57600080fd5b81516020612b7a612a9f83613408565b80838252828201915082860187848660051b8901011115612b9a57600080fd5b60005b85811015612aec57815184529284019290840190600101612b9d565b8035612bc481613554565b919050565b600082601f830112612bda57600080fd5b813567ffffffffffffffff811115612bf457612bf4613529565b612c07601f8201601f19166020016133d7565b818152846020838601011115612c1c57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215612c4b57600080fd5b81356125118161353f565b600060208284031215612c6857600080fd5b81516125118161353f565b60008060408385031215612c8657600080fd5b8235612c918161353f565b91506020830135612ca18161353f565b809150509250929050565b60008060408385031215612cbf57600080fd5b8235612cca8161353f565b91506020830135612ca181613554565b600080600060608486031215612cef57600080fd5b8335612cfa8161353f565b9250602084013591506040840135612d1181613554565b809150509250925092565b60008060008060408587031215612d3257600080fd5b843567ffffffffffffffff80821115612d4a57600080fd5b612d5688838901612a32565b90965094506020870135915080821115612d6f57600080fd5b50612d7c87828801612a32565b95989497509550505050565b600080600060608486031215612d9d57600080fd5b835167ffffffffffffffff80821115612db557600080fd5b818601915086601f830112612dc957600080fd5b81516020612dd9612a9f83613408565b8083825282820191508286018b848660051b8901011115612df957600080fd5b600096505b84871015612e25578051612e118161353f565b835260019690960195918301918301612dfe565b5091890151919750909350505080821115612e3f57600080fd5b50612e4c86828701612b59565b925050604084015190509250925092565b600060208284031215612e6f57600080fd5b815161251181613554565b600060208284031215612e8c57600080fd5b5051919050565b600060208284031215612ea557600080fd5b813567ffffffffffffffff80821115612ebd57600080fd5b908301906101408286031215612ed257600080fd5b612eda6133ad565b823582811115612ee957600080fd5b612ef587828601612bc9565b825250602083013582811115612f0a57600080fd5b612f1687828601612bc9565b602083015250604083013582811115612f2e57600080fd5b612f3a87828601612a7e565b604083015250606083013582811115612f5257600080fd5b612f5e87828601612af9565b606083015250608083013582811115612f7657600080fd5b612f8287828601612af9565b60808301525060a083013582811115612f9a57600080fd5b612fa687828601612af9565b60a083015250612fb860c08401612bb9565b60c082015260e0838101359082015261010080840135908201526101209283013592810192909252509392505050565b600060208284031215612ffa57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561303a5781516001600160a01b031687529582019590820190600101613015565b509495945050505050565b600081518084526020808501945080840160005b8381101561303a57815187529582019590820190600101613059565b6000815180845261308d81602086016020860161349c565b601f01601f19169290920160200192915050565b60008151608084526130b66080850182613001565b9050602083015184820360208601526130cf8282613045565b915050604083015184820360408601526130e98282613075565b9150506060830151151560608501528091505092915050565b6000825161311481846020870161349c565b9190910192915050565b6040808252810184905260008560608301825b878110156131615782356131448161353f565b6001600160a01b0316825260209283019290910190600101613131565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85111561319a57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b602081526000611e586020830184613001565b6060815260006131e16060830186613001565b82810360208401526131f38186613045565b905082810360408401526132078185613075565b9695505050505050565b84815260006001600160a01b0380861660208401528085166040840152506080606083015261320760808301846130a1565b60006101008a835280602084015261325d8184018b613075565b90508281036040840152613271818a613075565b905082810360608401526132858189613001565b905082810360808401526132998188613045565b60a084019690965250506001600160a01b039290921660c0830152151560e09091015295945050505050565b60408101600384106132e757634e487b7160e01b600052602160045260246000fd5b9281526020015290565b60ff831681526040602082015260006125136040830184613045565b60e08152600061332060e083018a613075565b8281036020840152613332818a613075565b905082810360408401526133468189613001565b9050828103606084015261335a8188613045565b608084019690965250506001600160a01b039290921660a0830152151560c090910152949350505050565b8381528260208201526060604082015260006133a46060830184613045565b95945050505050565b604051610140810167ffffffffffffffff811182821017156133d1576133d1613529565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561340057613400613529565b604052919050565b600067ffffffffffffffff82111561342257613422613529565b5060051b60200190565b6000821982111561343f5761343f6134e7565b500190565b60008261346157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613480576134806134e7565b500290565b600082821015613497576134976134e7565b500390565b60005b838110156134b757818101518382015260200161349f565b838111156134c6576000848401525b50505050565b60006000198214156134e0576134e06134e7565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611e3457600080fd5b8015158114611e3457600080fdfea2646970667358221220eab5d1afc974852d6afc0653fa86c4cce36dfa465c18f7c43ae71b8d4b91af1064736f6c6343000807003300000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e

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

00000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e

-----Decoded View---------------
Arg [0] : _platformAccessFeeBPS (uint256): 200
Arg [1] : _LBPFactoryAddress (address): 0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [1] : 0000000000000000000000000f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.