Contract 0xd20530F0720B3e33f5A68DbD6452091Ef0876A0e

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xa3f95a0d80fcea010c8ae3cb022b3cbfd1fb3970ecdb93ca22ba00eeba783358Claim586683512023-03-29 22:19:4118 hrs 59 mins ago0x8c9c8bf9008f5e61c2c20ec545fc00a57ef30a72 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.01236235
0xab9721a99bea5890bbacf6f909229fbb0fd4636c37b759ce96c2146020b1924dClaim584118592023-03-26 10:49:564 days 6 hrs ago0x3578db872e9899d8bf0ff1198fdf8dba74ec3733 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.002176675576
0x871b50837830bb2ff151b981b35f42646fdf53378bb1d6fd55fc1a018e71d28cClaim583769682023-03-25 23:00:054 days 18 hrs ago0x5572695ddc83fb5fd154d232c68f3352e9819b8e IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003872763388
0x423adceb29b4e9ede06da21c91f31a7084c4bdbd93c2c978fc41e313cddbba49Claim581634802023-03-22 23:57:087 days 17 hrs ago0x5920efc503fed5f6677afe5217bd2a26e58d75ab IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.013111813783
0x4d4568368d41e5a9b15658e36b0e32b35cc403b2938042f9f51c35bafe214ea5Claim581633212023-03-22 23:53:307 days 17 hrs ago0x456e9812b9bd1cd50cf48c1aa5c454202e5984be IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.016083846118
0xbe6c5a59cc92824276fd4e823c2530d3c416f518ec5af3588846ea48fc38baf0Claim581629382023-03-22 23:44:447 days 17 hrs ago0x5dccc0963afd3d25eb6eed453b4e2f1be2ad0850 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.014333918501
0x76515581dcbb0c32e3a0d16c8cdb1cb079ca8a781c9b2493f47db1f6d2e54bc4Claim579275702023-03-19 17:10:5611 days 7 mins ago0x9a229743bcd2ef49e3f8c930e64723e4acebeb67 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.007413568556
0xe370f5bb5ddff81c61f427da56a44bc6d09dbd7a367b472053ff5760fb453ffbClaim577536762023-03-17 6:10:3113 days 11 hrs ago0x4650a04978398cf9e794624a28725bd1b79c04c2 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003002660318
0x236aa28848361705f3ddef2049e46466a6a37bc479e1265f9edd028bc5438a98Claim577535162023-03-17 6:07:1813 days 11 hrs ago0x0368e9dd8b1e868144a9ca7798699bf8856631a2 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003822967649
0x8666617cc4d9a9814b32b1fc49abc6cc6e394fe075926ca87980fba1e4a60334Claim577533102023-03-17 6:03:1513 days 11 hrs ago0x61eedebdc8c75f502db8a3e443556efcafdecf75 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003663480815
0x5dea54936674984d5fbbcc6ba707195af4fc338a790126f3a8a9a2f510724f19Claim577530852023-03-17 5:58:4713 days 11 hrs ago0xf851b568720c34508ebdd08953c9eb0780e90e84 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003658458794
0x604e62de34506265d56dcf505a6e6590fa26df5f96380923abf796b28e5dfe5fClaim577528712023-03-17 5:54:1713 days 11 hrs ago0xd1f61071a4fbedc42bb838d67d94c035214ad698 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.00387777299
0x1f1185ce433170d3c87f6c317a151eabe638015afee532214c906a60a905a625Claim577526632023-03-17 5:50:0413 days 11 hrs ago0x877a051dadcb0f957c55ca09e5dde773afc9614b IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003545457315
0x5e7ddd70f7dc52e528170ab97f39ea3161cbac09e69fec44e874cc54feb483f2Claim577522682023-03-17 5:43:0013 days 11 hrs ago0xd5641473bf9adb983617e058407703582bc26a62 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003785856671
0xe18b2ad595a0bbec92dd4d6209b88a98f81e1a27891ec35339a922d9a64442fcClaim577520522023-03-17 5:39:2413 days 11 hrs ago0xbe987a6ea0543cdebe7f795a67953b7882663332 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003764046734
0x542a83b09e626c3482ef000c4c23077b5c7684459f55812c68dcda8d5afab8e0Claim577517822023-03-17 5:33:4113 days 11 hrs ago0x67057522acb395fc1a168922cc80c0b2c96d8e93 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.004288893346
0xf4b6c2b76dec0061852fdf05e3377891c9f3deedfb7b8647335cfc4154767a91Claim577023292023-03-16 12:09:0314 days 5 hrs ago0x09c0404001f1e48b33eefb894c9dbd602e324685 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.005388042356
0x91270438a31794da86efc2bbb5bfa2ca763f2d5177edd3b29661ae04f7df584cClaim574891712023-03-13 4:22:5917 days 12 hrs ago0x60edf66e1957706c47fbc9f98282480041295184 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.025355376356
0x7194e97e4d4571e02daaa99eff718b556b879e9feb8fa2943a90e3329c56e581Claim570454492023-03-06 8:16:5724 days 9 hrs ago0x700904383efe3b02ffc5b97cc07ef295a94d0a2d IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003374585183
0x31c417883684c1d04a87cef20b75ece7fd6d5045ccca653fd8d170f0313458c1Claim570403332023-03-06 5:48:4224 days 11 hrs ago0xe2ac919f0c39dd21c3020a85c0878bad6477ee88 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.004635052328
0xb9ed5e624cdae0946022206979e66ced4e086e4952cd5a5dfd31e8a18f55023dClaim570051612023-03-05 15:57:2825 days 1 hr ago0x768df3cda0a7fc778b88a8d1b4509d0079220f01 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003777163036
0x3e63d4fe7a98083c5a63896a225bc6aeaacae20c8645bfcc7119d9ff9b81b3bdClaim570048992023-03-05 15:49:0025 days 1 hr ago0xd5ab373624a1c27f2748c385ed6b24fdece1b174 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003762451145
0x8643018c0a669e70b9fb4907b36c68401b86c9a7ab1564289aa5ee0395f69643Claim570045832023-03-05 15:39:1325 days 1 hr ago0x8ad56c360c663fe8e434372bf726b158334aa9da IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.004904930996
0xabac194433a91867aed8e08f6fa9f73b9025fd81890a94a8aace32391d6fc2e2Claim570041012023-03-05 15:23:3225 days 1 hr ago0xc69520308d3b966af80b31bf6c5c84fdc83792d0 IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003722437252
0xbd7001b77a558f676df4397f3be4111a7219492063872c8a7d47a9d0fe76ab00Claim570040202023-03-05 15:20:5625 days 1 hr ago0x3c4718a18d552a54d67b916fa77a8a304c930c0e IN  0xd20530f0720b3e33f5a68dbd6452091ef0876a0e0 FTM0.003212969126
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x7465e899ae9b2ecf4634dfe9a26ba4bf28a6d0106bbfb4e8151b90e0299e05cb309696622022-02-14 19:11:06408 days 22 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"}]

