Overview
ETH Balance
0.597952312078275644 ETH
ETH Value
$1,570.02 (@ $2,625.67/ETH)More Info
Private Name Tags
ContractCreator
Latest 18 from a total of 18 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 15179187 | 39 hrs ago | IN | 0.7 ETH | 0.00000002 | ||||
Transfer | 14942630 | 7 days ago | IN | 0.5 ETH | 0.00000002 | ||||
Transfer | 14908299 | 7 days ago | IN | 0.2 ETH | 0.00000007 | ||||
Transfer | 14622349 | 14 days ago | IN | 1 ETH | 0.00000003 | ||||
Transfer | 14142223 | 25 days ago | IN | 1 ETH | 0.00000002 | ||||
Transfer | 13957933 | 29 days ago | IN | 0.8 ETH | 0.00000003 | ||||
Transfer | 13440695 | 41 days ago | IN | 1.5 ETH | 0.00000003 | ||||
Transfer | 13440401 | 41 days ago | IN | 0.1 ETH | 0.00000003 | ||||
Transfer | 12840756 | 55 days ago | IN | 0.1 ETH | 0.00000005 | ||||
Transfer | 11591542 | 84 days ago | IN | 1 ETH | 0.00000006 | ||||
Transfer | 9768309 | 126 days ago | IN | 0.99 ETH | 0.00000004 | ||||
Transfer | 8748949 | 150 days ago | IN | 0.99 ETH | 0.00000014 | ||||
Transfer | 8742089 | 150 days ago | IN | 0.01 ETH | 0.00000023 | ||||
Transfer | 8688196 | 151 days ago | IN | 0.005 ETH | 0.00000023 | ||||
Transfer | 8688050 | 151 days ago | IN | 0.005 ETH | 0.00000022 | ||||
Transfer | 8688017 | 151 days ago | IN | 0.005 ETH | 0.00000023 | ||||
Transfer Ownersh... | 8655985 | 152 days ago | IN | 0 ETH | 0.00000041 | ||||
Set Authorized K... | 8655977 | 152 days ago | IN | 0 ETH | 0.00000041 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
15251075 | 1 min ago | 0.000015 ETH | ||||
15251069 | 1 min ago | 0.000015 ETH | ||||
15251066 | 1 min ago | 0.000015 ETH | ||||
15251056 | 1 min ago | 0.000015 ETH | ||||
15251017 | 3 mins ago | 0.000015 ETH | ||||
15251013 | 3 mins ago | 0.000015 ETH | ||||
15250995 | 3 mins ago | 0.000015 ETH | ||||
15250992 | 4 mins ago | 0.000015 ETH | ||||
15250991 | 4 mins ago | 0.000015 ETH | ||||
15250956 | 5 mins ago | 0.000015 ETH | ||||
15250943 | 5 mins ago | 0.000015 ETH | ||||
15250901 | 7 mins ago | 0.000015 ETH | ||||
15250900 | 7 mins ago | 0.000015 ETH | ||||
15250899 | 7 mins ago | 0.000015 ETH | ||||
15250898 | 7 mins ago | 0.000015 ETH | ||||
15250897 | 7 mins ago | 0.000015 ETH | ||||
15250896 | 7 mins ago | 0.000015 ETH | ||||
15250885 | 7 mins ago | 0.000015 ETH | ||||
15250860 | 8 mins ago | 0.000015 ETH | ||||
15250838 | 9 mins ago | 0.000015 ETH | ||||
15250824 | 9 mins ago | 0.000015 ETH | ||||
15250811 | 10 mins ago | 0.000015 ETH | ||||
15250809 | 10 mins ago | 0.000015 ETH | ||||
15250777 | 11 mins ago | 0.000015 ETH | ||||
15250773 | 11 mins ago | 0.000015 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xe7B4948e...986138CD0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
CardRun
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// c=< // | // | ////\ 1@2 // @@ | /___\** @@@2 @@@@@@@@@@@@@@@@@@@@@@ // @@@ | |~L~ |* @@@@@@ @@@ @@@@@ @@@@ @@@ @@@@ @@@ @@@@@@@@ @@@@ @@@@ @@@ @@@@@@@@@ @@@@ @@@@ // @@@@@ | \=_/8 @@@@1@@ @@@ @@@@@ @@@@ @@@@ @@@ @@@@@ @@@ @@@@@@@@@ @@@@ @@@@@ @@@@ @@@@@@@@@ @@@@ @@@@ // @@@@@@| _ /| |\__ @@@@@@@@2 @@@ @@@@@ @@@@ @@@@ @@@ @@@@@@@ @@@ @@@@ @@@@ @@@@@@ @@@@ @@@ @@@@@@@ // 1@@@@@@|\ \___/) @@1@@@@@2 ~~~ ~~~~~ @@@@ ~~@@ ~~~ ~~~~~~~~~~~ ~~~~ ~~~~ ~~~~~~~~~~~ ~@@ @@@@@ // 2@@@@@ | \ \ / | @@@@@@2 @@@ @@@@@ @@@@ @@@@ @@@ @@@@@@@@@@@ @@@@@@@@@ @@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@ // 2@@@@ |_ > <|__ @@1@12 @@@ @@@@@ @@@@ @@@@ @@@ @@@@ @@@@@@ @@@@ @@@@ @@@@ @@@@@@ @@@ @@@@@@@ // @@@@ / _| / \/ \ @@1@ @@@ @@@ @@@@ @@@@ @@@ @@@@ @@@@@ @@@@ @@@@ @@@@ @@@@@ @@@@@@@@@ @@@@ @@@@ // @@ / |^\/ | | @@1 @@@ @@@@ @@@@ @@@ @@@@ @@@ @@@@ @@@@ @@@ @@@@ @@@@@@@@@ @@@@ @@@@ // / / ---- \ \\\= @@ @@@@@@@@@@@@@@@@@@@@@@ // \___/ -------- ~~ @@@ // @@ | | | | -- @@ // ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— // SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import { IEntropy } from "@pythnetwork/entropy-sdk-solidity/IEntropy.sol"; import { IEntropyConsumer } from "@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol"; import { Ownable2Step, Ownable } from "@openzeppelin/contracts/access/Ownable2Step.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import { ERC2771Context } from "src/forwarder/ERC2771Context.sol"; import { ICardRun } from "src/cardrun/ICardRun.sol"; import { Error } from "src/libraries/Error.sol"; /** * @title CardRun contract * @notice A contract that allows users to request the opening of card packs */ contract CardRun is Ownable2Step, ICardRun, IEntropyConsumer, ReentrancyGuard { IEntropy public immutable entropy; mapping(bytes32 => bool) public packsOpened; mapping(address => bool) public authorizedKeepers; mapping(uint64 => CardPackData) public entropyRequests; address public immutable entropyProvider; uint256 public constant MAX_CARDS_PER_PACK = 16; /*/////////////////////////////////////////////////////////////// CONSTRUCTOR ///////////////////////////////////////////////////////////////*/ /** * @param _owner The owner of the contract * @param _trustedForwarder The address of the trusted forwarder * @param _entropy The address of the Entropy contract * @param _entropyProvider The address of the Entropy provider */ constructor(address _owner, address _trustedForwarder, address _entropy, address _entropyProvider) Ownable(_owner) { if (_trustedForwarder == address(0)) revert Error.NullAddress(); if (_entropy == address(0)) revert Error.NullAddress(); if (_entropyProvider == address(0)) revert Error.NullAddress(); entropy = IEntropy(_entropy); entropyProvider = _entropyProvider; ERC2771Context.initialize(_trustedForwarder); } /*/////////////////////////////////////////////////////////////// VIEW FUNCTIONS ///////////////////////////////////////////////////////////////*/ /** * @notice Returns the data of a card pack request * @param _sequenceNumber The sequence number of the request * @return The CardPackData struct of the request */ function getEntropyRequest(uint64 _sequenceNumber) external view returns (CardPackData memory) { return entropyRequests[_sequenceNumber]; } /*/////////////////////////////////////////////////////////////// MUTATIVE FUNCTIONS ///////////////////////////////////////////////////////////////*/ /** * @notice Requests the opening of a card pack by calling the Entropy contract * @param _account The address of the Infinex account requesting the pack * @param _collection The collection of the pack * @param _packKey The key of the pack * @param _idempotencyKey The idempotency key of the request * @param _cardAmount The amount of cards that the pack will contain * @param _userRandomBytes The random bytes provided by the user * @return sequenceNumber The sequence number of the request given by Entropy */ function requestPackOpening( address _account, string calldata _collection, string calldata _packKey, bytes32 _idempotencyKey, uint256 _cardAmount, bytes32 _userRandomBytes ) external nonReentrant returns (uint64 sequenceNumber) { if (!authorizedKeepers[ERC2771Context._msgSender()]) revert Error.Unauthorized(); if (_account == address(0)) revert Error.NullAddress(); if (bytes(_collection).length == 0) revert Error.EmptyString(); if (bytes(_packKey).length == 0) revert Error.EmptyString(); if (_idempotencyKey == bytes32(0)) revert Error.ZeroValue(); if (_cardAmount == 0 || _cardAmount > MAX_CARDS_PER_PACK) revert WrongCardAmount(); uint128 requestFee = entropy.getFee(entropyProvider); if (address(this).balance < requestFee) revert EthBalanceTooLow(); bytes32 hashKey = keccak256(abi.encodePacked(_account, _packKey)); if (hashKey != _idempotencyKey) revert InvalidIdempotencyKey(hashKey, _idempotencyKey); if (packsOpened[hashKey]) revert PackAlreadyOpened(); // slither-disable-next-line reentrancy-benign sequenceNumber = entropy.requestWithCallback{ value: requestFee }(entropyProvider, _userRandomBytes); emit PackOpeningRequested(sequenceNumber, _account, _collection, _packKey, _idempotencyKey, _cardAmount, _userRandomBytes); uint16[MAX_CARDS_PER_PACK] memory cards; entropyRequests[sequenceNumber] = CardPackData(_account, _collection, _packKey, _idempotencyKey, _cardAmount, _userRandomBytes, bytes32(0), cards, false); } /*/////////////////////////////////////////////////////////////// ADMIN FUNCTIONS ///////////////////////////////////////////////////////////////*/ /** * @notice Sets an authorized keeper * @param _keeper The address of the keeper * @param _authorized A boolean indicating if the keeper is authorized */ function setAuthorizedKeeper(address _keeper, bool _authorized) external onlyOwner { if (_keeper == address(0)) revert Error.NullAddress(); emit KeeperAuthorizationSet(_keeper, _authorized); authorizedKeepers[_keeper] = _authorized; } /** * @notice Withdraws the ETH balance from the contract * @param _to The address to which the ETH balance will be transferred */ function withdrawEth(address _to) external onlyOwner { if (_to == address(0)) revert Error.NullAddress(); (bool success,) = _to.call{ value: address(this).balance }(""); if (!success) revert WithdrawalFailed(); } /*/////////////////////////////////////////////////////////////// ENTROPY OVERRIDE FUNCTIONS ///////////////////////////////////////////////////////////////*/ /** * @notice Callback function that is called by Entropy when the random number is generated * @param _sequenceNumber The sequence number of the request * @param _randomNumber The generated random number */ function entropyCallback(uint64 _sequenceNumber, address, bytes32 _randomNumber) internal override { _openPack(_sequenceNumber, _randomNumber); } /** * @notice Returns the address of the Entropy contract * @return The address of the Entropy contract */ function getEntropy() internal view override returns (address) { return address(entropy); } /*/////////////////////////////////////////////////////////////// INTERNAL FUNCTIONS ///////////////////////////////////////////////////////////////*/ /** * @notice Processes the random number generated by Entropy by opening a card pack * @param _sequenceNumber The sequence number of the request provided by Entropy * @param _randomNumber The generated random number provided by Entropy */ function _openPack(uint64 _sequenceNumber, bytes32 _randomNumber) internal { CardPackData storage cardPackData = entropyRequests[_sequenceNumber]; if (cardPackData.account == address(0)) revert SequenceNumberNotFound(); if (cardPackData.processed) revert EntropyRequestAlreadyProcessed(); if (packsOpened[cardPackData.idempotencyKey]) revert PackAlreadyOpened(); // Generates up to N cards (0 <= N <= 16) from a single 32-byte random number (`_randomNumber`). // Each card's value is derived from 2 bytes, giving a range of 0 to 65535 (2^16 - 1). // Since `_randomNumber` is 32 bytes, this allows us to generate up to 16 card values // (32 bytes / 2 bytes per card = 16 cards). // This method ensures that each card is created using a distinct 16-bit segment (2 bytes = 16 bits) of the original // random number. // Since the (`cards`) array has a fixed size of 16, we always generate 16 cards in a single call. for (uint8 i = 0; i < MAX_CARDS_PER_PACK; i++) { // Combine two consecutive bytes from `_randomNumber` to form a 16-bit value: // Shift the first byte 8 bits left, then combine it with the next byte using a bitwise OR. uint16 twoBytesValue = uint16(uint8(_randomNumber[i * 2])) << 8 | uint16(uint8(_randomNumber[(i * 2) + 1])); cardPackData.cards[i] = twoBytesValue; } emit PackOpened( _sequenceNumber, cardPackData.account, cardPackData.collection, cardPackData.packKey, cardPackData.idempotencyKey, cardPackData.cardAmount, _randomNumber, cardPackData.cards ); cardPackData.entropyRandomBytes = _randomNumber; cardPackData.processed = true; packsOpened[cardPackData.idempotencyKey] = true; } /*/////////////////////////////////////////////////////////////// FALLBACK FUNCTION ///////////////////////////////////////////////////////////////*/ /** * @notice Fallback function that allows the contract to receive ETH */ receive() external payable { } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {Ownable} from "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import "./EntropyStructs.sol"; interface EntropyEvents { event Registered(EntropyStructs.ProviderInfo provider); event Requested(EntropyStructs.Request request); event RequestedWithCallback( address indexed provider, address indexed requestor, uint64 indexed sequenceNumber, bytes32 userRandomNumber, EntropyStructs.Request request ); event Revealed( EntropyStructs.Request request, bytes32 userRevelation, bytes32 providerRevelation, bytes32 blockHash, bytes32 randomNumber ); event RevealedWithCallback( EntropyStructs.Request request, bytes32 userRandomNumber, bytes32 providerRevelation, bytes32 randomNumber ); event ProviderFeeUpdated(address provider, uint128 oldFee, uint128 newFee); event ProviderUriUpdated(address provider, bytes oldUri, bytes newUri); }
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; contract EntropyStructs { struct ProviderInfo { uint128 feeInWei; uint128 accruedFeesInWei; // The commitment that the provider posted to the blockchain, and the sequence number // where they committed to this. This value is not advanced after the provider commits, // and instead is stored to help providers track where they are in the hash chain. bytes32 originalCommitment; uint64 originalCommitmentSequenceNumber; // Metadata for the current commitment. Providers may optionally use this field to to help // manage rotations (i.e., to pick the sequence number from the correct hash chain). bytes commitmentMetadata; // Optional URI where clients can retrieve revelations for the provider. // Client SDKs can use this field to automatically determine how to retrieve random values for each provider. // TODO: specify the API that must be implemented at this URI bytes uri; // The first sequence number that is *not* included in the current commitment (i.e., an exclusive end index). // The contract maintains the invariant that sequenceNumber <= endSequenceNumber. // If sequenceNumber == endSequenceNumber, the provider must rotate their commitment to add additional random values. uint64 endSequenceNumber; // The sequence number that will be assigned to the next inbound user request. uint64 sequenceNumber; // The current commitment represents an index/value in the provider's hash chain. // These values are used to verify requests for future sequence numbers. Note that // currentCommitmentSequenceNumber < sequenceNumber. // // The currentCommitment advances forward through the provider's hash chain as values // are revealed on-chain. bytes32 currentCommitment; uint64 currentCommitmentSequenceNumber; } struct Request { // Storage slot 1 // address provider; uint64 sequenceNumber; // The number of hashes required to verify the provider revelation. uint32 numHashes; // Storage slot 2 // // The commitment is keccak256(userCommitment, providerCommitment). Storing the hash instead of both saves 20k gas by // eliminating 1 store. bytes32 commitment; // Storage slot 3 // // The number of the block where this request was created. // Note that we're using a uint64 such that we have an additional space for an address and other fields in // this storage slot. Although block.number returns a uint256, 64 bits should be plenty to index all of the // blocks ever generated. uint64 blockNumber; // The address that requested this random number. address requester; // If true, incorporate the blockhash of blockNumber into the generated random value. bool useBlockhash; // If true, the requester will be called back with the generated random value. bool isRequestWithCallback; // There are 2 remaining bytes of free space in this slot. } }
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; import "./EntropyEvents.sol"; interface IEntropy is EntropyEvents { // Register msg.sender as a randomness provider. The arguments are the provider's configuration parameters // and initial commitment. Re-registering the same provider rotates the provider's commitment (and updates // the feeInWei). // // chainLength is the number of values in the hash chain *including* the commitment, that is, chainLength >= 1. function register( uint128 feeInWei, bytes32 commitment, bytes calldata commitmentMetadata, uint64 chainLength, bytes calldata uri ) external; // Withdraw a portion of the accumulated fees for the provider msg.sender. // Calling this function will transfer `amount` wei to the caller (provided that they have accrued a sufficient // balance of fees in the contract). function withdraw(uint128 amount) external; // As a user, request a random number from `provider`. Prior to calling this method, the user should // generate a random number x and keep it secret. The user should then compute hash(x) and pass that // as the userCommitment argument. (You may call the constructUserCommitment method to compute the hash.) // // This method returns a sequence number. The user should pass this sequence number to // their chosen provider (the exact method for doing so will depend on the provider) to retrieve the provider's // number. The user should then call fulfillRequest to construct the final random number. // // This method will revert unless the caller provides a sufficient fee (at least getFee(provider)) as msg.value. // Note that excess value is *not* refunded to the caller. function request( address provider, bytes32 userCommitment, bool useBlockHash ) external payable returns (uint64 assignedSequenceNumber); // Request a random number. The method expects the provider address and a secret random number // in the arguments. It returns a sequence number. // // The address calling this function should be a contract that inherits from the IEntropyConsumer interface. // The `entropyCallback` method on that interface will receive a callback with the generated random number. // // This method will revert unless the caller provides a sufficient fee (at least getFee(provider)) as msg.value. // Note that excess value is *not* refunded to the caller. function requestWithCallback( address provider, bytes32 userRandomNumber ) external payable returns (uint64 assignedSequenceNumber); // Fulfill a request for a random number. This method validates the provided userRandomness and provider's proof // against the corresponding commitments in the in-flight request. If both values are validated, this function returns // the corresponding random number. // // Note that this function can only be called once per in-flight request. Calling this function deletes the stored // request information (so that the contract doesn't use a linear amount of storage in the number of requests). // If you need to use the returned random number more than once, you are responsible for storing it. function reveal( address provider, uint64 sequenceNumber, bytes32 userRevelation, bytes32 providerRevelation ) external returns (bytes32 randomNumber); // Fulfill a request for a random number. This method validates the provided userRandomness // and provider's revelation against the corresponding commitment in the in-flight request. If both values are validated // and the requestor address is a contract address, this function calls the requester's entropyCallback method with the // sequence number, provider address and the random number as arguments. Else if the requestor is an EOA, it won't call it. // // Note that this function can only be called once per in-flight request. Calling this function deletes the stored // request information (so that the contract doesn't use a linear amount of storage in the number of requests). // If you need to use the returned random number more than once, you are responsible for storing it. // // Anyone can call this method to fulfill a request, but the callback will only be made to the original requester. function revealWithCallback( address provider, uint64 sequenceNumber, bytes32 userRandomNumber, bytes32 providerRevelation ) external; function getProviderInfo( address provider ) external view returns (EntropyStructs.ProviderInfo memory info); function getDefaultProvider() external view returns (address provider); function getRequest( address provider, uint64 sequenceNumber ) external view returns (EntropyStructs.Request memory req); function getFee(address provider) external view returns (uint128 feeAmount); function getAccruedPythFees() external view returns (uint128 accruedPythFeesInWei); function setProviderFee(uint128 newFeeInWei) external; function setProviderUri(bytes calldata newUri) external; function constructUserCommitment( bytes32 userRandomness ) external pure returns (bytes32 userCommitment); function combineRandomValues( bytes32 userRandomness, bytes32 providerRandomness, bytes32 blockHash ) external pure returns (bytes32 combinedRandomness); }
// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; abstract contract IEntropyConsumer { // This method is called by Entropy to provide the random number to the consumer. // It asserts that the msg.sender is the Entropy contract. It is not meant to be // override by the consumer. function _entropyCallback( uint64 sequence, address provider, bytes32 randomNumber ) external { address entropy = getEntropy(); require(entropy != address(0), "Entropy address not set"); require(msg.sender == entropy, "Only Entropy can call this function"); entropyCallback(sequence, provider, randomNumber); } // getEntropy returns Entropy contract address. The method is being used to check that the // callback is indeed from Entropy contract. The consumer is expected to implement this method. // Entropy address can be found here - https://docs.pyth.network/entropy/contract-addresses function getEntropy() internal view virtual returns (address); // This method is expected to be implemented by the consumer to handle the random number. // It will be called by _entropyCallback after _entropyCallback ensures that the call is // indeed from Entropy contract. function entropyCallback( uint64 sequence, address provider, bytes32 randomNumber ) internal virtual; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; /** * @title Initializable module */ library Initializable { // ------- Storage ------- struct InitializableStorageData { bool initialized; } error AlreadyInitialized(); error NotInitialized(); /** * @dev Returns the account stored at the specified account id. */ function getStorage() internal pure returns (InitializableStorageData storage data) { bytes32 slot = keccak256(abi.encode("io.infinex.InitializableStorage")); // solhint-disable-next-line no-inline-assembly assembly { data.slot := slot } } // ------- Implementation ------- function initialize() internal { InitializableStorageData storage data = getStorage(); // Note: We don't use onlyUninitialized here to save gas by preventing a double call to load(). if (data.initialized) revert AlreadyInitialized(); data.initialized = true; } modifier onlyInitialized() { if (!getStorage().initialized) revert NotInitialized(); _; } modifier onlyUninitialized() { if (getStorage().initialized) revert AlreadyInitialized(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; interface ICardRun { /*/////////////////////////////////////////////////////////////// STRUCTS ///////////////////////////////////////////////////////////////*/ struct CardPackData { address account; string collection; string packKey; bytes32 idempotencyKey; uint256 cardAmount; bytes32 userRandomBytes; bytes32 entropyRandomBytes; uint16[16] cards; bool processed; } /*/////////////////////////////////////////////////////////////// EVENTS ///////////////////////////////////////////////////////////////*/ event PackOpeningRequested( uint64 indexed sequenceNumber, address indexed account, string indexed collection, string packKey, bytes32 idempotencyKey, uint256 cardAmount, bytes32 userRandomBytes ); event PackOpened( uint64 indexed sequenceNumber, address indexed account, string indexed collection, string packKey, bytes32 idempotencyKey, uint256 cardAmount, bytes32 entropyRandomBytes, uint16[16] cards ); event KeeperAuthorizationSet(address indexed keeper, bool authorized); /*/////////////////////////////////////////////////////////////// ERRORS ///////////////////////////////////////////////////////////////*/ error WrongCardAmount(); error PackAlreadyOpened(); error EthBalanceTooLow(); error WithdrawalFailed(); error InvalidIdempotencyKey(bytes32 key1, bytes32 key2); error SequenceNumberNotFound(); error EntropyRequestAlreadyProcessed(); /*/////////////////////////////////////////////////////////////// EXTERNAL FUNCTIONS ///////////////////////////////////////////////////////////////*/ /** * @notice Returns the data of a card pack request * @param _sequenceNumber The sequence number of the request * @return The CardPackData struct of the request */ function getEntropyRequest(uint64 _sequenceNumber) external view returns (CardPackData memory); /** * @notice Requests the opening of a card pack by calling the Entropy contract * @param _account The address of the Infinex account requesting the pack * @param _collection The collection of the pack * @param _packKey The key of the pack * @param _idempotencyKey The idempotency key of the request * @param _cardAmount The amount of cards that the pack will contain * @param _userRandomBytes The random bytes provided by the user * @return sequenceNumber The sequence number of the request given by Entropy */ function requestPackOpening( address _account, string calldata _collection, string calldata _packKey, bytes32 _idempotencyKey, uint256 _cardAmount, bytes32 _userRandomBytes ) external returns (uint64 sequenceNumber); /** * @notice Sets an authorized keeper * @param _keeper The address of the keeper * @param _authorized A boolean indicating if the keeper is authorized */ function setAuthorizedKeeper(address _keeper, bool _authorized) external; /** * @notice Withdraws the ETH balance from the contract * @param _to The address to which the ETH balance will be transferred */ function withdrawEth(address _to) external; /** * @notice Fallback function that allows the contract to receive ETH */ receive() external payable; }
// SPDX-License-Identifier: MIT // Originally sourced from OpenZeppelin Contracts (last updated v4.9.3) (metatx/ERC2771Context.sol) pragma solidity ^0.8.21; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { Initializable } from "src/Initializable.sol"; import { Error } from "src/libraries/Error.sol"; /** * @dev Context variant with ERC2771 support. */ library ERC2771Context { event TrustedForwarderAdded(address forwarder); event TrustedForwarderRemoved(address forwarder); struct Data { EnumerableSet.AddressSet trustedForwarders; } function getStorage() internal pure returns (Data storage data) { bytes32 slot = keccak256(abi.encode("io.infinex.ERC2771Context")); assembly { data.slot := slot } } function initialize(address initialTrustedForwarder) internal { Initializable.initialize(); EnumerableSet.add(getStorage().trustedForwarders, initialTrustedForwarder); } function isTrustedForwarder(address forwarder) internal view returns (bool) { return EnumerableSet.contains(getStorage().trustedForwarders, forwarder); } function trustedForwarder() internal view returns (address[] memory) { return EnumerableSet.values(getStorage().trustedForwarders); } function _addTrustedForwarder(address forwarder) internal returns (bool) { if (EnumerableSet.add(getStorage().trustedForwarders, forwarder)) { emit TrustedForwarderAdded(forwarder); return true; } else { revert Error.AlreadyExists(); } } function _removeTrustedForwarder(address forwarder) internal returns (bool) { if (EnumerableSet.remove(getStorage().trustedForwarders, forwarder)) { emit TrustedForwarderRemoved(forwarder); return true; } else { revert Error.DoesNotExist(); } } function _msgSender() internal view returns (address) { uint256 calldataLength = msg.data.length; uint256 contextSuffixLength = _contextSuffixLength(); if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); } else { return msg.sender; } } // slither-disable-start dead-code function _msgData() internal view returns (bytes calldata) { uint256 calldataLength = msg.data.length; uint256 contextSuffixLength = _contextSuffixLength(); if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { return msg.data[:calldataLength - contextSuffixLength]; } else { return msg.data; } } /** * @dev ERC-2771 specifies the context as being a single address (20 bytes). */ function _contextSuffixLength() internal pure returns (uint256) { return 20; } // slither-disable-end dead-code }
// c=< // | // | ////\ 1@2 // @@ | /___\** @@@2 @@@@@@@@@@@@@@@@@@@@@@ // @@@ | |~L~ |* @@@@@@ @@@ @@@@@ @@@@ @@@ @@@@ @@@ @@@@@@@@ @@@@ @@@@ @@@ @@@@@@@@@ @@@@ @@@@ // @@@@@ | \=_/8 @@@@1@@ @@@ @@@@@ @@@@ @@@@ @@@ @@@@@ @@@ @@@@@@@@@ @@@@ @@@@@ @@@@ @@@@@@@@@ @@@@ @@@@ // @@@@@@| _ /| |\__ @@@@@@@@2 @@@ @@@@@ @@@@ @@@@ @@@ @@@@@@@ @@@ @@@@ @@@@ @@@@@@ @@@@ @@@ @@@@@@@ // 1@@@@@@|\ \___/) @@1@@@@@2 ~~~ ~~~~~ @@@@ ~~@@ ~~~ ~~~~~~~~~~~ ~~~~ ~~~~ ~~~~~~~~~~~ ~@@ @@@@@ // 2@@@@@ | \ \ / | @@@@@@2 @@@ @@@@@ @@@@ @@@@ @@@ @@@@@@@@@@@ @@@@@@@@@ @@@@ @@@@@@@@@@@ @@@@@@@@@ @@@@@ // 2@@@@ |_ > <|__ @@1@12 @@@ @@@@@ @@@@ @@@@ @@@ @@@@ @@@@@@ @@@@ @@@@ @@@@ @@@@@@ @@@ @@@@@@@ // @@@@ / _| / \/ \ @@1@ @@@ @@@ @@@@ @@@@ @@@ @@@@ @@@@@ @@@@ @@@@ @@@@ @@@@@ @@@@@@@@@ @@@@ @@@@ // @@ / |^\/ | | @@1 @@@ @@@@ @@@@ @@@ @@@@ @@@ @@@@ @@@@ @@@ @@@@ @@@@@@@@@ @@@@ @@@@ // / / ---- \ \\\= @@ @@@@@@@@@@@@@@@@@@@@@@ // \___/ -------- ~~ @@@ // @@ | | | | -- @@ // ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— // SPDX-License-Identifier: MIT pragma solidity ^0.8.21; library Error { /*/////////////////////////////////////////////////////////////// GENERIC ///////////////////////////////////////////////////////////////*/ error AlreadyExists(); error DoesNotExist(); error Unauthorized(); error InvalidLength(); error NotOwner(); error InvalidCallerContext(); error InvalidChainId(); /*/////////////////////////////////////////////////////////////// ADDRESS ///////////////////////////////////////////////////////////////*/ error ImplementationMismatch(address implementation, address latestImplementation); error InvalidWithdrawalAddress(address to); error NullAddress(); error SameAddress(); error InvalidSolanaAddress(); error AddressAlreadySet(); error InsufficientAllowlistDelay(); /*/////////////////////////////////////////////////////////////// AMOUNT / BALANCE ///////////////////////////////////////////////////////////////*/ error InsufficientBalance(); error InsufficientWithdrawalAmount(uint256 amount); error InsufficientBalanceForFee(uint256 balance, uint256 fee); error InvalidNonce(bytes32 nonce); error ZeroValue(); error EmptyString(); error AmountDeltaZeroValue(); error DecimalsMoreThan18(uint256 decimals); error BridgeMaxAmountExceeded(); error ETHTransferFailed(); error OutOfBounds(); /*/////////////////////////////////////////////////////////////// ACCOUNT ///////////////////////////////////////////////////////////////*/ error CreateAccountDisabled(); error InvalidKeysForSalt(); error PredictAddressDisabled(); error FundsRecoveryActivationDeadlinePending(); error InvalidAppAccount(); error InvalidAppBeacon(); /*/////////////////////////////////////////////////////////////// KEY MANAGEMENT ///////////////////////////////////////////////////////////////*/ error InvalidRequest(); error InvalidKeySignature(address from); error KeyAlreadyInvalid(); error KeyAlreadyValid(); error KeyNotFound(); error CannotRemoveLastKey(); /*/////////////////////////////////////////////////////////////// BRIDGING ///////////////////////////////////////////////////////////////*/ error InvalidCCTPDomain(); error InvalidWormholeChainId(); /*/////////////////////////////////////////////////////////////// WORMHOLE ///////////////////////////////////////////////////////////////*/ error UnexpectedResultLength(); error InvalidBlockFinality(); /*/////////////////////////////////////////////////////////////// GAS FEE REBATE ///////////////////////////////////////////////////////////////*/ error InvalidDeductGasFunction(bytes4 sig); /*/////////////////////////////////////////////////////////////// FEATURE FLAGS ///////////////////////////////////////////////////////////////*/ error FundsRecoveryNotActive(); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "remappings": [ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@pythnetwork/entropy-sdk-solidity/=node_modules/@pythnetwork/entropy-sdk-solidity/", "@synthetixio/core-contracts/=node_modules/@synthetixio/core-contracts/", "@synthetixio/core-modules/=node_modules/@synthetixio/core-modules/", "@synthetixio/main/=node_modules/@synthetixio/main/", "@synthetixio/oracle-manager/=node_modules/@synthetixio/oracle-manager/", "@synthetixio/perps-market/=node_modules/@synthetixio/perps-market/", "@synthetixio/spot-market/=node_modules/@synthetixio/spot-market/", "cannon-std/=lib/cannon-std/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "src/=src/", "test/=test/", "wormhole-circle-integration/=lib/wormhole-circle-integration/evm/src/", "wormhole-solidity-sdk/=lib/wormhole-solidity-sdk/src/", "wormhole/=lib/wormhole-circle-integration/evm/src/" ], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_trustedForwarder","type":"address"},{"internalType":"address","name":"_entropy","type":"address"},{"internalType":"address","name":"_entropyProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"EmptyString","type":"error"},{"inputs":[],"name":"EntropyRequestAlreadyProcessed","type":"error"},{"inputs":[],"name":"EthBalanceTooLow","type":"error"},{"inputs":[{"internalType":"bytes32","name":"key1","type":"bytes32"},{"internalType":"bytes32","name":"key2","type":"bytes32"}],"name":"InvalidIdempotencyKey","type":"error"},{"inputs":[],"name":"NullAddress","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PackAlreadyOpened","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SequenceNumberNotFound","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"WithdrawalFailed","type":"error"},{"inputs":[],"name":"WrongCardAmount","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"keeper","type":"address"},{"indexed":false,"internalType":"bool","name":"authorized","type":"bool"}],"name":"KeeperAuthorizationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"sequenceNumber","type":"uint64"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"string","name":"collection","type":"string"},{"indexed":false,"internalType":"string","name":"packKey","type":"string"},{"indexed":false,"internalType":"bytes32","name":"idempotencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"cardAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"entropyRandomBytes","type":"bytes32"},{"indexed":false,"internalType":"uint16[16]","name":"cards","type":"uint16[16]"}],"name":"PackOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"sequenceNumber","type":"uint64"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"string","name":"collection","type":"string"},{"indexed":false,"internalType":"string","name":"packKey","type":"string"},{"indexed":false,"internalType":"bytes32","name":"idempotencyKey","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"cardAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"userRandomBytes","type":"bytes32"}],"name":"PackOpeningRequested","type":"event"},{"inputs":[],"name":"MAX_CARDS_PER_PACK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"sequence","type":"uint64"},{"internalType":"address","name":"provider","type":"address"},{"internalType":"bytes32","name":"randomNumber","type":"bytes32"}],"name":"_entropyCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedKeepers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entropy","outputs":[{"internalType":"contract IEntropy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entropyProvider","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"","type":"uint64"}],"name":"entropyRequests","outputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"string","name":"collection","type":"string"},{"internalType":"string","name":"packKey","type":"string"},{"internalType":"bytes32","name":"idempotencyKey","type":"bytes32"},{"internalType":"uint256","name":"cardAmount","type":"uint256"},{"internalType":"bytes32","name":"userRandomBytes","type":"bytes32"},{"internalType":"bytes32","name":"entropyRandomBytes","type":"bytes32"},{"internalType":"bool","name":"processed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_sequenceNumber","type":"uint64"}],"name":"getEntropyRequest","outputs":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"string","name":"collection","type":"string"},{"internalType":"string","name":"packKey","type":"string"},{"internalType":"bytes32","name":"idempotencyKey","type":"bytes32"},{"internalType":"uint256","name":"cardAmount","type":"uint256"},{"internalType":"bytes32","name":"userRandomBytes","type":"bytes32"},{"internalType":"bytes32","name":"entropyRandomBytes","type":"bytes32"},{"internalType":"uint16[16]","name":"cards","type":"uint16[16]"},{"internalType":"bool","name":"processed","type":"bool"}],"internalType":"struct ICardRun.CardPackData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"packsOpened","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"string","name":"_collection","type":"string"},{"internalType":"string","name":"_packKey","type":"string"},{"internalType":"bytes32","name":"_idempotencyKey","type":"bytes32"},{"internalType":"uint256","name":"_cardAmount","type":"uint256"},{"internalType":"bytes32","name":"_userRandomBytes","type":"bytes32"}],"name":"requestPackOpening","outputs":[{"internalType":"uint64","name":"sequenceNumber","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"bool","name":"_authorized","type":"bool"}],"name":"setAuthorizedKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106100f75760003560e01c80637b7f8ec51161008a578063cbf6fc6811610059578063cbf6fc68146102fd578063dd2f1a231461032a578063e30c397814610363578063f2fde38b1461038157600080fd5b80637b7f8ec51461024c578063879e64341461028c5780638da5cb5b146102af578063c56f264d146102cd57600080fd5b806352a5f1f8116100c657806352a5f1f8146101ce5780635bf414ac146101ee578063715018a61461022257806379ba50971461023757600080fd5b8063028ca3a414610103578063231640aa1461012557806325e160631461016257806347ce07cc1461018257600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5061012361011e366004611439565b6103a1565b005b34801561013157600080fd5b5061014561014036600461148b565b610440565b6040516101599897969594939291906114ee565b60405180910390f35b34801561016e57600080fd5b5061012361017d366004611555565b61059f565b34801561018e57600080fd5b506101b67f0000000000000000000000005744cbf430d99456a0a8771208b674f27f8ef0fb81565b6040516001600160a01b039091168152602001610159565b3480156101da57600080fd5b506101236101e9366004611570565b610646565b3480156101fa57600080fd5b506101b67f00000000000000000000000052deaa1c84233f7bb8c8a45baede41091c61650681565b34801561022e57600080fd5b50610123610737565b34801561024357600080fd5b5061012361074b565b34801561025857600080fd5b5061027c6102673660046115ae565b60036020526000908152604090205460ff1681565b6040519015158152602001610159565b34801561029857600080fd5b506102a1601081565b604051908152602001610159565b3480156102bb57600080fd5b506000546001600160a01b03166101b6565b3480156102d957600080fd5b5061027c6102e8366004611555565b60046020526000908152604090205460ff1681565b34801561030957600080fd5b5061031d61031836600461148b565b61078f565b60405161015991906115ee565b34801561033657600080fd5b5061034a6103453660046116dd565b610994565b60405167ffffffffffffffff9091168152602001610159565b34801561036f57600080fd5b506001546001600160a01b03166101b6565b34801561038d57600080fd5b5061012361039c366004611555565b610eb5565b6103a9610f26565b6001600160a01b0382166103d05760405163e99d5ac560e01b815260040160405180910390fd5b816001600160a01b03167fa6a88fae21ea0297e57b6ccb5f53877db2a62edf44b9eaf29e5e59a8d2cdeb438260405161040d911515815260200190565b60405180910390a26001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600560205260009081526040902080546001820180546001600160a01b03909216929161046c90611775565b80601f016020809104026020016040519081016040528092919081815260200182805461049890611775565b80156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050908060020180546104fa90611775565b80601f016020809104026020016040519081016040528092919081815260200182805461052690611775565b80156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b505050600384015460048501546005860154600687015460089097015495969295919450925060ff1688565b6105a7610f26565b6001600160a01b0381166105ce5760405163e99d5ac560e01b815260040160405180910390fd5b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461061b576040519150601f19603f3d011682016040523d82523d6000602084013e610620565b606091505b5050905080610642576040516327fcd9d160e01b815260040160405180910390fd5b5050565b7f0000000000000000000000005744cbf430d99456a0a8771208b674f27f8ef0fb6001600160a01b0381166106c25760405162461bcd60e51b815260206004820152601760248201527f456e74726f70792061646472657373206e6f742073657400000000000000000060448201526064015b60405180910390fd5b336001600160a01b038216146107265760405162461bcd60e51b815260206004820152602360248201527f4f6e6c7920456e74726f70792063616e2063616c6c20746869732066756e637460448201526234b7b760e91b60648201526084016106b9565b610731848484610f53565b50505050565b61073f610f26565b6107496000610f62565b565b60015433906001600160a01b031681146107835760405163118cdaa760e01b81526001600160a01b03821660048201526024016106b9565b61078c81610f62565b50565b6107976112ff565b67ffffffffffffffff82166000908152600560209081526040918290208251610120810190935280546001600160a01b0316835260018101805491928401916107df90611775565b80601f016020809104026020016040519081016040528092919081815260200182805461080b90611775565b80156108585780601f1061082d57610100808354040283529160200191610858565b820191906000526020600020905b81548152906001019060200180831161083b57829003601f168201915b5050505050815260200160028201805461087190611775565b80601f016020809104026020016040519081016040528092919081815260200182805461089d90611775565b80156108ea5780601f106108bf576101008083540402835291602001916108ea565b820191906000526020600020905b8154815290600101906020018083116108cd57829003601f168201915b50505091835250506003820154602082015260048201546040808301919091526005830154606083015260068301546080830152805161020081019182905260a090920191906007840190601090826000855b82829054906101000a900461ffff1661ffff168152602001906002019060208260010104928301926001038202915080841161093d575050509284525050506008919091015460ff16151560209091015292915050565b600061099e610f7b565b600460006109aa610fa3565b6001600160a01b0316815260208101919091526040016000205460ff166109e3576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038916610a0a5760405163e99d5ac560e01b815260040160405180910390fd5b6000879003610a2c5760405163ecd7b0d160e01b815260040160405180910390fd5b6000859003610a4e5760405163ecd7b0d160e01b815260040160405180910390fd5b83610a6c57604051637c946ed760e01b815260040160405180910390fd5b821580610a795750601083115b15610a975760405163022a353760e41b815260040160405180910390fd5b604051631711922960e31b81526001600160a01b037f00000000000000000000000052deaa1c84233f7bb8c8a45baede41091c616506811660048301526000917f0000000000000000000000005744cbf430d99456a0a8771208b674f27f8ef0fb9091169063b88c914890602401602060405180830381865afa158015610b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4691906117af565b9050806001600160801b0316471015610b7257604051630dc5bc2f60e01b815260040160405180910390fd5b60008a8888604051602001610b89939291906117d8565b604051602081830303815290604052805190602001209050858114610bcb57604051630ac63ff960e31b815260048101829052602481018790526044016106b9565b60008181526003602052604090205460ff1615610bfb5760405163d7747b5960e01b815260040160405180910390fd5b6040516319cb825f60e01b81526001600160a01b037f00000000000000000000000052deaa1c84233f7bb8c8a45baede41091c61650681166004830152602482018690527f0000000000000000000000005744cbf430d99456a0a8771208b674f27f8ef0fb16906319cb825f906001600160801b0385169060440160206040518083038185885af1158015610c94573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cb99190611804565b92508989604051610ccb929190611821565b60405180910390208b6001600160a01b03168467ffffffffffffffff167ea25a3573387df432092297ef1431a1b494702432a3efa50c1561ccf4d3079a8b8b8b8b8b604051610d1e959493929190611831565b60405180910390a4610d2e611353565b6040518061012001604052808d6001600160a01b031681526020018c8c8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8d018190048102820181019092528b815291810191908c908c9081908401838280828437600092018290525093855250505060208083018b905260408084018b9052606084018a90526080840183905260a0840186905260c090930182905267ffffffffffffffff8816825260058152919020825181546001600160a01b0319166001600160a01b03909116178155908201516001820190610e2c90826118dc565b5060408201516002820190610e4190826118dc565b50606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151610e7f9060078301906010611372565b5061010091909101516008909101805460ff191691151591909117905550610ea99150610ff59050565b98975050505050505050565b610ebd610f26565b600180546001600160a01b0383166001600160a01b03199091168117909155610eee6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146107495760405163118cdaa760e01b81523360048201526024016106b9565b610f5d8382610ffc565b505050565b600180546001600160a01b031916905561078c8161120f565b6002805403610f9d57604051633ee5aeb560e01b815260040160405180910390fd5b60028055565b6000366014610fb13361125f565b8015610fbd5750808210155b15610fed57600036610fcf83856119b2565b610fda9282906119c5565b610fe3916119ef565b60601c9250505090565b339250505090565b6001600255565b67ffffffffffffffff8216600090815260056020526040902080546001600160a01b031661103d576040516364aaaded60e01b815260040160405180910390fd5b600881015460ff161561106357604051631b624ab360e21b815260040160405180910390fd5b6003818101546000908152602091909152604090205460ff161561109a5760405163d7747b5960e01b815260040160405180910390fd5b60005b60108160ff161015611153576000836110b7836002611a24565b6110c2906001611a47565b60ff16602081106110d5576110d5611a60565b1a6008856110e4856002611a24565b60ff16602081106110f7576110f7611a60565b1a61ffff16901b179050806007840160ff84166010811061111a5761111a611a60565b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555050808061114b90611a76565b91505061109d565b50806001016040516111659190611a95565b60405190819003812082546003840154600485015492936001600160a01b039092169267ffffffffffffffff8816927f7476c4ff8fc9e3e495e1efeb8bd96b06bda7e74091f6a56b52d0c0b8ed6864bf926111cb9260028901928a9060078b0190611c67565b60405180910390a46006810191909155600881018054600160ff19918216811790925560039283015460009081526020939093526040909220805490921617905550565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061127261126c611278565b836112da565b92915050565b6000806040516020016112bc9060208082526019908201527f696f2e696e66696e65782e45524332373731436f6e7465787400000000000000604082015260600190565b60408051601f19818403018152919052805160209091012092915050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b604080516101208101825260008082526060602083018190529282018390529181018290526080810182905260a0810182905260c081019190915260e08101611346611353565b8152600060209091015290565b6040518061020001604052806010906020820280368337509192915050565b6001830191839082156113f85791602002820160005b838211156113c857835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302611388565b80156113f65782816101000a81549061ffff02191690556002016020816001010492830192600103026113c8565b505b50611404929150611408565b5090565b5b808211156114045760008155600101611409565b80356001600160a01b038116811461143457600080fd5b919050565b6000806040838503121561144c57600080fd5b6114558361141d565b91506020830135801515811461146a57600080fd5b809150509250929050565b67ffffffffffffffff8116811461078c57600080fd5b60006020828403121561149d57600080fd5b81356112f881611475565b6000815180845260005b818110156114ce576020818501810151868301820152016114b2565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0389168152610100602082018190526000906115138382018b6114a8565b90508281036040840152611527818a6114a8565b60608401989098525050608081019490945260a084019290925260c0830152151560e0909101529392505050565b60006020828403121561156757600080fd5b6112f88261141d565b60008060006060848603121561158557600080fd5b833561159081611475565b925061159e6020850161141d565b9150604084013590509250925092565b6000602082840312156115c057600080fd5b5035919050565b8060005b601081101561073157815161ffff168452602093840193909101906001016115cb565b602081526116086020820183516001600160a01b03169052565b600060208301516103008060408501526116266103208501836114a8565b91506040850151601f1985840301606086015261164383826114a8565b92505060608501516080850152608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100611682818701836115c7565b90950151151593019290925250919050565b60008083601f8401126116a657600080fd5b50813567ffffffffffffffff8111156116be57600080fd5b6020830191508360208285010111156116d657600080fd5b9250929050565b60008060008060008060008060c0898b0312156116f957600080fd5b6117028961141d565b9750602089013567ffffffffffffffff8082111561171f57600080fd5b61172b8c838d01611694565b909950975060408b013591508082111561174457600080fd5b506117518b828c01611694565b999c989b5096999698976060880135976080810135975060a0013595509350505050565b600181811c9082168061178957607f821691505b6020821081036117a957634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156117c157600080fd5b81516001600160801b03811681146112f857600080fd5b6bffffffffffffffffffffffff198460601b168152818360148301376000910160140190815292915050565b60006020828403121561181657600080fd5b81516112f881611475565b8183823760009101908152919050565b60808152846080820152848660a0830137600060a08683010152600060a0601f19601f88011683010190508460208301528360408301528260608301529695505050505050565b634e487b7160e01b600052604160045260246000fd5b601f821115610f5d57600081815260208120601f850160051c810160208610156118b55750805b601f850160051c820191505b818110156118d4578281556001016118c1565b505050505050565b815167ffffffffffffffff8111156118f6576118f6611878565b61190a816119048454611775565b8461188e565b602080601f83116001811461193f57600084156119275750858301515b600019600386901b1c1916600185901b1785556118d4565b600085815260208120601f198616915b8281101561196e5788860151825594840194600190910190840161194f565b508582101561198c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b818103818111156112725761127261199c565b600080858511156119d557600080fd5b838611156119e257600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015611a1c5780818660140360031b1b83161692505b505092915050565b60ff8181168382160290811690818114611a4057611a4061199c565b5092915050565b60ff81811683821601908111156112725761127261199c565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff8103611a8c57611a8c61199c565b60010192915050565b6000808354611aa381611775565b60018281168015611abb5760018114611ad057611aff565b60ff1984168752821515830287019450611aff565b8760005260208060002060005b85811015611af65781548a820152908401908201611add565b50505082870194505b50929695505050505050565b8060005b601080600f830110611b215750610731565b825461ffff80821687526020611b408189018385871c1661ffff169052565b60409350611b578489018385841c1661ffff169052565b506060611b6e818901838560301c1661ffff169052565b6080611b83818a018486881c1661ffff169052565b60a09450611b9b858a01848660501c1661ffff169052565b60c0611bb0818b018587861c1661ffff169052565b60e09250611bc8838b01858760701c1661ffff169052565b61ffff85831c8516166101008b0152611bed6101208b01858760901c1661ffff169052565b61ffff85871c8516166101408b0152611c126101608b01858760b01c1661ffff169052565b61ffff85821c8516166101808b01525050611c396101a08901838560d01c1661ffff169052565b82901c1661ffff166101c087015260f01c6101e0860152506102009093019260019190910190601001611b0f565b600061028080835260008854611c7c81611775565b9285018390526102a09260018281168015611c9e5760018114611cb857611ce9565b60ff1984168887015282151560051b880186019450611ce9565b8c60005260208060002060005b85811015611ce05781548b82018a0152908401908201611cc5565b8a018801965050505b505050508092505050856020830152846040830152836060830152611d116080830184611b0b565b969550505050505056fea264697066735822122009ff71650956458ebf27e19f1f897c85efadbc2f650cf877613962944c31443a64736f6c63430008150033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BLAST | 100.00% | $2,625.67 | 0.598 | $1,570.02 |
[ 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.