Overview
ETH Balance
ETH Value
$34,162.23 (@ $3,631.05/ETH)Token Holdings
Could not find any matches!
- ERC-20 Tokens (8)0.000496 WLDWorldcoin (WLD)$0.00@2.398815,000 WLD [ WWW.GET-WLD.ORG ] Visit to claim rewardERC-20: ! (WLD [ ...)43,767 BRC-20.WSERC-20: ! BRC-20.... (BRC-20...)1 claim rewards on debridgether.comERC-20: Acces deb... (claim ...)0.55 USDGLOGlo Dollar$0.55@0.998610,000 OPTERC-20: OPTOPUS (OPT)70,000 TokenERC-20 TOKEN*[Spam]24 TokenERC-20 TOKEN*[Spam]NFT Tokens (28)hurry Up!!ERC-1155Events+ $50 000 (BONUS-ETH.NET)ERC-1155Airdrop+$50 000 (BONUS-ETH.NET) 🎁ERC-1155Airdrop+$50 000 (BONUS-ETH.NET) 🎁ERC-1155hurry Up!$5O OOO FOR FREEERC-1155hurry Up!$5O OOO FOR FREEERC-1155hurry Up!$5O OOO FOR FREEERC-1155hurry Up!congratulations!ERC-1155hurry Up!congratulations!ERC-1155deBridge Airdrop https://t.ly/ethersdeBridge AirdropERC-721EventEthereumERC-1155EventEthereumERC-1155EthereumEthereumERC-1155EventEventERC-1155EventEventERC-1155$FLOKIFLOKI AIRDROP AT floki-crypto.onlineERC-1155ERC-1155 TOKEN*[Spam]ERC-1155 TOKEN*[Spam]ERC-1155 TOKEN*[Spam]
More Info
Private Name Tags
ContractCreator
Multichain Info
4 addresses found viaLatest 25 from a total of 28,799 transactions
Transaction Hash MethodBlockFromToWithdraw 129480708 2024-12-18 22:16:33 3 hrs ago 1734560193 IN 0 ETH$0.00 0.000000461716 0.00257233 Withdraw 129476323 2024-12-18 19:50:23 5 hrs ago 1734551423 IN 0 ETH$0.00 0.000000229052 0.00246098 Withdraw 129474084 2024-12-18 18:35:45 6 hrs ago 1734546945 IN 0 ETH$0.00 0.000000524786 0.0109146 Withdraw 129473524 2024-12-18 18:17:05 7 hrs ago 1734545825 IN 0 ETH$0.00 0.000000275458 0.00208035 Withdraw 129472790 2024-12-18 17:52:37 7 hrs ago 1734544357 IN 0 ETH$0.00 0.000000237719 0.002052 Withdraw 129472229 2024-12-18 17:33:55 7 hrs ago 1734543235 IN 0 ETH$0.00 0.000000277787 0.002004 Withdraw 129472190 2024-12-18 17:32:37 8 hrs ago 1734543157 IN 0 ETH$0.00 0.000000275358 0.0019754 Withdraw 129471086 2024-12-18 16:55:49 8 hrs ago 1734540949 IN 0 ETH$0.00 0.000000272017 0.00170655 Withdraw 129466330 2024-12-18 14:17:17 11 hrs ago 1734531437 IN 0 ETH$0.00 0.000000211197 0.00023913 Withdraw 129465187 2024-12-18 13:39:11 11 hrs ago 1734529151 IN 0 ETH$0.00 0.000000131707 0.00019018 Withdraw 129459254 2024-12-18 10:21:25 15 hrs ago 1734517285 IN 0 ETH$0.00 0.000000195418 0.00113834 Withdraw 129459120 2024-12-18 10:16:57 15 hrs ago 1734517017 IN 0 ETH$0.00 0.000000166513 0.00024201 Withdraw For 129457935 2024-12-18 9:37:27 15 hrs ago 1734514647 IN 0 ETH$0.00 0.000000111855 0.0011661 Withdraw 129455959 2024-12-18 8:31:35 17 hrs ago 1734510695 IN 0 ETH$0.00 0.000000112665 0.00113198 Withdraw 129454684 2024-12-18 7:49:05 17 hrs ago 1734508145 IN 0 ETH$0.00 0.000000102518 0.0011407 Withdraw 129454684 2024-12-18 7:49:05 17 hrs ago 1734508145 IN 0 ETH$0.00 0.000000102518 0.0011407 Withdraw 129453875 2024-12-18 7:22:07 18 hrs ago 1734506527 IN 0 ETH$0.00 0.000000096984 0.0002576 Withdraw 129453691 2024-12-18 7:15:59 18 hrs ago 1734506159 IN 0 ETH$0.00 0.00000011588 0.0011614 Withdraw 129453536 2024-12-18 7:10:49 18 hrs ago 1734505849 IN 0 ETH$0.00 0.000000111992 0.0011652 Withdraw 129451971 2024-12-18 6:18:39 19 hrs ago 1734502719 IN 0 ETH$0.00 0.000000117505 0.0011773 Withdraw 129444786 2024-12-18 2:19:09 23 hrs ago 1734488349 IN 0 ETH$0.00 0.000000130989 0.0014522 Withdraw 129444628 2024-12-18 2:13:53 23 hrs ago 1734488033 IN 0 ETH$0.00 0.000000134017 0.0014737 Withdraw 129444432 2024-12-18 2:07:21 23 hrs ago 1734487641 IN 0 ETH$0.00 0.000000133506 0.0014943 Withdraw 129444385 2024-12-18 2:05:47 23 hrs ago 1734487547 IN 0 ETH$0.00 0.000000134017 0.0014936 Withdraw 129444294 2024-12-18 2:02:45 23 hrs ago 1734487365 IN 0 ETH$0.00 0.000000133607 0.0014885 Latest 25 internal transactions (View All)
Advanced mode:Parent Transaction Hash Block From To 129486123 2024-12-19 1:17:03 15 mins ago 1734571023 0.0000999 ETH$0.36 129485497 2024-12-19 0:56:11 36 mins ago 1734569771 0.0000888 ETH$0.32 129485179 2024-12-19 0:45:35 47 mins ago 1734569135 0.0000999 ETH$0.36 129484527 2024-12-19 0:23:51 1 hr ago 1734567831 0.000777 ETH$2.82 129482753 2024-12-18 23:24:43 2 hrs ago 1734564283 0.0000999 ETH$0.36 129482113 2024-12-18 23:03:23 2 hrs ago 1734563003 0.0000888 ETH$0.32 129480708 2024-12-18 22:16:33 3 hrs ago 1734560193 0.0002886 ETH$1.05 129480439 2024-12-18 22:07:35 3 hrs ago 1734559655 0.0000888 ETH$0.32 129480292 2024-12-18 22:02:41 3 hrs ago 1734559361 0.000001 ETH$0.00 129480100 2024-12-18 21:56:17 3 hrs ago 1734558977 0.0000888 ETH$0.32 129480021 2024-12-18 21:53:39 3 hrs ago 1734558819 0.000001 ETH$0.00 129477675 2024-12-18 20:35:27 4 hrs ago 1734554127 0.0000888 ETH$0.32 129477525 2024-12-18 20:30:27 5 hrs ago 1734553827 0.0000888 ETH$0.32 129477407 2024-12-18 20:26:31 5 hrs ago 1734553591 0.0000999 ETH$0.36 129476323 2024-12-18 19:50:23 5 hrs ago 1734551423 0.001998 ETH$7.25 129476238 2024-12-18 19:47:33 5 hrs ago 1734551253 0.000001 ETH$0.00 129475434 2024-12-18 19:20:45 6 hrs ago 1734549645 0.000001 ETH$0.00 129475428 2024-12-18 19:20:33 6 hrs ago 1734549633 0.000001 ETH$0.00 129475113 2024-12-18 19:10:03 6 hrs ago 1734549003 0.000001 ETH$0.00 129474084 2024-12-18 18:35:45 6 hrs ago 1734546945 0.0028749 ETH$10.44 129473611 2024-12-18 18:19:59 7 hrs ago 1734545999 0.0000999 ETH$0.36 129473524 2024-12-18 18:17:05 7 hrs ago 1734545825 0.0004218 ETH$1.53 129472790 2024-12-18 17:52:37 7 hrs ago 1734544357 0.0001332 ETH$0.48 129472647 2024-12-18 17:47:51 7 hrs ago 1734544071 0.000001 ETH$0.00 129472521 2024-12-18 17:43:39 7 hrs ago 1734543819 0.0000888 ETH$0.32 Latest 25 Deposits
Loading...LoadingContract Name:ProtocolRewards
Compiler Versionv0.8.17+commit.8df45f5f
Optimization Enabled:Yes with 500000 runs
Other Settings:london EvmVersionContract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {Enjoy} from "../_imagine/Enjoy.sol"; import {EIP712} from "./lib/EIP712.sol"; import {IProtocolRewards} from "./interfaces/IProtocolRewards.sol"; /// @title ProtocolRewards /// @notice Manager of deposits & withdrawals for protocol rewards contract ProtocolRewards is Enjoy, IProtocolRewards, EIP712 { /// @notice The EIP-712 typehash for gasless withdraws bytes32 public constant WITHDRAW_TYPEHASH = keccak256("Withdraw(address from,address to,uint256 amount,uint256 nonce,uint256 deadline)"); /// @notice An account's balance mapping(address => uint256) public balanceOf; /// @notice An account's nonce for gasless withdraws mapping(address => uint256) public nonces; constructor() payable EIP712("ProtocolRewards", "1") {} /// @notice The total amount of ETH held in the contract function totalSupply() external view returns (uint256) { return address(this).balance; } /// @notice Generic function to deposit ETH for a recipient, with an optional comment /// @param to Address to deposit to /// @param to Reason system reason for deposit (used for indexing) /// @param comment Optional comment as reason for deposit function deposit(address to, bytes4 reason, string calldata comment) external payable { if (to == address(0)) { revert ADDRESS_ZERO(); } balanceOf[to] += msg.value; emit Deposit(msg.sender, to, reason, msg.value, comment); } /// @notice Generic function to deposit ETH for multiple recipients, with an optional comment /// @param recipients recipients to send the amount to, array aligns with amounts /// @param amounts amounts to send to each recipient, array aligns with recipients /// @param reasons optional bytes4 hash for indexing /// @param comment Optional comment to include with mint function depositBatch(address[] calldata recipients, uint256[] calldata amounts, bytes4[] calldata reasons, string calldata comment) external payable { uint256 numRecipients = recipients.length; if (numRecipients != amounts.length || numRecipients != reasons.length) { revert ARRAY_LENGTH_MISMATCH(); } uint256 expectedTotalValue; for (uint256 i; i < numRecipients; ) { expectedTotalValue += amounts[i]; unchecked { ++i; } } if (msg.value != expectedTotalValue) { revert INVALID_DEPOSIT(); } address currentRecipient; uint256 currentAmount; for (uint256 i; i < numRecipients; ) { currentRecipient = recipients[i]; currentAmount = amounts[i]; if (currentRecipient == address(0)) { revert ADDRESS_ZERO(); } balanceOf[currentRecipient] += currentAmount; emit Deposit(msg.sender, currentRecipient, reasons[i], currentAmount, comment); unchecked { ++i; } } } /// @notice Used by Zora ERC-721 & ERC-1155 contracts to deposit protocol rewards /// @param creator Creator for NFT rewards /// @param creatorReward Creator reward amount /// @param createReferral Creator referral /// @param createReferralReward Creator referral reward /// @param mintReferral Mint referral user /// @param mintReferralReward Mint referral amount /// @param firstMinter First minter reward /// @param firstMinterReward First minter reward amount /// @param zora ZORA recipient /// @param zoraReward ZORA amount function depositRewards( address creator, uint256 creatorReward, address createReferral, uint256 createReferralReward, address mintReferral, uint256 mintReferralReward, address firstMinter, uint256 firstMinterReward, address zora, uint256 zoraReward ) external payable { if (msg.value != (creatorReward + createReferralReward + mintReferralReward + firstMinterReward + zoraReward)) { revert INVALID_DEPOSIT(); } unchecked { if (creator != address(0)) { balanceOf[creator] += creatorReward; } if (createReferral != address(0)) { balanceOf[createReferral] += createReferralReward; } if (mintReferral != address(0)) { balanceOf[mintReferral] += mintReferralReward; } if (firstMinter != address(0)) { balanceOf[firstMinter] += firstMinterReward; } if (zora != address(0)) { balanceOf[zora] += zoraReward; } } emit RewardsDeposit( creator, createReferral, mintReferral, firstMinter, zora, msg.sender, creatorReward, createReferralReward, mintReferralReward, firstMinterReward, zoraReward ); } /// @notice Withdraw protocol rewards /// @param to Withdraws from msg.sender to this address /// @param amount Amount to withdraw (0 for total balance) function withdraw(address to, uint256 amount) external { if (to == address(0)) { revert ADDRESS_ZERO(); } address owner = msg.sender; if (amount > balanceOf[owner]) { revert INVALID_WITHDRAW(); } if (amount == 0) { amount = balanceOf[owner]; } balanceOf[owner] -= amount; emit Withdraw(owner, to, amount); (bool success, ) = to.call{value: amount}(""); if (!success) { revert TRANSFER_FAILED(); } } /// @notice Withdraw rewards on behalf of an address /// @param to The address to withdraw for /// @param amount The amount to withdraw (0 for total balance) function withdrawFor(address to, uint256 amount) external { if (to == address(0)) { revert ADDRESS_ZERO(); } if (amount > balanceOf[to]) { revert INVALID_WITHDRAW(); } if (amount == 0) { amount = balanceOf[to]; } balanceOf[to] -= amount; emit Withdraw(to, to, amount); (bool success, ) = to.call{value: amount}(""); if (!success) { revert TRANSFER_FAILED(); } } /// @notice Execute a withdraw of protocol rewards via signature /// @param from Withdraw from this address /// @param to Withdraw to this address /// @param amount Amount to withdraw (0 for total balance) /// @param deadline Deadline for the signature to be valid /// @param v V component of signature /// @param r R component of signature /// @param s S component of signature function withdrawWithSig(address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external { if (block.timestamp > deadline) { revert SIGNATURE_DEADLINE_EXPIRED(); } bytes32 withdrawHash; unchecked { withdrawHash = keccak256(abi.encode(WITHDRAW_TYPEHASH, from, to, amount, nonces[from]++, deadline)); } bytes32 digest = _hashTypedDataV4(withdrawHash); address recoveredAddress = ecrecover(digest, v, r, s); if (recoveredAddress == address(0) || recoveredAddress != from) { revert INVALID_SIGNATURE(); } if (to == address(0)) { revert ADDRESS_ZERO(); } if (amount > balanceOf[from]) { revert INVALID_WITHDRAW(); } if (amount == 0) { amount = balanceOf[from]; } balanceOf[from] -= amount; emit Withdraw(from, to, amount); (bool success, ) = to.call{value: amount}(""); if (!success) { revert TRANSFER_FAILED(); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* ░░░░░░░░░░░░░░ ░░▒▒░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░░░ ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░ OURS TRULY, */ interface Enjoy { }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; import "./ECDSA.sol"; import "./IERC5267.sol"; import "./ShortStrings.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * _Available since v3.4._ * * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {EIP-5267}. * * _Available since v4.9._ */ function eip712Domain() public view virtual override returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _name.toStringWithFallback(_nameFallback), _version.toStringWithFallback(_versionFallback), block.chainid, address(this), bytes32(0), new uint256[](0) ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /// @title IProtocolRewards /// @notice The interface for deposits & withdrawals for Protocol Rewards interface IProtocolRewards { /// @notice Rewards Deposit Event /// @param creator Creator for NFT rewards /// @param createReferral Creator referral /// @param mintReferral Mint referral user /// @param firstMinter First minter reward recipient /// @param zora ZORA recipient /// @param from The caller of the deposit /// @param creatorReward Creator reward amount /// @param createReferralReward Creator referral reward /// @param mintReferralReward Mint referral amount /// @param firstMinterReward First minter reward amount /// @param zoraReward ZORA amount event RewardsDeposit( address indexed creator, address indexed createReferral, address indexed mintReferral, address firstMinter, address zora, address from, uint256 creatorReward, uint256 createReferralReward, uint256 mintReferralReward, uint256 firstMinterReward, uint256 zoraReward ); /// @notice Deposit Event /// @param from From user /// @param to To user (within contract) /// @param reason Optional bytes4 reason for indexing /// @param amount Amount of deposit /// @param comment Optional user comment event Deposit(address indexed from, address indexed to, bytes4 indexed reason, uint256 amount, string comment); /// @notice Withdraw Event /// @param from From user /// @param to To user (within contract) /// @param amount Amount of deposit event Withdraw(address indexed from, address indexed to, uint256 amount); /// @notice Cannot send to address zero error ADDRESS_ZERO(); /// @notice Function argument array length mismatch error ARRAY_LENGTH_MISMATCH(); /// @notice Invalid deposit error INVALID_DEPOSIT(); /// @notice Invalid signature for deposit error INVALID_SIGNATURE(); /// @notice Invalid withdraw error INVALID_WITHDRAW(); /// @notice Signature for withdraw is too old and has expired error SIGNATURE_DEADLINE_EXPIRED(); /// @notice Low-level ETH transfer has failed error TRANSFER_FAILED(); /// @notice Generic function to deposit ETH for a recipient, with an optional comment /// @param to Address to deposit to /// @param to Reason system reason for deposit (used for indexing) /// @param comment Optional comment as reason for deposit function deposit(address to, bytes4 why, string calldata comment) external payable; /// @notice Generic function to deposit ETH for multiple recipients, with an optional comment /// @param recipients recipients to send the amount to, array aligns with amounts /// @param amounts amounts to send to each recipient, array aligns with recipients /// @param reasons optional bytes4 hash for indexing /// @param comment Optional comment to include with mint function depositBatch(address[] calldata recipients, uint256[] calldata amounts, bytes4[] calldata reasons, string calldata comment) external payable; /// @notice Used by Zora ERC-721 & ERC-1155 contracts to deposit protocol rewards /// @param creator Creator for NFT rewards /// @param creatorReward Creator reward amount /// @param createReferral Creator referral /// @param createReferralReward Creator referral reward /// @param mintReferral Mint referral user /// @param mintReferralReward Mint referral amount /// @param firstMinter First minter reward /// @param firstMinterReward First minter reward amount /// @param zora ZORA recipient /// @param zoraReward ZORA amount function depositRewards( address creator, uint256 creatorReward, address createReferral, uint256 createReferralReward, address mintReferral, uint256 mintReferralReward, address firstMinter, uint256 firstMinterReward, address zora, uint256 zoraReward ) external payable; /// @notice Withdraw protocol rewards /// @param to Withdraws from msg.sender to this address /// @param amount amount to withdraw function withdraw(address to, uint256 amount) external; /// @notice Execute a withdraw of protocol rewards via signature /// @param from Withdraw from this address /// @param to Withdraw to this address /// @param amount Amount to withdraw /// @param deadline Deadline for the signature to be valid /// @param v V component of signature /// @param r R component of signature /// @param s S component of signature function withdrawWithSig(address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.8; import "./Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.8; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) pragma solidity ^0.8.8; import "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(_FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.8; import "./Math.sol"; import "./SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.8; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.8; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.8; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 500000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"inputs":[],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"ADDRESS_ZERO","type":"error"},{"inputs":[],"name":"ARRAY_LENGTH_MISMATCH","type":"error"},{"inputs":[],"name":"INVALID_DEPOSIT","type":"error"},{"inputs":[],"name":"INVALID_SIGNATURE","type":"error"},{"inputs":[],"name":"INVALID_WITHDRAW","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"SIGNATURE_DEADLINE_EXPIRED","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"TRANSFER_FAILED","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"bytes4","name":"reason","type":"bytes4"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"comment","type":"string"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"createReferral","type":"address"},{"indexed":true,"internalType":"address","name":"mintReferral","type":"address"},{"indexed":false,"internalType":"address","name":"firstMinter","type":"address"},{"indexed":false,"internalType":"address","name":"zora","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"creatorReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"createReferralReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintReferralReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"firstMinterReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"zoraReward","type":"uint256"}],"name":"RewardsDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"WITHDRAW_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes4","name":"reason","type":"bytes4"},{"internalType":"string","name":"comment","type":"string"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes4[]","name":"reasons","type":"bytes4[]"},{"internalType":"string","name":"comment","type":"string"}],"name":"depositBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"creatorReward","type":"uint256"},{"internalType":"address","name":"createReferral","type":"address"},{"internalType":"uint256","name":"createReferralReward","type":"uint256"},{"internalType":"address","name":"mintReferral","type":"address"},{"internalType":"uint256","name":"mintReferralReward","type":"uint256"},{"internalType":"address","name":"firstMinter","type":"address"},{"internalType":"uint256","name":"firstMinterReward","type":"uint256"},{"internalType":"address","name":"zora","type":"address"},{"internalType":"uint256","name":"zoraReward","type":"uint256"}],"name":"depositRewards","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101608060405262000011816200014e565b600f8152602081016e50726f746f636f6c5265776172647360881b8152604051916200003d836200014e565b6001835260208301603160f81b815262000057826200016a565b9261012093845262000069856200033d565b92610140938452519020938460e05251902091610100938385524660a0526040519360208501917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8352604086015260608501524660808501523060a085015260a0845260c084019380851060018060401b038611176200013857846040525190206080523060c0526114379384620004eb8539608051846110c6015260a05184611192015260c05184611097015260e051846111150152518361113b015251826108ff015251816109290152f35b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176200013857604052565b8051602091908281101562000209575090601f825111620001a857808251920151908083106200019957501790565b82600019910360031b1b161790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b828510620001ef575050604492506000838284010152601f80199101168101030190fd5b8481018201518686016044015293810193859350620001cb565b6001600160401b03811162000138576000928354926001938481811c9116801562000332575b838210146200031e57601f8111620002e8575b5081601f8411600114620002815750928293918392869462000275575b50501b916000199060031b1c191617905560ff90565b0151925038806200025f565b919083601f1981168780528488209488905b88838310620002cd5750505010620002b3575b505050811b01905560ff90565b015160001960f88460031b161c19169055388080620002a6565b85870151885590960195948501948793509081019062000293565b85805284601f848820920160051c820191601f860160051c015b8281106200031257505062000242565b87815501859062000302565b634e487b7160e01b86526022600452602486fd5b90607f16906200022f565b805160209081811015620003cb5750601f8251116200036a57808251920151908083106200019957501790565b90604051809263305a27a960e01b82528060048301528251908160248401526000935b828510620003b1575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506200038d565b9192916001600160401b038111620001385760019182548381811c91168015620004df575b82821014620004c957601f811162000490575b5080601f83116001146200044357508192939460009262000437575b5050600019600383901b1c191690821b17905560ff90565b0151905038806200041f565b90601f198316958460005282600020926000905b888210620004785750508385969710620002b357505050811b01905560ff90565b80878596829496860151815501950193019062000457565b8360005283601f83600020920160051c820191601f850160051c015b828110620004bc57505062000403565b60008155018490620004ac565b634e487b7160e01b600052602260045260246000fd5b90607f1690620003f056fe60806040908082526004918236101561001757600080fd5b60009260e0928435841c90816318160ddd14610da557508063300def9514610b5b57806370a0823114610af957806376c5d75814610aa05780637ecebe0014610a3a57806384b0196e146108c9578063c27e9794146105e4578063db518db214610509578063f3fef3a3146103ab578063f7f8266f146102835763faa3516f146100a057600080fd5b6101407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261027f576100d3610e41565b90602435936044359373ffffffffffffffffffffffffffffffffffffffff9081861680960361027b57606435608435978389168099036102775760a4359260c435978589168099036102735760e43595610104359181831680930361026f5761012435996101528b61014d8b61014d8c61014d8d8d610ec2565b610ec2565b3403610248575092610100989592818f8f8f9e9b98957f90e8cce6b15b450d1e56e9ef986d1cd376838a90944336c02886ca12b9e6ebd79e9b98169e8f80610232575b508061021c575b5080610206575b508a6101f0575b826101da575b5051988952602089015233908801526060870152608086015260a085015260c0840152820152a480f35b828152600260205220888154019055818f6101b0565b8a815260026020528181208881540190556101aa565b815260026020528181208781540190558f6101a3565b825260026020528282208781540190558f61019c565b835260026020528383208781540190558f610195565b84517f534e04af000000000000000000000000000000000000000000000000000000008152fd5b8d80fd5b8b80fd5b8980fd5b8780fd5b8380fd5b84838360607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a7576102b8610e41565b602435927fffffffff0000000000000000000000000000000000000000000000000000000084168094036103a3576044359067ffffffffffffffff821161039f5761031b73ffffffffffffffffffffffffffffffffffffffff9236908601610e13565b9290931693841561037857507f5b769452a2090142e059af5137c5b92a3e966cfb03b794cd01ac195d196c000191610372918588526002602052808820610363348254610ec2565b90555191829133953484610efe565b0390a480f35b90517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8480fd5b8280fd5b509150346103a757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a7576103e4610e41565b6024359073ffffffffffffffffffffffffffffffffffffffff811680156104e05733865260026020528386205483116104b75785838194938294938394156104a4575b338452600260205287842061043d848254610f89565b905587518381527f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb60203392a35af1610474611022565b501561047e578280f35b517f3f4ab80e000000000000000000000000000000000000000000000000000000008152fd5b3384526002602052878420549250610427565b505050517f8e0b9808000000000000000000000000000000000000000000000000000000008152fd5b505050517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b509150346103a757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a757610542610e41565b6024359073ffffffffffffffffffffffffffffffffffffffff811680156104e05780865260026020528386205483116104b75785838194938294938394156105d1575b808452600260205287842061059b848254610f89565b9055807f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb60208a51868152a35af1610474611022565b8084526002602052878420549250610585565b50913461027f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261027f5761061c610e41565b906024359073ffffffffffffffffffffffffffffffffffffffff908183169182840361027b57604435906064356084359060ff82168092036108c557839781421161089d578392918c95948b9216968787528260209760038952209182549260018401905583519289898501957f7b35c0715842c169bbf11116e8d20b2e74dacbd860d36ad5e47c3d88c15be55b87528501528a606085015287608085015260a084015260c083015260c08252810181811067ffffffffffffffff821117610871579260428c8f946080948a9783525190206106f6611080565b9151917f190100000000000000000000000000000000000000000000000000000000000083526002830152602282015220908c519182528482015260a4358c82015260c435606082015282805260015afa156108675789511683811591821561085c575b505061083457831561080c57828952600282528689205481116107e457938895919386959386958695156107d2575b7f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb90828752600281528a87206107c0878254610f89565b90558a51868152a35af1610474611022565b81865260028152898620549450610789565b8787517f8e0b9808000000000000000000000000000000000000000000000000000000008152fd5b8787517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b8787517fa3402a38000000000000000000000000000000000000000000000000000000008152fd5b14159050833861075a565b87513d8b823e3d90fd5b60248e60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8a8a517fcddf40ed000000000000000000000000000000000000000000000000000000008152fd5b8a80fd5b50919234610a3757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a37576109237f00000000000000000000000000000000000000000000000000000000000000006111b8565b9061094d7f000000000000000000000000000000000000000000000000000000000000000061132e565b928051936020938486019686881067ffffffffffffffff891117610a0b575095936109c1838293878b9996528686526109b482519a8b9a7f0f000000000000000000000000000000000000000000000000000000000000008c5280878d01528b0190610e64565b91898303908a0152610e64565b924660608801523060808801528460a088015286840360c088015251928381520193925b8281106109f457505050500390f35b8351855286955093810193928101926001016109e5565b8460416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b80fd5b848334610a9c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c578060209273ffffffffffffffffffffffffffffffffffffffff610a8c610e41565b1681526003845220549051908152f35b5080fd5b848334610a9c57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c57602090517f7b35c0715842c169bbf11116e8d20b2e74dacbd860d36ad5e47c3d88c15be55b8152f35b848334610a9c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c578060209273ffffffffffffffffffffffffffffffffffffffff610b4b610e41565b1681526002845220549051908152f35b84838360807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a75767ffffffffffffffff81358181116103a357610ba79036908401610ddd565b602493919335838111610da157610bc19036908401610ddd565b959093604435818111610d9d57610bdb9036908601610ddd565b9160643590811161027757610bf39036908701610e13565b989094818114801590610d93575b610d6b578a8b5b838a848310610d4b575050503403610d23578a5b818110610c27578b80f35b610c3281838c610f4a565b359073ffffffffffffffffffffffffffffffffffffffff8216809203610d1f57610c5d81858c610f4a565b35918015610cf757878e828152600260205220610c7b848254610ec2565b9055610c88828888610f4a565b35907fffffffff000000000000000000000000000000000000000000000000000000008216809203610cf3576001937f5b769452a2090142e059af5137c5b92a3e966cfb03b794cd01ac195d196c00018f8c610cea8d51928392339684610efe565b0390a401610c1c565b8e80fd5b8988517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b8c80fd5b8685517f534e04af000000000000000000000000000000000000000000000000000000008152fd5b92610d5d83610d649360019596610f4a565b3590610ec2565b9101610c08565b8685517f88adebd2000000000000000000000000000000000000000000000000000000008152fd5b5083811415610c01565b8880fd5b8680fd5b859034610a9c57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c57602090478152f35b9181601f84011215610e0e5782359167ffffffffffffffff8311610e0e576020808501948460051b010111610e0e57565b600080fd5b9181601f84011215610e0e5782359167ffffffffffffffff8311610e0e5760208381860195010111610e0e57565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610e0e57565b919082519283825260005b848110610eae5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610e6f565b91908201809211610ecf57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9183606094601f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0948652604060208701528160408701528686013760008582860101520116010190565b9190811015610f5a5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908203918211610ecf57565b6040810190811067ffffffffffffffff821117610fb257604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610fb257604052565b3d1561107b573d9067ffffffffffffffff8211610fb2576040519161106f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610fe1565b82523d6000602084013e565b606090565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630148061118f575b156110e8577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff821117610fb25760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000046146110bf565b60ff811461120e5760ff811690601f82116111e457604051916111da83610f96565b8252602082015290565b60046040517fb3512b0c000000000000000000000000000000000000000000000000000000008152fd5b506040516000805490600182811c90808416938415611324575b60209485841081146112f757838752869493929181156112b8575060011461125c575b505061125992500382610fe1565b90565b60008080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56395935091905b8183106112a05750506112599350820101388061124b565b85548784018501529485019486945091830191611288565b90506112599593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101388061124b565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b91607f1691611228565b60ff81146113505760ff811690601f82116111e457604051916111da83610f96565b50604051600060019081549182811c908084169384156113f7575b60209485841081146112f757838752869493929181156112b8575060011461139b57505061125992500382610fe1565b60008181527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf695935091905b8183106113df5750506112599350820101388061124b565b855487840185015294850194869450918301916113c7565b91607f169161136b56fea2646970667358221220dd9db9dffead2c147be67623cf2b22414f1301ec1fec56acd3cbf65bd45c937d64736f6c63430008110033Deployed Bytecode
0x60806040908082526004918236101561001757600080fd5b60009260e0928435841c90816318160ddd14610da557508063300def9514610b5b57806370a0823114610af957806376c5d75814610aa05780637ecebe0014610a3a57806384b0196e146108c9578063c27e9794146105e4578063db518db214610509578063f3fef3a3146103ab578063f7f8266f146102835763faa3516f146100a057600080fd5b6101407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261027f576100d3610e41565b90602435936044359373ffffffffffffffffffffffffffffffffffffffff9081861680960361027b57606435608435978389168099036102775760a4359260c435978589168099036102735760e43595610104359181831680930361026f5761012435996101528b61014d8b61014d8c61014d8d8d610ec2565b610ec2565b3403610248575092610100989592818f8f8f9e9b98957f90e8cce6b15b450d1e56e9ef986d1cd376838a90944336c02886ca12b9e6ebd79e9b98169e8f80610232575b508061021c575b5080610206575b508a6101f0575b826101da575b5051988952602089015233908801526060870152608086015260a085015260c0840152820152a480f35b828152600260205220888154019055818f6101b0565b8a815260026020528181208881540190556101aa565b815260026020528181208781540190558f6101a3565b825260026020528282208781540190558f61019c565b835260026020528383208781540190558f610195565b84517f534e04af000000000000000000000000000000000000000000000000000000008152fd5b8d80fd5b8b80fd5b8980fd5b8780fd5b8380fd5b84838360607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a7576102b8610e41565b602435927fffffffff0000000000000000000000000000000000000000000000000000000084168094036103a3576044359067ffffffffffffffff821161039f5761031b73ffffffffffffffffffffffffffffffffffffffff9236908601610e13565b9290931693841561037857507f5b769452a2090142e059af5137c5b92a3e966cfb03b794cd01ac195d196c000191610372918588526002602052808820610363348254610ec2565b90555191829133953484610efe565b0390a480f35b90517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8480fd5b8280fd5b509150346103a757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a7576103e4610e41565b6024359073ffffffffffffffffffffffffffffffffffffffff811680156104e05733865260026020528386205483116104b75785838194938294938394156104a4575b338452600260205287842061043d848254610f89565b905587518381527f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb60203392a35af1610474611022565b501561047e578280f35b517f3f4ab80e000000000000000000000000000000000000000000000000000000008152fd5b3384526002602052878420549250610427565b505050517f8e0b9808000000000000000000000000000000000000000000000000000000008152fd5b505050517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b509150346103a757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a757610542610e41565b6024359073ffffffffffffffffffffffffffffffffffffffff811680156104e05780865260026020528386205483116104b75785838194938294938394156105d1575b808452600260205287842061059b848254610f89565b9055807f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb60208a51868152a35af1610474611022565b8084526002602052878420549250610585565b50913461027f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261027f5761061c610e41565b906024359073ffffffffffffffffffffffffffffffffffffffff908183169182840361027b57604435906064356084359060ff82168092036108c557839781421161089d578392918c95948b9216968787528260209760038952209182549260018401905583519289898501957f7b35c0715842c169bbf11116e8d20b2e74dacbd860d36ad5e47c3d88c15be55b87528501528a606085015287608085015260a084015260c083015260c08252810181811067ffffffffffffffff821117610871579260428c8f946080948a9783525190206106f6611080565b9151917f190100000000000000000000000000000000000000000000000000000000000083526002830152602282015220908c519182528482015260a4358c82015260c435606082015282805260015afa156108675789511683811591821561085c575b505061083457831561080c57828952600282528689205481116107e457938895919386959386958695156107d2575b7f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb90828752600281528a87206107c0878254610f89565b90558a51868152a35af1610474611022565b81865260028152898620549450610789565b8787517f8e0b9808000000000000000000000000000000000000000000000000000000008152fd5b8787517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b8787517fa3402a38000000000000000000000000000000000000000000000000000000008152fd5b14159050833861075a565b87513d8b823e3d90fd5b60248e60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8a8a517fcddf40ed000000000000000000000000000000000000000000000000000000008152fd5b8a80fd5b50919234610a3757807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a37576109237f50726f746f636f6c52657761726473000000000000000000000000000000000f6111b8565b9061094d7f310000000000000000000000000000000000000000000000000000000000000161132e565b928051936020938486019686881067ffffffffffffffff891117610a0b575095936109c1838293878b9996528686526109b482519a8b9a7f0f000000000000000000000000000000000000000000000000000000000000008c5280878d01528b0190610e64565b91898303908a0152610e64565b924660608801523060808801528460a088015286840360c088015251928381520193925b8281106109f457505050500390f35b8351855286955093810193928101926001016109e5565b8460416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b80fd5b848334610a9c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c578060209273ffffffffffffffffffffffffffffffffffffffff610a8c610e41565b1681526003845220549051908152f35b5080fd5b848334610a9c57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c57602090517f7b35c0715842c169bbf11116e8d20b2e74dacbd860d36ad5e47c3d88c15be55b8152f35b848334610a9c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c578060209273ffffffffffffffffffffffffffffffffffffffff610b4b610e41565b1681526002845220549051908152f35b84838360807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103a75767ffffffffffffffff81358181116103a357610ba79036908401610ddd565b602493919335838111610da157610bc19036908401610ddd565b959093604435818111610d9d57610bdb9036908601610ddd565b9160643590811161027757610bf39036908701610e13565b989094818114801590610d93575b610d6b578a8b5b838a848310610d4b575050503403610d23578a5b818110610c27578b80f35b610c3281838c610f4a565b359073ffffffffffffffffffffffffffffffffffffffff8216809203610d1f57610c5d81858c610f4a565b35918015610cf757878e828152600260205220610c7b848254610ec2565b9055610c88828888610f4a565b35907fffffffff000000000000000000000000000000000000000000000000000000008216809203610cf3576001937f5b769452a2090142e059af5137c5b92a3e966cfb03b794cd01ac195d196c00018f8c610cea8d51928392339684610efe565b0390a401610c1c565b8e80fd5b8988517f66e79509000000000000000000000000000000000000000000000000000000008152fd5b8c80fd5b8685517f534e04af000000000000000000000000000000000000000000000000000000008152fd5b92610d5d83610d649360019596610f4a565b3590610ec2565b9101610c08565b8685517f88adebd2000000000000000000000000000000000000000000000000000000008152fd5b5083811415610c01565b8880fd5b8680fd5b859034610a9c57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610a9c57602090478152f35b9181601f84011215610e0e5782359167ffffffffffffffff8311610e0e576020808501948460051b010111610e0e57565b600080fd5b9181601f84011215610e0e5782359167ffffffffffffffff8311610e0e5760208381860195010111610e0e57565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610e0e57565b919082519283825260005b848110610eae5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006020809697860101520116010190565b602081830181015184830182015201610e6f565b91908201809211610ecf57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9183606094601f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0948652604060208701528160408701528686013760008582860101520116010190565b9190811015610f5a5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908203918211610ecf57565b6040810190811067ffffffffffffffff821117610fb257604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610fb257604052565b3d1561107b573d9067ffffffffffffffff8211610fb2576040519161106f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610fe1565b82523d6000602084013e565b606090565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007777777f279eba3d3ad8f4e708545291a6fdba8b1630148061118f575b156110e8577fe363eadbc3771c8bffac674dd5400d5804dabdbe8766c4c08a75ffb3ceb1da3990565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f2c4679fa3806a63bb76094fb31a249690e22248001692948fa20c105d49b623b60408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff821117610fb25760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000a46146110bf565b60ff811461120e5760ff811690601f82116111e457604051916111da83610f96565b8252602082015290565b60046040517fb3512b0c000000000000000000000000000000000000000000000000000000008152fd5b506040516000805490600182811c90808416938415611324575b60209485841081146112f757838752869493929181156112b8575060011461125c575b505061125992500382610fe1565b90565b60008080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56395935091905b8183106112a05750506112599350820101388061124b565b85548784018501529485019486945091830191611288565b90506112599593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101388061124b565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b91607f1691611228565b60ff81146113505760ff811690601f82116111e457604051916111da83610f96565b50604051600060019081549182811c908084169384156113f7575b60209485841081146112f757838752869493929181156112b8575060011461139b57505061125992500382610fe1565b60008181527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf695935091905b8183106113df5750506112599350820101388061124b565b855487840185015294850194869450918301916113c7565b91607f169161136b56fea2646970667358221220dd9db9dffead2c147be67623cf2b22414f1301ec1fec56acd3cbf65bd45c937d64736f6c63430008110033
Loading...LoadingLoading...Loading
Loading...Loading
Loading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingMultichain Portfolio | 30 Chains
Chain Token Portfolio % Price Amount Value BASE 88.18% $3,626.64 258.0592 $935,888.76 ETH 4.86% $3,627.7 14.2336 $51,635.09 OP Ether (ETH)3.22% $3,627.14 9.4084 $34,125.48 OP <0.01% $0.998564 0.55 $0.5492 BLAST 2.27% $3,630.47 6.6373 $24,096.36 ARB 1.47% $3,630.2 4.3111 $15,650.18 ARBNOVA <0.01% $3,630.18 0.0000002 $0.000726 ZKSYNC <0.01% $3,631.75 0.00000001 $0.000036 [ Download: CSV Export ][ 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.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Name Tags (up to 35 characters) can be used for easy identification of addressesPrivate Note:
A private note (up to 500 characters) can be attached to this address.
Please DO NOT store any passwords or private keys here.Compiler specific version warnings:
The compiled contract might be susceptible to VerbatimInvalidDeduplication (low-severity), FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity) Solidity Compiler Bugs.
Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Before You Copy
Transaction Private Note
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.