60e060405234801561001057600080fd5b50604051610a6c380380610a6c83398101604081905261002f916100c6565b4282116100a85760405162461bcd60e51b815260206004820152603460248201527f5769676f4d65726b6c6550726f6f663a2072656c656173652074696d6520697360448201527f206265666f72652063757272656e742074696d65000000000000000000000000606482015260840160405180910390fd5b60609290921b6001600160601b03191660805260a05260c052610109565b6000806000606084860312156100db57600080fd5b83516001600160a01b03811681146100f257600080fd5b602085015160409095015190969495509392505050565b60805160601c60a05160c05161091761015560003960008181606101526102f601526000818160e0015261013e01526000818161011101528181610180015261036e01526109176000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632fc37ab21461005c5780633d13f8741461009657806373b2e80e146100ab578063b91d4001146100de578063fc0c546a14610104575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100a96100a436600461075e565b61013b565b005b6100ce6100b9366004610743565b60006020819052908152604090205460ff1681565b604051901515815260200161008d565b7f0000000000000000000000000000000000000000000000000000000000000000610083565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200161008d565b427f0000000000000000000000000000000000000000000000000000000000000000111561017c57604051633d2b9b5560e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156101e057600080fd5b505afa1580156101f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610218919061080a565b905083811080610226575080155b1561024457604051632d65aa3b60e11b815260040160405180910390fd5b6001600160a01b03851660009081526020819052604090205460ff161561027e57604051630c8d9eab60e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606087901b1660208201526034810185905260009060540160405160208183030381529060405280519060200120905060006103218585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508691506103ec9050565b9050806103415760405163452c2df160e11b815260040160405180910390fd5b6001600160a01b0387166000908152602081905260409020805460ff191660011790556103a087876103907f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b03169190610404565b866001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4876040516103db91815260200190565b60405180910390a250505050505050565b6000826103f9858461045b565b1490505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104569084906104cf565b505050565b600081815b84518110156104c757600085828151811061047d5761047d6108cb565b602002602001015190508083116104a357600083815260208290526040902092506104b4565b600081815260208490526040902092505b50806104bf816108a2565b915050610460565b509392505050565b6000610524826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105a69092919063ffffffff16565b805190915015610456578080602001905181019061054291906107e8565b6104565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b60606105b584846000856105bd565b949350505050565b60608247101561061e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161059d565b6001600160a01b0385163b6106755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b600080866001600160a01b031685876040516106919190610823565b60006040518083038185875af1925050503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b50915091506106e38282866106ee565b979650505050505050565b606083156106fd5750816103fd565b82511561070d5782518084602001fd5b8160405162461bcd60e51b815260040161059d919061083f565b80356001600160a01b038116811461073e57600080fd5b919050565b60006020828403121561075557600080fd5b6103fd82610727565b6000806000806060858703121561077457600080fd5b61077d85610727565b935060208501359250604085013567ffffffffffffffff808211156107a157600080fd5b818701915087601f8301126107b557600080fd5b8135818111156107c457600080fd5b8860208260051b85010111156107d957600080fd5b95989497505060200194505050565b6000602082840312156107fa57600080fd5b815180151581146103fd57600080fd5b60006020828403121561081c57600080fd5b5051919050565b60008251610835818460208701610872565b9190910192915050565b602081526000825180602084015261085e816040850160208701610872565b601f01601f19169190910160400192915050565b60005b8381101561088d578181015183820152602001610875565b8381111561089c576000848401525b50505050565b60006000198214156108c457634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fdfea264697066735822122015af17d2018d370c4938c986607c1daebf4215ace7b4996a86de3b77a0ac6dc564736f6c63430008070033000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd600000000000000000000000000000000000000000000000000000000625554a8a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd600000000000000000000000000000000000000000000000000000000625554a8a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd6
Arg [1] : 00000000000000000000000000000000000000000000000000000000625554a8
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.