Mumbai Testnet

Contract

0x494024993160e15F3bf2BE8C26cbcD02bc10baA1
Transaction Hash
Method
Block
From
To
Value
Create Wallet481358892024-04-11 19:14:2365 days ago1712862863IN
0x49402499...2bc10baA1
0 MATIC0.0056076815.52000001
Create Wallet481286882024-04-11 14:41:1165 days ago1712846471IN
0x49402499...2bc10baA1
0 MATIC0.007250620.06700001
Create Wallet481279682024-04-11 14:14:3765 days ago1712844877IN
0x49402499...2bc10baA1
0 MATIC0.00151984.20638787
Create Wallet481258572024-04-11 12:59:2465 days ago1712840364IN
0x49402499...2bc10baA1
0 MATIC0.0051914.36401741
Create Wallet481242342024-04-11 12:01:1465 days ago1712836874IN
0x49402499...2bc10baA1
0 MATIC0.010839630.00000001
Create Wallet481238932024-04-11 11:49:0865 days ago1712836148IN
0x49402499...2bc10baA1
0 MATIC0.00180665
Create Wallet481227242024-04-11 11:07:3965 days ago1712833659IN
0x49402499...2bc10baA1
0 MATIC0.0101734928.15646644
Create Wallet481226032024-04-11 11:03:2165 days ago1712833401IN
0x49402499...2bc10baA1
0 MATIC0.0048656513.46632348
Create Wallet481220502024-04-11 10:43:4165 days ago1712832221IN
0x49402499...2bc10baA1
0 MATIC0.00197865.476038
Create Wallet480977652024-04-10 20:04:1565 days ago1712779455IN
0x49402499...2bc10baA1
0 MATIC0.001806185
Create Wallet480790292024-04-10 8:51:3866 days ago1712739098IN
0x49402499...2bc10baA1
0 MATIC0.000630861.74600001
Create Wallet480416092024-04-09 10:02:2167 days ago1712656941IN
0x49402499...2bc10baA1
0 MATIC0.00180665
Create Wallet480407532024-04-09 9:31:5967 days ago1712655119IN
0x49402499...2bc10baA1
0 MATIC0.001750144.84375322
Create Wallet480389512024-04-09 8:27:4767 days ago1712651267IN
0x49402499...2bc10baA1
0 MATIC0.00090292.49891603
Create Wallet480389032024-04-09 8:26:0567 days ago1712651165IN
0x49402499...2bc10baA1
0 MATIC0.000930832.57620209
Create Wallet480062022024-04-08 12:22:0568 days ago1712578925IN
0x49402499...2bc10baA1
0 MATIC0.007226420.00000001
Create Wallet478903852024-04-05 10:03:3171 days ago1712311411IN
0x49402499...2bc10baA1
0 MATIC0.0115658532.01000001
Create Wallet478185002024-04-03 14:35:5973 days ago1712154959IN
0x49402499...2bc10baA1
0 MATIC0.0081591822.58160001
Create Wallet478105442024-04-03 9:41:1773 days ago1712137277IN
0x49402499...2bc10baA1
0 MATIC0.0059402816.44050519
Create Wallet478104482024-04-03 9:37:5373 days ago1712137073IN
0x49402499...2bc10baA1
0 MATIC0.0059400816.44050519
Create Wallet478034142024-04-03 5:21:5573 days ago1712121715IN
0x49402499...2bc10baA1
0 MATIC0.00090332.50000001
Create Wallet478031682024-04-03 5:13:1373 days ago1712121193IN
0x49402499...2bc10baA1
0 MATIC0.001942015.37477125
Create Wallet478025362024-04-03 4:50:4973 days ago1712119849IN
0x49402499...2bc10baA1
0 MATIC0.002420336.69857751
Create Wallet478021602024-04-03 4:37:3173 days ago1712119051IN
0x49402499...2bc10baA1
0 MATIC0.002167926
Create Wallet478018802024-04-03 4:27:3573 days ago1712118455IN
0x49402499...2bc10baA1
0 MATIC0.001349743.73560001
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To Value
481358892024-04-11 19:14:2365 days ago1712862863
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481286882024-04-11 14:41:1165 days ago1712846471
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481279682024-04-11 14:14:3765 days ago1712844877
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481258572024-04-11 12:59:2465 days ago1712840364
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481242342024-04-11 12:01:1465 days ago1712836874
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481238932024-04-11 11:49:0865 days ago1712836148
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481227242024-04-11 11:07:3965 days ago1712833659
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481226032024-04-11 11:03:2165 days ago1712833401
0x49402499...2bc10baA1
 Contract Creation0 MATIC
