Token PIOU

 

Overview ERC20

Price
$0.00 @ 0.000000 ETH
Fully Diluted Market Cap
Total Supply:
127,586,571.2 P*** IOU Token

Holders:
743 addresses

Transfers:
-

Contract:
0xFffffF8244e4d4a906F9A70C13E91cB30E1Cb39A0xFffffF8244e4d4a906F9A70C13E91cB30E1Cb39A

Decimals:
18

Social Profiles:
Not Available, Update ?

Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

Click here to update the token ICO / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PIOU

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 2 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;
    }
}

File 3 of 6 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 4 of 6 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

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

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 5 of 6 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument.
            mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

File 6 of 6 : PIOU.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "openzeppelin/utils/cryptography/MerkleProof.sol";

import {ERC20} from "solmate/tokens/ERC20.sol";
import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {Ownable} from "openzeppelin/access/Ownable.sol";

contract PIOU is ERC20("PIOU", "P*** IOU Token", 18), Ownable {
    ////////////////////////////////////////////////////////////////////// libraries
    using SafeTransferLib for ERC20;
    ////////////////////////////////////////////////////////////////////// state
    enum State {
        Active,
        Paused,
        Ended
    }
    State public state = State.Paused;

    modifier onlyActive() {
        require(state == State.Active, "not active");
        _;
    }

    function unpause() external onlyOwner {
        require(state == State.Paused, "not paused");
        state = State.Active;
    }

    function pause() external onlyOwner onlyActive {
        state = State.Paused;
    }

    function end() external onlyOwner {
        state = State.Ended;
    }

    ////////////////////////////////////////////////////////////////////// merkle tree
    bytes32 public merkleRoot;
    event MerkleRootChanged(bytes32 _merkleRoot);

    ////////////////////////////////////////////////////////////////////// claim stable
    ERC20 public immutable asset;
    address public treasury = address(0);
    uint256 public stableSwapRate = 746; // 746k USDC to dissolve
    event TreasuryAddressChanged(address _treasury);
    event StableSwapRateChanged(uint256 _stableSwapRate);
    event ClaimStable(
        address indexed account,
        uint256 amount,
        uint256 amountStable
    );

    ////////////////////////////////////////////////////////////////////// claim token
    event Claim(address indexed account, uint256 amount);

    ////////////////////////////////////////////////////////////////////// data
    uint256 public totalExited;
    uint256 public totalMigrated;
    mapping(address => uint256) public claimedByAddress;

    //////////////////////////////////////////////////////////////////////
    constructor(
        bytes32 _merkleRoot,
        address _owner,
        address _treasury,
        ERC20 _asset
    ) {
        merkleRoot = _merkleRoot;
        treasury = _treasury;
        asset = _asset;
        transferOwnership(_owner);
    }

    ////////////////////////////////////////////////////////////////////// merkle tree
    function _leaf(address account, uint256 allocation)
        public
        pure
        returns (bytes32)
    {
        return keccak256(abi.encodePacked(account, ",", allocation));
    }

    function _verify(
        address account,
        uint256 allocation,
        bytes32[] calldata merkleProof
    ) public view returns (bool) {
        bool isValid = MerkleProof.verify(
            merkleProof,
            merkleRoot,
            _leaf(account, allocation)
        );
        return isValid;
    }

    ////////////////////////////////////////////////////////////////////// read
    function totalClaimed() public view returns (uint256) {
        return totalExited + totalMigrated;
    }

    function previewClaim(uint256 _claimable) public pure returns (uint256) {
        return ((_claimable * 10**18) / 5);
    }

    function previewClaimStable(uint256 _claimable)
        public
        view
        returns (uint256)
    {
        return (_claimable * stableSwapRate);
    }

    ////////////////////////////////////////////////////////////////////// public

    function claim(
        address _to,
        uint256 _allocation,
        bytes32[] calldata merkleProof
    ) external onlyActive {
        // Verify the merkle proof.
        require(
            _verify(msg.sender, _allocation, merkleProof),
            "Merkle Tree: Invalid proof."
        );
        require(
            claimedByAddress[msg.sender] < _allocation,
            "Merkle Tree: Already claimed."
        );
        uint256 claimable = _allocation - claimedByAddress[msg.sender];

        // Mark it claimed and send the token.
        totalMigrated += claimable;
        claimedByAddress[msg.sender] += claimable;
        _mint(_to, previewClaim(claimable));
        emit Claim(_to, claimable);
    }

    function claimStable(
        address _to,
        uint256 _allocation,
        bytes32[] calldata merkleProof
    ) external onlyActive {
        // Verify the merkle proof.
        require(
            _verify(msg.sender, _allocation, merkleProof),
            "Merkle Tree: Invalid proof."
        );
        require(
            claimedByAddress[msg.sender] < _allocation,
            "Merkle Tree: Already claimed."
        );

        uint256 claimable = _allocation - claimedByAddress[msg.sender];
        uint256 amount = previewClaimStable(claimable);
        require(
            asset.allowance(treasury, address(this)) >= amount,
            "Not enough allowance in treasury"
        );

        // Mark it claimed and send the token.
        totalExited += claimable;
        claimedByAddress[msg.sender] += claimable;

        asset.safeTransferFrom(treasury, _to, amount);
        emit ClaimStable(_to, claimable, amount);
    }

    ////////////////////////////////////////////////////////////////////// admin
    function setStableSwapRate(uint256 _stableSwapRate) external onlyOwner {
        stableSwapRate = _stableSwapRate;
        emit StableSwapRateChanged(_stableSwapRate);
    }

    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
        emit MerkleRootChanged(_merkleRoot);
    }

    function setTreasuryAddress(address _treasury) external onlyOwner {
        treasury = _treasury;
        emit TreasuryAddressChanged(_treasury);
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"contract ERC20","name":"_asset","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountStable","type":"uint256"}],"name":"ClaimStable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"MerkleRootChanged","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":false,"internalType":"uint256","name":"_stableSwapRate","type":"uint256"}],"name":"StableSwapRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_treasury","type":"address"}],"name":"TreasuryAddressChanged","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"allocation","type":"uint256"}],"name":"_leaf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"_verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_allocation","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_allocation","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claimStable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"end","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimable","type":"uint256"}],"name":"previewClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_claimable","type":"uint256"}],"name":"previewClaimStable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stableSwapRate","type":"uint256"}],"name":"setStableSwapRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stableSwapRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"enum PIOU.State","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMigrated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040526006805460ff60a01b1916600160a01b179055600880546001600160a01b03191690556102ea6009553480156200003b57600080fd5b5060405162001e7438038062001e748339810160408190526200005e91620003bd565b604080518082018252600481526350494f5560e01b60208083019182528351808501909452600e84526d281515151024a7aa902a37b5b2b760911b908401528151919291601291620000b4916000919062000301565b508151620000ca90600190602085019062000301565b5060ff81166080524660a052620000e062000132565b60c05250620000f39150339050620001ce565b6007849055600880546001600160a01b0319166001600160a01b0384811691909117909155811660e052620001288362000220565b50505050620004f8565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405162000166919062000455565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200022a620002a3565b6001600160a01b038116620002955760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b620002a081620001ce565b50565b6006546001600160a01b03163314620002ff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200028c565b565b8280546200030f9062000419565b90600052602060002090601f0160209004810192826200033357600085556200037e565b82601f106200034e57805160ff19168380011785556200037e565b828001600101855582156200037e579182015b828111156200037e57825182559160200191906001019062000361565b506200038c92915062000390565b5090565b5b808211156200038c576000815560010162000391565b6001600160a01b0381168114620002a057600080fd5b60008060008060808587031215620003d457600080fd5b845193506020850151620003e881620003a7565b6040860151909350620003fb81620003a7565b60608601519092506200040e81620003a7565b939692955090935050565b600181811c908216806200042e57607f821691505b6020821081036200044f57634e487b7160e01b600052602260045260246000fd5b50919050565b600080835481600182811c9150808316806200047257607f831692505b602080841082036200049257634e487b7160e01b86526022600452602486fd5b818015620004a95760018114620004bb57620004ea565b60ff19861689528489019650620004ea565b60008a81526020902060005b86811015620004e25781548b820152908501908301620004c7565b505084890196505b509498975050505050505050565b60805160a05160c05160e051611934620005406000396000818161031001528181610b6d0152610c740152600061077f0152600061074a015260006102cf01526119346000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80637ecebe0011610125578063ae648e90116100ad578063d505accf1161007c578063d505accf146104b5578063d54ad2a1146104c8578063dd62ed3e146104d0578063efbe1c1c146104fb578063f2fde38b1461050357600080fd5b8063ae648e901461045b578063b61d0c631461046e578063c19d93fb14610481578063c3355f1c146104a257600080fd5b806391994b2c116100f457806391994b2c1461042557806395a0f5eb1461042e57806395d89b4114610437578063a9059cbb1461043f578063abd63bed1461045257600080fd5b80637ecebe00146103d95780638456cb59146103f95780638da5cb5b1461040157806390b7fcf31461041257600080fd5b806338d52e0f116101a85780636605bfda116101775780636605bfda1461037857806367e695c81461038b57806370a082311461039e578063715018a6146103be5780637cb64759146103c657600080fd5b806338d52e0f1461030b5780633d13f8741461034a5780633f4ba83a1461035d57806361d027b31461036557600080fd5b806327c4bdc7116101ef57806327c4bdc71461028c57806328592fc6146102a15780632eb4a7ab146102c1578063313ce567146102ca5780633644e5151461030357600080fd5b806306fdde0314610221578063095ea7b31461023f57806318160ddd1461026257806323b872dd14610279575b600080fd5b610229610516565b60405161023691906114be565b60405180910390f35b61025261024d36600461152f565b6105a4565b6040519015158152602001610236565b61026b60025481565b604051908152602001610236565b610252610287366004611559565b610610565b61029f61029a366004611595565b610702565b005b61026b6102af3660046115ae565b600c6020526000908152604090205481565b61026b60075481565b6102f17f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610236565b61026b610746565b6103327f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610236565b61029f6103583660046115c9565b6107a1565b61029f610951565b600854610332906001600160a01b031681565b61029f6103863660046115ae565b6109d0565b61029f6103993660046115c9565b610a26565b61026b6103ac3660046115ae565b60036020526000908152604090205481565b61029f610cea565b61029f6103d4366004611595565b610cfe565b61026b6103e73660046115ae565b60056020526000908152604090205481565b61029f610d3b565b6006546001600160a01b0316610332565b61026b610420366004611595565b610d9a565b61026b600a5481565b61026b600b5481565b610229610db0565b61025261044d36600461152f565b610dbd565b61026b60095481565b61026b610469366004611595565b610e35565b61026b61047c36600461152f565b610e55565b60065461049590600160a01b900460ff1681565b6040516102369190611669565b6102526104b03660046115c9565b610ea6565b61029f6104c3366004611691565b610efd565b61026b611141565b61026b6104de366004611704565b600460209081526000928352604080842090915290825290205481565b61029f611153565b61029f6105113660046115ae565b611175565b6000805461052390611737565b80601f016020809104026020016040519081016040528092919081815260200182805461054f90611737565b801561059c5780601f106105715761010080835404028352916020019161059c565b820191906000526020600020905b81548152906001019060200180831161057f57829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105ff9086815260200190565b60405180910390a350600192915050565b6001600160a01b0383166000908152600460209081526040808320338452909152812054600019811461066c576106478382611787565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b03851660009081526003602052604081208054859290610694908490611787565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106ef9087815260200190565b60405180910390a3506001949350505050565b61070a6111ee565b60098190556040518181527f97f1edc8dabba05233d78282225d28427bf96c267ea5dbc754ac65bfeb54e3fe906020015b60405180910390a150565b60007f0000000000000000000000000000000000000000000000000000000000000000461461077c57610777611248565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6000600654600160a01b900460ff1660028111156107c1576107c1611653565b146107e75760405162461bcd60e51b81526004016107de9061179e565b60405180910390fd5b6107f333848484610ea6565b61083f5760405162461bcd60e51b815260206004820152601b60248201527f4d65726b6c6520547265653a20496e76616c69642070726f6f662e000000000060448201526064016107de565b336000908152600c6020526040902054831161089d5760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c6520547265653a20416c726561647920636c61696d65642e00000060448201526064016107de565b336000908152600c60205260408120546108b79085611787565b905080600b60008282546108cb91906117c2565b9091555050336000908152600c6020526040812080548392906108ef9084906117c2565b9091555061090790508561090283610e35565b6112e2565b846001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d48260405161094291815260200190565b60405180910390a25050505050565b6109596111ee565b6001600654600160a01b900460ff16600281111561097957610979611653565b146109b35760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081c185d5cd95960b21b60448201526064016107de565b600680546000919060ff60a01b1916600160a01b835b0217905550565b6109d86111ee565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f9073dfac663173e64aa95665faedae52e2246f9bcdd3890fbfaf6733b46bba139060200161073b565b6000600654600160a01b900460ff166002811115610a4657610a46611653565b14610a635760405162461bcd60e51b81526004016107de9061179e565b610a6f33848484610ea6565b610abb5760405162461bcd60e51b815260206004820152601b60248201527f4d65726b6c6520547265653a20496e76616c69642070726f6f662e000000000060448201526064016107de565b336000908152600c60205260409020548311610b195760405162461bcd60e51b815260206004820152601d60248201527f4d65726b6c6520547265653a20416c726561647920636c61696d65642e00000060448201526064016107de565b336000908152600c6020526040812054610b339085611787565b90506000610b4082610d9a565b600854604051636eb1769f60e11b81526001600160a01b03918216600482015230602482015291925082917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e90604401602060405180830381865afa158015610bb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bda91906117da565b1015610c285760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e6f75676820616c6c6f77616e636520696e20747265617375727960448201526064016107de565b81600a6000828254610c3a91906117c2565b9091555050336000908152600c602052604081208054849290610c5e9084906117c2565b9091555050600854610c9e906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116888461134d565b60408051838152602081018390526001600160a01b038816917fff282d5713996f415ef6323cd5f8ec32ac67ead3a8438d3e476cc2aec4366fa7910160405180910390a2505050505050565b610cf26111ee565b610cfc60006113d7565b565b610d066111ee565b60078190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c9060200161073b565b610d436111ee565b6000600654600160a01b900460ff166002811115610d6357610d63611653565b14610d805760405162461bcd60e51b81526004016107de9061179e565b600680546001919060ff60a01b1916600160a01b836109c9565b600060095482610daa91906117f3565b92915050565b6001805461052390611737565b33600090815260036020526040812080548391908390610dde908490611787565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906105ff9086815260200190565b60006005610e4b83670de0b6b3a76400006117f3565b610daa9190611812565b6040516bffffffffffffffffffffffff19606084901b166020820152600b60fa1b60348201526035810182905260009060550160405160208183030381529060405280519060200120905092915050565b600080610ef3848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506007549150610eee90508989610e55565b611429565b9695505050505050565b42841015610f4d5760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064016107de565b60006001610f59610746565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611065573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061109b5750876001600160a01b0316816001600160a01b0316145b6110d85760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107de565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b6000600b54600a5461077791906117c2565b61115b6111ee565b600680546002919060ff60a01b1916600160a01b836109c9565b61117d6111ee565b6001600160a01b0381166111e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107de565b6111eb816113d7565b50565b6006546001600160a01b03163314610cfc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107de565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405161127a9190611834565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b80600260008282546112f491906117c2565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60006040516323b872dd60e01b81528460048201528360248201528260448201526020600060648360008a5af13d15601f3d11600160005114161716915050806113d05760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b60448201526064016107de565b5050505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082611436858461143f565b14949350505050565b600081815b84518110156114845761147082868381518110611463576114636118cf565b602002602001015161148c565b91508061147c816118e5565b915050611444565b509392505050565b60008183106114a85760008281526020849052604090206114b7565b60008381526020839052604090205b9392505050565b600060208083528351808285015260005b818110156114eb578581018301518582016040015282016114cf565b818111156114fd576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461152a57600080fd5b919050565b6000806040838503121561154257600080fd5b61154b83611513565b946020939093013593505050565b60008060006060848603121561156e57600080fd5b61157784611513565b925061158560208501611513565b9150604084013590509250925092565b6000602082840312156115a757600080fd5b5035919050565b6000602082840312156115c057600080fd5b6114b782611513565b600080600080606085870312156115df57600080fd5b6115e885611513565b935060208501359250604085013567ffffffffffffffff8082111561160c57600080fd5b818701915087601f83011261162057600080fd5b81358181111561162f57600080fd5b8860208260051b850101111561164457600080fd5b95989497505060200194505050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061168b57634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600080600060e0888a0312156116ac57600080fd5b6116b588611513565b96506116c360208901611513565b95506040880135945060608801359350608088013560ff811681146116e757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561171757600080fd5b61172083611513565b915061172e60208401611513565b90509250929050565b600181811c9082168061174b57607f821691505b60208210810361176b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561179957611799611771565b500390565b6020808252600a90820152696e6f742061637469766560b01b604082015260600190565b600082198211156117d5576117d5611771565b500190565b6000602082840312156117ec57600080fd5b5051919050565b600081600019048311821515161561180d5761180d611771565b500290565b60008261182f57634e487b7160e01b600052601260045260246000fd5b500490565b600080835481600182811c91508083168061185057607f831692505b6020808410820361186f57634e487b7160e01b86526022600452602486fd5b8180156118835760018114611894576118c1565b60ff198616895284890196506118c1565b60008a81526020902060005b868110156118b95781548b8201529085019083016118a0565b505084890196505b509498975050505050505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016118f7576118f7611771565b506001019056fea2646970667358221220808bb6f6948138d463dda46b227585dac4ce38c5743ba870cd4fd328f2a7680964736f6c634300080d0033447026721f1aea5a135491f0b936d754cc52b4840c143731041650765e1371d8000000000000000000000000edf7a5bc543874b81deeca16bcbf8fa43e03bd7a000000000000000000000000edf7a5bc543874b81deeca16bcbf8fa43e03bd7a000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8

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

447026721f1aea5a135491f0b936d754cc52b4840c143731041650765e1371d8000000000000000000000000edf7a5bc543874b81deeca16bcbf8fa43e03bd7a000000000000000000000000edf7a5bc543874b81deeca16bcbf8fa43e03bd7a000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8

-----Decoded View---------------
Arg [0] : _merkleRoot (bytes32): 0x447026721f1aea5a135491f0b936d754cc52b4840c143731041650765e1371d8
Arg [1] : _owner (address): 0xedf7a5bc543874b81deeca16bcbf8fa43e03bd7a
Arg [2] : _treasury (address): 0xedf7a5bc543874b81deeca16bcbf8fa43e03bd7a
Arg [3] : _asset (address): 0xff970a61a04b1ca14834a43f5de4533ebddb5cc8

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 447026721f1aea5a135491f0b936d754cc52b4840c143731041650765e1371d8
Arg [1] : 000000000000000000000000edf7a5bc543874b81deeca16bcbf8fa43e03bd7a
Arg [2] : 000000000000000000000000edf7a5bc543874b81deeca16bcbf8fa43e03bd7a
Arg [3] : 000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8


Loading