Contract 0x3b6A18B3c63E9Da66f0A26caa19FBC7157c1d725

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfa86b7d80f435f0cb8853b08f8e8376ed4afdcf27c86518129099831532ab486Claim586683652023-03-29 22:19:5419 hrs 48 mins ago0x8c9c8bf9008f5e61c2c20ec545fc00a57ef30a72 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.01066945
0xbc9eb2bdb50154e89d2c5d2abb277387a81326ee7006c9c35e8c637ce37db772Claim584118632023-03-26 10:50:014 days 7 hrs ago0x3578db872e9899d8bf0ff1198fdf8dba74ec3733 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.002176675576
0x0d28e5035619fc2acd803d0235a98da60bee47e0c7b9dfcbd4ce7b7fbac76740Claim584013182023-03-26 7:14:054 days 10 hrs ago0x22edf81088feac37349c30310ee84231f0bf25df IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.0112397
0x835ceea471cd84a0d6ff5711769e3330d3cd2a6617e60a1c5b5d86f887369f6bClaim583770002023-03-25 23:00:364 days 19 hrs ago0x5572695ddc83fb5fd154d232c68f3352e9819b8e IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003342342281
0x603fc94b7bc91ef5628c4502520c1dab002d7dbaaf515f6cc4b5ea7c48a3f77cClaim581635012023-03-22 23:57:267 days 18 hrs ago0x5920efc503fed5f6677afe5217bd2a26e58d75ab IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.013135532452
0x70e87247aaf5ddff69426f1ad30a407a02cfd93320e28b8d43c1f0a34f2ef354Claim581633342023-03-22 23:54:007 days 18 hrs ago0x456e9812b9bd1cd50cf48c1aa5c454202e5984be IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.013867381345
0xd6065171059e461d5a99b63d6daf60f1244e4810921225c5839e37c31304112cClaim581629612023-03-22 23:45:177 days 18 hrs ago0x5dccc0963afd3d25eb6eed453b4e2f1be2ad0850 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.012364136519
0xbb67bedeefd1cf38861be0a0b9bbb2ef3504c9781837f6c0c4e4f6a9a3efc2b2Claim580340462023-03-21 5:38:099 days 12 hrs ago0x22f3827dc0aaf0889610179ec7044a9421abdbc1 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.009059797132
0x89d38f530f300dc065ffb2b4f6ba9958c542e9ccd2cd1cc4b4048d19d1b2871cClaim579276172023-03-19 17:11:4011 days 57 mins ago0x9a229743bcd2ef49e3f8c930e64723e4acebeb67 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.007413474771
0x853165e123720d57f9ecc27051b9ab3c574459b88bcc9662dd4de45ca1c5d7b7Claim578741322023-03-18 20:54:1311 days 21 hrs ago0x87846699083491ded70abb2d0d65e38e88568a5f IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.010940971577
0xbaa0a9124e2232876f4ba0133ff3cd138a9e588ee44a9af4c0afb61bdb1cb05aClaim577617752023-03-17 8:51:2313 days 9 hrs ago0x8984c00855bc1e5114d5ecb89f5be07b5e7ddf32 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.008049355328
0xd0ef1f91f6599b14f7dc60004b5beb220f2433f7131a3fc6481aad2de3442cafClaim577537062023-03-17 6:10:5613 days 11 hrs ago0x4650a04978398cf9e794624a28725bd1b79c04c2 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003729884437
0xbb8e3f3d5fa0d4df7826025605ea51b7df9b85e3fcb3137934e4171715dfd08bClaim577535462023-03-17 6:07:5313 days 12 hrs ago0x0368e9dd8b1e868144a9ca7798699bf8856631a2 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003002521459
0x58c88623b8be517cffb541544220a0ba79ca1ff98d709d1d6f52ebff6fceee67Claim577533362023-03-17 6:03:4613 days 12 hrs ago0x61eedebdc8c75f502db8a3e443556efcafdecf75 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003657072963
0xf37cdc54c87c30482556a177b3ccbf32b5c316092e39f527ec050b7255ef3ed1Claim577531172023-03-17 5:59:2213 days 12 hrs ago0xf851b568720c34508ebdd08953c9eb0780e90e84 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003724407013
0xd777c013aaf55a5e2dea5fea24138a06a3fdb80e1217b22227912de9a9b8c1cfClaim577528862023-03-17 5:54:4613 days 12 hrs ago0xd1f61071a4fbedc42bb838d67d94c035214ad698 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003897758402
0x4990020cf3ff3bba2e405c315fe0d398d56b97d732fb2124ecfd4c8bc7cc6e79Claim577526772023-03-17 5:50:2313 days 12 hrs ago0x877a051dadcb0f957c55ca09e5dde773afc9614b IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003663381274
0x92af2ec6da6ebcc65fce166b2418be3b94a74093502f5e3c4de971afc454ba4cClaim577522942023-03-17 5:43:2113 days 12 hrs ago0xd5641473bf9adb983617e058407703582bc26a62 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003819439837
0xe02802955825acd557cd4fa08760f9db8803a93e5b6c91b0814a5caab874a5e9Claim577520762023-03-17 5:39:5013 days 12 hrs ago0xbe987a6ea0543cdebe7f795a67953b7882663332 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.00389611747
0xdcf5b3ae5c36f4211727e43019f5d91930c7b65e6f109f350a124c89ff9cd0bfClaim577518012023-03-17 5:34:1313 days 12 hrs ago0x67057522acb395fc1a168922cc80c0b2c96d8e93 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003811987417
0x66ffc0df41c0f9244fa0bc5b1c5b93cf486eed8d4d6c2c8acc1910fe50e2ec26Claim577023442023-03-16 12:09:2114 days 5 hrs ago0x09c0404001f1e48b33eefb894c9dbd602e324685 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.006364112777
0x52441328afbaea5b4cb73854bdc771f8ade8273cdabb8f2d57f48856c2eeca84Claim575531402023-03-14 6:44:1416 days 11 hrs ago0xf7ba6aa432e37b37a738afd22c61782c929e985d IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.004346848457
0x6a6d13dfb7db9649e91017881d2884f5d6a7e70ebf9adfeec68eac4c99010933Claim575097272023-03-13 12:30:5517 days 5 hrs ago0xa9be4615f40e68463c9fcdfd62e5d01f6c100ca9 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.003993611676
0x6b3c68d270d3b70cfbca815f768b59926c9527cf6959eca97a9d976df4bd4b5eClaim574892142023-03-13 4:23:5317 days 13 hrs ago0x60edf66e1957706c47fbc9f98282480041295184 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.017619045926
0xf60d19b50ef8d698e69c527e4ba27d534d9f8756bc99d16a0f3e9c367003bd37Claim572978792023-03-10 6:32:3420 days 11 hrs ago0x7ab235e28db2712e3fc2c3c74e355b81e3c5e038 IN  0x3b6a18b3c63e9da66f0a26caa19fbc7157c1d7250 FTM0.008000605186
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x7dddb27fb1bfef29070115e8fe66e21ba8f144790cefe56e07ca93f9b1aaa134309697102022-02-14 19:11:46408 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"}]

