Contract 0x34fada93c6d05D0bd568CB2C4917C99912D7EC70

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x64a32e930a65a739ddab47ee93a68563300f4c2f771e59cf02a116052e258ad3Claim586683912023-03-29 22:20:2419 hrs 9 mins ago0x8c9c8bf9008f5e61c2c20ec545fc00a57ef30a72 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.01066945
0x0a3be85030f1866b35d2e06442459e2c02a61d58fb3d21000019ed508f37cf72Claim584118562023-03-26 10:49:514 days 6 hrs ago0x3578db872e9899d8bf0ff1198fdf8dba74ec3733 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.002522201018
0xb90d14e9c97dadf6c894ae5770bf0f8fb5b945f841f79ccd06d56eda3f003f82Claim579275572023-03-19 17:10:4411 days 19 mins ago0x9a229743bcd2ef49e3f8c930e64723e4acebeb67 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.008587249769
0xfd4aaf60184e9e9196cea7fb43dc9639f92e3b3b450ea57c11c887c4812537bcClaim577536622023-03-17 6:10:1113 days 11 hrs ago0x4650a04978398cf9e794624a28725bd1b79c04c2 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.004645426421
0xd965e14a77ee531a790ca7ccb3e19a5fff818106e5d6cc0b046410cce3ea8b70Claim577534982023-03-17 6:06:5913 days 11 hrs ago0x0368e9dd8b1e868144a9ca7798699bf8856631a2 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.0047571026
0x2c69e712db29caf6759f5172cd82cbc5397f69140e9e387e6bf448b023c3a5ceClaim577532942023-03-17 6:02:5613 days 11 hrs ago0x61eedebdc8c75f502db8a3e443556efcafdecf75 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.004300973248
0x56c9b19be3a668297c7335f579ac77a26bf4d9d2d88a337decab3291b670ffd3Claim577530682023-03-17 5:58:2113 days 11 hrs ago0xf851b568720c34508ebdd08953c9eb0780e90e84 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.00436596616
0xe94c56c7c886031c46fc5be683b5f08fee9f48e5966fec85964de9045b2a9b1aClaim577528522023-03-17 5:53:5513 days 11 hrs ago0xd1f61071a4fbedc42bb838d67d94c035214ad698 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.004342731401
0xa575fc814a0ed702e3a4ceb2b4045ece0a49e766ee6ad0490a13b179317e4fcaClaim577517712023-03-17 5:33:1813 days 11 hrs ago0x67057522acb395fc1a168922cc80c0b2c96d8e93 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.004367204659
0x11d2c07f06c0159eba4c72632a55ce0dc2aa7ab795faaa8bb31179a6e9184e71Claim574891992023-03-13 4:23:3517 days 13 hrs ago0x60edf66e1957706c47fbc9f98282480041295184 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.021835797335
0xcf52cdf2da5e0577506989b65f039baaf14c90b24a5c51346d6827a4e20ce2cbClaim570454432023-03-06 8:16:5024 days 9 hrs ago0x700904383efe3b02ffc5b97cc07ef295a94d0a2d IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.004113304556
0x46014a24e17d9cd83511de388dd44537d7f1f46df7e3bfd9d201d0201efef07bClaim570045862023-03-05 15:39:2325 days 1 hr ago0x8ad56c360c663fe8e434372bf726b158334aa9da IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.007173525149
0x46c69d95930a76ff6a2620935e728b3c0a5df338aecb56ee833154493ae5d3e5Claim570040092023-03-05 15:20:3725 days 2 hrs ago0x3c4718a18d552a54d67b916fa77a8a304c930c0e IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003719933834
0x60506f462ac6f74f454a904275892401c817c2ebe4b3c814102d112f59e8abd4Claim570039682023-03-05 15:19:2625 days 2 hrs ago0x021eb5da5c73d6e3f395f83a51d2e94a97884430 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003870013994
0x265046032644455ff5df1df0a8ea324e430ace78b8f0b1df5e3c6268119b1264Claim570039052023-03-05 15:17:3325 days 2 hrs ago0x5de5e2dd62d10818ae8ba45998ebef7e5e688ea3 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.010370030308
0x180c5a8cd8a6e6a52b8e1e594e343cefe2b247a0d5e96e801b9939ac444fdba4Claim570038532023-03-05 15:15:3825 days 2 hrs ago0xcfe786b9efba557fe07b46621ab499a9bafddaa8 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003935876657
0xe4d0a5f3d9b6623f43688b17f20f2c2c908ec82ca683925549a3e870fa9a60b4Claim570038352023-03-05 15:15:0925 days 2 hrs ago0x2130d90a2c6926f55c0f98f9e7d8dad34c909cd2 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003774003553
0xca0a07be98f7665f7a8e0c890c323c1dbea64e221d44780a62534b9d2156bd1cClaim570037052023-03-05 15:10:4925 days 2 hrs ago0xee51b98e731e09f991a340c0239c7330b9641b97 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003717133623
0xde95c60e650d3f96f2618a33ec716201d922917893ac79cd2adbcaaa83eea192Claim570034532023-03-05 15:02:3525 days 2 hrs ago0x73ef3d2a1f3cf4d143fce19147d98184b7af1d76 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003757863476
0xf710205b71fdd7b5768a92e256c252cf47ab4a107f39f2fa2e12c984dcdcaec0Claim570029162023-03-05 14:45:1025 days 2 hrs ago0x09b89b9bec33d2d3a651d528311342c25f7f9d85 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.005950994016
0x4e4097cc16a0cf00238088c8d3b16af46e8a4bc9cec4a03dc930e7dd7ae631ecClaim570014412023-03-05 14:00:5225 days 3 hrs ago0x1e53401a4a7c4186ed678a47b28e1dab4e909ce9 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003965762402
0xbdf03f96af902af21a69c7cb889d5a4b018f8bb38dda6b1a45abd4bf35d8f78bClaim569999012023-03-05 13:12:2525 days 4 hrs ago0x6b68de4333915de74ae892c86f4fb013900323f0 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.007384976243
0x9a70d83e99955fd1ff6e1211652df2d2e9eb825805bbfdd5b7291d4104fb9ee2Claim569998282023-03-05 13:09:1425 days 4 hrs ago0xd9fb3463205dec541ed00d3026a9a673dfe56999 IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.00475925065
0x734b95638b43a4765129e5178498a2704e6418e9676930de3f5e71bdfeba7cd8Claim569964172023-03-05 11:39:2925 days 5 hrs ago0x230eb268f380a0832967b9962355f29c3df93b3a IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.0050114291
0x5050f417e89399917dbf3b781b9548a2cec1481146d5b500244759df7e47f7f2Claim569937862023-03-05 10:42:5625 days 6 hrs ago0x43de114b655a29188a208eb50c2862d215c3773b IN  0x34fada93c6d05d0bd568cb2c4917c99912d7ec700 FTM0.003177080126
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xf599483fec60287d302e0548aaafc16a6899a30c9ae8ae92f397e71d605e1ece309694052022-02-14 19:06:15408 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"}]