481220502024-04-11 10:43:4165 days ago1712832221
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480977652024-04-10 20:04:1565 days ago1712779455
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480790292024-04-10 8:51:3866 days ago1712739098
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480416092024-04-09 10:02:2167 days ago1712656941
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480407532024-04-09 9:31:5967 days ago1712655119
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480389512024-04-09 8:27:4767 days ago1712651267
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480389032024-04-09 8:26:0567 days ago1712651165
0x49402499...2bc10baA1
 Contract Creation0 MATIC
480062022024-04-08 12:22:0568 days ago1712578925
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478903852024-04-05 10:03:3171 days ago1712311411
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478185002024-04-03 14:35:5973 days ago1712154959
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478105442024-04-03 9:41:1773 days ago1712137277
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478104482024-04-03 9:37:5373 days ago1712137073
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478034142024-04-03 5:21:5573 days ago1712121715
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478031682024-04-03 5:13:1373 days ago1712121193
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478025362024-04-03 4:50:4973 days ago1712119849
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478021602024-04-03 4:37:3173 days ago1712119051
0x49402499...2bc10baA1
 Contract Creation0 MATIC
478018802024-04-03 4:27:3573 days ago1712118455
0x49402499...2bc10baA1
 Contract Creation0 MATIC
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WalletFactory

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 99999999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : walletFactory.sol
// SPDX-License-Identifier:GPL-3.0-only
pragma solidity 0.8.4;

import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import { Address } from "@openzeppelin/contracts/utils/Address.sol";

import { WalletProxy } from "./external/walletproxy.sol";
import { Create2 } from "./external/create2.sol";

contract WalletFactory is AccessControlEnumerable {
	using Address for address;

	event CreateWallet(address indexed wallet, string indexed name);
	event NewWalletImplementation(address indexed newWalletImplementation);
	event FreeCreationChanged(bool indexed enabled);

	address public walletImplementation;
	bool public freeCreationEnabled;
	string public constant WALLET_CREATION = "WALLET_CREATION";
	bytes32 public constant ROLE_WALLET_CREATOR =
		keccak256("ROLE_WALLET_CREATOR");

	struct CreateRecord {
		address wallet;
		string name;
	}

	CreateRecord[] public created;

	constructor() {
		_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
	}

	function createWallet(string calldata walletName, bytes calldata data)
		external
		returns (address wallet)
	{
		if (!freeCreationEnabled) {
			_checkRole(ROLE_WALLET_CREATOR, msg.sender);
		}
		require(
			walletImplementation != address(0),
			"WalletFactory: missing wallet implementation"
		);

		wallet = _deploy(walletName);
		wallet.functionCall(data);

		created.push(CreateRecord(wallet, walletName));
		emit CreateWallet(wallet, walletName);
	}

	function setWalletImplementation(address newWalletImplementation)
		external
		onlyRole(DEFAULT_ADMIN_ROLE)
	{
		require(
			newWalletImplementation != address(0),
			"WalletFactory: Invalid wallet implementation"
		);
		walletImplementation = newWalletImplementation;
		emit NewWalletImplementation(newWalletImplementation);
	}

	function setFreeCreation(bool enabled) public onlyRole(DEFAULT_ADMIN_ROLE) {
		freeCreationEnabled = enabled;
		emit FreeCreationChanged(enabled);
	}

	function computeWalletAddress(string memory walletName)
		public
		view
		returns (address)
	{
		return
			Create2.computeAddress(
				keccak256(abi.encodePacked(WALLET_CREATION, walletName)),
				_getWalletCode()
			);
	}

	function getCreated() public view returns (CreateRecord[] memory) {
		return created;
	}

	function getCreatedLength() public view returns (uint256) {
		return created.length;
	}

	// --- Internal functions ---

	function _deploy(string calldata walletName)
		internal
		returns (address payable wallet)
	{
		// Deploy the wallet proxy
		wallet = Create2.deploy(
			keccak256(abi.encodePacked(WALLET_CREATION, walletName)),
			_getWalletCode()
		);
		WalletProxy(wallet).initializeFromWalletFactory(walletImplementation);
	}

	function _getWalletCode() internal pure returns (bytes memory) {
		return type(WalletProxy).creationCode;
	}
}

File 2 of 13 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

File 2 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 2 of 13 : walletproxy.sol
// SPDX-License-Identifier: LBUSL-1.1-or-later
// Taken from: https://github.com/gnosis/safe-contracts/blob/development/contracts/proxies/GnosisSafeProxy.sol
pragma solidity >=0.7.0;

