Contract 0x83c5a394b4C368b006bbf3A03d9a47Fb5De34726

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xdbf6c683ba6affead36a8879cbf23b6d700c0d74114c97e8ecf85c38b7e03abfClaim586683732023-03-29 22:20:0020 hrs 5 mins ago0x8c9c8bf9008f5e61c2c20ec545fc00a57ef30a72 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.01066945
0x0dca5c9c2e93ba7d4035041fd319c4559309679d816cc18dd3d894c154c9be70Claim585794542023-03-28 16:16:442 days 2 hrs ago0x8345bbffa35bd91e4037cc29079bfcc7d4bdcfd8 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.002925555722
0x283066444ba1874990497aeec66a300a050ee67dc42db616f1001857577a32eeClaim584763042023-03-27 7:11:193 days 11 hrs ago0x8a78c6d401404ffda6add1d349abeecde9d6d98a IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.002830526663
0x3101d8afbed1388cae60ab8cd7b6d6bec3bf4c12eb2e6f8f78f43b9007fa8cc7Claim584742772023-03-27 6:40:253 days 11 hrs ago0xeb234cc36af209a865dd33bf5cf79f43dab1e41f IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.002640353723
0x6c599f523bb56f2d4af3a2e56c508fcfc77de6ed811a578fb74dacb3a60fc41cClaim584741912023-03-27 6:38:573 days 11 hrs ago0x9d717e336438f4327631c646eada989d2fb3bff0 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.002640353723
0x22d275030f4e35945d216e94063315a72eb1617b00637560a93db94b933c1fb8Claim584118712023-03-26 10:50:084 days 7 hrs ago0x3578db872e9899d8bf0ff1198fdf8dba74ec3733 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.002176658121
0xae760fb1ca790d0ddf476c8852a1b76636e047266e100a5d6f5e2e4d8760c52aClaim584013412023-03-26 7:14:334 days 11 hrs ago0x22edf81088feac37349c30310ee84231f0bf25df IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.0097007
0x2045e6eed898cb40291be821b80014f77801df21f35d7897dc5dae49807820c3Claim583770022023-03-25 23:00:394 days 19 hrs ago0x5572695ddc83fb5fd154d232c68f3352e9819b8e IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.003342342281
0xb1947cf52cee42ad3a823ff0aec09187982fb8e149e329019606082668cc41bcClaim581635342023-03-22 23:57:527 days 18 hrs ago0x5920efc503fed5f6677afe5217bd2a26e58d75ab IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.013130121441
0x98479c9abba753e618d20a572b0206f66b594e25f605c32222d62fa2530d24e2Claim581633422023-03-22 23:54:147 days 18 hrs ago0x456e9812b9bd1cd50cf48c1aa5c454202e5984be IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.013846289766
0x53fb7993a3ccfae52164467bee7b2eb8c4a8f8707f38a482587d2e9bf72ddd57Claim581629812023-03-22 23:45:417 days 18 hrs ago0x5dccc0963afd3d25eb6eed453b4e2f1be2ad0850 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.012347945384
0x1564451b63da6153d6742d6880becd5e0d09cc005336dcee75c151c5fd3cb98dClaim580533212023-03-21 12:22:049 days 6 hrs ago0xccfc268c885d9a3b58356111d9f3ba28aa129b8c IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.01067154
0x6cdd9dc2bc94f24bc00cdc225ada95c0b5b51e361071f27878cf63c985d6f9d1Claim580340512023-03-21 5:38:149 days 12 hrs ago0x22f3827dc0aaf0889610179ec7044a9421abdbc1 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.007995090519
0x3e72d22aa70f3cf1558bda3091da71433e53314ec76916575a5d57fbaaf98ed2Claim579276332023-03-19 17:12:0011 days 1 hr ago0x9a229743bcd2ef49e3f8c930e64723e4acebeb67 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.007400532491
0x7f1e412097ef645624d40d9e222379ddbc0e23f509370b90c5a2651adff46ae7Claim578741372023-03-18 20:54:2011 days 21 hrs ago0x87846699083491ded70abb2d0d65e38e88568a5f IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.009442637761
0xd3d13904fc501c8aa69d09686119071cbf40f051de4e15763f85b3c450da6536Claim578733452023-03-18 20:39:2311 days 21 hrs ago0x260088254fa7d7694125290b231fbb0c2af69d1f IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.010104039215
0x035602165dc7c1ad78e450a488071ff48b7c2bfdf44403f921d1fbc19260af0dClaim577617812023-03-17 8:51:3013 days 9 hrs ago0x8984c00855bc1e5114d5ecb89f5be07b5e7ddf32 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.00698869933
0xdd00e57f53abfa954f3286f495ad9ce38c995d5ad4fa93e20764cee432c5c2d7Claim577537212023-03-17 6:11:1213 days 12 hrs ago0x4650a04978398cf9e794624a28725bd1b79c04c2 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.004080525356
0x824b6b47afa7a90822cd9823151c4c1d902a070850a298fcac9a93b3b2cf1c60Claim577535632023-03-17 6:08:1213 days 12 hrs ago0x0368e9dd8b1e868144a9ca7798699bf8856631a2 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.003846494514
0x2db9f296291ece836e65bbdba457e6ad9b1c78544207307b0ebedad45e35e397Claim577533602023-03-17 6:04:1713 days 12 hrs ago0x61eedebdc8c75f502db8a3e443556efcafdecf75 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.003766828786
0x139f33f167f765745553a6b50534081c308fe631925b8dcd39939c9623bb1040Claim577531372023-03-17 5:59:4813 days 12 hrs ago0xf851b568720c34508ebdd08953c9eb0780e90e84 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.00368184263
0x1b594a06a95dba3625d17ca31e2e2a037a0049fc8515b4b467547d26b6428522Claim577529232023-03-17 5:55:2813 days 12 hrs ago0xd1f61071a4fbedc42bb838d67d94c035214ad698 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.004146039131
0x2e36a0c43567ae142887c726e2964e34d04b3d65bc0383ea3aefab87b301877aClaim577526942023-03-17 5:50:4313 days 12 hrs ago0x877a051dadcb0f957c55ca09e5dde773afc9614b IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.0037669144
0x9529cbf0af8413558f8974b96c24a18e9953ec844df32060a55c98073dcc576bClaim577525542023-03-17 5:48:0613 days 12 hrs ago0xd5641473bf9adb983617e058407703582bc26a62 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.002437892794
0x8819433b3edaa6b64c4527c2c33c5baf37a0f9345315077ae9449ea03e772269Claim577523472023-03-17 5:44:1513 days 12 hrs ago0xd5641473bf9adb983617e058407703582bc26a62 IN  0x83c5a394b4c368b006bbf3a03d9a47fb5de347260 FTM0.003709637615
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xddcbcfd0a19f97d55ab03b8ed9b675937a9c7f597d7a16a23680fe231bf7121e309697482022-02-14 19:12:22408 days 23 hrs ago WigoSwap: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WigoMerkleProof

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at FtmScan.com on 2022-02-14
*/

// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/token/ERC20/[email protected]

// 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 @openzeppelin/contracts/utils/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File @openzeppelin/contracts/token/ERC20/utils/[email protected]

// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

// File @openzeppelin/contracts/utils/cryptography/[email protected]

// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
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 Returns the rebuilt hash obtained by traversing a Merklee 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++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b)
        private
        pure
        returns (bytes32 value)
    {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// File contracts/WigoMerkleProof.sol

pragma solidity ^0.8.7;

/// ============ Imports ============

/// @title WigoMerkleProof
/// @notice ERC20 vesting contract claimable by airdrop winners
/// @author WigoSwap <[email protected]>

contract WigoMerkleProof {
    using SafeERC20 for IERC20;

    /// ERC20 basic token contract being held
    IERC20 private immutable _token;

    /// timestamp when token release is enabled
    uint256 private immutable _releaseTime;

    /// ============ Immutable storage ============

    /// @notice ERC20-claimee inclusion root
    bytes32 public immutable _merkleRoot;

    /// ============ Mutable storage ============

    /// @notice Mapping of addresses who have claimed tokens
    mapping(address => bool) public hasClaimed;

    /// ============ Errors ============

    /// @notice Thrown if address has already claimed
    error AlreadyClaimed();
    /// @notice Thrown if address/amount are not part of Merkle tree
    error NotInMerkle();
    /// @notice Thrown if token balance is not enough
    error NotEnoughToken();
    /// @notice Thrown if the time for release has not come
    error NotReleaseTime();

    /// ============ Constructor ============

    /// @notice Creates a new WigoMerkleProof contract
    /// @param token_ address of token
    /// @param releaseTime_ release timestamp
    /// @param merkleRoot_ of claimees
    constructor(
        IERC20 token_,
        uint256 releaseTime_,
        bytes32 merkleRoot_
    ) {
        require(
            releaseTime_ > block.timestamp,
            "WigoMerkleProof: release time is before current time"
        );
        _token = token_;
        _releaseTime = releaseTime_;
        _merkleRoot = merkleRoot_;
    }

    /// ============ Events ============

    /// @notice Emitted after a successful token claim
    /// @param to recipient of claim
    /// @param amount of tokens claimed
    event Claim(address indexed to, uint256 amount);

    /// ============ Functions ============

    /// @notice token contract being held
    function token() public view virtual returns (IERC20) {
        return _token;
    }

    /// @notice token release timestamp
    function releaseTime() public view virtual returns (uint256) {
        return _releaseTime;
    }

    /// @notice Allows claiming tokens if address is part of merkle tree and it's time to release.
    /// @param to address of claimee
    /// @param amount of tokens owed to claimee
    /// @param proof merkle proof to prove address and amount are in tree
    function claim(
        address to,
        uint256 amount,
        bytes32[] calldata proof
    ) external {
        // Throw if the time for release has not come
        if (releaseTime() > block.timestamp) revert NotReleaseTime();

        uint256 balance = token().balanceOf(address(this));
        // Throw if token balance is not enough
        if (balance < amount || balance == 0) revert NotEnoughToken();

        // Throw if address has already claimed tokens
        if (hasClaimed[to]) revert AlreadyClaimed();

        // Verify merkle proof, or revert if not in tree
        bytes32 leaf = keccak256(abi.encodePacked(to, amount));
        bool isValidLeaf = MerkleProof.verify(proof, _merkleRoot, leaf);
        if (!isValidLeaf) revert NotInMerkle();

        // Set address to claimed
        hasClaimed[to] = true;

        // send tokens to address
        token().safeTransfer(to, amount);

        // Emit claim event
        emit Claim(to, amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"token_","type":"address"},{"internalType":"uint256","name":"releaseTime_","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"NotEnoughToken","type":"error"},{"inputs":[],"name":"NotInMerkle","type":"error"},{"inputs":[],"name":"NotReleaseTime","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"inputs":[],"name":"_merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e060405234801561001057600080fd5b50604051610a6c380380610a6c83398101604081905261002f916100c6565b4282116100a85760405162461bcd60e51b815260206004820152603460248201527f5769676f4d65726b6c6550726f6f663a2072656c656173652074696d6520697360448201527f206265666f72652063757272656e742074696d65000000000000000000000000606482015260840160405180910390fd5b60609290921b6001600160601b03191660805260a05260c052610109565b6000806000606084860312156100db57600080fd5b83516001600160a01b03811681146100f257600080fd5b602085015160409095015190969495509392505050565b60805160601c60a05160c05161091761015560003960008181606101526102f601526000818160e0015261013e01526000818161011101528181610180015261036e01526109176000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632fc37ab21461005c5780633d13f8741461009657806373b2e80e146100ab578063b91d4001146100de578063fc0c546a14610104575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100a96100a436600461075e565b61013b565b005b6100ce6100b9366004610743565b60006020819052908152604090205460ff1681565b604051901515815260200161008d565b7f0000000000000000000000000000000000000000000000000000000000000000610083565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200161008d565b427f0000000000000000000000000000000000000000000000000000000000000000111561017c57604051633d2b9b5560e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156101e057600080fd5b505afa1580156101f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610218919061080a565b905083811080610226575080155b1561024457604051632d65aa3b60e11b815260040160405180910390fd5b6001600160a01b03851660009081526020819052604090205460ff161561027e57604051630c8d9eab60e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606087901b1660208201526034810185905260009060540160405160208183030381529060405280519060200120905060006103218585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508691506103ec9050565b9050806103415760405163452c2df160e11b815260040160405180910390fd5b6001600160a01b0387166000908152602081905260409020805460ff191660011790556103a087876103907f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b03169190610404565b866001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4876040516103db91815260200190565b60405180910390a250505050505050565b6000826103f9858461045b565b1490505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104569084906104cf565b505050565b600081815b84518110156104c757600085828151811061047d5761047d6108cb565b602002602001015190508083116104a357600083815260208290526040902092506104b4565b600081815260208490526040902092505b50806104bf816108a2565b915050610460565b509392505050565b6000610524826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105a69092919063ffffffff16565b805190915015610456578080602001905181019061054291906107e8565b6104565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b60606105b584846000856105bd565b949350505050565b60608247101561061e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161059d565b6001600160a01b0385163b6106755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b600080866001600160a01b031685876040516106919190610823565b60006040518083038185875af1925050503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b50915091506106e38282866106ee565b979650505050505050565b606083156106fd5750816103fd565b82511561070d5782518084602001fd5b8160405162461bcd60e51b815260040161059d919061083f565b80356001600160a01b038116811461073e57600080fd5b919050565b60006020828403121561075557600080fd5b6103fd82610727565b6000806000806060858703121561077457600080fd5b61077d85610727565b935060208501359250604085013567ffffffffffffffff808211156107a157600080fd5b818701915087601f8301126107b557600080fd5b8135818111156107c457600080fd5b8860208260051b85010111156107d957600080fd5b95989497505060200194505050565b6000602082840312156107fa57600080fd5b815180151581146103fd57600080fd5b60006020828403121561081c57600080fd5b5051919050565b60008251610835818460208701610872565b9190910192915050565b602081526000825180602084015261085e816040850160208701610872565b601f01601f19169190910160400192915050565b60005b8381101561088d578181015183820152602001610875565b8381111561089c576000848401525b50505050565b60006000198214156108c457634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fdfea264697066735822122015af17d2018d370c4938c986607c1daebf4215ace7b4996a86de3b77a0ac6dc564736f6c63430008070033000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd60000000000000000000000000000000000000000000000000000000062a5c028a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd60000000000000000000000000000000000000000000000000000000062a5c028a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

-----Decoded View---------------
Arg [0] : token_ (address): 0xe992beab6659bff447893641a378fbbf031c5bd6
Arg [1] : releaseTime_ (uint256): 1655029800
Arg [2] : merkleRoot_ (bytes32): 0xa38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd6
Arg [1] : 0000000000000000000000000000000000000000000000000000000062a5c028
Arg [2] : a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f


Deployed ByteCode Sourcemap

19128:3392:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19479:36;;;;;;;;3019:25:1;;;3007:2;2992:18;19479:36:0;;;;;;;;21514:1003;;;;;;:::i;:::-;;:::i;:::-;;19639:42;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;2846:14:1;;2839:22;2821:41;;2809:2;2794:18;19639:42:0;2681:187:1;21145:99:0;21224:12;21145:99;;21010:86;;;-1:-1:-1;;;;;21082:6:0;2358:32:1;2340:51;;2328:2;2313:18;21010:86:0;2194:203:1;21514:1003:0;21712:15;21224:12;21696:31;21692:60;;;21736:16;;-1:-1:-1;;;21736:16:0;;;;;;;;;;;21692:60;21765:15;21082:6;21783:32;;-1:-1:-1;;;21783:32:0;;21809:4;21783:32;;;2340:51:1;-1:-1:-1;;;;;21783:17:0;;;;;;;2313:18:1;;21783:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21765:50;;21889:6;21879:7;:16;:32;;;-1:-1:-1;21899:12:0;;21879:32;21875:61;;;21920:16;;-1:-1:-1;;;21920:16:0;;;;;;;;;;;21875:61;-1:-1:-1;;;;;22009:14:0;;:10;:14;;;;;;;;;;;;;22005:43;;;22032:16;;-1:-1:-1;;;22032:16:0;;;;;;;;;;;22005:43;22144:28;;-1:-1:-1;;1793:2:1;1789:15;;;1785:53;22144:28:0;;;1773:66:1;1855:12;;;1848:28;;;22119:12:0;;1892::1;;22144:28:0;;;;;;;;;;;;22134:39;;;;;;22119:54;;22184:16;22203:44;22222:5;;22203:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22229:11:0;;-1:-1:-1;22242:4:0;;-1:-1:-1;22203:18:0;;-1:-1:-1;22203:44:0:i;:::-;22184:63;;22263:11;22258:38;;22283:13;;-1:-1:-1;;;22283:13:0;;;;;;;;;;;22258:38;-1:-1:-1;;;;;22344:14:0;;:10;:14;;;;;;;;;;:21;;-1:-1:-1;;22344:21:0;22361:4;22344:21;;;22413:32;22355:2;22438:6;22413:7;21082:6;;21010:86;22413:7;-1:-1:-1;;;;;22413:20:0;;:32;:20;:32::i;:::-;22498:2;-1:-1:-1;;;;;22492:17:0;;22502:6;22492:17;;;;3019:25:1;;3007:2;2992:18;;2873:177;22492:17:0;;;;;;;;21626:891;;;21514:1003;;;;:::o;17353:190::-;17478:4;17531;17502:25;17515:5;17522:4;17502:12;:25::i;:::-;:33;17495:40;;17353:190;;;;;;:::o;12650:248::-;12821:58;;;-1:-1:-1;;;;;2594:32:1;;12821:58:0;;;2576:51:1;2643:18;;;;2636:34;;;12821:58:0;;;;;;;;;;2549:18:1;;;;12821:58:0;;;;;;;;-1:-1:-1;;;;;12821:58:0;-1:-1:-1;;;12821:58:0;;;12767:123;;12801:5;;12767:19;:123::i;:::-;12650:248;;;:::o;17905:707::-;18015:7;18063:4;18015:7;18078:497;18102:5;:12;18098:1;:16;18078:497;;;18136:20;18159:5;18165:1;18159:8;;;;;;;;:::i;:::-;;;;;;;18136:31;;18202:12;18186;:28;18182:382;;18715:13;18770:15;;;18806:4;18799:15;;;18853:4;18837:21;;18314:57;;18182:382;;;18715:13;18770:15;;;18806:4;18799:15;;;18853:4;18837:21;;18491:57;;18182:382;-1:-1:-1;18116:3:0;;;;:::i;:::-;;;;18078:497;;;-1:-1:-1;18592:12:0;17905:707;-1:-1:-1;;;17905:707:0:o;15617:802::-;16041:23;16067:106;16109:4;16067:106;;;;;;;;;;;;;;;;;16075:5;-1:-1:-1;;;;;16067:27:0;;;:106;;;;;:::i;:::-;16188:17;;16041:132;;-1:-1:-1;16188:21:0;16184:228;;16303:10;16292:30;;;;;;;;;;;;:::i;:::-;16266:134;;;;-1:-1:-1;;;16266:134:0;;4631:2:1;16266:134:0;;;4613:21:1;4670:2;4650:18;;;4643:30;4709:34;4689:18;;;4682:62;-1:-1:-1;;;4760:18:1;;;4753:40;4810:19;;16266:134:0;;;;;;;;7058:229;7195:12;7227:52;7249:6;7257:4;7263:1;7266:12;7227:21;:52::i;:::-;7220:59;7058:229;-1:-1:-1;;;;7058:229:0:o;8274:571::-;8444:12;8516:5;8491:21;:30;;8469:118;;;;-1:-1:-1;;;8469:118:0;;3866:2:1;8469:118:0;;;3848:21:1;3905:2;3885:18;;;3878:30;3944:34;3924:18;;;3917:62;-1:-1:-1;;;3995:18:1;;;3988:36;4041:19;;8469:118:0;3664:402:1;8469:118:0;-1:-1:-1;;;;;4511:19:0;;;8598:60;;;;-1:-1:-1;;;8598:60:0;;4273:2:1;8598:60:0;;;4255:21:1;4312:2;4292:18;;;4285:30;4351:31;4331:18;;;4324:59;4400:18;;8598:60:0;4071:353:1;8598:60:0;8672:12;8686:23;8713:6;-1:-1:-1;;;;;8713:11:0;8732:5;8753:4;8713:55;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8671:97;;;;8786:51;8803:7;8812:10;8824:12;8786:16;:51::i;:::-;8779:58;8274:571;-1:-1:-1;;;;;;;8274:571:0:o;11234:712::-;11384:12;11413:7;11409:530;;;-1:-1:-1;11444:10:0;11437:17;;11409:530;11558:17;;:21;11554:374;;11756:10;11750:17;11817:15;11804:10;11800:2;11796:19;11789:44;11554:374;11899:12;11892:20;;-1:-1:-1;;;11892:20:0;;;;;;;;:::i;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;383:757::-;487:6;495;503;511;564:2;552:9;543:7;539:23;535:32;532:52;;;580:1;577;570:12;532:52;603:29;622:9;603:29;:::i;:::-;593:39;;679:2;668:9;664:18;651:32;641:42;;734:2;723:9;719:18;706:32;757:18;798:2;790:6;787:14;784:34;;;814:1;811;804:12;784:34;852:6;841:9;837:22;827:32;;897:7;890:4;886:2;882:13;878:27;868:55;;919:1;916;909:12;868:55;959:2;946:16;985:2;977:6;974:14;971:34;;;1001:1;998;991:12;971:34;1054:7;1049:2;1039:6;1036:1;1032:14;1028:2;1024:23;1020:32;1017:45;1014:65;;;1075:1;1072;1065:12;1014:65;383:757;;;;-1:-1:-1;;1106:2:1;1098:11;;-1:-1:-1;;;383:757:1:o;1145:277::-;1212:6;1265:2;1253:9;1244:7;1240:23;1236:32;1233:52;;;1281:1;1278;1271:12;1233:52;1313:9;1307:16;1366:5;1359:13;1352:21;1345:5;1342:32;1332:60;;1388:1;1385;1378:12;1427:184;1497:6;1550:2;1538:9;1529:7;1525:23;1521:32;1518:52;;;1566:1;1563;1556:12;1518:52;-1:-1:-1;1589:16:1;;1427:184;-1:-1:-1;1427:184:1:o;1915:274::-;2044:3;2082:6;2076:13;2098:53;2144:6;2139:3;2132:4;2124:6;2120:17;2098:53;:::i;:::-;2167:16;;;;;1915:274;-1:-1:-1;;1915:274:1:o;3276:383::-;3425:2;3414:9;3407:21;3388:4;3457:6;3451:13;3500:6;3495:2;3484:9;3480:18;3473:34;3516:66;3575:6;3570:2;3559:9;3555:18;3550:2;3542:6;3538:15;3516:66;:::i;:::-;3643:2;3622:15;-1:-1:-1;;3618:29:1;3603:45;;;;3650:2;3599:54;;3276:383;-1:-1:-1;;3276:383:1:o;5022:258::-;5094:1;5104:113;5118:6;5115:1;5112:13;5104:113;;;5194:11;;;5188:18;5175:11;;;5168:39;5140:2;5133:10;5104:113;;;5235:6;5232:1;5229:13;5226:48;;;5270:1;5261:6;5256:3;5252:16;5245:27;5226:48;;5022:258;;;:::o;5285:232::-;5324:3;-1:-1:-1;;5345:17:1;;5342:140;;;5404:10;5399:3;5395:20;5392:1;5385:31;5439:4;5436:1;5429:15;5467:4;5464:1;5457:15;5342:140;-1:-1:-1;5509:1:1;5498:13;;5285:232::o;5522:127::-;5583:10;5578:3;5574:20;5571:1;5564:31;5614:4;5611:1;5604:15;5638:4;5635:1;5628:15

Swarm Source

ipfs://15af17d2018d370c4938c986607c1daebf4215ace7b4996a86de3b77a0ac6dc5
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
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.