60e060405234801561001057600080fd5b50604051610a6c380380610a6c83398101604081905261002f916100c6565b4282116100a85760405162461bcd60e51b815260206004820152603460248201527f5769676f4d65726b6c6550726f6f663a2072656c656173652074696d6520697360448201527f206265666f72652063757272656e742074696d65000000000000000000000000606482015260840160405180910390fd5b60609290921b6001600160601b03191660805260a05260c052610109565b6000806000606084860312156100db57600080fd5b83516001600160a01b03811681146100f257600080fd5b602085015160409095015190969495509392505050565b60805160601c60a05160c05161091761015560003960008181606101526102f601526000818160e0015261013e01526000818161011101528181610180015261036e01526109176000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80632fc37ab21461005c5780633d13f8741461009657806373b2e80e146100ab578063b91d4001146100de578063fc0c546a14610104575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100a96100a436600461075e565b61013b565b005b6100ce6100b9366004610743565b60006020819052908152604090205460ff1681565b604051901515815260200161008d565b7f0000000000000000000000000000000000000000000000000000000000000000610083565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200161008d565b427f0000000000000000000000000000000000000000000000000000000000000000111561017c57604051633d2b9b5560e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156101e057600080fd5b505afa1580156101f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610218919061080a565b905083811080610226575080155b1561024457604051632d65aa3b60e11b815260040160405180910390fd5b6001600160a01b03851660009081526020819052604090205460ff161561027e57604051630c8d9eab60e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606087901b1660208201526034810185905260009060540160405160208183030381529060405280519060200120905060006103218585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508691506103ec9050565b9050806103415760405163452c2df160e11b815260040160405180910390fd5b6001600160a01b0387166000908152602081905260409020805460ff191660011790556103a087876103907f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b03169190610404565b866001600160a01b03167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4876040516103db91815260200190565b60405180910390a250505050505050565b6000826103f9858461045b565b1490505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104569084906104cf565b505050565b600081815b84518110156104c757600085828151811061047d5761047d6108cb565b602002602001015190508083116104a357600083815260208290526040902092506104b4565b600081815260208490526040902092505b50806104bf816108a2565b915050610460565b509392505050565b6000610524826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105a69092919063ffffffff16565b805190915015610456578080602001905181019061054291906107e8565b6104565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b60606105b584846000856105bd565b949350505050565b60608247101561061e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161059d565b6001600160a01b0385163b6106755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b600080866001600160a01b031685876040516106919190610823565b60006040518083038185875af1925050503d80600081146106ce576040519150601f19603f3d011682016040523d82523d6000602084013e6106d3565b606091505b50915091506106e38282866106ee565b979650505050505050565b606083156106fd5750816103fd565b82511561070d5782518084602001fd5b8160405162461bcd60e51b815260040161059d919061083f565b80356001600160a01b038116811461073e57600080fd5b919050565b60006020828403121561075557600080fd5b6103fd82610727565b6000806000806060858703121561077457600080fd5b61077d85610727565b935060208501359250604085013567ffffffffffffffff808211156107a157600080fd5b818701915087601f8301126107b557600080fd5b8135818111156107c457600080fd5b8860208260051b85010111156107d957600080fd5b95989497505060200194505050565b6000602082840312156107fa57600080fd5b815180151581146103fd57600080fd5b60006020828403121561081c57600080fd5b5051919050565b60008251610835818460208701610872565b9190910192915050565b602081526000825180602084015261085e816040850160208701610872565b601f01601f19169190910160400192915050565b60005b8381101561088d578181015183820152602001610875565b8381111561089c576000848401525b50505050565b60006000198214156108c457634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fdfea264697066735822122015af17d2018d370c4938c986607c1daebf4215ace7b4996a86de3b77a0ac6dc564736f6c63430008070033000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd600000000000000000000000000000000000000000000000000000000622c7628a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

000000000000000000000000e992beab6659bff447893641a378fbbf031c5bd600000000000000000000000000000000000000000000000000000000622c7628a38a6212e6ced4e6b6b8baeb635ed31f83a41ce8505055686b5a838f1d83051f

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

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