Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 1,673,713 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mint | 6416953 | 554 days ago | IN | 0 ETH | 0.00951479 | ||||
| Mint | 6414482 | 555 days ago | IN | 0 ETH | 0.00032135 | ||||
| Mint | 6412525 | 555 days ago | IN | 0 ETH | 0.00029677 | ||||
| Mint | 6412514 | 555 days ago | IN | 0 ETH | 0.00029697 | ||||
| Mint | 6403120 | 556 days ago | IN | 0 ETH | 0.00526284 | ||||
| Mint | 6400366 | 557 days ago | IN | 0 ETH | 0.00041019 | ||||
| Mint | 6399145 | 557 days ago | IN | 0 ETH | 0.0018535 | ||||
| Mint | 6397351 | 557 days ago | IN | 0 ETH | 0.00156671 | ||||
| Mint | 6393221 | 558 days ago | IN | 0 ETH | 0.0005495 | ||||
| Mint | 6388180 | 559 days ago | IN | 0 ETH | 0.0002991 | ||||
| Mint | 6388164 | 559 days ago | IN | 0 ETH | 0.00047704 | ||||
| Mint | 6385623 | 559 days ago | IN | 0 ETH | 0.00616749 | ||||
| Mint | 6377385 | 561 days ago | IN | 0 ETH | 0.0012918 | ||||
| Mint | 6374947 | 561 days ago | IN | 0 ETH | 0.00137848 | ||||
| Mint | 6374944 | 561 days ago | IN | 0 ETH | 0.00137664 | ||||
| Mint | 6374455 | 561 days ago | IN | 0 ETH | 0.00521865 | ||||
| Mint | 6369792 | 562 days ago | IN | 0 ETH | 0.00029544 | ||||
| Mint | 6369235 | 562 days ago | IN | 0 ETH | 0.00131587 | ||||
| Mint | 6369193 | 562 days ago | IN | 0 ETH | 0.00167566 | ||||
| Mint | 6368261 | 562 days ago | IN | 0 ETH | 0.00679836 | ||||
| Mint | 6368257 | 562 days ago | IN | 0 ETH | 0.00682144 | ||||
| Mint | 6368253 | 562 days ago | IN | 0 ETH | 0.00673837 | ||||
| Mint | 6368105 | 562 days ago | IN | 0 ETH | 0.00749506 | ||||
| Mint | 6367196 | 562 days ago | IN | 0 ETH | 0.00638661 | ||||
| Mint | 6366879 | 562 days ago | IN | 0 ETH | 0.00648112 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
To
|
Amount
|
|||
|---|---|---|---|---|---|---|---|---|
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6416953 | 554 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH | |||||
| Transfer* | 6414482 | 555 days ago | 0 ETH |
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
MockTokenFaucet
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
interface IERC20Detailed is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
interface IMintableERC20 is IERC20Detailed {
/**
* @dev Function to mint tokens
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(uint256 value) external returns (bool);
/**
* @dev Function to mint tokens to address
* @param account The account to mint tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address account, uint256 value) external returns (bool);
}
interface IMintERC721 {
function mint(uint256 _count, address _to) external;
function mint(uint256 _count) external;
function tokenOfOwnerByIndex(
address owner,
uint256 index
) external view returns (uint256 tokenId);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
}
contract MockTokenFaucet is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
struct Token {
address addr;
uint256 mintValue; // based on token decimals
}
mapping(address => Token) public tokenInfo;
EnumerableSet.AddressSet private _mockERC20Tokens;
EnumerableSet.AddressSet private _mockERC721Tokens;
constructor(Token[] memory erc20Tokens, Token[] memory erc721Tokens) {
for (uint256 index = 0; index < erc20Tokens.length; index++) {
Token memory t = erc20Tokens[index];
_mockERC20Tokens.add(t.addr);
tokenInfo[t.addr] = t;
}
for (uint256 index = 0; index < erc721Tokens.length; index++) {
Token memory t = erc721Tokens[index];
_mockERC721Tokens.add(t.addr);
tokenInfo[t.addr] = t;
}
}
function allMockERC20Tokens() public view returns (Token[] memory) {
uint256 len = _mockERC20Tokens.length();
Token[] memory tokens = new Token[](len);
for (uint256 index = 0; index < len; index++) {
tokens[index] = tokenInfo[_mockERC20Tokens.at(index)];
}
return tokens;
}
function allMockERC721Tokens() public view returns (Token[] memory) {
uint256 len = _mockERC721Tokens.length();
Token[] memory tokens = new Token[](len + 1);
for (uint256 index = 0; index < len; index++) {
tokens[index] = tokenInfo[_mockERC721Tokens.at(index)];
}
return tokens;
}
function addERC20(Token[] calldata _tokens) public onlyOwner {
for (uint256 index = 0; index < _tokens.length; index++) {
Token memory t = _tokens[index];
tokenInfo[t.addr] = t;
_mockERC20Tokens.add(t.addr);
}
}
function removeERC20(address[] memory _tokens) public onlyOwner {
for (uint256 index = 0; index < _tokens.length; index++) {
address addr = _tokens[index];
_mockERC20Tokens.remove(addr);
delete tokenInfo[addr];
}
}
function addERC721(Token[] calldata _tokens) public onlyOwner {
for (uint256 index = 0; index < _tokens.length; index++) {
Token memory t = _tokens[index];
tokenInfo[t.addr] = t;
_mockERC721Tokens.add(t.addr);
}
}
function removeERC721(address[] memory _tokens) public onlyOwner {
for (uint256 index = 0; index < _tokens.length; index++) {
address addr = _tokens[index];
_mockERC721Tokens.remove(addr);
delete tokenInfo[addr];
}
}
function mintERC20(address token, address to, uint256 mintValue) public {
IMintableERC20 mintToken = IMintableERC20(token);
uint256 decimals = mintToken.decimals();
Address.functionCall(
token,
abi.encodeWithSignature(
"mint(address,uint256)",
to,
mintValue * 10 ** decimals
)
);
}
function mintERC721(address token, address to, uint256 mintValue) public {
IMintERC721 mintToken = IMintERC721(token);
try mintToken.mint(mintValue, to) {
return;
} catch {}
try mintToken.mint(mintValue) {
for (uint256 index; index < mintValue; index++) {
uint256 id = mintToken.tokenOfOwnerByIndex(address(this), 0);
mintToken.safeTransferFrom(address(this), to, id);
}
return;
} catch {}
}
function mintERC20s(address to) internal {
for (uint256 index = 0; index < _mockERC20Tokens.length(); index++) {
Token memory token = tokenInfo[_mockERC20Tokens.at(index)];
mintERC20(token.addr, to, token.mintValue);
}
}
function mintERC721s(address to) internal {
for (uint256 index = 0; index < _mockERC721Tokens.length(); index++) {
Token memory token = tokenInfo[_mockERC721Tokens.at(index)];
mintERC721(token.addr, to, token.mintValue);
}
}
function mint(address to) public {
mintERC20s(to);
mintERC721s(to);
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) external virtual returns (bytes4) {
return this.onERC721Received.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @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 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [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://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.0/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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```solidity
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
* unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
* array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastValue;
// Update the index for the moved value
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract ABI
API[{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"internalType":"struct MockTokenFaucet.Token[]","name":"erc20Tokens","type":"tuple[]"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"internalType":"struct MockTokenFaucet.Token[]","name":"erc721Tokens","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"internalType":"struct MockTokenFaucet.Token[]","name":"_tokens","type":"tuple[]"}],"name":"addERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"internalType":"struct MockTokenFaucet.Token[]","name":"_tokens","type":"tuple[]"}],"name":"addERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allMockERC20Tokens","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"internalType":"struct MockTokenFaucet.Token[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allMockERC721Tokens","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"internalType":"struct MockTokenFaucet.Token[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"name":"mintERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"name":"mintERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"removeERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"removeERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenInfo","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"mintValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506040516200183b3803806200183b83398101604081905262000034916200035b565b6200003f336200015f565b60005b8251811015620000ca576000838281518110620000635762000063620003c5565b602002602001015190506200008781600001516002620001af60201b90919060201c565b5080516001600160a01b039081166000908152600160208181526040909220845181546001600160a01b0319169416939093178355920151908201550162000042565b5060005b815181101562000156576000828281518110620000ef57620000ef620003c5565b602002602001015190506200011381600001516004620001af60201b90919060201c565b5080516001600160a01b039081166000908152600160208181526040909220845181546001600160a01b03191694169390931783559201519082015501620000ce565b505050620003db565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000620001c6836001600160a01b038416620001cf565b90505b92915050565b60008181526001830160205260408120546200021857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001c9565b506000620001c9565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156200025c576200025c62000221565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200028d576200028d62000221565b604052919050565b600082601f830112620002a757600080fd5b815160206001600160401b03821115620002c557620002c562000221565b620002d5818360051b0162000262565b82815260069290921b84018101918181019086841115620002f557600080fd5b8286015b84811015620003505760408189031215620003145760008081fd5b6200031e62000237565b81516001600160a01b0381168114620003375760008081fd5b81528185015185820152835291830191604001620002f9565b509695505050505050565b600080604083850312156200036f57600080fd5b82516001600160401b03808211156200038757600080fd5b620003958683870162000295565b93506020850151915080821115620003ac57600080fd5b50620003bb8582860162000295565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b61145080620003eb6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806371209f7e1161008c578063c83413ad11610066578063c83413ad146101c1578063d438c6d1146101d4578063f2fde38b146101e7578063f5dab711146101fa57600080fd5b806371209f7e14610196578063715018a61461019e5780638da5cb5b146101a657600080fd5b8063358ae4ad116100c8578063358ae4ad1461014857806347c07e881461015b578063677d586b1461016e5780636a6278421461018357600080fd5b806302df5433146100ef5780630cae1d9114610104578063150b7a0214610117575b600080fd5b6101026100fd366004610ec6565b61024c565b005b610102610112366004610f02565b61040b565b61012a610125366004610fbe565b6104a2565b6040516001600160e01b031990911681526020015b60405180910390f35b610102610156366004610f02565b6104b3565b610102610169366004610ec6565b610545565b61017661061f565b60405161013f919061107e565b6101026101913660046110d6565b61071c565b610176610731565b61010261081d565b6000546040516001600160a01b03909116815260200161013f565b6101026101cf3660046110f1565b610831565b6101026101e23660046110f1565b6108af565b6101026101f53660046110d6565b610929565b61022d6102083660046110d6565b600160208190526000918252604090912080549101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161013f565b6040516394bf804d60e01b8152600481018290526001600160a01b0383811660248301528491908216906394bf804d90604401600060405180830381600087803b15801561029957600080fd5b505af19250505080156102aa575060015b156102b6575b50505050565b60405163140e25ad60e31b8152600481018390526001600160a01b0382169063a0712d6890602401600060405180830381600087803b1580156102f857600080fd5b505af1925050508015610309575060015b156102b05760005b8281101561040457604051632f745c5960e01b8152306004820152600060248201819052906001600160a01b03841690632f745c5990604401602060405180830381865afa158015610367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038b919061119e565b604051632142170760e11b81523060048201526001600160a01b03878116602483015260448201839052919250908416906342842e0e90606401600060405180830381600087803b1580156103df57600080fd5b505af11580156103f3573d6000803e3d6000fd5b505060019093019250610311915050565b5050505050565b6104136109a4565b60005b8181101561049d576000838383818110610432576104326111b7565b90506040020180360381019061044891906111cd565b80516001600160a01b039081166000908152600160208181526040909220845181546001600160a01b03191694811694909417815591840151910155909150610493906004906109fe565b5050600101610416565b505050565b630a85bd0160e11b5b949350505050565b6104bb6109a4565b60005b8181101561049d5760008383838181106104da576104da6111b7565b9050604002018036038101906104f091906111cd565b80516001600160a01b039081166000908152600160208181526040909220845181546001600160a01b0319169481169490941781559184015191015590915061053b906002906109fe565b50506001016104be565b60008390506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ae9190611224565b60ff16905061061785856105c384600a611348565b6105cd9087611354565b6040516001600160a01b039092166024830152604482015260640160408051601f198184030181529190526020810180516001600160e01b03166340c10f1960e01b179052610a1c565b505050505050565b6060600061062d6004610a60565b9050600061063c82600161136b565b67ffffffffffffffff81111561065457610654610f77565b60405190808252806020026020018201604052801561069957816020015b60408051808201909152600080825260208201528152602001906001900390816106725790505b50905060005b8281101561071557600160006106b6600484610a6a565b6001600160a01b039081168252602080830193909352604091820160002082518084019093528054909116825260010154918101919091528251839083908110610702576107026111b7565b602090810291909101015260010161069f565b5092915050565b61072581610a76565b61072e81610aeb565b50565b6060600061073f6002610a60565b905060008167ffffffffffffffff81111561075c5761075c610f77565b6040519080825280602002602001820160405280156107a157816020015b604080518082019091526000808252602082015281526020019060019003908161077a5790505b50905060005b8281101561071557600160006107be600284610a6a565b6001600160a01b03908116825260208083019390935260409182016000208251808401909352805490911682526001015491810191909152825183908390811061080a5761080a6111b7565b60209081029190910101526001016107a7565b6108256109a4565b61082f6000610b60565b565b6108396109a4565b60005b81518110156108ab576000828281518110610859576108596111b7565b60200260200101519050610877816004610bb090919063ffffffff16565b506001600160a01b03166000908152600160208190526040822080546001600160a01b03191681558101919091550161083c565b5050565b6108b76109a4565b60005b81518110156108ab5760008282815181106108d7576108d76111b7565b602002602001015190506108f5816002610bb090919063ffffffff16565b506001600160a01b03166000908152600160208190526040822080546001600160a01b0319168155810191909155016108ba565b6109316109a4565b6001600160a01b03811661099b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61072e81610b60565b6000546001600160a01b0316331461082f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610992565b6000610a13836001600160a01b038416610bc5565b90505b92915050565b6060610a13838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250610c14565b6000610a16825490565b6000610a138383610cef565b60005b610a836002610a60565b8110156108ab576000600181610a9a600285610a6a565b6001600160a01b039081168252602080830193909352604091820160002082518084019093528054909116808352600190910154928201839052909250610ae2918590610545565b50600101610a79565b60005b610af86004610a60565b8110156108ab576000600181610b0f600485610a6a565b6001600160a01b039081168252602080830193909352604091820160002082518084019093528054909116808352600190910154928201839052909250610b5791859061024c565b50600101610aee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610a13836001600160a01b038416610d19565b6000818152600183016020526040812054610c0c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a16565b506000610a16565b606082471015610c755760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610992565b600080866001600160a01b03168587604051610c9191906113a2565b60006040518083038185875af1925050503d8060008114610cce576040519150601f19603f3d011682016040523d82523d6000602084013e610cd3565b606091505b5091509150610ce487838387610e0c565b979650505050505050565b6000826000018281548110610d0657610d066111b7565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610e02576000610d3d6001836113be565b8554909150600090610d51906001906113be565b9050818114610db6576000866000018281548110610d7157610d716111b7565b9060005260206000200154905080876000018481548110610d9457610d946111b7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dc757610dc76113d1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a16565b6000915050610a16565b60608315610e7b578251600003610e74576001600160a01b0385163b610e745760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610992565b50816104ab565b6104ab8383815115610e905781518083602001fd5b8060405162461bcd60e51b815260040161099291906113e7565b80356001600160a01b0381168114610ec157600080fd5b919050565b600080600060608486031215610edb57600080fd5b610ee484610eaa565b9250610ef260208501610eaa565b9150604084013590509250925092565b60008060208385031215610f1557600080fd5b823567ffffffffffffffff80821115610f2d57600080fd5b818501915085601f830112610f4157600080fd5b813581811115610f5057600080fd5b8660208260061b8501011115610f6557600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610fb657610fb6610f77565b604052919050565b60008060008060808587031215610fd457600080fd5b610fdd85610eaa565b93506020610fec818701610eaa565b935060408601359250606086013567ffffffffffffffff8082111561101057600080fd5b818801915088601f83011261102457600080fd5b81358181111561103657611036610f77565b611048601f8201601f19168501610f8d565b9150808252898482850101111561105e57600080fd5b808484018584013760008482840101525080935050505092959194509250565b602080825282518282018190526000919060409081850190868401855b828110156110c957815180516001600160a01b0316855286015186850152928401929085019060010161109b565b5091979650505050505050565b6000602082840312156110e857600080fd5b610a1382610eaa565b6000602080838503121561110457600080fd5b823567ffffffffffffffff8082111561111c57600080fd5b818501915085601f83011261113057600080fd5b81358181111561114257611142610f77565b8060051b9150611153848301610f8d565b818152918301840191848101908884111561116d57600080fd5b938501935b838510156111925761118385610eaa565b82529385019390850190611172565b98975050505050505050565b6000602082840312156111b057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000604082840312156111df57600080fd5b6040516040810181811067ffffffffffffffff8211171561120257611202610f77565b60405261120e83610eaa565b8152602083013560208201528091505092915050565b60006020828403121561123657600080fd5b815160ff8116811461124757600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561129f5781600019048211156112855761128561124e565b8085161561129257918102915b93841c9390800290611269565b509250929050565b6000826112b657506001610a16565b816112c357506000610a16565b81600181146112d957600281146112e3576112ff565b6001915050610a16565b60ff8411156112f4576112f461124e565b50506001821b610a16565b5060208310610133831016604e8410600b8410161715611322575081810a610a16565b61132c8383611264565b80600019048211156113405761134061124e565b029392505050565b6000610a1383836112a7565b8082028115828204841417610a1657610a1661124e565b80820180821115610a1657610a1661124e565b60005b83811015611399578181015183820152602001611381565b50506000910152565b600082516113b481846020870161137e565b9190910192915050565b81810381811115610a1657610a1661124e565b634e487b7160e01b600052603160045260246000fd5b602081526000825180602084015261140681604085016020870161137e565b601f01601f1916919091016040019291505056fea2646970667358221220d0513d8b1433ee35bde7df8389dd2606351a703ce729ab616decbb70072e2a4a64736f6c634300081600330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806371209f7e1161008c578063c83413ad11610066578063c83413ad146101c1578063d438c6d1146101d4578063f2fde38b146101e7578063f5dab711146101fa57600080fd5b806371209f7e14610196578063715018a61461019e5780638da5cb5b146101a657600080fd5b8063358ae4ad116100c8578063358ae4ad1461014857806347c07e881461015b578063677d586b1461016e5780636a6278421461018357600080fd5b806302df5433146100ef5780630cae1d9114610104578063150b7a0214610117575b600080fd5b6101026100fd366004610ec6565b61024c565b005b610102610112366004610f02565b61040b565b61012a610125366004610fbe565b6104a2565b6040516001600160e01b031990911681526020015b60405180910390f35b610102610156366004610f02565b6104b3565b610102610169366004610ec6565b610545565b61017661061f565b60405161013f919061107e565b6101026101913660046110d6565b61071c565b610176610731565b61010261081d565b6000546040516001600160a01b03909116815260200161013f565b6101026101cf3660046110f1565b610831565b6101026101e23660046110f1565b6108af565b6101026101f53660046110d6565b610929565b61022d6102083660046110d6565b600160208190526000918252604090912080549101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161013f565b6040516394bf804d60e01b8152600481018290526001600160a01b0383811660248301528491908216906394bf804d90604401600060405180830381600087803b15801561029957600080fd5b505af19250505080156102aa575060015b156102b6575b50505050565b60405163140e25ad60e31b8152600481018390526001600160a01b0382169063a0712d6890602401600060405180830381600087803b1580156102f857600080fd5b505af1925050508015610309575060015b156102b05760005b8281101561040457604051632f745c5960e01b8152306004820152600060248201819052906001600160a01b03841690632f745c5990604401602060405180830381865afa158015610367573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038b919061119e565b604051632142170760e11b81523060048201526001600160a01b03878116602483015260448201839052919250908416906342842e0e90606401600060405180830381600087803b1580156103df57600080fd5b505af11580156103f3573d6000803e3d6000fd5b505060019093019250610311915050565b5050505050565b6104136109a4565b60005b8181101561049d576000838383818110610432576104326111b7565b90506040020180360381019061044891906111cd565b80516001600160a01b039081166000908152600160208181526040909220845181546001600160a01b03191694811694909417815591840151910155909150610493906004906109fe565b5050600101610416565b505050565b630a85bd0160e11b5b949350505050565b6104bb6109a4565b60005b8181101561049d5760008383838181106104da576104da6111b7565b9050604002018036038101906104f091906111cd565b80516001600160a01b039081166000908152600160208181526040909220845181546001600160a01b0319169481169490941781559184015191015590915061053b906002906109fe565b50506001016104be565b60008390506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561058a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ae9190611224565b60ff16905061061785856105c384600a611348565b6105cd9087611354565b6040516001600160a01b039092166024830152604482015260640160408051601f198184030181529190526020810180516001600160e01b03166340c10f1960e01b179052610a1c565b505050505050565b6060600061062d6004610a60565b9050600061063c82600161136b565b67ffffffffffffffff81111561065457610654610f77565b60405190808252806020026020018201604052801561069957816020015b60408051808201909152600080825260208201528152602001906001900390816106725790505b50905060005b8281101561071557600160006106b6600484610a6a565b6001600160a01b039081168252602080830193909352604091820160002082518084019093528054909116825260010154918101919091528251839083908110610702576107026111b7565b602090810291909101015260010161069f565b5092915050565b61072581610a76565b61072e81610aeb565b50565b6060600061073f6002610a60565b905060008167ffffffffffffffff81111561075c5761075c610f77565b6040519080825280602002602001820160405280156107a157816020015b604080518082019091526000808252602082015281526020019060019003908161077a5790505b50905060005b8281101561071557600160006107be600284610a6a565b6001600160a01b03908116825260208083019390935260409182016000208251808401909352805490911682526001015491810191909152825183908390811061080a5761080a6111b7565b60209081029190910101526001016107a7565b6108256109a4565b61082f6000610b60565b565b6108396109a4565b60005b81518110156108ab576000828281518110610859576108596111b7565b60200260200101519050610877816004610bb090919063ffffffff16565b506001600160a01b03166000908152600160208190526040822080546001600160a01b03191681558101919091550161083c565b5050565b6108b76109a4565b60005b81518110156108ab5760008282815181106108d7576108d76111b7565b602002602001015190506108f5816002610bb090919063ffffffff16565b506001600160a01b03166000908152600160208190526040822080546001600160a01b0319168155810191909155016108ba565b6109316109a4565b6001600160a01b03811661099b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61072e81610b60565b6000546001600160a01b0316331461082f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610992565b6000610a13836001600160a01b038416610bc5565b90505b92915050565b6060610a13838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c65640000815250610c14565b6000610a16825490565b6000610a138383610cef565b60005b610a836002610a60565b8110156108ab576000600181610a9a600285610a6a565b6001600160a01b039081168252602080830193909352604091820160002082518084019093528054909116808352600190910154928201839052909250610ae2918590610545565b50600101610a79565b60005b610af86004610a60565b8110156108ab576000600181610b0f600485610a6a565b6001600160a01b039081168252602080830193909352604091820160002082518084019093528054909116808352600190910154928201839052909250610b5791859061024c565b50600101610aee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610a13836001600160a01b038416610d19565b6000818152600183016020526040812054610c0c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a16565b506000610a16565b606082471015610c755760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610992565b600080866001600160a01b03168587604051610c9191906113a2565b60006040518083038185875af1925050503d8060008114610cce576040519150601f19603f3d011682016040523d82523d6000602084013e610cd3565b606091505b5091509150610ce487838387610e0c565b979650505050505050565b6000826000018281548110610d0657610d066111b7565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610e02576000610d3d6001836113be565b8554909150600090610d51906001906113be565b9050818114610db6576000866000018281548110610d7157610d716111b7565b9060005260206000200154905080876000018481548110610d9457610d946111b7565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dc757610dc76113d1565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a16565b6000915050610a16565b60608315610e7b578251600003610e74576001600160a01b0385163b610e745760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610992565b50816104ab565b6104ab8383815115610e905781518083602001fd5b8060405162461bcd60e51b815260040161099291906113e7565b80356001600160a01b0381168114610ec157600080fd5b919050565b600080600060608486031215610edb57600080fd5b610ee484610eaa565b9250610ef260208501610eaa565b9150604084013590509250925092565b60008060208385031215610f1557600080fd5b823567ffffffffffffffff80821115610f2d57600080fd5b818501915085601f830112610f4157600080fd5b813581811115610f5057600080fd5b8660208260061b8501011115610f6557600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610fb657610fb6610f77565b604052919050565b60008060008060808587031215610fd457600080fd5b610fdd85610eaa565b93506020610fec818701610eaa565b935060408601359250606086013567ffffffffffffffff8082111561101057600080fd5b818801915088601f83011261102457600080fd5b81358181111561103657611036610f77565b611048601f8201601f19168501610f8d565b9150808252898482850101111561105e57600080fd5b808484018584013760008482840101525080935050505092959194509250565b602080825282518282018190526000919060409081850190868401855b828110156110c957815180516001600160a01b0316855286015186850152928401929085019060010161109b565b5091979650505050505050565b6000602082840312156110e857600080fd5b610a1382610eaa565b6000602080838503121561110457600080fd5b823567ffffffffffffffff8082111561111c57600080fd5b818501915085601f83011261113057600080fd5b81358181111561114257611142610f77565b8060051b9150611153848301610f8d565b818152918301840191848101908884111561116d57600080fd5b938501935b838510156111925761118385610eaa565b82529385019390850190611172565b98975050505050505050565b6000602082840312156111b057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000604082840312156111df57600080fd5b6040516040810181811067ffffffffffffffff8211171561120257611202610f77565b60405261120e83610eaa565b8152602083013560208201528091505092915050565b60006020828403121561123657600080fd5b815160ff8116811461124757600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561129f5781600019048211156112855761128561124e565b8085161561129257918102915b93841c9390800290611269565b509250929050565b6000826112b657506001610a16565b816112c357506000610a16565b81600181146112d957600281146112e3576112ff565b6001915050610a16565b60ff8411156112f4576112f461124e565b50506001821b610a16565b5060208310610133831016604e8410600b8410161715611322575081810a610a16565b61132c8383611264565b80600019048211156113405761134061124e565b029392505050565b6000610a1383836112a7565b8082028115828204841417610a1657610a1661124e565b80820180821115610a1657610a1661124e565b60005b83811015611399578181015183820152602001611381565b50506000910152565b600082516113b481846020870161137e565b9190910192915050565b81810381811115610a1657610a1661124e565b634e487b7160e01b600052603160045260246000fd5b602081526000825180602084015261140681604085016020870161137e565b601f01601f1916919091016040019291505056fea2646970667358221220d0513d8b1433ee35bde7df8389dd2606351a703ce729ab616decbb70072e2a4a64736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : erc20Tokens (tuple[]):
Arg [1] : erc721Tokens (tuple[]):
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
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.