Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 74 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Genesis | 18781062 | 297 days ago | IN | 0 ETH | 0.00680706 | ||||
Genesis | 18520451 | 333 days ago | IN | 0 ETH | 0.00611006 | ||||
Genesis | 18516421 | 334 days ago | IN | 0 ETH | 0.00444624 | ||||
Genesis | 18516401 | 334 days ago | IN | 0 ETH | 0.00554707 | ||||
Genesis | 18473673 | 340 days ago | IN | 0 ETH | 0.00265874 | ||||
Genesis | 18447179 | 343 days ago | IN | 0 ETH | 0.00134423 | ||||
Genesis | 18331411 | 360 days ago | IN | 0 ETH | 0.00077749 | ||||
Genesis | 18328002 | 360 days ago | IN | 0 ETH | 0.00226507 | ||||
Genesis | 18320198 | 361 days ago | IN | 0 ETH | 0.00128117 | ||||
Genesis | 18317217 | 362 days ago | IN | 0 ETH | 0.00077436 | ||||
Genesis | 18317068 | 362 days ago | IN | 0 ETH | 0.00076773 | ||||
Genesis | 18213617 | 376 days ago | IN | 0 ETH | 0.00342449 | ||||
Genesis | 18042461 | 400 days ago | IN | 0 ETH | 0.00686715 | ||||
Genesis | 17867368 | 425 days ago | IN | 0 ETH | 0.00197971 | ||||
Genesis | 17840485 | 428 days ago | IN | 0 ETH | 0.00232042 | ||||
Genesis | 17839950 | 428 days ago | IN | 0 ETH | 0.00251755 | ||||
Genesis | 17838549 | 429 days ago | IN | 0 ETH | 0.00208202 | ||||
Genesis | 17831908 | 429 days ago | IN | 0 ETH | 0.00188518 | ||||
Genesis | 17752306 | 441 days ago | IN | 0 ETH | 0.00179633 | ||||
Genesis | 17692388 | 449 days ago | IN | 0 ETH | 0.00456433 | ||||
Genesis | 17651584 | 455 days ago | IN | 0 ETH | 0.00203963 | ||||
Genesis | 17630440 | 458 days ago | IN | 0 ETH | 0.00672486 | ||||
Genesis | 17595172 | 463 days ago | IN | 0 ETH | 0.00241703 | ||||
Genesis | 17594111 | 463 days ago | IN | 0 ETH | 0.0046785 | ||||
Genesis | 17514141 | 474 days ago | IN | 0 ETH | 0.00276603 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
Contract Name:
Factory
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/proxy/Clones.sol"; import "./Buffer2.sol"; contract Factory { event ContractDeployed(address indexed deployer, address indexed group); address public immutable implementation; constructor() { implementation = address(new Buffer2 { salt: bytes32(uint(1)) }()); } function genesis(bytes32 _root, bytes32 _cidDigest, bool _cidEncoding, uint _index) external returns (address) { bytes32 salt = keccak256(abi.encodePacked(msg.sender, _index)); address payable clone = payable(Clones.cloneDeterministic(implementation, salt)); Buffer2 buffer = Buffer2(clone); buffer.initialize(_root, _cidDigest, _cidEncoding); emit ContractDeployed(msg.sender, clone); return clone; } function find(address creator, uint start, uint count) external view returns (address[] memory) { address[] memory addrs = new address[](count); for(uint i; i<count; i++) { bytes32 salt = keccak256(abi.encodePacked(creator, i+start)); addrs[i] = Clones.predictDeterministicAddress( implementation, salt ); } return addrs; } }
///////////////////////////////////////////////////////////////////////////////////// // // SPDX-License-Identifier: MIT // // ███ ███ ██████ ███ ██ ███████ ██ ██ ██████ ██ ██████ ███████ // ████ ████ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ████ ██ ██ ██ ██ ██ ██ █████ ████ ██████ ██ ██████ █████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██████ ██ ████ ███████ ██ ██ ██ ██ ███████ // // // ██████ ██ ██ ███████ ███████ ███████ ██████ ██████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ██ ██ █████ █████ █████ ██████ █████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ██████ ██ ██ ███████ ██ ██ ███████ // // https://moneypipe.xyz // ///////////////////////////////////////////////////////////////////////////////////// pragma solidity ^0.8.17; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; contract Buffer2 is Initializable { using SafeERC20 for IERC20; mapping (address => uint) public withdrawn; // total ETH withdrawn mapping (address => mapping (address => uint)) public token_withdrawn; // user ERC20 token withdrawn (for each token addressand user account) mapping (address => uint) public total_token_withdrawn; // total ERC20 token withdrawn (for each address) bytes32 private root; // Merkle root bytes32 private id; // IPFS cid hash digest bool public encoding; // IPFS cid encoding uint public totalReceived; // total ETH received // initialize the buffer pipe with merkle root and CID of the JSON that stores the members list (which will be used to construct the merkle tree) function initialize(bytes32 _root, bytes32 _cidDigest, bool _cidEncoding) initializer public { root = _root; id = _cidDigest; encoding = _cidEncoding; } // track totalreceived whenever an ETH payment is made receive () external payable { totalReceived += msg.value; } // account: the account to withdraw to (must be part of the merkle tree // amount: the amount (out of 10^12) of shares in the split owned by the account // proof: merkle proof containing the account and split // tokens: an array of ERC20 addresses // - if empty, only withdraw ETH // - if not empty, withdraw from the ETH balance AND from the balance for the specified ERC20 tokens function withdraw(address account, uint256 amount, bytes32[] calldata proof, address[] calldata tokens) external { // 1. verify merkle proof bytes32 hash = keccak256(abi.encodePacked(account, amount)); for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (hash <= proofElement) { hash = _hash(hash, proofElement); } else { hash = _hash(proofElement, hash); } } require(hash == root, "1"); // 2. calculate amount to withdraw based on "amount" (out of 1,000,000,000,000) uint payment = totalReceived * amount / 10**12 - withdrawn[account]; withdrawn[account] += payment; // 3. withdraw ETH _transfer(account, payment); // 4. withdraw erc20 tokens for(uint i=0; i<tokens.length; i++) { address token = tokens[i]; uint total_token_received = IERC20(token).balanceOf(address(this)) + total_token_withdrawn[token]; uint token_payment = total_token_received * amount / 10**12 - token_withdrawn[token][account]; token_withdrawn[token][account] += token_payment; total_token_withdrawn[token] += token_payment; IERC20(token).safeTransfer(account, token_payment); } } // Calculate IPFS CID from id and encoding function cid() public view returns (string memory) { bytes32 data = bytes32(id); bytes memory alphabet = bytes("abcdefghijklmnopqrstuvwxyz234567"); bytes memory _cid = bytes(encoding ? "bafybei" : "bafkrei"); uint bits = 2; uint buffer = 24121888; uint bitsPerChar = 5; uint mask = uint((1 << bitsPerChar) - 1); for(uint i=0; i<data.length; ++i) { bytes1 char = bytes1(bytes32(id << (8*i))); buffer = (uint32(buffer) << 8) | uint(uint8(char)); bits += 8; while (bits > bitsPerChar) { bits -= bitsPerChar; _cid = abi.encodePacked(_cid, alphabet[mask & (buffer >> bits)]); } } if (bits > 0) { _cid = abi.encodePacked(_cid, alphabet[mask & (buffer << (bitsPerChar-bits))]); } return string(_cid); } // memory optimization from: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3039 function _hash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } // adopted from https://github.com/lexDAO/Kali/blob/main/contracts/libraries/SafeTransferLib.sol error TransferFailed(); function _transfer(address to, uint256 amount) internal { bool callStatus; assembly { callStatus := call(gas(), to, amount, 0, 0, 0, 0) } if (!callStatus) revert TransferFailed(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/Address.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 10000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"deployer","type":"address"},{"indexed":true,"internalType":"address","name":"group","type":"address"}],"name":"ContractDeployed","type":"event"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"find","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"bytes32","name":"_cidDigest","type":"bytes32"},{"internalType":"bool","name":"_cidEncoding","type":"bool"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"genesis","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405160019061002090610052565b8190604051809103906000f5905080158015610040573d6000803e3d6000fd5b506001600160a01b031660805261005f565b6111c58061074383390190565b6080516106bc61008760003960008181604b01528181610180015261025401526106bc6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635c60da1b146100465780635f8745cb1461009757806360a06d96146100b7575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100aa6100a53660046104c2565b6100ca565b60405161008e9190610510565b61006d6100c536600461056a565b6101f8565b606060008267ffffffffffffffff8111156100e7576100e76105ae565b604051908082528060200260200182016040528015610110578160200160208202803683370190505b50905060005b838110156101ef5760008661012b878461060c565b60405160609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602083015260348201526054016040516020818303038152906040528051906020012090506101a57f00000000000000000000000000000000000000000000000000000000000000008261035b565b8383815181106101b7576101b761061f565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015250806101e78161064e565b915050610116565b50949350505050565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101829052600090819060540160405160208183030381529060405280519060200120905060006102797f0000000000000000000000000000000000000000000000000000000000000000836103e0565b6040517f5e8695ab00000000000000000000000000000000000000000000000000000000815260048101899052602481018890528615156044820152909150819073ffffffffffffffffffffffffffffffffffffffff821690635e8695ab90606401600060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff851692503391507f33c981baba081f8fd2c52ac6ad1ea95b6814b4376640f55689051f658472968890600090a3509695505050505050565b60006103d78383306040517f3d602d80600a3d3981f3363d3d373d3d3d363d730000000000000000000000008152606093841b60148201527f5af43d82803e903d91602b57fd5bf3ff000000000000000000000000000000006028820152921b6038830152604c8201526037808220606c830152605591012090565b90505b92915050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f591505073ffffffffffffffffffffffffffffffffffffffff81166103da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b6000806000606084860312156104d757600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146104fb57600080fd5b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b8181101561055e57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161052c565b50909695505050505050565b6000806000806080858703121561058057600080fd5b84359350602085013592506040850135801515811461059e57600080fd5b9396929550929360600135925050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103da576103da6105dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361067f5761067f6105dd565b506001019056fea26469706673582212207d98b57a52f5359cfb495cc586eb2ffd711d9e90a3bcb1723e92f266d945dcce64736f6c63430008110033608060405234801561001057600080fd5b506111a5806100206000396000f3fe60806040526004361061007f5760003560e01c8063971d7fdc1161004e578063971d7fdc1461015d578063a3c2c4621461018a578063aa3ec0a9146101a0578063d8f4eeed146101c257600080fd5b8063031e8f33146100a357806345e11b09146100ee5780635e8695ab146101105780636ef610921461013057600080fd5b3661009e5734600760008282546100969190610de5565b925050819055005b600080fd5b3480156100af57600080fd5b506100db6100be366004610e27565b600260209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b3480156100fa57600080fd5b5061010e610109366004610ea6565b6101ec565b005b34801561011c57600080fd5b5061010e61012b366004610f41565b61064b565b34801561013c57600080fd5b506100db61014b366004610f7a565b60016020526000908152604090205481565b34801561016957600080fd5b506100db610178366004610f7a565b60036020526000908152604090205481565b34801561019657600080fd5b506100db60075481565b3480156101ac57600080fd5b506101b561080e565b6040516100e59190610fb9565b3480156101ce57600080fd5b506006546101dc9060ff1681565b60405190151581526020016100e5565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1660208201526034810186905260009060540160405160208183030381529060405280519060200120905060005b848110156102a857600086868381811061025f5761025f61100a565b9050602002013590508083116102845760008381526020829052604090209250610295565b600081815260208490526040902092505b50806102a081611039565b915050610243565b506004548114610319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f310000000000000000000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff871660009081526001602052604081205460075464e8d4a5100090610354908a90611071565b61035e9190611088565b61036891906110c3565b73ffffffffffffffffffffffffffffffffffffffff89166000908152600160205260408120805492935083929091906103a2908490610de5565b909155506103b2905088826109f5565b60005b838110156106405760008585838181106103d1576103d161100a565b90506020020160208101906103e69190610f7a565b73ffffffffffffffffffffffffffffffffffffffff81166000818152600360205260408082205490517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015293945090929091906370a0823190602401602060405180830381865afa158015610466573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048a91906110d6565b6104949190610de5565b90506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205464e8d4a510008c846105279190611071565b6105319190611088565b61053b91906110c3565b905080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546105c99190610de5565b909155505073ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054839290610603908490610de5565b9091555061062a905073ffffffffffffffffffffffffffffffffffffffff84168d83610a3f565b505050808061063890611039565b9150506103b5565b505050505050505050565b600054610100900460ff161580801561066b5750600054600160ff909116105b806106855750303b158015610685575060005460ff166001145b610711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610310565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561076f57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b60048490556005839055600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016831515179055801561080857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6005546040805180820190915260208082527f6162636465666768696a6b6c6d6e6f707172737475767778797a32333435363790820152600654606092919060009060ff16610892576040518060400160405280600781526020017f6261666b726569000000000000000000000000000000000000000000000000008152506108c9565b6040518060400160405280600781526020017f62616679626569000000000000000000000000000000000000000000000000008152505b905060026301701220600560006108e2600160206110c3565b905060005b60208110156109935760006108fd826008611071565b600554901b60f881901c600896871b63ffffff001617959091506109219087610de5565b95505b838611156109825761093684876110c3565b955086888787901c8516815181106109505761095061100a565b602001015160f81c60f81b60405160200161096c9291906110ef565b6040516020818303038152906040529650610924565b5061098c81611039565b90506108e7565b5083156109e95784866109a686856110c3565b85901b8316815181106109bb576109bb61100a565b602001015160f81c60f81b6040516020016109d79291906110ef565b60405160208183030381529060405294505b50929695505050505050565b600080600080600085875af1905080610a3a576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610a3a92869291600091610b0a918516908490610bb4565b805190915015610a3a5780806020019051810190610b289190611136565b610a3a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610310565b6060610bc38484600085610bcd565b90505b9392505050565b606082471015610c5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610310565b73ffffffffffffffffffffffffffffffffffffffff85163b610cdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610310565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610d069190611153565b60006040518083038185875af1925050503d8060008114610d43576040519150601f19603f3d011682016040523d82523d6000602084013e610d48565b606091505b5091509150610d58828286610d63565b979650505050505050565b60608315610d72575081610bc6565b825115610d825782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103109190610fb9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610df857610df8610db6565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e2257600080fd5b919050565b60008060408385031215610e3a57600080fd5b610e4383610dfe565b9150610e5160208401610dfe565b90509250929050565b60008083601f840112610e6c57600080fd5b50813567ffffffffffffffff811115610e8457600080fd5b6020830191508360208260051b8501011115610e9f57600080fd5b9250929050565b60008060008060008060808789031215610ebf57600080fd5b610ec887610dfe565b955060208701359450604087013567ffffffffffffffff80821115610eec57600080fd5b610ef88a838b01610e5a565b90965094506060890135915080821115610f1157600080fd5b50610f1e89828a01610e5a565b979a9699509497509295939492505050565b8015158114610f3e57600080fd5b50565b600080600060608486031215610f5657600080fd5b83359250602084013591506040840135610f6f81610f30565b809150509250925092565b600060208284031215610f8c57600080fd5b610bc682610dfe565b60005b83811015610fb0578181015183820152602001610f98565b50506000910152565b6020815260008251806020840152610fd8816040850160208701610f95565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361106a5761106a610db6565b5060010190565b8082028115828204841417610df857610df8610db6565b6000826110be577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b81810381811115610df857610df8610db6565b6000602082840312156110e857600080fd5b5051919050565b60008351611101818460208801610f95565b7fff00000000000000000000000000000000000000000000000000000000000000939093169190920190815260010192915050565b60006020828403121561114857600080fd5b8151610bc681610f30565b60008251611165818460208701610f95565b919091019291505056fea26469706673582212202f49da4e77d9e9c2e9c38c764600c79748728f1dc58a0177ee603a3fd7b7db2464736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80635c60da1b146100465780635f8745cb1461009757806360a06d96146100b7575b600080fd5b61006d7f000000000000000000000000d912512eca388daaaf14ee9b8cd9471a789ec66e81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100aa6100a53660046104c2565b6100ca565b60405161008e9190610510565b61006d6100c536600461056a565b6101f8565b606060008267ffffffffffffffff8111156100e7576100e76105ae565b604051908082528060200260200182016040528015610110578160200160208202803683370190505b50905060005b838110156101ef5760008661012b878461060c565b60405160609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602083015260348201526054016040516020818303038152906040528051906020012090506101a57f000000000000000000000000d912512eca388daaaf14ee9b8cd9471a789ec66e8261035b565b8383815181106101b7576101b761061f565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015250806101e78161064e565b915050610116565b50949350505050565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101829052600090819060540160405160208183030381529060405280519060200120905060006102797f000000000000000000000000d912512eca388daaaf14ee9b8cd9471a789ec66e836103e0565b6040517f5e8695ab00000000000000000000000000000000000000000000000000000000815260048101899052602481018890528615156044820152909150819073ffffffffffffffffffffffffffffffffffffffff821690635e8695ab90606401600060405180830381600087803b1580156102f557600080fd5b505af1158015610309573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff851692503391507f33c981baba081f8fd2c52ac6ad1ea95b6814b4376640f55689051f658472968890600090a3509695505050505050565b60006103d78383306040517f3d602d80600a3d3981f3363d3d373d3d3d363d730000000000000000000000008152606093841b60148201527f5af43d82803e903d91602b57fd5bf3ff000000000000000000000000000000006028820152921b6038830152604c8201526037808220606c830152605591012090565b90505b92915050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f591505073ffffffffffffffffffffffffffffffffffffffff81166103da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b6000806000606084860312156104d757600080fd5b833573ffffffffffffffffffffffffffffffffffffffff811681146104fb57600080fd5b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b8181101561055e57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161052c565b50909695505050505050565b6000806000806080858703121561058057600080fd5b84359350602085013592506040850135801515811461059e57600080fd5b9396929550929360600135925050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103da576103da6105dd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361067f5761067f6105dd565b506001019056fea26469706673582212207d98b57a52f5359cfb495cc586eb2ffd711d9e90a3bcb1723e92f266d945dcce64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.