Source Code
Latest 25 from a total of 44,713 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 37750559 | 9 days ago | IN | 0 ETH | 0.00011988 | ||||
| Claim | 37738806 | 9 days ago | IN | 0 ETH | 0.00000008 | ||||
| Claim | 37722209 | 10 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37721306 | 10 days ago | IN | 0 ETH | 0.00000008 | ||||
| Claim | 37699764 | 10 days ago | IN | 0 ETH | 0.00000009 | ||||
| Claim | 37694244 | 10 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37651255 | 10 days ago | IN | 0 ETH | 0.00000008 | ||||
| Claim | 37650108 | 10 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37649758 | 10 days ago | IN | 0 ETH | 0.00000009 | ||||
| Claim | 37632172 | 11 days ago | IN | 0 ETH | 0 | ||||
| Create Distribut... | 37631610 | 11 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37478542 | 12 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37478529 | 12 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37468103 | 13 days ago | IN | 0 ETH | 0 | ||||
| Claim | 37141239 | 16 days ago | IN | 0 ETH | 0.0000001 | ||||
| Claim | 36641716 | 22 days ago | IN | 0 ETH | 0.00000009 | ||||
| Claim | 36105682 | 28 days ago | IN | 0 ETH | 0 | ||||
| Claim | 36055885 | 29 days ago | IN | 0 ETH | 0 | ||||
| Claim | 36055481 | 29 days ago | IN | 0 ETH | 0.00000009 | ||||
| Claim | 36055377 | 29 days ago | IN | 0 ETH | 0 | ||||
| Claim | 36046055 | 29 days ago | IN | 0 ETH | 0.00000009 | ||||
| Claim | 36036590 | 29 days ago | IN | 0 ETH | 0 | ||||
| Claim | 35771606 | 32 days ago | IN | 0 ETH | 0.00000013 | ||||
| Claim | 35771012 | 32 days ago | IN | 0 ETH | 0.00000009 | ||||
| Claim | 35744812 | 33 days ago | IN | 0 ETH | 0 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MerkleDistributor
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 50000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.20;
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/**
* @title MerkleDistributor
* @dev A contract for distributing tokens to multiple addresses using a Merkle tree.
*/
contract MerkleDistributor {
using SafeERC20 for IERC20;
error MerkleDistributor__PermissionDenied();
error MerkleDistributor__NotStarted();
error MerkleDistributor__Finished();
error MerkleDistributor__Refunded();
error MerkleDistributor__AlreadyRefunded();
error MerkleDistributor__NoClaimableTokensLeft();
error MerkleDistributor__AlreadyClaimed();
error MerkleDistributor__InvalidCaller();
error MerkleDistributor__InvalidProof();
error MerkleDistributor__InvalidParams(string param);
error MerkleDistributor__NothingToRefund();
error MerkleDistributor__InvalidPaginationParameters();
// Events
event Created(uint256 indexed distributionId, address indexed token, bool isERC20, uint40 startTime);
event Refunded(uint256 indexed distributionId, uint256 amount);
event Claimed(uint256 indexed distributionId, address account);
// Struct to store distribution details
struct Distribution {
address token;
bool isERC20;
uint40 walletCount; // max: ~1B wallets
uint40 claimedCount; // 160 + 8 + 40 + 40 = 248 bits
uint176 amountPerClaim;
uint40 startTime; // supports up to year 36,825
uint40 endTime; // 176 + 40 + 40 = 256 bits
address owner;
uint40 refundedAt; // 160 + 40 = 200 bits
bytes32 merkleRoot; // 256 bits
string title;
string ipfsCID; // To store all WL addresses to create the Merkle Proof
mapping(address => bool) isClaimed;
}
Distribution[] public distributions;
/**
* @dev Modifier to check if the caller is the owner of the distribution.
* @param distributionId The ID of the distribution.
*/
modifier onlyOwner(uint256 distributionId) {
if (msg.sender != distributions[distributionId].owner) revert MerkleDistributor__PermissionDenied();
_;
}
/**
* @dev Creates a new token distribution.
* @param token The address of the token to be distributed.
* @param isERC20 Flag indicating if the token is an ERC20 token.
* @param amountPerClaim The amount of tokens to be distributed per claim.
* @param walletCount The number of wallets to distribute tokens to.
* @param startTime The start time of the distribution.
* @param endTime The end time of the distribution.
* @param merkleRoot The Merkle root of the distribution (optional).
* @param title The title of the distribution (optional).
* @param ipfsCID The IPFS CID of the distribution (optional).
*
* @notice If the Merkle root is not provided, there will be no verification on claims,
* anyone can claim all tokens with multiple accounts.
*/
function createDistribution(
address token,
bool isERC20,
uint176 amountPerClaim,
uint40 walletCount,
uint40 startTime,
uint40 endTime,
bytes32 merkleRoot,
string calldata title,
string calldata ipfsCID
) external {
if (token == address(0)) revert MerkleDistributor__InvalidParams('token');
if (amountPerClaim == 0) revert MerkleDistributor__InvalidParams('amountPerClaim');
if (walletCount == 0) revert MerkleDistributor__InvalidParams('walletCount');
if (endTime <= block.timestamp) revert MerkleDistributor__InvalidParams('endTime');
if (startTime >= endTime) revert MerkleDistributor__InvalidParams('startTime');
// Create a new distribution
distributions.push();
Distribution storage distribution = distributions[distributions.length - 1];
distribution.token = token;
distribution.isERC20 = isERC20;
distribution.walletCount = walletCount;
// distribution.claimedCount = 0;
distribution.amountPerClaim = amountPerClaim;
distribution.startTime = startTime;
distribution.endTime = endTime;
distribution.owner = msg.sender;
// distribution.refundedAt = 0;
distribution.merkleRoot = merkleRoot; // optional
distribution.title = title; // optional
distribution.ipfsCID = ipfsCID; // optional
// Deposit total amount of tokens to this contract
if (isERC20) {
IERC20(token).safeTransferFrom(msg.sender, address(this), amountPerClaim * walletCount);
} else {
// Only support an ERC1155 token at id = 0
IERC1155(token).safeTransferFrom(msg.sender, address(this), 0, amountPerClaim * walletCount, "");
}
emit Created(distributions.length - 1, token, isERC20, startTime);
}
/**
* @dev Allows a user to claim tokens from a specific distribution using a merkle proof.
* @param distributionId The ID of the distribution.
* @param merkleProof The merkle proof for the user's claim.
*/
function claim(uint256 distributionId, bytes32[] calldata merkleProof) external {
Distribution storage distribution = distributions[distributionId];
if (distribution.startTime > block.timestamp) revert MerkleDistributor__NotStarted();
if (distribution.endTime < block.timestamp) revert MerkleDistributor__Finished();
if (distribution.refundedAt > 0) revert MerkleDistributor__Refunded();
if (distribution.isClaimed[msg.sender]) revert MerkleDistributor__AlreadyClaimed();
if (distribution.claimedCount >= distribution.walletCount) revert MerkleDistributor__NoClaimableTokensLeft();
if (distribution.merkleRoot == bytes32(0)) { // Public airdrop
// NOTE: Block contracts from claiming tokens to prevent abuse during a public airdrop.
// This won't completely eliminate bot claiming but will make it more challenging.
// Caveat: ERC4337-based wallets will also be unable to claim; however, they can use an EOA to do so.
if(tx.origin != msg.sender) revert MerkleDistributor__InvalidCaller();
} else { // Whitelist only
if (!MerkleProof.verify(
merkleProof,
distribution.merkleRoot,
keccak256(abi.encodePacked(msg.sender))
)) revert MerkleDistributor__InvalidProof();
}
// Mark it claimed and send the token
distribution.isClaimed[msg.sender] = true;
distribution.claimedCount += 1;
if (distribution.isERC20) {
IERC20(distribution.token).safeTransfer(msg.sender, distribution.amountPerClaim);
} else {
// Only support an ERC1155 token at id = 0
IERC1155(distribution.token).safeTransferFrom(address(this), msg.sender, 0, distribution.amountPerClaim, "");
}
emit Claimed(distributionId, msg.sender);
}
/**
* @dev Allows the owner to refund the remaining tokens from a specific distribution.
* @param distributionId The ID of the distribution to refund.
* @notice The owner can refund the remaining tokens whenever they want, even during the distribution.
*/
function refund(uint256 distributionId) external onlyOwner(distributionId) {
Distribution storage distribution = distributions[distributionId];
if (distribution.refundedAt > 0) revert MerkleDistributor__AlreadyRefunded();
uint256 amountLeft = getAmountLeft(distributionId);
if (amountLeft == 0) revert MerkleDistributor__NothingToRefund();
distribution.refundedAt = uint40(block.timestamp);
// Transfer the remaining tokens back to the owner
if (distribution.isERC20) {
IERC20(distribution.token).safeTransfer(distribution.owner, amountLeft);
} else {
// Only support an ERC1155 token at id = 0
IERC1155(distribution.token).safeTransferFrom(address(this), distribution.owner, 0, amountLeft, "");
}
emit Refunded(distributionId, amountLeft);
}
// MARK: - Utility functions
/**
* @dev Checks if a distribution is whitelist-only.
* @param distributionId The ID of the distribution.
* @return A boolean indicating whether the distribution is whitelist-only.
*/
function isWhitelistOnly(uint256 distributionId) external view returns (bool) {
return distributions[distributionId].merkleRoot != bytes32(0);
}
/**
* @dev Checks if an address is whitelisted for a specific distribution.
* @param distributionId The ID of the distribution.
* @param wallet The address to check.
* @param merkleProof The Merkle proof for the address.
* @return A boolean indicating whether the address is whitelisted.
*/
function isWhitelisted(uint256 distributionId, address wallet, bytes32[] calldata merkleProof) external view returns (bool) {
return MerkleProof.verify(
merkleProof,
distributions[distributionId].merkleRoot,
keccak256(abi.encodePacked(wallet))
);
}
/**
* @dev Checks if a specific wallet address has claimed the tokens for a given distribution ID.
* @param distributionId The ID of the distribution.
* @param wallet The wallet address to check.
* @return A boolean indicating whether the wallet address has claimed the tokens or not.
*/
function isClaimed(uint256 distributionId, address wallet) external view returns (bool) {
return distributions[distributionId].isClaimed[wallet];
}
/**
* @dev Returns the amount of tokens left to be claimed for a specific distribution.
* @param distributionId The ID of the distribution.
* @return The amount of tokens left to be claimed.
*/
function getAmountLeft(uint256 distributionId) public view returns (uint256) {
Distribution storage distribution = distributions[distributionId];
return distribution.amountPerClaim * (distribution.walletCount - distribution.claimedCount);
}
/**
* @dev Returns the total amount claimed for a specific distribution.
* @param distributionId The ID of the distribution.
* @return The total amount claimed for the distribution.
*/
function getAmountClaimed(uint256 distributionId) external view returns (uint256) {
Distribution storage distribution = distributions[distributionId];
return distribution.amountPerClaim * distribution.claimedCount;
}
/**
* @dev Returns the number of distributions in the MerkleDistributor contract.
* @return The number of distributions.
*/
function distributionCount() external view returns (uint256) {
return distributions.length;
}
/**
* @dev Retrieves the distribution IDs for a given token address within a specified range.
* @param token The address of the token.
* @param start The starting index of the range (inclusive).
* @param stop The ending index of the range (exclusive).
* @return ids An array of distribution IDs within the specified range.
*/
function getDistributionIdsByToken(address token, uint256 start, uint256 stop) external view returns (uint256[] memory ids) {
if (start >= stop || stop - start > 10000) revert MerkleDistributor__InvalidPaginationParameters();
unchecked {
uint256 distributionsLength = distributions.length;
if (stop > distributionsLength) {
stop = distributionsLength;
}
uint256 count;
for (uint256 i = start; i < stop; ++i) {
if (distributions[i].token == token) ++count;
}
ids = new uint256[](count);
uint256 j;
for (uint256 i = start; i < stop; ++i) {
if (distributions[i].token == token) {
ids[j++] = i;
if (j == count) break;
}
}
}
}
/**
* @dev Retrieves the distribution IDs owned by a specific address within a given range.
* @param owner The address of the owner.
* @param start The starting index of the range (inclusive).
* @param stop The ending index of the range (exclusive).
* @return ids An array of distribution IDs owned by the specified address within the given range.
*/
function getDistributionIdsByOwner(address owner, uint256 start, uint256 stop) external view returns (uint256[] memory ids) {
if (start >= stop || stop - start > 10000) revert MerkleDistributor__InvalidPaginationParameters();
unchecked {
uint256 distributionsLength = distributions.length;
if (stop > distributionsLength) {
stop = distributionsLength;
}
uint256 count;
for (uint256 i = start; i < stop; ++i) {
if (distributions[i].owner == owner) ++count;
}
ids = new uint256[](count);
uint256 j;
for (uint256 i = start; i < stop; ++i) {
if (distributions[i].owner == owner) {
ids[j++] = i;
if (j == count) break;
}
}
}
}
// MARK: - ERC1155 Receiver
function onERC1155Received(address, address, uint256, uint256, bytes memory) external pure returns (bytes4) {
return this.onERC1155Received.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the value of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] calldata accounts,
uint256[] calldata ids
) external view returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155Received} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @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;
/**
* @dev An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @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);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.20;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the Merkle tree could be reinterpreted as a leaf value.
* OpenZeppelin's JavaScript library generates Merkle trees that are safe
* against this attack out of the box.
*/
library MerkleProof {
/**
*@dev The multiproof provided is not valid.
*/
error MerkleProofInvalidMultiproof();
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*/
function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the Merkle tree.
uint256 leavesLen = leaves.length;
uint256 proofLen = proof.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
if (leavesLen + proofLen != totalHashes + 1) {
revert MerkleProofInvalidMultiproof();
}
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i]
? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
: proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
if (proofPos != proofLen) {
revert MerkleProofInvalidMultiproof();
}
unchecked {
return hashes[totalHashes - 1];
}
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the Merkle tree.
uint256 leavesLen = leaves.length;
uint256 proofLen = proof.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
if (leavesLen + proofLen != totalHashes + 1) {
revert MerkleProofInvalidMultiproof();
}
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i]
? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
: proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
if (proofPos != proofLen) {
revert MerkleProofInvalidMultiproof();
}
unchecked {
return hashes[totalHashes - 1];
}
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Sorts the pair (a, b) and hashes the result.
*/
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
/**
* @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
*/
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"evmVersion": "paris",
"optimizer": {
"enabled": true,
"runs": 50000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"MerkleDistributor__AlreadyClaimed","type":"error"},{"inputs":[],"name":"MerkleDistributor__AlreadyRefunded","type":"error"},{"inputs":[],"name":"MerkleDistributor__Finished","type":"error"},{"inputs":[],"name":"MerkleDistributor__InvalidCaller","type":"error"},{"inputs":[],"name":"MerkleDistributor__InvalidPaginationParameters","type":"error"},{"inputs":[{"internalType":"string","name":"param","type":"string"}],"name":"MerkleDistributor__InvalidParams","type":"error"},{"inputs":[],"name":"MerkleDistributor__InvalidProof","type":"error"},{"inputs":[],"name":"MerkleDistributor__NoClaimableTokensLeft","type":"error"},{"inputs":[],"name":"MerkleDistributor__NotStarted","type":"error"},{"inputs":[],"name":"MerkleDistributor__NothingToRefund","type":"error"},{"inputs":[],"name":"MerkleDistributor__PermissionDenied","type":"error"},{"inputs":[],"name":"MerkleDistributor__Refunded","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"distributionId","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"distributionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"isERC20","type":"bool"},{"indexed":false,"internalType":"uint40","name":"startTime","type":"uint40"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"distributionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Refunded","type":"event"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"isERC20","type":"bool"},{"internalType":"uint176","name":"amountPerClaim","type":"uint176"},{"internalType":"uint40","name":"walletCount","type":"uint40"},{"internalType":"uint40","name":"startTime","type":"uint40"},{"internalType":"uint40","name":"endTime","type":"uint40"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"title","type":"string"},{"internalType":"string","name":"ipfsCID","type":"string"}],"name":"createDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distributions","outputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"isERC20","type":"bool"},{"internalType":"uint40","name":"walletCount","type":"uint40"},{"internalType":"uint40","name":"claimedCount","type":"uint40"},{"internalType":"uint176","name":"amountPerClaim","type":"uint176"},{"internalType":"uint40","name":"startTime","type":"uint40"},{"internalType":"uint40","name":"endTime","type":"uint40"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint40","name":"refundedAt","type":"uint40"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"title","type":"string"},{"internalType":"string","name":"ipfsCID","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"}],"name":"getAmountClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"}],"name":"getAmountLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"getDistributionIdsByOwner","outputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"getDistributionIdsByToken","outputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"}],"name":"isWhitelistOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionId","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50612473806100206000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806361f66c081161008c578063c65c3d9511610066578063c65c3d95146101d9578063cf45236e146101e1578063d2ef0795146101f4578063f23a6e611461020757600080fd5b806361f66c081461019357806367e9327e146101a65780639fa08e6f146101c657600080fd5b80632f52ebb7116100bd5780632f52ebb7146101345780634487d3df1461014757806358c064f21461017257600080fd5b8063169a5027146100e45780631e4220001461010c578063278ecde11461011f575b600080fd5b6100f76100f2366004611b57565b610270565b60405190151581526020015b60405180910390f35b6100f761011a366004611be5565b6102a4565b61013261012d366004611b57565b610362565b005b610132610142366004611c3f565b610616565b61015a610155366004611b57565b610aef565b6040516101039c9b9a99989796959493929190611cf9565b610185610180366004611b57565b610d22565b604051908152602001610103565b6101326101a1366004611e3d565b610db9565b6101b96101b4366004611f45565b611395565b6040516101039190611f78565b6101b96101d4366004611f45565b611554565b600054610185565b6101856101ef366004611b57565b611702565b6100f7610202366004611fbc565b6117a5565b61023f610215366004612017565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610103565b60008060001b600083815481106102895761028961211b565b90600052602060002090600702016003015414159050919050565b6000610359838380806020026020016040519081016040528093929190818152602001838360200280828437600092018290525080549093508a9250821090506102f0576102f061211b565b9060005260206000209060070201600301548660405160200161033e919060609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b604051602081830303815290604052805190602001206117fb565b95945050505050565b80600081815481106103765761037661211b565b600091825260209091206007909102016002015473ffffffffffffffffffffffffffffffffffffffff1633146103d8576040517f37e55bac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008083815481106103ec576103ec61211b565b60009182526020909120600790910201600281015490915074010000000000000000000000000000000000000000900464ffffffffff161561045a576040517ffd3179be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061046584611702565b9050806000036104a1576040517ff89eb8c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002820180547fffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000004264ffffffffff1681029190911790915582540460ff161561052b57600282015482546105269173ffffffffffffffffffffffffffffffffffffffff918216911683611813565b6105d6565b815460028301546040517ff242432a00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91821660248201526000604482018190526064820185905260a0608483015260a482015291169063f242432a9060c401600060405180830381600087803b1580156105bd57600080fd5b505af11580156105d1573d6000803e3d6000fd5b505050505b837fb7c1f9298a18c36af08bd57eabbfbeb04695f24d0438f67614741ec15fb5c4a98260405161060891815260200190565b60405180910390a250505050565b600080848154811061062a5761062a61211b565b90600052602060002090600702019050428160010160169054906101000a900464ffffffffff1664ffffffffff161115610690576040517f7b48d49e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154427b0100000000000000000000000000000000000000000000000000000090910464ffffffffff1610156106f5576040517fe6e6750100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600281015474010000000000000000000000000000000000000000900464ffffffffff1615610750576040517f1b14e10700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260068201602052604090205460ff161561079c576040517f493ab40800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff7501000000000000000000000000000000000000000000820481167a0100000000000000000000000000000000000000000000000000009092041610610816576040517fb48589d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600381015461085d57323314610858576040517fc8d83bfc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610904565b6108ce83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060038301546040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260340161033e565b610904576040517f88eccfa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600682016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915581548290601a9061097990849064ffffffffff7a01000000000000000000000000000000000000000000000000000090910416612179565b92506101000a81548164ffffffffff021916908364ffffffffff1602179055508060000160149054906101000a900460ff16156109f857600181015481546109f39173ffffffffffffffffffffffffffffffffffffffff90911690339075ffffffffffffffffffffffffffffffffffffffffffff16611813565b610abd565b805460018201546040517ff242432a00000000000000000000000000000000000000000000000000000000815230600482015233602482015260006044820181905275ffffffffffffffffffffffffffffffffffffffffffff909216606482015260a0608482015260a481019190915273ffffffffffffffffffffffffffffffffffffffff9091169063f242432a9060c401600060405180830381600087803b158015610aa457600080fd5b505af1158015610ab8573d6000803e3d6000fd5b505050505b60405133815284907f6aa3eac93d079e5e100b1029be716caa33586c96aa4baac390669fb5c2a2121290602001610608565b60008181548110610aff57600080fd5b60009182526020909120600790910201805460018201546002830154600384015460048501805473ffffffffffffffffffffffffffffffffffffffff80871698507401000000000000000000000000000000000000000080880460ff16987501000000000000000000000000000000000000000000890464ffffffffff908116997a010000000000000000000000000000000000000000000000000000900481169875ffffffffffffffffffffffffffffffffffffffffffff81169876010000000000000000000000000000000000000000000082048316987b0100000000000000000000000000000000000000000000000000000090920483169795811696949004909116939092610c119061219e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3d9061219e565b8015610c8a5780601f10610c5f57610100808354040283529160200191610c8a565b820191906000526020600020905b815481529060010190602001808311610c6d57829003601f168201915b505050505090806005018054610c9f9061219e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccb9061219e565b8015610d185780601f10610ced57610100808354040283529160200191610d18565b820191906000526020600020905b815481529060010190602001808311610cfb57829003601f168201915b505050505090508c565b60008060008381548110610d3857610d3861211b565b6000918252602090912060079091020180546001820154919250610d9a917a01000000000000000000000000000000000000000000000000000090910464ffffffffff169075ffffffffffffffffffffffffffffffffffffffffffff166121f1565b75ffffffffffffffffffffffffffffffffffffffffffff169392505050565b73ffffffffffffffffffffffffffffffffffffffff8b16610e3b576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f746f6b656e00000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b8875ffffffffffffffffffffffffffffffffffffffffffff16600003610ebd576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f616d6f756e74506572436c61696d0000000000000000000000000000000000006044820152606401610e32565b8764ffffffffff16600003610f2e576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f77616c6c6574436f756e740000000000000000000000000000000000000000006044820152606401610e32565b428664ffffffffff1611610f9e576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f656e6454696d65000000000000000000000000000000000000000000000000006044820152606401610e32565b8564ffffffffff168764ffffffffff1610611015576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f737461727454696d6500000000000000000000000000000000000000000000006044820152606401610e32565b600080546001908101808355828052829161102f91612232565b8154811061103f5761103f61211b565b906000526020600020906007020190508b8160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a8160000160146101000a81548160ff021916908315150217905550888160000160156101000a81548164ffffffffff021916908364ffffffffff160217905550898160010160006101000a81548175ffffffffffffffffffffffffffffffffffffffffffff021916908375ffffffffffffffffffffffffffffffffffffffffffff160217905550878160010160166101000a81548164ffffffffff021916908364ffffffffff1602179055508681600101601b6101000a81548164ffffffffff021916908364ffffffffff160217905550338160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085816003018190555084848260040191826111c3929190612293565b50600581016111d3838583612293565b508a156112345761122f33306111f064ffffffffff8d168e6121f1565b75ffffffffffffffffffffffffffffffffffffffffffff168f73ffffffffffffffffffffffffffffffffffffffff16611899909392919063ffffffff16565b61131f565b8b73ffffffffffffffffffffffffffffffffffffffff1663f242432a333060008d64ffffffffff168f61126791906121f1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff9485166004820152939092166024840152604483015275ffffffffffffffffffffffffffffffffffffffffffff16606482015260a06084820152600060a482015260c401600060405180830381600087803b15801561130657600080fd5b505af115801561131a573d6000803e3d6000fd5b505050505b60005473ffffffffffffffffffffffffffffffffffffffff8d169061134690600190612232565b604080518e1515815264ffffffffff8c1660208201527f395503978abf0bf7dd838e941dea654d5feebe88da8c0ce0a4262ed458e812ff910160405180910390a3505050505050505050505050565b606081831015806113b057506127106113ae8484612232565b115b156113e7576040517ff6e0165300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054808311156113f6578092505b6000845b8481101561146a578673ffffffffffffffffffffffffffffffffffffffff166000828154811061142c5761142c61211b565b600091825260209091206002600790920201015473ffffffffffffffffffffffffffffffffffffffff1603611462578160010191505b6001016113fa565b508067ffffffffffffffff81111561148457611484611fe8565b6040519080825280602002602001820160405280156114ad578160200160208202803683370190505b5092506000855b85811015611549578773ffffffffffffffffffffffffffffffffffffffff16600082815481106114e6576114e661211b565b600091825260209091206002600790920201015473ffffffffffffffffffffffffffffffffffffffff1603611541578085838060010194508151811061152e5761152e61211b565b6020908102919091010152818314611549575b6001016114b4565b505050509392505050565b6060818310158061156f575061271061156d8484612232565b115b156115a6576040517ff6e0165300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054808311156115b5578092505b6000845b84811015611626578673ffffffffffffffffffffffffffffffffffffffff16600082815481106115eb576115eb61211b565b600091825260209091206007909102015473ffffffffffffffffffffffffffffffffffffffff160361161e578160010191505b6001016115b9565b508067ffffffffffffffff81111561164057611640611fe8565b604051908082528060200260200182016040528015611669578160200160208202803683370190505b5092506000855b85811015611549578773ffffffffffffffffffffffffffffffffffffffff16600082815481106116a2576116a261211b565b600091825260209091206007909102015473ffffffffffffffffffffffffffffffffffffffff16036116fa57808583806001019450815181106116e7576116e761211b565b6020908102919091010152818314611549575b600101611670565b600080600083815481106117185761171861211b565b6000918252602090912060079091020180549091506117779064ffffffffff7a010000000000000000000000000000000000000000000000000000820481169175010000000000000000000000000000000000000000009004166123ae565b6001820154610d9a9164ffffffffff169075ffffffffffffffffffffffffffffffffffffffffffff166121f1565b60008083815481106117b9576117b961211b565b6000918252602080832073ffffffffffffffffffffffffffffffffffffffff861684526006600790930201919091019052604090205460ff1690505b92915050565b60008261180885846118e5565b1490505b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261189491859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611932565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd9060840161184d565b50505050565b600081815b845181101561192a57611916828683815181106119095761190961211b565b60200260200101516119c8565b915080611922816123cc565b9150506118ea565b509392505050565b600061195473ffffffffffffffffffffffffffffffffffffffff8416836119f4565b905080516000141580156119795750808060200190518101906119779190612404565b155b15611894576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610e32565b60008183106119e457600082815260208490526040902061180c565b5060009182526020526040902090565b606061180c83836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051611a279190612421565b60006040518083038185875af1925050503d8060008114611a64576040519150601f19603f3d011682016040523d82523d6000602084013e611a69565b606091505b5091509150611a79868383611a83565b9695505050505050565b606082611a9857611a9382611b12565b61180c565b8151158015611abc575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611b0b576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610e32565b508061180c565b805115611b225780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060208284031215611b6957600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611b9457600080fd5b919050565b60008083601f840112611bab57600080fd5b50813567ffffffffffffffff811115611bc357600080fd5b6020830191508360208260051b8501011115611bde57600080fd5b9250929050565b60008060008060608587031215611bfb57600080fd5b84359350611c0b60208601611b70565b9250604085013567ffffffffffffffff811115611c2757600080fd5b611c3387828801611b99565b95989497509550505050565b600080600060408486031215611c5457600080fd5b83359250602084013567ffffffffffffffff811115611c7257600080fd5b611c7e86828701611b99565b9497909650939450505050565b60005b83811015611ca6578181015183820152602001611c8e565b50506000910152565b60008151808452611cc7816020860160208601611c8b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8d1681528b1515602082015264ffffffffff8b811660408301528a16606082015275ffffffffffffffffffffffffffffffffffffffffffff89166080820152600061018064ffffffffff8a1660a084015264ffffffffff891660c084015273ffffffffffffffffffffffffffffffffffffffff881660e084015264ffffffffff87166101008401528561012084015280610140840152611db081840186611caf565b9050828103610160840152611dc58185611caf565b9f9e505050505050505050505050505050565b8015158114611b5457600080fd5b803564ffffffffff81168114611b9457600080fd5b60008083601f840112611e0d57600080fd5b50813567ffffffffffffffff811115611e2557600080fd5b602083019150836020828501011115611bde57600080fd5b60008060008060008060008060008060006101208c8e031215611e5f57600080fd5b611e688c611b70565b9a50611e7760208d0135611dd8565b60208c0135995060408c013575ffffffffffffffffffffffffffffffffffffffffffff81168114611ea757600080fd5b9850611eb560608d01611de6565b9750611ec360808d01611de6565b9650611ed160a08d01611de6565b955060c08c0135945067ffffffffffffffff8060e08e01351115611ef457600080fd5b611f048e60e08f01358f01611dfb565b90955093506101008d0135811015611f1b57600080fd5b50611f2d8d6101008e01358e01611dfb565b81935080925050509295989b509295989b9093969950565b600080600060608486031215611f5a57600080fd5b611f6384611b70565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611fb057835183529284019291840191600101611f94565b50909695505050505050565b60008060408385031215611fcf57600080fd5b82359150611fdf60208401611b70565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080600060a0868803121561202f57600080fd5b61203886611b70565b945061204660208701611b70565b93506040860135925060608601359150608086013567ffffffffffffffff8082111561207157600080fd5b818801915088601f83011261208557600080fd5b81358181111561209757612097611fe8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156120dd576120dd611fe8565b816040528281528b60208487010111156120f657600080fd5b8260208601602083013760006020848301015280955050505050509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b64ffffffffff8181168382160190808211156121975761219761214a565b5092915050565b600181811c908216806121b257607f821691505b6020821081036121eb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b75ffffffffffffffffffffffffffffffffffffffffffff8281168282168181028316929181158285048214176122295761222961214a565b50505092915050565b818103818111156117f5576117f561214a565b601f82111561189457600081815260208120601f850160051c8101602086101561226c5750805b601f850160051c820191505b8181101561228b57828155600101612278565b505050505050565b67ffffffffffffffff8311156122ab576122ab611fe8565b6122bf836122b9835461219e565b83612245565b6000601f84116001811461231157600085156122db5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556123a7565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156123605786850135825560209485019460019092019101612340565b508682101561239b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b64ffffffffff8281168282160390808211156121975761219761214a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123fd576123fd61214a565b5060010190565b60006020828403121561241657600080fd5b815161180c81611dd8565b60008251612433818460208701611c8b565b919091019291505056fea2646970667358221220e521315e24b1525862a16dac95d337c83afb94df5bdb4c33760109f408ca521564736f6c63430008140033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806361f66c081161008c578063c65c3d9511610066578063c65c3d95146101d9578063cf45236e146101e1578063d2ef0795146101f4578063f23a6e611461020757600080fd5b806361f66c081461019357806367e9327e146101a65780639fa08e6f146101c657600080fd5b80632f52ebb7116100bd5780632f52ebb7146101345780634487d3df1461014757806358c064f21461017257600080fd5b8063169a5027146100e45780631e4220001461010c578063278ecde11461011f575b600080fd5b6100f76100f2366004611b57565b610270565b60405190151581526020015b60405180910390f35b6100f761011a366004611be5565b6102a4565b61013261012d366004611b57565b610362565b005b610132610142366004611c3f565b610616565b61015a610155366004611b57565b610aef565b6040516101039c9b9a99989796959493929190611cf9565b610185610180366004611b57565b610d22565b604051908152602001610103565b6101326101a1366004611e3d565b610db9565b6101b96101b4366004611f45565b611395565b6040516101039190611f78565b6101b96101d4366004611f45565b611554565b600054610185565b6101856101ef366004611b57565b611702565b6100f7610202366004611fbc565b6117a5565b61023f610215366004612017565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610103565b60008060001b600083815481106102895761028961211b565b90600052602060002090600702016003015414159050919050565b6000610359838380806020026020016040519081016040528093929190818152602001838360200280828437600092018290525080549093508a9250821090506102f0576102f061211b565b9060005260206000209060070201600301548660405160200161033e919060609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b604051602081830303815290604052805190602001206117fb565b95945050505050565b80600081815481106103765761037661211b565b600091825260209091206007909102016002015473ffffffffffffffffffffffffffffffffffffffff1633146103d8576040517f37e55bac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008083815481106103ec576103ec61211b565b60009182526020909120600790910201600281015490915074010000000000000000000000000000000000000000900464ffffffffff161561045a576040517ffd3179be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061046584611702565b9050806000036104a1576040517ff89eb8c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002820180547fffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000004264ffffffffff1681029190911790915582540460ff161561052b57600282015482546105269173ffffffffffffffffffffffffffffffffffffffff918216911683611813565b6105d6565b815460028301546040517ff242432a00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91821660248201526000604482018190526064820185905260a0608483015260a482015291169063f242432a9060c401600060405180830381600087803b1580156105bd57600080fd5b505af11580156105d1573d6000803e3d6000fd5b505050505b837fb7c1f9298a18c36af08bd57eabbfbeb04695f24d0438f67614741ec15fb5c4a98260405161060891815260200190565b60405180910390a250505050565b600080848154811061062a5761062a61211b565b90600052602060002090600702019050428160010160169054906101000a900464ffffffffff1664ffffffffff161115610690576040517f7b48d49e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154427b0100000000000000000000000000000000000000000000000000000090910464ffffffffff1610156106f5576040517fe6e6750100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600281015474010000000000000000000000000000000000000000900464ffffffffff1615610750576040517f1b14e10700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260068201602052604090205460ff161561079c576040517f493ab40800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff7501000000000000000000000000000000000000000000820481167a0100000000000000000000000000000000000000000000000000009092041610610816576040517fb48589d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600381015461085d57323314610858576040517fc8d83bfc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610904565b6108ce83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060038301546040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260340161033e565b610904576040517f88eccfa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600682016020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915581548290601a9061097990849064ffffffffff7a01000000000000000000000000000000000000000000000000000090910416612179565b92506101000a81548164ffffffffff021916908364ffffffffff1602179055508060000160149054906101000a900460ff16156109f857600181015481546109f39173ffffffffffffffffffffffffffffffffffffffff90911690339075ffffffffffffffffffffffffffffffffffffffffffff16611813565b610abd565b805460018201546040517ff242432a00000000000000000000000000000000000000000000000000000000815230600482015233602482015260006044820181905275ffffffffffffffffffffffffffffffffffffffffffff909216606482015260a0608482015260a481019190915273ffffffffffffffffffffffffffffffffffffffff9091169063f242432a9060c401600060405180830381600087803b158015610aa457600080fd5b505af1158015610ab8573d6000803e3d6000fd5b505050505b60405133815284907f6aa3eac93d079e5e100b1029be716caa33586c96aa4baac390669fb5c2a2121290602001610608565b60008181548110610aff57600080fd5b60009182526020909120600790910201805460018201546002830154600384015460048501805473ffffffffffffffffffffffffffffffffffffffff80871698507401000000000000000000000000000000000000000080880460ff16987501000000000000000000000000000000000000000000890464ffffffffff908116997a010000000000000000000000000000000000000000000000000000900481169875ffffffffffffffffffffffffffffffffffffffffffff81169876010000000000000000000000000000000000000000000082048316987b0100000000000000000000000000000000000000000000000000000090920483169795811696949004909116939092610c119061219e565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3d9061219e565b8015610c8a5780601f10610c5f57610100808354040283529160200191610c8a565b820191906000526020600020905b815481529060010190602001808311610c6d57829003601f168201915b505050505090806005018054610c9f9061219e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccb9061219e565b8015610d185780601f10610ced57610100808354040283529160200191610d18565b820191906000526020600020905b815481529060010190602001808311610cfb57829003601f168201915b505050505090508c565b60008060008381548110610d3857610d3861211b565b6000918252602090912060079091020180546001820154919250610d9a917a01000000000000000000000000000000000000000000000000000090910464ffffffffff169075ffffffffffffffffffffffffffffffffffffffffffff166121f1565b75ffffffffffffffffffffffffffffffffffffffffffff169392505050565b73ffffffffffffffffffffffffffffffffffffffff8b16610e3b576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f746f6b656e00000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b8875ffffffffffffffffffffffffffffffffffffffffffff16600003610ebd576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f616d6f756e74506572436c61696d0000000000000000000000000000000000006044820152606401610e32565b8764ffffffffff16600003610f2e576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f77616c6c6574436f756e740000000000000000000000000000000000000000006044820152606401610e32565b428664ffffffffff1611610f9e576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f656e6454696d65000000000000000000000000000000000000000000000000006044820152606401610e32565b8564ffffffffff168764ffffffffff1610611015576040517f948290d900000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f737461727454696d6500000000000000000000000000000000000000000000006044820152606401610e32565b600080546001908101808355828052829161102f91612232565b8154811061103f5761103f61211b565b906000526020600020906007020190508b8160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a8160000160146101000a81548160ff021916908315150217905550888160000160156101000a81548164ffffffffff021916908364ffffffffff160217905550898160010160006101000a81548175ffffffffffffffffffffffffffffffffffffffffffff021916908375ffffffffffffffffffffffffffffffffffffffffffff160217905550878160010160166101000a81548164ffffffffff021916908364ffffffffff1602179055508681600101601b6101000a81548164ffffffffff021916908364ffffffffff160217905550338160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085816003018190555084848260040191826111c3929190612293565b50600581016111d3838583612293565b508a156112345761122f33306111f064ffffffffff8d168e6121f1565b75ffffffffffffffffffffffffffffffffffffffffffff168f73ffffffffffffffffffffffffffffffffffffffff16611899909392919063ffffffff16565b61131f565b8b73ffffffffffffffffffffffffffffffffffffffff1663f242432a333060008d64ffffffffff168f61126791906121f1565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b16815273ffffffffffffffffffffffffffffffffffffffff9485166004820152939092166024840152604483015275ffffffffffffffffffffffffffffffffffffffffffff16606482015260a06084820152600060a482015260c401600060405180830381600087803b15801561130657600080fd5b505af115801561131a573d6000803e3d6000fd5b505050505b60005473ffffffffffffffffffffffffffffffffffffffff8d169061134690600190612232565b604080518e1515815264ffffffffff8c1660208201527f395503978abf0bf7dd838e941dea654d5feebe88da8c0ce0a4262ed458e812ff910160405180910390a3505050505050505050505050565b606081831015806113b057506127106113ae8484612232565b115b156113e7576040517ff6e0165300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054808311156113f6578092505b6000845b8481101561146a578673ffffffffffffffffffffffffffffffffffffffff166000828154811061142c5761142c61211b565b600091825260209091206002600790920201015473ffffffffffffffffffffffffffffffffffffffff1603611462578160010191505b6001016113fa565b508067ffffffffffffffff81111561148457611484611fe8565b6040519080825280602002602001820160405280156114ad578160200160208202803683370190505b5092506000855b85811015611549578773ffffffffffffffffffffffffffffffffffffffff16600082815481106114e6576114e661211b565b600091825260209091206002600790920201015473ffffffffffffffffffffffffffffffffffffffff1603611541578085838060010194508151811061152e5761152e61211b565b6020908102919091010152818314611549575b6001016114b4565b505050509392505050565b6060818310158061156f575061271061156d8484612232565b115b156115a6576040517ff6e0165300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054808311156115b5578092505b6000845b84811015611626578673ffffffffffffffffffffffffffffffffffffffff16600082815481106115eb576115eb61211b565b600091825260209091206007909102015473ffffffffffffffffffffffffffffffffffffffff160361161e578160010191505b6001016115b9565b508067ffffffffffffffff81111561164057611640611fe8565b604051908082528060200260200182016040528015611669578160200160208202803683370190505b5092506000855b85811015611549578773ffffffffffffffffffffffffffffffffffffffff16600082815481106116a2576116a261211b565b600091825260209091206007909102015473ffffffffffffffffffffffffffffffffffffffff16036116fa57808583806001019450815181106116e7576116e761211b565b6020908102919091010152818314611549575b600101611670565b600080600083815481106117185761171861211b565b6000918252602090912060079091020180549091506117779064ffffffffff7a010000000000000000000000000000000000000000000000000000820481169175010000000000000000000000000000000000000000009004166123ae565b6001820154610d9a9164ffffffffff169075ffffffffffffffffffffffffffffffffffffffffffff166121f1565b60008083815481106117b9576117b961211b565b6000918252602080832073ffffffffffffffffffffffffffffffffffffffff861684526006600790930201919091019052604090205460ff1690505b92915050565b60008261180885846118e5565b1490505b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261189491859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611932565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526118df9186918216906323b872dd9060840161184d565b50505050565b600081815b845181101561192a57611916828683815181106119095761190961211b565b60200260200101516119c8565b915080611922816123cc565b9150506118ea565b509392505050565b600061195473ffffffffffffffffffffffffffffffffffffffff8416836119f4565b905080516000141580156119795750808060200190518101906119779190612404565b155b15611894576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610e32565b60008183106119e457600082815260208490526040902061180c565b5060009182526020526040902090565b606061180c83836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051611a279190612421565b60006040518083038185875af1925050503d8060008114611a64576040519150601f19603f3d011682016040523d82523d6000602084013e611a69565b606091505b5091509150611a79868383611a83565b9695505050505050565b606082611a9857611a9382611b12565b61180c565b8151158015611abc575073ffffffffffffffffffffffffffffffffffffffff84163b155b15611b0b576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610e32565b508061180c565b805115611b225780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060208284031215611b6957600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611b9457600080fd5b919050565b60008083601f840112611bab57600080fd5b50813567ffffffffffffffff811115611bc357600080fd5b6020830191508360208260051b8501011115611bde57600080fd5b9250929050565b60008060008060608587031215611bfb57600080fd5b84359350611c0b60208601611b70565b9250604085013567ffffffffffffffff811115611c2757600080fd5b611c3387828801611b99565b95989497509550505050565b600080600060408486031215611c5457600080fd5b83359250602084013567ffffffffffffffff811115611c7257600080fd5b611c7e86828701611b99565b9497909650939450505050565b60005b83811015611ca6578181015183820152602001611c8e565b50506000910152565b60008151808452611cc7816020860160208601611c8b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8d1681528b1515602082015264ffffffffff8b811660408301528a16606082015275ffffffffffffffffffffffffffffffffffffffffffff89166080820152600061018064ffffffffff8a1660a084015264ffffffffff891660c084015273ffffffffffffffffffffffffffffffffffffffff881660e084015264ffffffffff87166101008401528561012084015280610140840152611db081840186611caf565b9050828103610160840152611dc58185611caf565b9f9e505050505050505050505050505050565b8015158114611b5457600080fd5b803564ffffffffff81168114611b9457600080fd5b60008083601f840112611e0d57600080fd5b50813567ffffffffffffffff811115611e2557600080fd5b602083019150836020828501011115611bde57600080fd5b60008060008060008060008060008060006101208c8e031215611e5f57600080fd5b611e688c611b70565b9a50611e7760208d0135611dd8565b60208c0135995060408c013575ffffffffffffffffffffffffffffffffffffffffffff81168114611ea757600080fd5b9850611eb560608d01611de6565b9750611ec360808d01611de6565b9650611ed160a08d01611de6565b955060c08c0135945067ffffffffffffffff8060e08e01351115611ef457600080fd5b611f048e60e08f01358f01611dfb565b90955093506101008d0135811015611f1b57600080fd5b50611f2d8d6101008e01358e01611dfb565b81935080925050509295989b509295989b9093969950565b600080600060608486031215611f5a57600080fd5b611f6384611b70565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611fb057835183529284019291840191600101611f94565b50909695505050505050565b60008060408385031215611fcf57600080fd5b82359150611fdf60208401611b70565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600080600060a0868803121561202f57600080fd5b61203886611b70565b945061204660208701611b70565b93506040860135925060608601359150608086013567ffffffffffffffff8082111561207157600080fd5b818801915088601f83011261208557600080fd5b81358181111561209757612097611fe8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156120dd576120dd611fe8565b816040528281528b60208487010111156120f657600080fd5b8260208601602083013760006020848301015280955050505050509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b64ffffffffff8181168382160190808211156121975761219761214a565b5092915050565b600181811c908216806121b257607f821691505b6020821081036121eb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b75ffffffffffffffffffffffffffffffffffffffffffff8281168282168181028316929181158285048214176122295761222961214a565b50505092915050565b818103818111156117f5576117f561214a565b601f82111561189457600081815260208120601f850160051c8101602086101561226c5750805b601f850160051c820191505b8181101561228b57828155600101612278565b505050505050565b67ffffffffffffffff8311156122ab576122ab611fe8565b6122bf836122b9835461219e565b83612245565b6000601f84116001811461231157600085156122db5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556123a7565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156123605786850135825560209485019460019092019101612340565b508682101561239b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b64ffffffffff8281168282160390808211156121975761219761214a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123fd576123fd61214a565b5060010190565b60006020828403121561241657600080fd5b815161180c81611dd8565b60008251612433818460208701611c8b565b919091019291505056fea2646970667358221220e521315e24b1525862a16dac95d337c83afb94df5bdb4c33760109f408ca521564736f6c63430008140033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.