/// @title IWalletProxyImplementation - Helper interface to access masterCopy of the Proxy on-chain
/// @author Richard Meissner - <[email protected]>
interface IWalletProxyImplementation {
	function masterCopy() external view returns (address);

	function walletFactory() external view returns (address);

	function version() external view returns (uint256);

	function upgradeMasterCopy(address newMasterCopy) external;

	function initialize(
		address resolver_,
		string[2] calldata domain_,
		address owner_,
		address feeRecipient,
		uint256 feeAmount
	) external;
}

/// @title WalletProxy - Generic proxy contract allows to execute all transactions applying the code of a master contract.
/// @author Stefan George - <[email protected]>
/// @author Richard Meissner - <[email protected]>
contract WalletProxy {
	// masterCopy and walletFactory always need to be the first declared variables, to ensure that they are at the same location in the contracts to which calls are delegated.
	// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
	address internal masterCopy;
	address internal walletFactory;

	/// @dev Constructor function sets the address of walletFactory contract
	constructor() {
		walletFactory = msg.sender;
	}

	/// @param _masterCopy Master copy address.
	function initializeFromWalletFactory(address _masterCopy) external {
		require(msg.sender == walletFactory, "WalletProxy: Forbidden");
		require(
			_masterCopy != address(0),
			"Invalid master copy address provided"
		);
		masterCopy = _masterCopy;
	}

	/// @dev Fallback function forwards all transactions and returns all received return data.
	fallback() external payable {
		assembly {
			let _masterCopy := and(
				sload(0),
				0xffffffffffffffffffffffffffffffffffffffff
			)
			// 0xa619486e == keccak("masterCopy()"). The value is right padded to 32-bytes with 0s
			if eq(
				calldataload(0),
				0xa619486e00000000000000000000000000000000000000000000000000000000
			) {
				mstore(0, _masterCopy)
				return(0, 0x20)
			}
			calldatacopy(0, 0, calldatasize())
			let success := delegatecall(
				gas(),
				_masterCopy,
				0,
				calldatasize(),
				0,
				0
			)
			returndatacopy(0, 0, returndatasize())
			if eq(success, 0) {
				revert(0, returndatasize())
			}
			return(0, returndatasize())
		}
	}
}

File 2 of 13 : create2.sol
// SPDX-License-Identifier: UNLICENSED
// Taken from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/970f687f04d20e01138a3e8ccf9278b1d4b3997b/contracts/utils/Create2.sol

pragma solidity >=0.7.0;

/**
 * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
 * `CREATE2` can be used to compute in advance the address where a smart
 * contract will be deployed, which allows for interesting new mechanisms known
 * as 'counterfactual interactions'.
 *
 * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
 * information.
 */

library Create2 {
	/**
	 * @dev Deploys a contract using `CREATE2`. The address where the contract
	 * will be deployed can be known in advance via {computeAddress}. Note that
	 * a contract cannot be deployed twice using the same salt.
	 */
	function deploy(bytes32 salt, bytes memory bytecode)
		internal
		returns (address payable)
	{
		address payable addr;
		// solhint-disable-next-line no-inline-assembly
		assembly {
			addr := create2(0, add(bytecode, 0x20), mload(bytecode), salt)
		}
		require(addr != address(0), "CREATE2_FAILED");
		return addr;
	}

	/**
	 * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the `bytecode`
	 * or `salt` will result in a new destination address.
	 */
	function computeAddress(bytes32 salt, bytes memory bytecode)
		internal
		view
		returns (address)
	{
		return computeAddress(salt, bytecode, address(this));
	}

	/**
	 * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
	 * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
	 */
	function computeAddress(
		bytes32 salt,
		bytes memory bytecodeHash,
		address deployer
	) internal pure returns (address) {
		bytes32 bytecodeHashHash = keccak256(bytecodeHash);
		bytes32 _data = keccak256(
			abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHashHash)
		);
		return address(bytes20(_data << 96));
	}
}