60e060405234801561001057600080fd5b50604051610a6c380380610a6c83398101604081905261002f916100c6565b4282116100a85760405162461bcd60e51b815260206004820152603460248201527f5769676f4d65726b6c6550726f6f663a2072656c656173652074696d6520697360448201527f206265666f72652063757272656e742074696d65000000000000000000000000606482015260840160405180910390fd5b60609290921b6001600160601b03191660805260a05260c052610109565b6000806000606084860312156100db57600080fd5b83516001600160a01b03811681146100f257600080fd5b602085015160409095015190969495509392505050565b60805160601c60a05160c05161091761015560003960008181606101526102f601526000818160e0015261013e01526000818161011101528181610180015261036e01526109176000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632fc37ab21461005c5780633d13f8741461009657806373b2e80e146100ab578063b91d4001146100de578063fc0c546a14610104575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100a96100a436600461075e565b61013b565b005b6100ce6100b9366004610743565b60006020819052908152604090205460ff1681565b604051901515815260200161008d565b7f0000000000000000000000000000000000000000000000000000000000000000610083565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200161008d565b427f0000000000000000000000000000000000000000000000000000000000000000111561017c57604051633d2b9b5560e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156101e057600080fd5b505afa1580156101f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610218919061080a565b905083811080610226575080155b1561024457604051632d65aa3b60e11b815260040160405180910390fd5b6001600160a01b03851660009081526020819052604090205460ff161561027e57604051630c8d9eab60e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606087901b1660208201526034810185905260009060540160405160208183030381529060405280519060200120905060006103218585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508691506103ec9050565b9050806103415760405163452c2df160e11b815260040160405180910390fd5b6001600160a01b0387166000908152602081905260409020805460ff191660011790556103a087876103907f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b03169190610404565b866001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4876040516103db91815260200190565b60405180910390a250505050505050565b6000826103f9858461045b565b1490505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104569084906104cf565b505050565b600081815b84518110156104c757600085828151811061047d5761047d6108cb565b602002602001015190508083116104a357600083815260208290526040902092506104b4565b600081815260208490526040902092505b50806104bf816108a2565b915050610460565b509392505050565b6000610524826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105a69092919063ffffffff16565b805190915015610456578080602001905181019061054291906107e8565b6104565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b60606105b584846000856105bd565b949350505050565b60608247101561061e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161059d565b6001600160a01b0385163b6106755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b600080866001600160a01b031685876040516106919190610823565b60006040518083038185875af1925050503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b50915091506106e38282866106ee565b979650505050505050565b606083156106fd5750816103fd565b82511561070d5782518084602001fd5b8160405162461bcd60e51b815260040161059d919061083f565b80356001600160a01b038116811461073e57600080fd5b919050565b60006020828403121561075557600080fd5b6103fd82610727565b6000806000806060858703121561077457600080fd5b61077d85610727565b935060208501359250604085013567ffffffffffffffff808211156107a157600080fd5b818701915087601f8301126107b557600080fd5b8135818111156107c457600080fd5b8860208260051b85010111156107d957600080fd5b95989497505060200194505050565b6000602082840312156107fa57600080fd5b815180151581146103fd57600080fd5b60006020828403121561081c57600080fd5b5051919050565b60008251610835818460208701610872565b9190910192915050565b602081526000825180602084015261085e816040850160208701610872565b601f01601f19169190910160400192915050565b60005b8381101561088d578181015183820152602001610875565b8381111561089c576000848401525b50505050565b60006000198214156108c457634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fdfea264697066735822122015af17d2018d370c4938c986607c1daebf4215ace7b4996a86de3b77a0ac6dc564736f6c63430008070033000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd600000000000000000000000000000000000000000000000000000000627ce1a8a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd600000000000000000000000000000000000000000000000000000000627ce1a8a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

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