File 2 of 13 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 2 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 2 of 13 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

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.
 *
 * ```
 * 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.
 */
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) {
        return _values(set._inner);
    }

    // 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;

        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 on 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;

        assembly {
            result := store
        }

        return result;
    }
}

File 2 of 13 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 2 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}

File 2 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 2 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 2 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @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);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 99999999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":true,"internalType":"string","name":"name","type":"string"}],"name":"CreateWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"enabled","type":"bool"}],"name":"FreeCreationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newWalletImplementation","type":"address"}],"name":"NewWalletImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_WALLET_CREATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WALLET_CREATION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"walletName","type":"string"}],"name":"computeWalletAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"walletName","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"createWallet","outputs":[{"internalType":"address","name":"wallet","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"created","outputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeCreationEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCreated","outputs":[{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct WalletFactory.CreateRecord[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCreatedLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setFreeCreation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWalletImplementation","type":"address"}],"name":"setWalletImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"walletImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506200001f60003362000025565b6200018a565b62000031828262000035565b5050565b6200004c82826200007860201b62000bfb1760201c565b60008281526001602090815260409091206200007391839062000ceb62000118821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000031576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000d43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200012f836001600160a01b03841662000138565b90505b92915050565b6000818152600183016020526040812054620001815750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000132565b50600062000132565b612323806200019a6000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c80639010d07c116100cd578063ca15c87311610081578063d547741f11610066578063d547741f1461039b578063e0e93e64146103ae578063f2576c16146103d357600080fd5b8063ca15c87314610375578063cf8920e21461038857600080fd5b806391d14854116100b257806391d148541461030257806396eb8f2b14610346578063a217fddf1461036d57600080fd5b80639010d07c146102a657806390610b0e146102b957600080fd5b8063556b88f4116101245780638117abc1116101095780638117abc11461025057806382cb6b72146102705780638ecf0d0b1461029157600080fd5b8063556b88f41461020557806376b134eb1461023d57600080fd5b80632f2ff15d116101555780632f2ff15d146101ca57806336568abe146101df578063539fcf41146101f257600080fd5b806301ffc9a714610171578063248a9ca314610199575b600080fd5b61018461017f366004611b09565b6103db565b60405190151581526020015b60405180910390f35b6101bc6101a7366004611aa5565b60009081526020819052604090206001015490565b604051908152602001610190565b6101dd6101d8366004611abd565b610437565b005b6101dd6101ed366004611abd565b610462565b6101dd610200366004611a85565b61051a565b610218610213366004611bb2565b61059c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610190565b61021861024b366004611b49565b61060c565b6002546102189073ffffffffffffffffffffffffffffffffffffffff1681565b61028361027e366004611aa5565b61089e565b604051610190929190611dc5565b61029961096d565b6040516101909190611df4565b6102186102b4366004611ae8565b610a80565b6102f56040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e000000000000000000000000000000000081525081565b6040516101909190611e9b565b610184610310366004611abd565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101bc7fae9b63ab4b462b07680cb8b996bddf99415495c0085a2e2cc9077cb59cc8a42b81565b6101bc600081565b6101bc610383366004611aa5565b610a9f565b6101dd610396366004611a6b565b610ab6565b6101dd6103a9366004611abd565b610bd5565b6002546101849074010000000000000000000000000000000000000000900460ff1681565b6003546101bc565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610431575061043182610d0d565b92915050565b6000828152602081905260409020600101546104538133610da4565b61045d8383610e74565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461050c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105168282610e96565b5050565b60006105268133610da4565b600280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000841515908102919091179091556040517f35ac19551a52b8f4900b06449534a47b8155d2c807e790887610c7412dd3991c90600090a25050565b60006104316040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e0000000000000000000000000000000000815250836040516020016105e9929190611d15565b60405160208183030381529060405280519060200120610607610eb8565b610f00565b60025460009074010000000000000000000000000000000000000000900460ff1661065b5761065b7fae9b63ab4b462b07680cb8b996bddf99415495c0085a2e2cc9077cb59cc8a42b33610da4565b60025473ffffffffffffffffffffffffffffffffffffffff16610700576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f57616c6c6574466163746f72793a206d697373696e672077616c6c657420696d60448201527f706c656d656e746174696f6e00000000000000000000000000000000000000006064820152608401610503565b61070a8585610fa1565b905061076383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505073ffffffffffffffffffffffffffffffffffffffff8516929150506110a0565b50600360405180604001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050835460018082018655948252602091829020845160029092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911781558382015180519495919461083b9450918501920190611955565b505050848460405161084e929190611ce0565b6040519081900381209073ffffffffffffffffffffffffffffffffffffffff8316907ff13604b1f23976d03c5d21690239f9943ed156b0a06f2c8da954e1545bad517590600090a3949350505050565b600381815481106108ae57600080fd5b60009182526020909120600290910201805460018201805473ffffffffffffffffffffffffffffffffffffffff9092169350906108ea90611f7f565b80601f016020809104026020016040519081016040528092919081815260200182805461091690611f7f565b80156109635780601f1061093857610100808354040283529160200191610963565b820191906000526020600020905b81548152906001019060200180831161094657829003601f168201915b5050505050905082565b60606003805480602002602001604051908101604052809291908181526020016000905b82821015610a775760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff16825260018101805492939192918401916109e690611f7f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1290611f7f565b8015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b50505050508152505081526020019060010190610991565b50505050905090565b6000828152600160205260408120610a9890836110e2565b9392505050565b6000818152600160205260408120610431906110ee565b6000610ac28133610da4565b73ffffffffffffffffffffffffffffffffffffffff8216610b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f57616c6c6574466163746f72793a20496e76616c69642077616c6c657420696d60448201527f706c656d656e746174696f6e00000000000000000000000000000000000000006064820152608401610503565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040517f7ec2b55977d50d4d272b55752e3eab04b06ef8688a9652e447b641d2821e6d0790600090a25050565b600082815260208190526040902060010154610bf18133610da4565b61045d8383610e96565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166105165760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610c8d3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610a988373ffffffffffffffffffffffffffffffffffffffff84166110f8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061043157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610431565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661051657610dfa8173ffffffffffffffffffffffffffffffffffffffff166014611147565b610e05836020611147565b604051602001610e16929190611d44565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261050391600401611e9b565b610e7e8282610bfb565b600082815260016020526040902061045d9082610ceb565b610ea0828261144d565b600082815260016020526040902061045d9082611504565b606060405180602001610eca906119d9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604052919050565b8051602080830191909120604080517fff00000000000000000000000000000000000000000000000000000000000000818501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b16602182015260358101869052605580820193909352815180820390930183526075019052805191012060009073ffffffffffffffffffffffffffffffffffffffff16610a98565b60006110136040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e00000000000000000000000000000000008152508484604051602001610ff093929190611cf0565b6040516020818303038152906040528051906020012061100e610eb8565b611526565b6002546040517f34b6748600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201529192508216906334b6748690602401600060405180830381600087803b15801561108257600080fd5b505af1158015611096573d6000803e3d6000fd5b5050505092915050565b6060610a9883836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506115b2565b6000610a9883836115c9565b6000610431825490565b600081815260018301602052604081205461113f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610431565b506000610431565b60606000611156836002611ec6565b611161906002611eae565b67ffffffffffffffff8111156111a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156111ca576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611228577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106112b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006112ee846002611ec6565b6112f9906001611eae565b90505b60018111156113e4577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611361577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b82828151811061139e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936113dd81611f4a565b90506112fc565b508315610a98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610503565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156105165760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610a988373ffffffffffffffffffffffffffffffffffffffff841661161a565b600080838351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff8116610a98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f435245415445325f4641494c45440000000000000000000000000000000000006044820152606401610503565b60606115c18484600085611782565b949350505050565b6000826000018281548110611607577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154905092915050565b6000818152600183016020526040812054801561177857600061163e600183611f03565b855490915060009061165290600190611f03565b9050818114611705576000866000018281548110611699577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001549050808760000184815481106116e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061173d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610431565b6000915050610431565b606082471015611814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610503565b843b61187c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610503565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118a59190611cc4565b60006040518083038185875af1925050503d80600081146118e2576040519150601f19603f3d011682016040523d82523d6000602084013e6118e7565b606091505b50915091506118f7828286611902565b979650505050505050565b60608315611911575081610a98565b8251156119215782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105039190611e9b565b82805461196190611f7f565b90600052602060002090601f01602090048101928261198357600085556119c9565b82601f1061199c57805160ff19168380011785556119c9565b828001600101855582156119c9579182015b828111156119c95782518255916020019190600101906119ae565b506119d59291506119e6565b5090565b6102bc8061203283390190565b5b808211156119d557600081556001016119e7565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a1f57600080fd5b919050565b60008083601f840112611a35578182fd5b50813567ffffffffffffffff811115611a4c578182fd5b602083019150836020828501011115611a6457600080fd5b9250929050565b600060208284031215611a7c578081fd5b610a98826119fb565b600060208284031215611a96578081fd5b81358015158114610a98578182fd5b600060208284031215611ab6578081fd5b5035919050565b60008060408385031215611acf578081fd5b82359150611adf602084016119fb565b90509250929050565b60008060408385031215611afa578182fd5b50508035926020909101359150565b600060208284031215611b1a578081fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a98578182fd5b60008060008060408587031215611b5e578182fd5b843567ffffffffffffffff80821115611b75578384fd5b611b8188838901611a24565b90965094506020870135915080821115611b99578384fd5b50611ba687828801611a24565b95989497509550505050565b600060208284031215611bc3578081fd5b813567ffffffffffffffff80821115611bda578283fd5b818401915084601f830112611bed578283fd5b813581811115611bff57611bff612002565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611c4557611c45612002565b81604052828152876020848701011115611c5d578586fd5b826020860160208301379182016020019490945295945050505050565b60008151808452611c92816020860160208601611f1a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611cd6818460208701611f1a565b9190910192915050565b8183823760009101908152919050565b60008451611d02818460208901611f1a565b8201838582379092019182525092915050565b60008351611d27818460208801611f1a565b835190830190611d3b818360208801611f1a565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d7c816017850160208801611f1a565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611db9816028840160208801611f1a565b01602801949350505050565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006115c16040830184611c7a565b60006020808301818452808551808352604092508286019150828160051b870101848801865b83811015611e8d578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff168452870151878401879052611e7a87850182611c7a565b9588019593505090860190600101611e1a565b509098975050505050505050565b602081526000610a986020830184611c7a565b60008219821115611ec157611ec1611fd3565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611efe57611efe611fd3565b500290565b600082821015611f1557611f15611fd3565b500390565b60005b83811015611f35578181015183820152602001611f1d565b83811115611f44576000848401525b50505050565b600081611f5957611f59611fd3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680611f9357607f821691505b60208210811415611fcd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfe608060405234801561001057600080fd5b50600180546001600160a01b0319163317905561028a806100326000396000f3fe60806040526004361061001e5760003560e01c806334b6748614610088575b600073ffffffffffffffffffffffffffffffffffffffff8154167fa619486e000000000000000000000000000000000000000000000000000000008235141561006957808252602082f35b3682833781823684845af490503d82833e80610083573d82fd5b503d81f35b34801561009457600080fd5b506100a86100a3366004610219565b6100aa565b005b60015473ffffffffffffffffffffffffffffffffffffffff163314610130576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f57616c6c657450726f78793a20466f7262696464656e0000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166101d2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c6964206d617374657220636f707920616464726573732070726f7660448201527f69646564000000000000000000000000000000000000000000000000000000006064820152608401610127565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006020828403121561022a578081fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461024d578182fd5b939250505056fea26469706673582212201c9723d8ac5d1f9666ba24ddc1ed181a581798dbfb2bd50a67563c5a23f093f864736f6c63430008040033a2646970667358221220d0224610403d04412e4a174874831e528920c3d6ebc1ba0ce9f6d7c66e2bd40064736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061016c5760003560e01c80639010d07c116100cd578063ca15c87311610081578063d547741f11610066578063d547741f1461039b578063e0e93e64146103ae578063f2576c16146103d357600080fd5b8063ca15c87314610375578063cf8920e21461038857600080fd5b806391d14854116100b257806391d148541461030257806396eb8f2b14610346578063a217fddf1461036d57600080fd5b80639010d07c146102a657806390610b0e146102b957600080fd5b8063556b88f4116101245780638117abc1116101095780638117abc11461025057806382cb6b72146102705780638ecf0d0b1461029157600080fd5b8063556b88f41461020557806376b134eb1461023d57600080fd5b80632f2ff15d116101555780632f2ff15d146101ca57806336568abe146101df578063539fcf41146101f257600080fd5b806301ffc9a714610171578063248a9ca314610199575b600080fd5b61018461017f366004611b09565b6103db565b60405190151581526020015b60405180910390f35b6101bc6101a7366004611aa5565b60009081526020819052604090206001015490565b604051908152602001610190565b6101dd6101d8366004611abd565b610437565b005b6101dd6101ed366004611abd565b610462565b6101dd610200366004611a85565b61051a565b610218610213366004611bb2565b61059c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610190565b61021861024b366004611b49565b61060c565b6002546102189073ffffffffffffffffffffffffffffffffffffffff1681565b61028361027e366004611aa5565b61089e565b604051610190929190611dc5565b61029961096d565b6040516101909190611df4565b6102186102b4366004611ae8565b610a80565b6102f56040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e000000000000000000000000000000000081525081565b6040516101909190611e9b565b610184610310366004611abd565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6101bc7fae9b63ab4b462b07680cb8b996bddf99415495c0085a2e2cc9077cb59cc8a42b81565b6101bc600081565b6101bc610383366004611aa5565b610a9f565b6101dd610396366004611a6b565b610ab6565b6101dd6103a9366004611abd565b610bd5565b6002546101849074010000000000000000000000000000000000000000900460ff1681565b6003546101bc565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610431575061043182610d0d565b92915050565b6000828152602081905260409020600101546104538133610da4565b61045d8383610e74565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461050c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105168282610e96565b5050565b60006105268133610da4565b600280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000841515908102919091179091556040517f35ac19551a52b8f4900b06449534a47b8155d2c807e790887610c7412dd3991c90600090a25050565b60006104316040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e0000000000000000000000000000000000815250836040516020016105e9929190611d15565b60405160208183030381529060405280519060200120610607610eb8565b610f00565b60025460009074010000000000000000000000000000000000000000900460ff1661065b5761065b7fae9b63ab4b462b07680cb8b996bddf99415495c0085a2e2cc9077cb59cc8a42b33610da4565b60025473ffffffffffffffffffffffffffffffffffffffff16610700576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f57616c6c6574466163746f72793a206d697373696e672077616c6c657420696d60448201527f706c656d656e746174696f6e00000000000000000000000000000000000000006064820152608401610503565b61070a8585610fa1565b905061076383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505073ffffffffffffffffffffffffffffffffffffffff8516929150506110a0565b50600360405180604001604052808373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250939094525050835460018082018655948252602091829020845160029092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911781558382015180519495919461083b9450918501920190611955565b505050848460405161084e929190611ce0565b6040519081900381209073ffffffffffffffffffffffffffffffffffffffff8316907ff13604b1f23976d03c5d21690239f9943ed156b0a06f2c8da954e1545bad517590600090a3949350505050565b600381815481106108ae57600080fd5b60009182526020909120600290910201805460018201805473ffffffffffffffffffffffffffffffffffffffff9092169350906108ea90611f7f565b80601f016020809104026020016040519081016040528092919081815260200182805461091690611f7f565b80156109635780601f1061093857610100808354040283529160200191610963565b820191906000526020600020905b81548152906001019060200180831161094657829003601f168201915b5050505050905082565b60606003805480602002602001604051908101604052809291908181526020016000905b82821015610a775760008481526020908190206040805180820190915260028502909101805473ffffffffffffffffffffffffffffffffffffffff16825260018101805492939192918401916109e690611f7f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1290611f7f565b8015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b50505050508152505081526020019060010190610991565b50505050905090565b6000828152600160205260408120610a9890836110e2565b9392505050565b6000818152600160205260408120610431906110ee565b6000610ac28133610da4565b73ffffffffffffffffffffffffffffffffffffffff8216610b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f57616c6c6574466163746f72793a20496e76616c69642077616c6c657420696d60448201527f706c656d656e746174696f6e00000000000000000000000000000000000000006064820152608401610503565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040517f7ec2b55977d50d4d272b55752e3eab04b06ef8688a9652e447b641d2821e6d0790600090a25050565b600082815260208190526040902060010154610bf18133610da4565b61045d8383610e96565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166105165760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610c8d3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610a988373ffffffffffffffffffffffffffffffffffffffff84166110f8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061043157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610431565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661051657610dfa8173ffffffffffffffffffffffffffffffffffffffff166014611147565b610e05836020611147565b604051602001610e16929190611d44565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261050391600401611e9b565b610e7e8282610bfb565b600082815260016020526040902061045d9082610ceb565b610ea0828261144d565b600082815260016020526040902061045d9082611504565b606060405180602001610eca906119d9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604052919050565b8051602080830191909120604080517fff00000000000000000000000000000000000000000000000000000000000000818501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b16602182015260358101869052605580820193909352815180820390930183526075019052805191012060009073ffffffffffffffffffffffffffffffffffffffff16610a98565b60006110136040518060400160405280600f81526020017f57414c4c45545f4352454154494f4e00000000000000000000000000000000008152508484604051602001610ff093929190611cf0565b6040516020818303038152906040528051906020012061100e610eb8565b611526565b6002546040517f34b6748600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201529192508216906334b6748690602401600060405180830381600087803b15801561108257600080fd5b505af1158015611096573d6000803e3d6000fd5b5050505092915050565b6060610a9883836040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c656400008152506115b2565b6000610a9883836115c9565b6000610431825490565b600081815260018301602052604081205461113f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610431565b506000610431565b60606000611156836002611ec6565b611161906002611eae565b67ffffffffffffffff8111156111a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156111ca576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611228577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106112b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006112ee846002611ec6565b6112f9906001611eae565b90505b60018111156113e4577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611361577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b1a60f81b82828151811061139e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936113dd81611f4a565b90506112fc565b508315610a98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610503565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156105165760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610a988373ffffffffffffffffffffffffffffffffffffffff841661161a565b600080838351602085016000f5905073ffffffffffffffffffffffffffffffffffffffff8116610a98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f435245415445325f4641494c45440000000000000000000000000000000000006044820152606401610503565b60606115c18484600085611782565b949350505050565b6000826000018281548110611607577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154905092915050565b6000818152600183016020526040812054801561177857600061163e600183611f03565b855490915060009061165290600190611f03565b9050818114611705576000866000018281548110611699577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001549050808760000184815481106116e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061173d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610431565b6000915050610431565b606082471015611814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610503565b843b61187c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610503565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118a59190611cc4565b60006040518083038185875af1925050503d80600081146118e2576040519150601f19603f3d011682016040523d82523d6000602084013e6118e7565b606091505b50915091506118f7828286611902565b979650505050505050565b60608315611911575081610a98565b8251156119215782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105039190611e9b565b82805461196190611f7f565b90600052602060002090601f01602090048101928261198357600085556119c9565b82601f1061199c57805160ff19168380011785556119c9565b828001600101855582156119c9579182015b828111156119c95782518255916020019190600101906119ae565b506119d59291506119e6565b5090565b6102bc8061203283390190565b5b808211156119d557600081556001016119e7565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a1f57600080fd5b919050565b60008083601f840112611a35578182fd5b50813567ffffffffffffffff811115611a4c578182fd5b602083019150836020828501011115611a6457600080fd5b9250929050565b600060208284031215611a7c578081fd5b610a98826119fb565b600060208284031215611a96578081fd5b81358015158114610a98578182fd5b600060208284031215611ab6578081fd5b5035919050565b60008060408385031215611acf578081fd5b82359150611adf602084016119fb565b90509250929050565b60008060408385031215611afa578182fd5b50508035926020909101359150565b600060208284031215611b1a578081fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610a98578182fd5b60008060008060408587031215611b5e578182fd5b843567ffffffffffffffff80821115611b75578384fd5b611b8188838901611a24565b90965094506020870135915080821115611b99578384fd5b50611ba687828801611a24565b95989497509550505050565b600060208284031215611bc3578081fd5b813567ffffffffffffffff80821115611bda578283fd5b818401915084601f830112611bed578283fd5b813581811115611bff57611bff612002565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611c4557611c45612002565b81604052828152876020848701011115611c5d578586fd5b826020860160208301379182016020019490945295945050505050565b60008151808452611c92816020860160208601611f1a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611cd6818460208701611f1a565b9190910192915050565b8183823760009101908152919050565b60008451611d02818460208901611f1a565b8201838582379092019182525092915050565b60008351611d27818460208801611f1a565b835190830190611d3b818360208801611f1a565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d7c816017850160208801611f1a565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611db9816028840160208801611f1a565b01602801949350505050565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006115c16040830184611c7a565b60006020808301818452808551808352604092508286019150828160051b870101848801865b83811015611e8d578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff168452870151878401879052611e7a87850182611c7a565b9588019593505090860190600101611e1a565b509098975050505050505050565b602081526000610a986020830184611c7a565b60008219821115611ec157611ec1611fd3565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611efe57611efe611fd3565b500290565b600082821015611f1557611f15611fd3565b500390565b60005b83811015611f35578181015183820152602001611f1d565b83811115611f44576000848401525b50505050565b600081611f5957611f59611fd3565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680611f9357607f821691505b60208210811415611fcd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfe608060405234801561001057600080fd5b50600180546001600160a01b0319163317905561028a806100326000396000f3fe60806040526004361061001e5760003560e01c806334b6748614610088575b600073ffffffffffffffffffffffffffffffffffffffff8154167fa619486e000000000000000000000000000000000000000000000000000000008235141561006957808252602082f35b3682833781823684845af490503d82833e80610083573d82fd5b503d81f35b34801561009457600080fd5b506100a86100a3366004610219565b6100aa565b005b60015473ffffffffffffffffffffffffffffffffffffffff163314610130576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f57616c6c657450726f78793a20466f7262696464656e0000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166101d2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c6964206d617374657220636f707920616464726573732070726f7660448201527f69646564000000000000000000000000000000000000000000000000000000006064820152608401610127565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006020828403121561022a578081fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461024d578182fd5b939250505056fea26469706673582212201c9723d8ac5d1f9666ba24ddc1ed181a581798dbfb2bd50a67563c5a23f093f864736f6c63430008040033a2646970667358221220d0224610403d04412e4a174874831e528920c3d6ebc1ba0ce9f6d7c66e2bd40064736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.